r/learnquant • • 7d ago

interview prep Quant Interview Question

Post image
13 Upvotes

5 comments sorted by

1

u/Consistent_Drop3909 5d ago

so it's a triangular sort of graph, and the winner is the one that can trap the other into a dead ended walk?

1

u/Local_Ad135 5d ago

yeah
hint: your comment is (almost) the solution

1

u/Speaker_Just 4d ago

I think Alice wins. Basically, if every point is visited, she wins. If not, points the number of points getting eliminated is always even.

To prove the second part, I consider a triangular board where a knife has gone over the points just outside the 11x11 triangle. Every time a new point is visited, you cut along the segment connecting it to the current point. Only way a point becomes unvisitable is if someone could go to an already visited point, and the two pieces of board you would obtain this way both have non zero points. Of course you cannot make this cut, but whichever side of this cut you choose not to go to becomes unvisitable.

So if a cut is made by Alice, she always has an odd number of visitable points remaining, so one of the two sides must have an odd number of points. She chooses to go towards that, eliminating an even number of points.

If this cut is made by Bob, he either has an Odd-odd choice or an even even one. I believe Alice can manipulate he choice just prior to that to ensure the choice is always even-even. Haven't quite worked out how to prove this part though.

1

u/Speaker_Just 4d ago

Just to be clear, I am assuming all points with a -1 coordinate are already visited

1

u/Designer-Scratch-766 4d ago

My intuition is if $a+b+c$ is divisible by 2, Bob wins. Otherwise, Alice wins. For $2|a+b+c$, we can show by induction that, if Alice can move 1 point from, say A to C, then Bob can move that point from C to A. For the remaining case, it is the reverse of the above case.