After the positive response to the new “Camicia” exercise, I got carried away looking for ideas for new exercises.
I saw that there was already a topic open for this idea, but I thought about it before reviving a thread from two years ago. (thanks to the pop-up)
There are several ways to implement this exercise, each with its own purpose. Here are a few:
-
Classic Tower of Hanoi (3 poles, n discs)
I don’t think there’s any need for introductions. Anyone who has never tried to create their first recursive algorithm with this game has missed out on a piece of their childhood. I think it’s a milestone in realising how complex a topic can be, which, after seeing the solution, can become trivial (or not in my case).
That said, four years after seeing it for the first time, I can say that I don’t remember anything AHAH. -
General Tower of Hanoi (k poles, n discs)
I investigated further, and as reported in the old topic, there is the Reve’s puzzle.
Similar to the Tower of Hanoi game, the puzzle is generalised to k>=4 poles and n discs.
The solution to this exercise, finding the minimum number of moves, is given by the Frame–Stewart algorithm, which has not yet been proven and verified to be optimal, but remains an unproven conjecture.
Here we reconnect with the world of research in the field of game theory.
You can find many papers on this topic; there is no single main resource from which to draw information. -
Shortest path between positions A and B (3 poles, n discs)
Known as the Sierpiński triangle, TOH can be represented using this interesting mathematical diagram.
The idea is to find the shortest path to reach state B from state A in the game.
There aren’t many exercises on path finding on this platform, so I think it would be a nice addition.
Let me know what you think.
It’s been two years since the last time, and maybe the general opinion on this has changed.
If you have any other types of exercises you want to implement, feel free to create a new topic about it and tag me.
I’ll be very happy to investigate and find new exciting challenges.
It could easily become my hobby LOL.
Other relevant links: