Here’s my solution!
Actually let me start by jumping straight to an answer, though not a complete one, using chains of I-know-you-know-they-know facts. I’m not sure whether to call this a warmup or throwing us into the deep end.
Consider all the possible numbers of monks:
-
I.e., just you. You did not know there were blue eyes. Now you do.
-
Just you (monk 2) and monk 1. You knew there were blue eyes but you didn’t know monk 1 knew. Now you know he does.
-
You (monk 3) plus 1 and 2. You knew monk 2 knew but you didn’t know monk 2 knew that monk 1 knew. Now you know she does know that 1 knows.
-
You knew that monk 3 knew that monk 2 knew but you didn’t know that monk 3 knew that monk 2 knew that monk 1 knew. Now you know he does know that 2 knows that 1 knows.
-
…
And in general, with you as monk n:
You didn’t know that monk n-1 knew that monk n-2 knew … that monk 2 knew that monk 1 knew. Now you know that n-1 does know that n-2 knows … that 1 knows.
Full Solution
As with the original puzzle, the case of 1 monk is trivial. The visitor’s statement is, in fact, the new fact. “There exist blue eyes.” Call that \text{Fact}1. The single blue-eyed monk thinks: “I did not know that. Now I do. Crap.” I.e., they learned \text{Fact}1 when the visitor spoke.
What about 2 blue-eyed monks? If I’m one of those monks, I’m thinking, “Yes, I knew there were blue eyes. Namely, that poor blue-eyed schmuck. What I didn’t know was that he knew that. But I just now heard the visitor tell him. So now I know that he knows.” That’s the new fact: “Other-monk knows there exist blue eyes.” Both monks learn that from the visitor. We’ll call that \text{Fact}2. Another way to state it is like so:
\text{Fact}1: There is at least one blue-eyed monk.
\text{Fact}2: Everyone knows \text{Fact}1.
Let me say it again in a way that will be easier to generalize. In the 2-monk case – call them A and B – both monks know \text{Fact}1 already, because they see each other. They do not know \text{Fact}2. In particular, A thinks B doesn’t know \text{Fact}1. \text{Fact}2 is that everyone (B in particular) knows \text{Fact}1. That’s the thing A doesn’t know because A thinks (hopes) B is in the dark. Until the visitor comes and blurts out \text{Fact}1 in front of B like an idiot.
Notice that \text{Fact}2 was already true, but neither monk knew it! Just like \text{Fact}1 in the 1-monk case.
Now add another possible fact which may or may not be known to a blue-eyed monk:
\text{Fact}1: There is at least one blue-eyed monk.
\text{Fact}2: Everyone knows \text{Fact}1.
\text{Fact}3: Everyone knows \text{Fact}2.
In the 3-monk case, it’s \text{Fact}2 that everyone already knows. Why? Because each monk, seeing 2 others, knows by the above reasoning that, in the 2-monk case, everyone knows \text{Fact}1. (This is still pre-visitor.) If each monk knows that everyone knows \text{Fact}1 then each monk knows \text{Fact}2. That’s what \text{Fact}2 means: “everyone knows \text{Fact}1”.
So every monk knows \text{Fact}2, which is to say that \text{Fact}3 is true. Not every monk knows it, but it’s true.
Then the visitor speaks and what happens? Immediately they all know \text{Fact}3. In fact, the visitor’s statement makes them all immediately know every fact from \text{Fact}3 to \text{Fact}\infty [*] but \text{Fact}3 is enough for all 3 to deduce, after 3 days of no suicides, that they themselves have blue eyes. Hence their deaths on night 3.
In general, we have this list of possible facts:
\text{Fact}1: There is at least one blue-eyed monk.
\text{Fact}2: Everyone knows \text{Fact}1.
\text{Fact}3: Everyone knows \text{Fact}2.
\text{Fact}4: Everyone knows \text{Fact}3.
etc.
With n blue-eyed monks, they all know \text{Fact}1 through \text{Fact}(n-1). As soon as the visitor speaks, they all know \text{Fact}n (and in fact every higher fact as well).
Therefore \text{Fact}n was the already true fact that each blue-eyed monk learned from the visitor’s public statement. QED.
Denouement
I think this proof is solid but trying to translate one of those newly learned facts into a single English statement, even for the 3-monk case, breaks my brain every dang time:
With 3 monks, they all know there are blue eyes and they all know that everyone knows that (they see 2 others seeing each other) but – until the visitor – they don’t know that everyone knows that everyone knows.
(Maybe I can just barely grok that but with 4 monks it’s utterly hopeless.)
By expressing each fact in terms of the previous one we can prove it without holding the whole card house in our head. We establish that the visitor makes \text{Fact}2 known to both A and B in the 2-monk case. So with n=3, each blue-eyed monk, thinking it is the n=2 case, knows that’s what’s playing out and that \text{Fact}2 (something each monk already knew) is, post-visitor, now also known to the others. Well, “everyone knows \text{Fact}2” is exactly what \text{Fact}3 is. So the visitor has in fact made all 3 blue-eyed monks aware of \text{Fact}3.
Which sadly seals their doom within 3 days’ time! Being infinitely intelligent and perceptive is the worst.
Footnote
[*] That’s known as “common knowledge” – when everyone knows something and everyone knows that everyone knows it and everyone knows that everyone knows that everyone knows … ad infinitum. You get common knowledge by saying something out loud with everyone present. So that’s a critical assumption in the puzzle and it’s why, if the visitor went around whispering to every monk “there are blue eyes on this island”, they’d each say “duh” and nothing would change.
Relatedly, it’s not enough for all the monks to be perfectly rational. There has to be common knowledge of that as well. They all have to know they’re all perfectly rational and all know that they know that and all know that they know that they know that, etc etc. Any iota of doubt anywhere in that chain and the entire reasoning falls apart and they can survive careless visitors just fine.