Author Topic: A hard riddle  (Read 9527 times)

0 Members and 3 Guests are viewing this topic.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
A hard riddle
« on: September 24, 2007, 02:23:16 am »
A sultan instructs his viziers, of unspecified number, to stand in a formation. When in formation, he will place a hat, either red or blue, on each one's head. They will not know which color hat is on their head. They are not allowed to move or communicate with each other once the first hat is placed.

Each vizier must say the color of the hat on his head. If more than one vizier says the wrong color, the sultan will kill all of them. The viziers may only say either "red" or "blue." They have the night to plan a strategy. The strategy must work for any number of viziers, and for any number of red or blue hats.

I solved this in about an hour. Critical thinking required.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: A hard riddle
« Reply #1 on: September 24, 2007, 03:02:57 am »

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A hard riddle
« Reply #2 on: September 24, 2007, 03:19:31 am »
It's a similar problem, but that one has at least four distinct solutions, with many variations.

This one has only one solution, and only two variations of it. Joe's solution to the other problem will not solve this one, and is far less elegant than the one that works here. The solution to this riddle does work for the other one, though.
« Last Edit: September 24, 2007, 03:29:26 am by Camel »

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: A hard riddle
« Reply #3 on: September 24, 2007, 12:20:56 pm »
The problem I gave only has one real solution that I know of.  None of the solutions presented match all of the specifications.

I'm pretty sure it's the same riddle worded differently.  I solved this too, by the way.  I don't remember how long it took me, but I'm pretty sure I thought of a solution in the middle of class (my professor gave it to us at the beginning).

Yours has some ambiguity (maybe its intentional?).  Is the "formation" a line or something completely arbitrary?  If there's an unspecified number, are you to assume that its possible there are enough viziers such that the first of them cannot see all of the rest when in formation?

Incidentally, I never posted the solution to mine? :(


Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A hard riddle
« Reply #4 on: September 24, 2007, 12:39:39 pm »
As I said, I came up with four distinct solutions to the problem you posted, which includes the one Joe posted, the solution to this riddle, and two more. There are also many variations - it diverges, but since there are only 10 prisoners, it's finite.

Assume that the ground is flat, visibility is infinite, and viziers have perfect vision.

Did you read Joe's solution to your problem? It doesn't work for this riddle, because there isn't a certain number of viziers. There are only two variations on one solution to this problem, and it's elegant; it can be explained in two concise sentences, not five paragraphs like Joe's solution.

Is it time for a hint yet?
« Last Edit: September 24, 2007, 12:46:34 pm by Camel »

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: A hard riddle
« Reply #5 on: September 24, 2007, 12:51:21 pm »
As I said, I came up with four distinct solutions to the problem you posted, which includes the one Joe posted, the solution to this riddle, and two more. There are also many variations on

Did you read Joe's solution to your problem? It doesn't work for this riddle, because there isn't a certain number of viziers. There are only two variations on one solution to this problem, and it's elegant; it can be explained in two concise sentences, not five paragraphs like Joe's solution.

Is it time for a hint yet?

Joe's solution doesn't work for this reason:

Quote
In your diagram, there are five red hats and five green hats. I'm not sure if they were intentionally even, but I'll assume they were, because that makes it easier.

Quote
The diagram is a mere representation of a possible configuration of hats.  The order and number of each color is purely random.

He was on the right track, but it isn't a legitimate answer.  I even said "that's close." :P

No, I know the answer.  I asked for clarification in the third paragraph, but I guess you didn't catch that.

Gur cevfbaref neovgenevyl pubbfr obgu n pbybe gung gur svefg cevfbare/ivrmre jvyy pbhag naq bar bs gur gjb pbybef (fnl erq) gung pbeeryngr jvgu "bqq".  Jura gur svefg crefba frrf na bqq ahzore bs ungf bs gur pubfra pbybe, gurl jvyy fnl "erq."  Vs abg, gurl jvyy fnl gur anzr bs gur bgure pbybe.  Ur unf n 50% punapr gb yvir naq jvyy or gur bayl bar jvgu gur cbffvovyvgl gb qvr vs guvf vf rkrphgrq cebcreyl.  Gur arkg cevfbare jvyy or noyr gb vasre gur pbybe bs uvf ung ol gur ahzore bs erznvavat ungf bs gur pubfra pbybe.  Vs vg vf fgvyy bqq, gura uvf ung vf bs gur bgure pbybe.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A hard riddle
« Reply #6 on: September 24, 2007, 01:08:58 pm »
You're red hot, but there is a minor flaw with your solution. I'm pretty sure you had the right answer in your head, but what you wrote is not complete. Can you make the answer simpler?

In this riddle, if exactly zero or one vizier is wrong, they all live. This isn't a maximize the odds problem, it's pass/fail.
« Last Edit: September 24, 2007, 01:13:44 pm by Camel »

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: A hard riddle
« Reply #7 on: September 24, 2007, 02:15:21 pm »
You're red hot, but there is a minor flaw with your solution. I'm pretty sure you had the right answer in your head, but what you wrote is not complete. Can you make the answer simpler?

In this riddle, if exactly zero or one vizier is wrong, they all live. This isn't a maximize the odds problem, it's pass/fail.

Ah, I see.  I think my solution allows for the first vizier to have a 50% of being correct and 100% chance of each successive person being correct.  So perhaps this is better?

Gur cevfbaref neovgenevyl pubbfr obgu n pbybe gung gur svefg cevfbare/ivrmre jvyy pbhag naq bar bs gur gjb pbybef (fnl erq) gung pbeeryngr jvgu "bqq".  Jura gur svefg crefba frrf na bqq ahzore bs ungf bs gur pubfra pbybe, gurl jvyy fnl "erq."  Vs abg, gurl jvyy fnl gur anzr bs gur bgure pbybe.  Rnpu fhpprffvir crefba jvyy or noyr gb vasre gur pbybe bs uvf ung ol gur nafjre bs gur crefba orsber uvz naq gur ahzore bs erznvavat ungf (gung ur frrf) bs gur pubfra pbybe.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A hard riddle
« Reply #8 on: September 24, 2007, 03:50:37 pm »
Gur cevfbaref neovgenevyl pubbfr obgu n pbybe gung gur svefg cevfbare/ivrmre jvyy pbhag naq bar bs gur gjb pbybef (fnl erq) gung pbeeryngr jvgu "bqq".  Jura gur svefg crefba frrf na bqq ahzore bs ungf bs gur pubfra pbybe, gurl jvyy fnl "erq."  Vs abg, gurl jvyy fnl gur anzr bs gur bgure pbybe.  Rnpu fhpprffvir crefba jvyy or noyr gb vasre gur pbybe bs uvf ung ol gur nafjre bs gur crefba orsber uvz naq gur ahzore bs erznvavat ungf (gung ur frrf) bs gur pubfra pbybe.

Bingo! A bit wordy, but correct none the less.

The short answer:
Gur svefg ivmvre'f erfcbafr vaqvpngrf gur cnevgl bs gur pbhag bs n cnegvphyne pbybe bs ungf. Gur erfg bs gur ivmvref pna vasre gur pbybe bs gur ung ba gurve urnq.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: A hard riddle
« Reply #9 on: September 24, 2007, 04:02:13 pm »
Hehe, yeah.  I opted out of using that word (the one starting with a p and ending with a y) to describe the state.  I suppose most of the people that care about the answer probably know what it is, though... lol.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A hard riddle
« Reply #10 on: September 24, 2007, 04:04:45 pm »
You can't have an elegant answer without a vocabulary.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: A hard riddle
« Reply #11 on: September 24, 2007, 04:12:37 pm »
You can't have an elegant answer without a vocabulary.

I wasn't trying for an elegant answer. ;)

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A hard riddle
« Reply #12 on: September 26, 2007, 10:02:53 am »
Hehe, yeah.  I opted out of using that word (the one starting with a p and ending with a y) to describe the state.  I suppose most of the people that care about the answer probably know what it is, though... lol.

Apply? Aptly? Apathy? Aperiodically? Apology? Appallingly? Appetizingly? Apprehensibly? Apparently? Am I getting warmer?

Offline Hitmen

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 1913
    • View Profile
Re: A hard riddle
« Reply #13 on: September 26, 2007, 11:59:47 am »
Hehe, yeah.  I opted out of using that word (the one starting with a p and ending with a y) to describe the state.  I suppose most of the people that care about the answer probably know what it is, though... lol.

Apply? Aptly? Apathy? Aperiodically? Apology? Appallingly? Appetizingly? Apprehensibly? Apparently? Am I getting warmer?
iago fails at life.

Here you go:
the one starting with the letter 'p' and ending with the letter 'y'

By the way, I dunno how you figured that it started with 'ap' but only ended with 'y' rather than 'ay' if you misinterpreted it that way :)
Quote
(22:15:39) Newby: it hurts to swallow

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A hard riddle
« Reply #14 on: September 26, 2007, 12:02:54 pm »
Haha, I just read it once. It seems to may that "starting with ap" sounds better than "ending with ay". :)

Plus, I usually say just the name of the letter, without the "a" in front. Saying, "a p" sounds funny to me..