Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in --d --h --m --s-- days -- hours -- minutes -- seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 14d 23h 11m 09s14 days 23 hours 11 minutes 9 seconds.
Guide: Jane Street Interview Questions: What They Actually Look For
Four dancers stand at the corners of a square. Each one holds one end of one of two long ropes and never lets go. At the start, the ropes look like this:
A D
\_________/ rope 1 joins A and D (top)
_________
/ \ rope 2 joins B and C (bottom)
B COnly two moves are allowed:
A fact you may use without proof (John Conway's theory of rational tangles). Every tangle these dancers can make has a label x, which is a rational number or the symbol ∞. Two tangles are the same, up to sliding the rope around with the ends held fixed, exactly when they have the same label. The labels behave as follows:
Moves are carried out in the order they are written, from left to right.
Starting from the untangled position, a dance master calls out this 18-move dance:
SSSRSSRSRSSSSSSRSSQuestion. What is the shortest sequence of R/S moves that the dancers can carry out next to untangle the ropes, meaning to bring the label back to exactly 0?
Answer format: there is exactly one shortest untangling sequence. Give two integers separated by a comma: its length L, and the sum of the positions (numbered 1 to L from the left) at which the letter R occurs in it. For example, the sequence RSSRS would be reported as 5, 5, since its R's are at positions 1 and 4.
Related Problems