Different age group, but I had success in engaging with high-school students with "Bitcoin mining". This was a ~15 minute exercise after a lecture on blockchains, during a cryptography seminar.
The original Bitcoin proof-of-work algorithm is to tweak the middle input of a hash so that the result starts with many binary zeroes (find x such that `sha256(sha256(a || x || b)) < H`). We simplified it down to `x^2 % N < 10^H` (calculators and computers allowed). You can freely tweak N and H.
The students had a blast, and I believe it was a lucky combination:
- It's more topical than ancient puzzles.
- The students were racing against each other.
- Rewards were semi-random (faster/smarter groups still had an advantage).
- The rewards were "physical bitcoins" (chocolate coins).
- Winning was more or less guaranteed by brute force, but there were plenty of shortcuts to find.
The original Bitcoin proof-of-work algorithm is to tweak the middle input of a hash so that the result starts with many binary zeroes (find x such that `sha256(sha256(a || x || b)) < H`). We simplified it down to `x^2 % N < 10^H` (calculators and computers allowed). You can freely tweak N and H.
The students had a blast, and I believe it was a lucky combination:
- It's more topical than ancient puzzles.
- The students were racing against each other.
- Rewards were semi-random (faster/smarter groups still had an advantage).
- The rewards were "physical bitcoins" (chocolate coins).
- Winning was more or less guaranteed by brute force, but there were plenty of shortcuts to find.