green eyes

clay shentrup
1 min readAug 3, 2023

--

first watch the video.

to understand this, let’s use the simplest meaningful example, with three people. we’ll use an algebraic notation so that ag means “alice has green eyes”, and bg means “bob has green eyes”, and so on. and bk[] means “bob knows the facts within the array”, so bk[ag] means that bob knows alice has green eyes. whereas bk[ak[bg & eg]] means that bob knows that alice knows bob and eve have green eyes. the | (pipe) symbol acts as a boolean or.

day 1:

ak[bg & eg & bk[eg] & ek[bg]] &
bk[ag & eg & ak[eg] & ek[ag]] &
ek[ag & bg & ak[bg] & bk[ag]]

day 2:

new information: alice knows that either she has green eyes or (if she has blue eyes) then bob must now know that he must have green eyes, because otherwise eve would have departed, given he and alice both had blue eyes). there’s more new information than that, but let’s express it all algebraically.

ak[ag | (bk[bg] & ek[eg])] &
bk[bg | (ak[ag] & ek[eg])] &
ek[eg | (ak[ak] & bk[bg])]

day 3:

alice already knows that either she has green eyes or bob and eve both know they have green eyes. but if they both knew that, they would have left. so if they’re still present, that means she (alice) must have green eyes.

ak[ag] &
bk[bg] &
ek[eg]

day 4: everyone leaves.

--

--

clay shentrup

advocate of score voting and approval voting. software engineer.