We had a chance to bring several CS Unplugged -inspired puzzles to a local middle school and try them out with the 5th, 6th and 7th grade. It was really great to see kids engaged with deciphering wheels, towers of hanoi, balance puzzles, parity, 3-colorability and lots of other neat algorithms you can explore with your hands.

In the balance puzzle ("the busy miner") students had to find the counterfeight silver nugget (aka the light nugget) among seven nuggest, in the least number of weighings. I made the nuggets out of foil and Unifix cubes. A few clever students claimed to be able to solve the puzzle without a single weighing, just by feel. It took some convincing to explain that using their hands to compare weight was a type of weighing. Most students could get binary search with some coaching (4 weighings). For the kids who seemed really engaged, I explained the optimal solution (3 weighings) and they thought it was cool that you could make conclusions about a nugget without even weighing it.

IMG_6167

Students really enjoyed playing with Towers of Hanoi. A few attempted my challenge to write out their algorithms using a special "assembly language" I invented for moving the discs. After they wrote the algorithm, I would act it out and they woud have to debug me. The exercise was partly inspired by CARDIAC and partly by Robot Turtles. Come to think of it, I should have brought Robot Turtles with me.

IMG_6162

We did a few other exercises --- traveling salesman, colorability, etc --- using dry-erase markers on sheets in plastic sleeves. The CS Unplugged parity "magic trick" is always a big hit: they pick it up fast, and they want to demonstrate it to their friends or parents who haven't learned it. Its awesome.

One exercise that kids actually asked to take home and if we had more puzzles for them to do was the crypto wheel challenge. Each sheet had a "Guess Who" style animal puzzle, where clues ("I have wings", "I eat bugs", ...) help select among guess-options (penguin, bat, ...). The more clues, the more options can be eliminated; however, all the clues are encrypted with a shift chipher, at various levels of diffculty. Some ciphertexts have some corresponding plaintext shown, others have no plaintext, others are missing bits of ciphertext, etc. Students were pretty good about using their intuitions about English digram frequency and the word structure to break them.

IMG_6161

Oh, and the kids are not addicted to caffeine: those coffee cups are to vote on the exercises using little happy or sad tokens. The voting didn't go so well --- enthusiastic voters stuffed the ballots, and many only voted as an afterthought.