Thank you to everyone for participating! Here are the solutions.
Solution
Solution
Solution
105813D - Distributive Property
Solution
105813E - 1D Super Checkers Solitaire
Solution
Solution
Solution
Solution
Solution
105813J - Another Expected Value Problem
Solution
Solution
105813L - Permutation Recovery
Solution
Solution
Solution








The proof for K is kind of involved, here is the code + intuitive version of it:
The high level idea is that there are 2m infinite states (we can show this), and we will find one of the "baseline" ones that start with the starting node $$$s$$$.
The intuition behind the while loop is that we can iteratively expand an eulerian tour.
The reason why we care about only the first "level" of edges that touch a node is because roughly the process for a node goes:
A. Unvisited on iteration $$$ \lt i$$$
B. Visited on iteration $$$i$$$, all edges may or may not be consumed
C. Consume rest of edges on iteration $$$i + 1$$$, furthermore re-consume the edges visited in $$$B$$$
D. For the rest of time, the order is fixed and you visit all edges, so you will always stay in $$$|B|$$$
Also fun trivia:
One of the earlier iterations of the problem was, "Does the graph return to the starting state an infinite number of times?", where "state" does NOT care about what the current node is, only the pointers.
This is actually cancer to write tests for and most common cheeses pass, so I reworked the problem so that most random graphs are good tests. I didn't understand the structure of the problem enough T-T
I have a very cool but unproven solution that relies on BCC decompositions — find the bridges, process each BCC individually, then run an algorithm that works on a tree on it.
I believe some teams during the on-site were trying something like this — the following algorithm can verify whether the initial state repeats infinitely, but it seems hard to recover the initial state of nodes. I still have the old problem package if people want to submit to this version of the problem and try their hand at it. I didn't have a proof for this version of the problem so it didn't make its way into the contest.