<p><strong>There are a <em>wealth</em> of various puzzle types.</strong>  Most great puzzles are rooted in discrete mathematics of some sort.</p>

<p>I will name both classic puzzles and more recent puzzles; in some cases I will provide specific links as not all good puzzles have been around long enough to have multiple forms/generic names, but I am not affiliated with any puzzle creators.</p>

<hr>

<p>Good puzzles can foster thinking in the following areas and many others:</p>

<ul>
<li>Combinatorics</li>
<li>Graph Theory</li>
<li>Topology</li>
<li>...</li>
</ul>

<p>But more to the point, <em>some</em> puzzles are tricky to analyze and give birth to entirely <em>new</em> fields of study.  The history of Graph Theory is an interesting example, as a puzzle (Seven Bridges of Königsberg) really prompted the entire subject.  So looking at fields of math to find interesting puzzles is, in a way, backwards.</p>

<hr>

<ul>
<li>Block sliding puzzles, such as "Rush Hour" (the most popular name) or "Unblock Me" (a free mobile app version).  This puzzle has even been the subject of CS studies such as <a href="http://www.ulb.ac.be/di/algo/secollet/papers/crs06.pdf" rel="nofollow noreferrer">computing the <em>hardest</em> Rush Hour puzzle</a>.</li>
<li>Block sliding puzzles with numbers or pictures (like the "Tile Game" in the Mac OS "Dashboard")</li>
<li>Drawing puzzles that involve drawing a figure without lifting the pencil or retracing one's path, much like the Seven Bridges of Königsberg as mentioned above.  "One Touch Draw" is a good mobile app execution of the idea, which adds its own twists in later puzzles (one-way paths and other aspects).  There are ways to analyze such puzzles for easy victory, and the <em>student</em> has to develop them.</li>
<li>Towers of Hanoi, as you already mentioned.</li>
<li>"Free the string" type puzzles—this may not relate very well to programming, but it is certainly interesting from a topological standpoint.  They definitely require logical thought.</li>
<li>Sudoku.  The logical methods of attack possible on Sudoku games are <em>quite</em> intricate.  Good CS students should be capable of developing many of the attacks themselves with no prompting or teaching.</li>
<li>A game I can't find the name for, played on a rectangular grid of squares (of whatever size) with a number above each column and beside each row, where you must draw an orthogonal (taxicab geometry) path across the squares from the top left corner to the bottom right, in such a way that the number of squares touched in each column/row matches the number above/beside that column/row.</li>
<li>There are two puzzle apps made by Pyrosphere that are (so far as I know) original, and quite unique <em>and</em> simple, and are <em>excellent</em> for logical thought.  (Similar to Sudoku in the logical attacks possible, but they have not been analyzed in books so you must develop your <em>own</em> analysis.)  One is <a href="http://pyrosphere.net/lazors/" rel="nofollow noreferrer">Lazors</a>; the other is <a href="http://pyrosphere.net/weaver/" rel="nofollow noreferrer">Weaver</a>.</li>
<li>"How many triangles in this diagram?"-type puzzles.  These are great for demanding a clear sequential approach as you <em>can't</em> accurately count the triangles otherwise.*</li>
</ul>

<hr>

<p>Then there are other not-quite-puzzles that don't really <em>require</em> intense logical thought to do, but which are <em>great</em> for logical analysis.  Games like:</p>

<ul>
<li>Checkers (of course)</li>
<li>Set (card game)</li>
<li>Spot It (card game) - there's a <a href="https://stackoverflow.com/q/6240113/5419599">post on SO about the math behind this game</a></li>
</ul>

<hr>

<p>I'm sure I've left out an awful lot of them.  I collect such things; this is just off the top of my head.</p>

<p><sub>*A great joke I read elsewhere on Stack Exchange: How many legs does a cow have?  Twelve: Two on the right, two on the left, two in front, two in the back, and one at each corner.</sub></p>

CC BY-SA 3.0
2017-07-11T23:25:53.203Z
2017-07-11T23:31:46.097Z
2017-07-11T23:31:46.097Z
Wildcard
<p>A fun and useful puzzle type is logical operators. Anything and everything that uses logical operators, and the more complex your operator, the better.</p>

<p>Working out how a mysterious logical operator works is a great way to increase, well, <em>logical</em> thinking. You really have to figure out what's the logical output. </p>

<p>An example puzzle would be:</p>

<p>Input: A B C (binary values)</p>

<p>(((A or b) or (not C)) and (C or (not (A and B))))</p>

<p>And then they need to figure out how this thing works. Building a truth table, figuring out tautologies or how one parameter can completely change what the operator does. ( I think C is like that, in the above example).</p>

<p>A very, very important skill this teaches is tautologies. Sometimes programming needs to be tautologous. The question of whether the program works should be true for <strong>every</strong> input which is allowed. While that isn't always possible (practical-wise), striving for bug-free code is, as I see it, a good thing.</p>

<p>It's also interesting to show the students how a very simple set of blocks (and,or,not) can be used to construct unbelievably complicated things; and to work out how those things work, the students have to develop logical thinking. </p>

<p>So logical operators overall improve a number of aspects of logical thinking. </p>

<p>(It doesn't add too much, but my personal experience has shown me that puzzles such as these are one of the only things that taught me logical thinking).</p>

CC BY-SA 3.0
2017-07-11T14:46:53.630Z
2017-07-11T14:46:53.630Z
ItamarG3
<p>With my informal Coding for Teens group, I like to start each session with a puzzle that we do as a group. My reasoning is that programming is not primarily about semicolons and syntax, but about logical thinking. And logical thinking can be demonstrated and honed with puzzles.</p>

<p>So far I've used grid puzzles (Alice, Betty, Carol, and Dawn have dates with Roger, Steve, Tim, and Ulmer...), and I'm thinking about using the Towers of Hanoi (obviously that's a one-session puzzle), but I'm wondering if there are other formats that are good for this type of group activity.</p>

<p><strong>Edit</strong></p>

<p>To be clear, I'm not asking for a list of specific puzzles / links. I'm asking for puzzle <em>types</em>. For instance, if I were asking for puzzle types that hone language and / or lateral thinking, "crossword puzzle" might be a good answer.</p>

CC BY-SA 3.0
2017-07-11T09:20:19.737Z
Could this be better asked as how to evaluate a puzzle for use as a CS teaching tool, than as a request for a list of puzzles?
Gypsy Spellweaver
CC BY-SA 3.0
2017-07-11T11:23:37.080Z
David Ginat has done a lot of work with this and has a wealth of exercises. Some has appeared in ACM publications and at SIGCSE conferences. See, for example: http://dl.acm.org/author_page.cfm?id=81100382337&coll=DL&dl=ACM&trk=0
Buffy
<best-practice>
Best puzzle type to foster logical thinking
# Best puzzle type to foster logical thinking

(Asked by: username_0 on 2017-07-11)

With my informal Coding for Teens group, I like to start each session with a puzzle that we do as a group. My reasoning is that programming is not primarily about semicolons and syntax, but about logical thinking. And logical thinking can be demonstrated and honed with puzzles.

So far I've used grid puzzles (Alice, Betty, Carol, and Dawn have dates with Roger, Steve, Tim, and Ulmer...), and I'm thinking about using the Towers of Hanoi (obviously that's a one-session puzzle), but I'm wondering if there are other formats that are good for this type of group activity.

**Edit**

To be clear, I'm not asking for a list of specific puzzles / links. I'm asking for puzzle *types*. For instance, if I were asking for puzzle types that hone language and / or lateral thinking, "crossword puzzle" might be a good answer.

**Tags:** best-practice

> **Comments:**
> **username_1**: Could this be better asked as how to evaluate a puzzle for use as a CS teaching tool, than as a request for a list of puzzles?  
> **username_2**: David Ginat has done a lot of work with this and has a wealth of exercises. Some has appeared in ACM publications and at SIGCSE conferences. See, for example: http://dl.acm.org/author_page.cfm?id=81100382337&coll=DL&dl=ACM&trk=0  

---

## 2 answers

### Answer by username_3 on 2017-07-11. Score: 1 | Accepted answer

**There are a *wealth* of various puzzle types.** Most great puzzles are rooted in discrete mathematics of some sort.

I will name both classic puzzles and more recent puzzles; in some cases I will provide specific links as not all good puzzles have been around long enough to have multiple forms/generic names, but I am not affiliated with any puzzle creators.

---

Good puzzles can foster thinking in the following areas and many others:

* Combinatorics
* Graph Theory
* Topology
* ...

But more to the point, *some* puzzles are tricky to analyze and give birth to entirely *new* fields of study. The history of Graph Theory is an interesting example, as a puzzle (Seven Bridges of Königsberg) really prompted the entire subject. So looking at fields of math to find interesting puzzles is, in a way, backwards.

---

* Block sliding puzzles, such as "Rush Hour" (the most popular name) or "Unblock Me" (a free mobile app version). This puzzle has even been the subject of CS studies such as [computing the *hardest* Rush Hour puzzle](http://www.ulb.ac.be/di/algo/secollet/papers/crs06.pdf).
* Block sliding puzzles with numbers or pictures (like the "Tile Game" in the Mac OS "Dashboard")
* Drawing puzzles that involve drawing a figure without lifting the pencil or retracing one's path, much like the Seven Bridges of Königsberg as mentioned above. "One Touch Draw" is a good mobile app execution of the idea, which adds its own twists in later puzzles (one-way paths and other aspects). There are ways to analyze such puzzles for easy victory, and the *student* has to develop them.
* Towers of Hanoi, as you already mentioned.
* "Free the string" type puzzles—this may not relate very well to programming, but it is certainly interesting from a topological standpoint. They definitely require logical thought.
* Sudoku. The logical methods of attack possible on Sudoku games are *quite* intricate. Good CS students should be capable of developing many of the attacks themselves with no prompting or teaching.
* A game I can't find the name for, played on a rectangular grid of squares (of whatever size) with a number above each column and beside each row, where you must draw an orthogonal (taxicab geometry) path across the squares from the top left corner to the bottom right, in such a way that the number of squares touched in each column/row matches the number above/beside that column/row.
* There are two puzzle apps made by Pyrosphere that are (so far as I know) original, and quite unique *and* simple, and are *excellent* for logical thought. (Similar to Sudoku in the logical attacks possible, but they have not been analyzed in books so you must develop your *own* analysis.) One is [Lazors](http://pyrosphere.net/lazors/); the other is [Weaver](http://pyrosphere.net/weaver/).
* "How many triangles in this diagram?"-type puzzles. These are great for demanding a clear sequential approach as you *can't* accurately count the triangles otherwise.\*

---

Then there are other not-quite-puzzles that don't really *require* intense logical thought to do, but which are *great* for logical analysis. Games like:

* Checkers (of course)
* Set (card game)
* Spot It (card game) - there's a [post on SO about the math behind this game](https://stackoverflow.com/q/6240113/5419599)

---

I'm sure I've left out an awful lot of them. I collect such things; this is just off the top of my head.

\*A great joke I read elsewhere on Stack Exchange: How many legs does a cow have? Twelve: Two on the right, two on the left, two in front, two in the back, and one at each corner.


---

### Answer by username_4 on 2017-07-11. Score: 4

A fun and useful puzzle type is logical operators. Anything and everything that uses logical operators, and the more complex your operator, the better.

Working out how a mysterious logical operator works is a great way to increase, well, *logical* thinking. You really have to figure out what's the logical output.

An example puzzle would be:

Input: A B C (binary values)

(((A or b) or (not C)) and (C or (not (A and B))))

And then they need to figure out how this thing works. Building a truth table, figuring out tautologies or how one parameter can completely change what the operator does. ( I think C is like that, in the above example).

A very, very important skill this teaches is tautologies. Sometimes programming needs to be tautologous. The question of whether the program works should be true for **every** input which is allowed. While that isn't always possible (practical-wise), striving for bug-free code is, as I see it, a good thing.

It's also interesting to show the students how a very simple set of blocks (and,or,not) can be used to construct unbelievably complicated things; and to work out how those things work, the students have to develop logical thinking.

So logical operators overall improve a number of aspects of logical thinking.

(It doesn't add too much, but my personal experience has shown me that puzzles such as these are one of the only things that taught me logical thinking).


---

