-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pap Lőrinc
committed
Mar 6, 2016
1 parent
30295d8
commit b91727f
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/main/groovy/Ch06_MathAndLogicPuzzles/_06_06_BlueEyedIsland.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package Ch06_MathAndLogicPuzzles | ||
|
||
/** Q: All (>0) blue eyed people must leave from an island ASAP. | ||
* Nobody knows their own eye color, just others'. | ||
* How many days will it take them to leave? */ | ||
|
||
/** A: We will assume that | ||
* 1) all blue eyed people will fit on a single flight | ||
* 2) all people are intelligent (or have worked out a plane beforehand). | ||
* Since everybody can assume, that if the plane didn't leave after as many days as the number of blue eyed people | ||
* the given person sees, she must have a blue eye also. | ||
* Therefore they will leave the day after that. */ | ||
|