I'm running an algorithms seminar and I'm trying to express the Hamiltonian cycle problem in a new way that is exciting to students. I know that many of them play a game called Hearthstone and I'm trying to express a problem in that game as a decision problem.
Essentially in most card games they break down and stop being fun when a mechanic, that the designer didn't anticipate, adds recursion. In Hearthstone and Yu-Gi-Oh! that problem is expressed well in this video. In the packet that I give them I explain how the mechanic works and how it leads to recursion, then I ask them the following:
-
Express the mechanic that leads to recursion in a card game formally with input and output states as a decision problem.
-
Show this problem is in NP by giving a verification algorithm for this problem and proving that algorithm is correct.
-
The Hamiltonian cycle problem is already known to be NP-complete. We can show that the recursion problem in card games is NP complete by reducing the Hamiltonian cycle problem to the card game recursion problem. Do so by first giving a reduction of Hamiltonian cycle problem to card game recursion problem. The reduction takes input to Hamiltonian cycle problem and converts it into input to the card game recursion problem. Then prove your reduction is correct.
My main question is: Did I state anything incorrectly and would you change anything about my formulation of the problem?
Best Answer
This sounds like a fun idea. I have a few thoughts that might help debug the assignment and make it better. (Part of the problem might be that I don't have enough information about the rest of the assignment, so feel free to correct me.)
The decision problem is a little ambiguous (which might be intentional to allow for creativity, or which could be made more precise to help students.) For example, we might want to formulate the problem as: (1) Can you make a pair of decks out of Hearthstone cards that could lead to a recursion condition? (2) Can these two decks, when shuffled and during the course of play, lead to a recursion condition? (3) At this exact point in the game, is there an action that a player can take that will lead to a recursion condition?
All of these alternatives amount to basically the same kind of NP problem, but having a precise implementation can help. I think (3) is most appealing to me because the only thing you're searching through is the side-effects of the players' currently available actions.
Do you have a specific recursion-causing mechanic in mind, such as the Shudderwock? Otherwise, it seems a bit open-ended if you have to map graphs onto some particular game state between two players that has a runaway recursion effect if the graph is Hamiltonian and otherwise doesn't. I'm not sure if you have a more specific mapping in mind.
Do you have sample answers to questions 1 and 2, and the reduction in 3?