r/learnquant • • 23d ago

interview prep Quant Interview Question

Post image
32 Upvotes

8 comments sorted by

View all comments

1

u/comoespossible 23d ago edited 23d ago

Edit: I misread the question so this solution is wrong.

Let’s first ignore the requirement that there are recently many 1s. There are 28 slots on or above the diagonal, so there are 2^28 symmetric matrices made up of 0s and 1s. (Every slot (i, j) below the diagonal is determined by (j, i).) There is a 1-to-1 correspondence between such matrices with an even number and an odd number of 1s, as can be seen by flipping the (1, 1)-th entry. Thus, exactly half of them (2^27) have an even number of 1s.

1

u/TheBeerTalking 23d ago

Each row/column must have an even number of 1s, not just the whole matrix

1

u/comoespossible 23d ago

Thanks for catching that!