by tzs · 12y ago · 0 comments
In a burst of over-enthusiasm, I also quickly hacked together a simple state machine simulator that he and his coworker could use to test their proposed solution(s).
The problem specification, state machine simulator, and documentation are available here: https://github.com/tzs/problems-state-machine-sync
I told them I would consider it solved if they could describe the algorithm. They did not need to actually specify fully working state machines that dealt with all the details.
Much to my surprise, especially considering that my friend had not studied computer science beyond what was given in a high school programming class, not only did they solve the problem in a few days, they produced fully working state machines.
Another puzzle I gave them consisted of several images that show the tracks of a bicycle. One of the wheels is leaving a red track and one a blue track (color assignment was random for each image). Their task: determine in each image whether the bike was traveling left to right or right to left. Here are the images: http://imgur.com/a/hv0b0
It was also randomly determined for each image whether to draw the front wheel track first or rear wheel track first, so you cannot deduce anything from which track appears to be on top when they cross.
If you want a hint for the bicycle problem, think about tangents.