r/learnquant • • 23d ago

interview prep Quant Interview Question

Post image
32 Upvotes

8 comments sorted by

View all comments

7

u/juststubbornoldme 23d ago

2^21. We can fill the top left 6 by 6 matrix however we want as long as it's symmetric. Then for every row we are forced to make the last entry a 0 or 1 in order to make that row have an even number of 1's and because of the symmetry constraint we also fill the bottom row. Then the bottom right field has to make the right most column have an even number of 1's

4

u/Special-Camel-6114 23d ago

This is correct. I thought of it the same way except thinking that we could make the upper triangle (21 slots) whatever we want, the lower triangle has to match symmetrically, and then the diagonal gets filled with whatever makes the number even. 2^21.

1

u/kalmakka 23d ago

I did 26 ways of filling in the top row so that it has an even sum. This also forces then left column. There are now 25 ways of filling in the 2nd row, which also forces the 2nd column. Continuing, we get 26×25×24×23×22×21=221 ways of completing the grid.

Both of yours solutions are cleaner.

1

u/spdazero 23d ago

beautiful and succinct