bgoated01
I showed this to my two kids, and we all three enjoyed it. The zero knowledge proof portion didnt really click for me, but we liked the four color map theorem stuff. This led me to download some maps for my kids to attempt coloring on paper, and also got me wondering about how this holds or doesn't on non-euclidian spaces. Turns out the maximum is four colors on a sphere, but 7 colors on a torus! More details here: https://mathworld.wolfram.com/TorusColoring.html

Thanks for leading us down this mathematical rabbit hole today.

franciscop
[spoiler alert]

I knew that 4 colours sufficed for any arbitrary map from back in the day when I learned this, but still I found it VERY rewarding by attempting to draw a map that needed 5 colors, and how intuitive this demo was for getting a "feel" for a thing that I knew only theoretically! Like I needed an impossible geometry to fit, either an area that stretched to a zero-width path (which would becomes a point, and thus 2 areas, so doesn't fit) or some other "impossible" geometry. Loved it, congrats on a really well executed idea!

zamadatix
Loved the interactions and flow overall but I'm a bit lost on the zero knowledge proof example. I'm familiar with the concept but I don't follow how the example is one. E.g. "By repeating the process enough times, the probability that you never catch me becomes smaller than, say, getting struck by lightning" doesn't seem to show it's a proof? If I pick a hundred numbers it'll look like I just proved some black box function which happens to be Sin[n] + 0.999999999999 is always positive even though I'd be able to clearly show it negative with the knowledge of the function.

It feels like something that got detached from the things that make it work during simplification. Or it could be that I just have a misunderstanding/oversight in the zero knowledge proof :).

In an unrelated note: I colored the larger graph and it didn't even play along!

chromy
The Republic of Ireland (the west most region on the first page) isn't part of the United Kingdom. The term for the group of regions shown is 'the British Isles'. See https://qntm.org/uk While it seems like a trivial distinction the whole thing is somewhat fraught (https://en.wikipedia.org/wiki/The_Troubles).
nirolo
You might want to get into touch with some museums on science topics to see if they are up to show it. I live in Germany at the moment and know of at least two MINT focused museums that let visitors engage a lot with their (sometimes digital) exhibits and this here checks all the boxes to make a great exhibit.

Very well done, I'll try to see if my children will enjoy that already too.

tzs
> Step 1. I put a <purple circle>, <blue circle>, or <red circle> color dot on each region, but hide it under a post-it

> Step 2. You click any two bordering regions, and I pull off their post-its

> Step 3. You check that the revealed colors are different

I would add explicitly in step 1 that you tell me what 3 colors you used, and in step 3 that I check that the revealed colors are different from each other and are both from that set of 3. Similar in the explanation of why this should convince me.

gkoberger
This was one of the cooler teaching examples I've ever played with... awesome job! Appreciate the warning that the 5 color map is "very difficult". It felt easy enough, and I would have spent an hour on it!

This was so much cooler than just being told that 4 colors is enough for every map – this one will stick with me.

It would be wonderful if schools taught a bit more like this – I almost felt like I discovered it myself!

baruchel
Hi, my two cents; you claim "Although mathematicians believe their proof is correct, it is too complex to verify without computer assistance", but I'm not sure "believe" is the correct verb since the proof has been formally verified (see for instance https://github.com/coq-community/fourcolor for a formal verification in Coq).

I understand that you want to emphasize the fact that no human can understand the proof with a full overview, but I wonder whether the current sentence will not make people think mathematicians are not perfectly sure of the proof.

AndrewOMartin
Can you add to the FAQ at the end an answer to the question "How do I know you're not just showing me two random colors?"? It's possible this is already addressed and I missed it.
MrZander
I know that it is impossible, but it was fun to try to make a 5 color map work. That being said, is this a bug? https://imgur.com/a/zbkYg9j

I can't seem to wrap my head around why this isn't 3 colors.

namjh
Great work! I really enjoyed the interactivity. Actually I already was aware of the concept of zero-knowledge proof from the wonderful article by ZCash(which is a privacy-oriented cryptocurrency) core developer Matthew Green, worth to check it out: https://blog.cryptographyengineering.com/2014/11/27/zero-kno...

My two cents of the ZKP illustration is that directly using hashes are more likely to convince "computer-friendly" people to introduce the commitment scheme.

trirpi
There seems to be an error in the backtracking algorithm. E.g.: https://imgur.com/a/1miv1AK
jostylr
That was enjoyable. You could submit this to the summer of math exposition: https://some.3b1b.co/
sn41
Just a quick note: Rahul Ilango is a phenomenal theoretical CS researcher who has made great progress towards understanding the "Minimum Circuit Size Problem" [MCSP], long believed to be, but not yet proven, NP hard. Needless to add, "the username checks out".
gpnt
> Warning: very difficult! Skip after trying a lot.

I think "very difficult" is misleading here. It implies there is an answer if you try hard enough.

williamDafoe
I remember when our neighbor Ken Appel proved the 4-color theorem (together with help from Arnand Haken). He had help from his teenage kids (Andrew, Laurel, & Peter) who helped him to check the output of the computer program that generated more than 1,000 different patterns and colorings to ensure that they could all be colored with only 4 colors. Andrew (son of Ken Apple) today teaches at Princeton University. https://www.cs.princeton.edu/people/profile/appel
gexaha
Nice puzzle, congrats! I also like this part of maths, and there's a related concept of Snark graphs.

https://en.wikipedia.org/wiki/Snark_(graph_theory)

First is that "One of the equivalent forms of the four color theorem is that every snark is a non-planar graph". Second, is as strengthened form of the four color theorem: "every snark has the Petersen graph as a minor", which is kind of proven (already 25 years ago), but still lacks 1 paper: https://thomas.math.gatech.edu/FC/generalize.html https://math.stackexchange.com/questions/3692582/what-is-the...

And another related concept is of nowhere-zero flows, and even more stronger conjecture that "every bridgeless graph with no Petersen minor has a nowhere zero 4-flow". https://en.wikipedia.org/wiki/Nowhere-zero_flow

hooby
So, there was this one question "Can every map be colored with just 4 colors?"...

And there I sit, knowing that every map of CONTIGUOUS territories can be colored with 4 colors - but on real world maps, there are enclaves - little islands that belong to a country that they have not connection to. And if those shall have the same color as their parent country, then 4 colors is not enough...

So I pick the answer "NO".

> you are wrong!!!!! every map can be colored with 4 colors! it has been proven!!!!!

OmarShehata
I love this! I'd for this to be a more typical experience in math class

(I bought Paul Lockhart's "measurements" but gave up because I felt like I needed a sandbox to play with and little hints. Like, I don't want to be told the answer but I want to know feedback exactly like this demo. Very simple: "this is not right" or "this is right, but can be done with fewer")

(My dream is to have a little game jam where we make interactive versions of these concepts as puzzle)

umvi
Seems easy to intuitively prove that 5 colors is impossible.

In order to need 5 colors, you'd need to construct a graph with 5 nodes where each of the nodes connects to all other nodes, but without any edges crossing: https://imgur.com/U52SFSi

You can just tell after playing around with the graph that it's impossible to move the nodes around on a 2d plane without an edge crossing; you need a 3rd dimension.

soneca
Great job! I enjoyed going through the steps.

The final though seemed like a huge leap for me, who don’t know anything about those math mysteries (which I assume is your target audience).

First I was curious to learn how is the fast way to understand that 1, 2, or 4 colors suffice. And why finding out such a way for 3 is so hard.

The zero-knowledge proof demonstration felt like “changing the subject”. Probably I missed the connection there.

sverona
This is cute. You should flag the "I claim that three colors suffice" map if the user actually 3-colors it. At least, I think I did...
aib
Ahh, very nice. It was fun to rediscover/relearn some of these things through this game.

Very nice wording on the 5-color challenge! I think it was the perfect balance.

One thing I was missing was the ability to move the points already on canvas. I assume you already considered, though. (As well as right-click-to-remove?)

Guvante
Fun fact, one of the reasons the four color problem is hard to prove is there isn't an algorithm that can color a map in four colors.

Well beyond effectively trivial ones where you try over and over again.

But the algorithm for coloring with five is pretty easy (relatively speaking still involves fun graph theory)

noodlesUK
Just FYI the “map of the UK” includes the Republic of Ireland, which is very much not part of the UK.

There’s not a 100% great term for the collective unit of land. Generally people go with “UK & Ireland” if they’re trying to be sensitive.

joshlk
That was fun.

On another note, I dislike how “Zero-Knowledge Proofs” are called proofs. It’s not a proof. You iteratively increase your belief that the result is true, like in experimentation, but that’s not a proof.

next_xibalba
Although I still didn't fully understand the relation between zero knowledge proofs and the post-it example, this game is just kind of fun in its own right!
Timwi
It showed a complicated map and asked me if it was 3-colorable. Then it said it can convince me that it's 3-colorable without revealing the solution. But then it demonstrated this proof on a super simple map that we already knew to be 2-colorable, not the complicated one I was told to assess.
JohnMakin
This gave me PTSD flashbacks to an extremely difficult computational geometry course I took once, but this is cool.
hgyjnbdet
Spent way too long on the five colour thing refusing to skip. You always have to surround one colour which then protects it. You simply can't touch four colours at once. Then I skipped it and found out it was impossible, FML.
dunefox
In Android using Firefox the button to go to the next challenge doesn't seem to work.
gsuuon
This is awesome and I hope in-general that a lot more education is done this way, especially with complicated concepts. I wonder if this sort of interactive toy explanation is currently used in classrooms?
snthpy
Nice!

I knew the 4-colour theorem but the zero knowledge proof illustration was great. I didn't get it initially but the FAQ cleared it up and I felt like I learned something as it wasn't obvious on the first look.

ModernMech
It's very fun!

Only thing I would change is to make it so clicking on the picture doesn't trigger a text select, it was hard to play because a context menu kept popping up every time I changed map color.

NegativeLatency
Something about 4 colors makes sense to me intuitively because you've got 0 or 1 color for each of the two cartesian axes (2 * 2 = 4). Not sure there's anything behind that though.
riffraff
I loved this, and, like others, walked through it with my two kids (7,9). They have up at the last page but they seemed to enjoy the process nonetheless!

Good job, would love to see more.

your_friend
How cool! I didn’t expect it will end up with ZK proofs that I was curious about for a long time. (After reading it I still don’t quite get the details of how they are working tho)
personjerry
How does the zero-knowledge solution make sense? Can't you just cheat and show me two random different colors whenever I click two post-its?
mbivert
Enjoyed the tutorial very much, thanks.

As a suggestion, I would dearly enjoy a follow-up rigorously connecting those visual, intuitive ideas to actual mathematics.

sakras
This was fun, I went into this thinking "Ha I already know this theorem" but came out learning something about zero knowledge proofs!
windowshopping
I went in skeptical and got completely hooked. Well played. Very neat thing to build. Wish more math were taught creatively like this.
teddarific
Wow, this was a lot of fun.

3 was a lot harder than expected — a great exercise for anyone honestly. I'm a math nerd so this was cool visualized!

yochem
You mention that this problem has overlap with training neural nets. Could you link some further reading for this? :)
passwordoops
So addictive! And it's great how you tie it in to the greater mathematical concept. I'm loving it!!
barbariangrunge
This is lovely. The Ux isn’t my favourite when it’s time to draw but it’s pretty great besides that
andrei-akopian
1. Nice site, bookmarked to give it to people. 2. You are a very bad and annoying person ;)
ceva
Would be nice to Introduce another continent like Europe :) it looks really nice tho!
ehershey
Wow what a fun little interesting time. My wife and I made it to the end on mobile!
neuron-enix
There goes my 2hrs of sleep, trying to solve feeling that I was close to solving, only to see myself draw shapes that I have never seen or imagined in my life.

Well in the end it was fun, but the warning is very misleading at least from a game perspective. I have played games at the same level but it certainly wasnt this hard, haha...

But hey, saying that it was difficult, was the only thing that kept me going for 2hrs, only to be annoyed and have a face palm moment after seeing the answer.

Nonetheless it's good post

js98
Nice work! I spent a bit too much time creating a map with 5 colors… ;)
poopcat
Had a great time with this! Great break to get my mental gears moving
dylanjcastillo
Thanks for sharing. This was instructive and fun in equal parts
xg15
(spoiler alert)

Thanks a lot for the game. I really enjoyed it and it got me thinking about the coloring problem.

I wonder if it could be interesting to also add some bits of the corresponding graph problem into the game. This might be able to make the coloring problem a bit less "mysterious", but not less interesting.

Some shower thoughts:

It's easy to see that if you start with an arbitrary "country map", you can easily convert it into a graph with the same coloring properties: Just draw a node into the center of each region, then, if two regions have a shared border somewhere, connect their nodes with an edge.

The coloring problem is now the task of coloring all the nodes, so that no two nodes that are directly connected with an edge have the same color.

The solution to that task is also easy to see: If you have n nodes where each nodes has edges to all the other nodes, then you need n colors. The more "missing" edges you have in the graph, the less colors you can get away with. (The location of the missing edges is important though: As soon as there a group of n fully connected nodes, you need at least n colors, no matter how many additional nodes and missing edges there are)

Does that mean you can construct graphs that need 5 colors or more? Yes, just make the desired number of nodes and draw edges between all of them.

So then, where does the limit of 4 come from? There it gets interesting: Because not every graph con be converted back into a country map: Only planar graphs, i.e. graphs where no edges cross if you lie it out on a plane have a corresponding country map, otherwise you'll get an "impossible geometry".

So the coloring problem "really" shows that you can have at most 4 fully connected nodes in a planar graph - if you have graphs with more connections, you will always have at least two edges crossing, no matter how you arrange the nodes and edges on the plane.

This might also explain why it is so hard to produce good visualisations for arbitrary graphs.

An interesting question might be how the planar criterion works for other geometries, e.g. if you lay out the graph on a sphere or torus or multi-hole torus.

Another aside: In real life, states are not always continous regions on a map. There are a lot of nations that have enclaves, oversea territories or for other reasons consist of more than one geographical region. So in theory, a "map of nation states" instead of a "map of regions" could represent a nonplanar graph and could have a coloring number greater than 4. I'm not sure if there is actually such a situation anywhere on the globe though.

stop50
Very nice. I had no problems playing it.
PUSH_AX
Thanks for taking me on that journey!
segfaltnh
Well done, enjoyed this a lot.
SilasX
Uh, when you draw the map that requires three colors, I couldn't figure out how to submit it to at least be told it's not good enough. Or if it automatically accepts for a 3-min [1], then it was too hard to make sure that the boundary reached the edge of the screen. (I thought I successfully drew five regions around a point.)

[1] sorry, 3-chromatic or whatever

vavooom
that was fun :)
zem
great work!
gcyjjkjg
[flagged]