All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic > Liars and Knights
The 37% Solution (Posted on 2003-06-24) Difficulty: 4 of 5
Kazaam the wizard lives in the kingdom of Liars and Knights. He is planning a grand illusion for the King's golden jubilee, in which he will make hundreds of people appear to turn into gold.

Kazaam plans to lay out markers on the parade ground for the people in the illusion to stand on. For the illusion to work, the markers must be laid out in a perfectly square grid, with an even number of rows and columns. Every marker must have a liar or knight standing on it, arranged such that they each can say that every person standing next to them in the same row or the same column is of the opposite persuasion (i.e. every knight can say that all adjacent markers have a liar standing on it, and vice versa).

The last detail required for Kazaam's spell to work is that at least 37% of the people in the illusion must be knights. What is the minimum number of rows and columns needed to accommodate this ratio of knights to liars, keeping in mind Kazaam wants at least 100 people in the illusion?

  Submitted by Bryan    
Rating: 4.2857 (7 votes)
Solution: (Hide)
If the only restriction were for the knights to be able to say all adjoining markers contain people of the opposite persuasion (i.e. liars), then the entire illusion could be filled with alternating liars and knights like the light and dark squares of a checkerboard, and there could be up to 50% knights. But when a liar says all adjoining markers contain people of the opposite persuasion, for this statement to be a lie at least one adjoining marker needs to have another liar on it.

Consider a vast checkerboard with black squares representing knights, and ignore the edges of the board for now. If every other diagonal line of knights were replaced with an alternating KLKLKL diagonal line, the result would be a pattern that allowed both liars and knights to make the required statement, and this pattern would also optimize the ratio of knights to liars. This pattern allows up to 3/8 (37.5%) of the population to be knights.

When the edges of the checkerboard are taken into account, we have to make sure that the KLKLKL diagonal lines end with a liar at each end, otherwise a liar at the end of an adjacent all-liar diagonal line will have knights on all sides of him, thus making him unable to lie that all adjacent cells contain people of the opposite persuasion. For an NxN grid where N is even (as stated in the problem), there are N black diagonals with an odd number of cells. N/2 of these will be the KLKLKL lines, and for these lines to have a liar at each end requires an average of one extra liar for every two such lines, or N/4 additional liars. In other words, the equation for the maximum number of knights in the wizard's illusion is

Kmax=3/8 * N² – N/4
Note: the exception to this rule is for N=4, where 6 knights can be safely housed using a deviant pattern. This solution is inadequate for Kazaam's illusion, since he wants hundreds of people in it.

For Kmax=0.37, N=50. Thus the minimum number of rows and columns in Kazzam's illusion is 50. 2500 liars and knights (at least!) will be required for this illusion.

As the number of rows and columns approches infinity, K/L approaches 0.375.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle Thoughts K Sengupta2023-06-19 07:00:59
SolutionNo SubjectDej Mar2008-01-23 03:18:58
Hints/Tipsre: Please post more about SolutionBryan2003-07-14 06:40:30
Please post more about SolutionEnder2003-07-01 02:53:00
Some Thoughtsre(3): Solution?Ender2003-06-25 08:30:18
Some Thoughtsre(2): Solution?Ender2003-06-25 04:11:57
re: Solution?Bryan2003-06-24 16:15:43
Some Thoughtsre: Solution?Gamer2003-06-24 13:17:29
re: Am I missing somethingDJ2003-06-24 13:08:09
Am I missing somethingK2003-06-24 13:02:38
Hints/Tipsre: Solution?Gamer2003-06-24 12:26:41
Some ThoughtsSolution?Ender2003-06-24 11:29:20
Some ThoughtsA Few ThoughtsLewis2003-06-24 10:58:45
Some ThoughtsFirst GlanceDJ2003-06-24 10:49:45
Hints/TipsMy notesGamer2003-06-24 09:35:37
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (12)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information