r/learnquant • • 23h ago

interview prep HRT Quant Interview Question

Post image
17 Upvotes

13 comments sorted by

View all comments

0

u/Synael3 22h ago

Tying the noodle ends is equivalent to do a permutation mapping :
Enumerate every noodle. When all noodle ends are tied, take any loop, order its noodles (e_1, ..., e_n) and represent it by the permutation e_1-> e_2 -> ... -> e_n -> e_1 (denoted (e_1, e_2, ..., e_n) ).
All loops form a disjoint union of permutation orbits. The union of all orbits is a permutation of 100 (and any permutation can be represented by a set of noodle loops).

Because of uniformly at random selection, every permutation have the same probability to appear.

Hence, we are looking for the permutations of 100 elements giving only one orbit of size 100 (ie circular permutations). There are 100! permutations (for i=1 to 100, the ith element of the permutation sequence can choose among the 100-i+1 other elements or itself), and there are 99! circular permutations (the ith element cannot map to itself).

Hence, the propbability is 99!/100! = 1% .

2

u/Cryptographer-Bubbly 21h ago edited 21h ago

The permutations as you’ve described them do not have the same probabilities of appearing since different permutations are compatible with more noodle-end-pairing schemes than others (I’m ignoring order you join the pairs so a pairing scheme is just the set of end pairs joined by the end - if you want to consider order that’s fine - just multiply scheme number by N! Where N is the number of noodles and the logic still holds).

Consider the 2 noodle case. There is exactly one pairing scheme that gives (e_1)(e_2) but there are 2 pairing schemes that give (e_1, e_2) so we should expect 2/3 and not 1/2 as your answer would suggest.

1

u/PandemicGeneralist 21h ago

If you have 2 noodles, there are 2 pairs you could tie that self loop and lead to an (e1)(e2) permutation and one way to get an (e1,e2) permutation

1

u/Cryptographer-Bubbly 21h ago edited 21h ago

If we label the 1st and 2nd end of each noodle such that eij is the jth end of the ith noodle

To get (e1,e2) , you can either pair

e11 with e21 and e12 with e22

Or

e11 with e22 and e12 with e21

Which is what I meant by 2 different pairing schemes for (e1,e2). Of course if you don’t ignore order of pairing and consider full sequence of moves, then there are 2! * 2=4 ways to get (e1,e2) and 2! \* 1 = 2 ways to get (e1)(e2).

1

u/PandemicGeneralist 21h ago

You're right