Puzzle challenges!

This is the place for forum games, not discussing games (Off-Topic), games development (Games Development), or Wesnoth (all other forums above).

Moderator: Forum Moderators

Post Reply
User avatar
Inky
Forum Moderator
Posts: 527
Joined: September 22nd, 2014, 1:02 am
Location: USA

Re: Puzzle challenges!

Post by Inky »

I love this logic puzzle! I like how your version has a fantasy theme with dragons :) The ending was kind of a downer though...wouldn't it be nicer if something positive happened instead? (I feel like in the current situation the best thing to do is just not think about it :whistle: )

As for a hint, I hope this is helpful without giving away too much:
Spoiler:
User avatar
Ephraim
Posts: 47
Joined: July 3rd, 2017, 2:03 pm
Location: The Great Library of WML, Studiying it

Re: Puzzle challenges!

Post by Ephraim »

Thinking about Inky's hint...
Spoiler:
The Great Library of WML is huge and extense. I must find the book who will lead me to create a perfect campaign.
Future Project: History of Vindalf
User avatar
Elder2
Posts: 405
Joined: July 11th, 2015, 2:13 pm

Re: Puzzle challenges!

Post by Elder2 »

Ok, I think I have figured it out, if there are 2 dragons, then, knowing that at least one of them has green eyes, dragon A is looking at dragon B, he sees that dragon B has green eyes, therefore either dragon B is the only dragon with green eyes or they both have green eyes. If only dragon B had green eyes, dragon B looking at dragon A would see that dragon A doesn't have green eyes and thus he would infer that he has green eyes himself and he would turn into stone in the morning.
In the morning of the first day, dragon A doesn't see dragon B turning into stone and so dragon B doesn't see dragon A turning into stone since he follows the same train of thought, therefore both dragons conclude that they both must have green eyes and they turn into stone in the morning the second day.

If we extrapolate that to have 50 pairs of dragons we have the solution.
User avatar
Inky
Forum Moderator
Posts: 527
Joined: September 22nd, 2014, 1:02 am
Location: USA

Re: Puzzle challenges!

Post by Inky »

Yes, Ephraim's answer and reasoning is correct! Nice! 8)
ElderofZion wrote:If we extrapolate that to have 50 pairs of dragons we have the solution.
Unfortunately the 50 pairs thing would only work if the sailor divided the 100 dragons into 50 pairs and told each pair "at least one of you has green eyes." But your reasoning for 2 dragons is exactly correct - you just need to think about 3 dragons next.
User avatar
Ephraim
Posts: 47
Joined: July 3rd, 2017, 2:03 pm
Location: The Great Library of WML, Studiying it

Re: Puzzle challenges!

Post by Ephraim »

Inky wrote:Yes, Ephraim's answer and reasoning is correct! Nice! 8)
Hurray! Well, here goes the next one:

The two sages and the evil king:

"Two sages of a town were imprisoned by an evil king. In order to test the intelligence of the sages, he locked them in cells separated from a tower: one looked eastward and the other westward, so that they could not communicate with the other one. Between the two, they could see all the cities that made up the kingdom, but no city was visible at the same time by both. The king told them that the cities of the kingdom were five or eight, and that they would be released immediately after one of them told the jailer that every morning he would bring them food, how many cities were part of the kingdom. In addition, the king told them they had a week or they would end up hanging. But on the third morning, the two sages were released after one of them discovered through a logical procedure how many cities the kingdom was made up of. What logical process led them to solve their problem? How many cities make up the kingdom? "

Warning! It's very difficult! Maybe you should cooperate to get the answer.
Solution and Winner:
Last edited by Ephraim on August 10th, 2017, 8:45 am, edited 1 time in total.
The Great Library of WML is huge and extense. I must find the book who will lead me to create a perfect campaign.
Future Project: History of Vindalf
User avatar
Elder2
Posts: 405
Joined: July 11th, 2015, 2:13 pm

Re: Puzzle challenges!

Post by Elder2 »

Hmmm, well, right, thinking about it the dragon thing is correct, but for this to work for large group of dragons, like the 100 dragons here it also requires each dragon to have perfect information about every other dragon of the 100, whether he got petrified or not, otherwise I think it wouldn't work. Also I think they would need to have perfect memory.
User avatar
Ravana
Forum Moderator
Posts: 3002
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Puzzle challenges!

Post by Ravana »

8.

Cases

Code: Select all

I see 0-2 cities.
Skip day.
d2 say 5, or he would have returned 8 on d1.

I see 3 cities.
He sees 2 or 5.
If he sees 2, he knows I see 3 or 6, and if 6, would return 8 on d1.
So at d2+ he knows I see 3, and returns 5 on d2.

I see 4 cities.
He sees 1 or 4.
If he sees 1, he knows I see 4 or 7, and if 7, would return 8 on d1.
	So at d2+ he knows I see 4, and returns 5 on d2.
If he sees 4, he knows I see 1 or 4, and if 1, then on d2 would return 5.
	So at d3+ he knows I see 4, and returns 8 on d3.
User avatar
Elder2
Posts: 405
Joined: July 11th, 2015, 2:13 pm

Re: Puzzle challenges!

Post by Elder2 »

@Ephraim i think I got it, the answer is: 8

Each of the sages can see a number of cities from 0 to 8. There are sages A and B. Neither of the sages (probably assuming they are perfect logicians XD) reported the number of cities on the first morning or the second morning.


If sage A saw 8 cities the sage B must see 0 cities and on the second day sage A would report 8 cities on the first morning, because it is the only possibility.

If sage A saw 7 cities, sage B must see 1 cities so sage A would report 8 cities on the first morning.

If sage A saw 6 cities, sage B must see 2 cities so sage A would report 8 cities on the first morning.

If sage A saw 5 cities, sage B can see either 3 or 0 cities. If sage B saw 0 cities then, sage B would conclude sage A must see either 8 or 5 cities, If sage A saw 8 cities he would report it on the first morning so A must see 5 cities, and sage B would report 5 cities on the second morning, but he didn't.
Therefore sage B must see 3 cities, so sage A would report 8 cities on the third morning

If sage A saw 4 cities, sage B must see either 4 or 1 cities, if sage B saw 1 cities he would conclude that sage A must see either 7 or 4 cities, if sage A saw 7 he would report 8 cities on the first morning, if he saw 4, then sage B would report 5 cities on the second morning.
Therefore sage B must see 4 cities, and sage A reports 8 cities on the third morning

If sage A saw 3 cities, sage B can see either 2 cities or 5 cities. If sage B saw 2 cities he would conclude sage A can see either 6 or 3, he can't see 6 because he would report it on the first morning, so he must see 3 and would report 5 on the second morning. Because he didn't sage B must see 5 cities, so sage A would report 8 cities on the third morning

If sage A saw 2 cities, sage B can see either 6 or 3, he can't see 6 because he would report it, so sage A would report 5 cities on the second morning, he didn't

If sage A saw 1 city then sage B can see either 7 or 4 cities, if he saw 7 he would report it on the first morning, so he must see 4 cities and sage A would report 5 cities on the second morning, he didn't


PS. Ravana's approach is better. XD
User avatar
Inky
Forum Moderator
Posts: 527
Joined: September 22nd, 2014, 1:02 am
Location: USA

Re: Puzzle challenges!

Post by Inky »

ElderofZion wrote:Hmmm, well, right, thinking about it the dragon thing is correct, but for this to work for large group of dragons, like the 100 dragons here it also requires each dragon to have perfect information about every other dragon of the 100, whether he got petrified or not, otherwise I think it wouldn't work. Also I think they would need to have perfect memory.
Yes, each dragon can see the 99 other dragons so he'll know whether any other dragon got petrified. However there's no need for perfect memory because on days 1-99 no one gets petrified so there's nothing to remember.

---
Cities problem: I think this could be done a little more elegantly by considering both sages at once:

Day 1: If either sage saw 6,7, or 8 cities they would report 8 on Day 1.

Day 2: Since no one said anything on Day 1, both sages now know that both see 0-5 cities. Therefore if either sage saw 0,1, or 2 cities they would know that since the other sage saw less than 6 cities, then there cannot be 8 cities, and would report 5.

Day 3: Now both sages know that both see 3-5 cities, and since any sums of these are at least 6 then there must be 8 cities.
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Puzzle challenges!

Post by Samonella »

:lol: Wow, I disappear for a few hours, and suddenly my riddle has been hinted at, solved, a new one proposed and it sure looks like it has been solved as well! Props to Inky, that's the exact hint I was planning to give. :eng:
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
Ephraim
Posts: 47
Joined: July 3rd, 2017, 2:03 pm
Location: The Great Library of WML, Studiying it

Re: Puzzle challenges!

Post by Ephraim »

Whoa! You are so clever. Ravana, ElderofZion and Inky's answer were correct. Honestly, I prefer Inky's solution, is better explained, but Ravana posted the answer first, so... let's say that Ravana won.
Do you know other puzzles, Ravana?
The Great Library of WML is huge and extense. I must find the book who will lead me to create a perfect campaign.
Future Project: History of Vindalf
User avatar
Ravana
Forum Moderator
Posts: 3002
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Puzzle challenges!

Post by Ravana »

I let someone else post.
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Puzzle challenges!

Post by Velensk »

If you're looking for an interesting one, there's one I remember reading in a book that was quite fun though I don't remember the answer. There were actually many of this style of question in the book of which this was but one however this is the one that stuck with me for some reason.
>As a note I'm somewhat throwing you into the deep end, as in the book, you've gone through a lot of problems that show the small jumps of logic needed to make this problem simpler but there's no reason one couldn't work their way through them without previous problems if so inclined. The problem is actually not that difficult, or at least, not compared to some of the questions that came after it in the book.

-In the Land of Transylvania there are Humans, Vampires, Faerie, and Alien Infiltrators. These groups are all aware of the others and understand how each other work. The Vampires, Faerie, and Alien Infiltrators all are masters of disguise and visually indistinguishable from humans.

-Humans will always tell the truth (as they perceive it)
-Vampires and Faerie will both always lie (as they perceive it)
-The Alien Infiltrators when they first arrived were puzzled by the behavior of those around them and have developed an odd habit where they always tell the truth (as they perceive it) every other question and lie the rest of the time but there is no way to know how one responded to the last question they were asked when you first meet them.

-Humans and Vampires may be sane or insane.
-Faerie are always insane
-Alien Infiltrators are always sane

Beings who are sane will perceive the truth as the truth and falsehood as falsehood. Beings who are insane perceive all things that are false as being true and all things that are true as being false.

So for instance, all Faerie believe that they are a Human, a Vampire, and an Alien Infiltrator (and also all possible subsets of those three) but if you ask them if they are a Faerie, they will say yes because Faerie always lie.

>The question is, what is the maximum number of yes/no style questions one must ask any random inhabitant of the land to determine what race they are and whether or not they are sane?

EDIT: After actually typing the question, I remembered the answer so I can confirm for you.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Puzzle challenges!

Post by Samonella »

Nice puzzle! I think I figured out how to determine what they are in max 4 questions, though it may be possible to do it in less.
Possible solution:
EDIT: About the cities problem... did the king threaten that if they guessed wrong they'd be killed or something? I can think of a way to be released by day 2, and it's a much simpler logical process... there are only two possibilities for the number of cities, after all...
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Puzzle challenges!

Post by Velensk »

Spoiler:
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
Post Reply