independent and unofficial
Prince fan community site
Wed 29th Jan 2020 10:22am
Welcome! Sign up or enter username and password to remember me
Forum jump
Forums > General Discussion > Could you work for Google? If you can solve the '100 hat riddle' you're in with a chance
« Previous topic  Next topic »
Page 1 of 2 12>
  New topic   Printable     (Log in to 'subscribe' to this topic)
Author

Tweet     Share

Message
Thread started 03/03/16 5:04pm

purplethunder3
121

avatar

Could you work for Google? If you can solve the '100 hat riddle' you're in with a chance

Could you work for Google? If you can solve the '100 hat riddle' you're in with a chance

Artificial intelligence has no problem coming up with the answer - but can you?

Google
Are you smart enough to work for Google? Solve the riddle below

While the rigour of the questions asked in job interviews may vary, there are some stock favourites which come up again and again.

What are your three greatest strengths and weaknesses? And the perennial classic: Where do you see yourself in five years time?

But if you want a job at Google, you'll need more than your five year plan to cut the mustard - their interview involves solving a fiendish riddle which artificial intelligence has no problem getting to the bottom of.

Have your say in the comments section below

The 100 hat riddle

Jakob FoersterGoogle interview hat riddle
Google interview hat riddle - can you come up with a solution?

1. 100 prisoners stand in line, one in front of the other, each wearing either a red hat or a blue hat.

2. Every prisoner can see the hats of the people in front but not their own hat, or the hats worn by anyone behind.

3. A prison guard starts at the back of the line and asks each prisoner the colour of their hat. If they answer correctly, they will be pardoned, if they get it wrong, they’ll be executed.

4. Before lining up, the prisoners are allowed to collectively come up with a strategy.

What should they do?

The good news is, there IS a way for 99 of the prisoners to definitely survive and the remaining prisoner to have a respectable shot at 50 per cent.

  • To get this result, the first prisoner in the line must say "blue" if he sees an even number of hats in front of him.

  • If he sees an odd number of hats in front of him, he must say "red".

  • This information, coupled with the responses other prisoners have already given and the hats in front is enough to work out what colour hat is on your head.

So, everyone except the first prisoner will definitely answer correctly

A team from the University of Oxford and Google's DeepMind created an AI (artificial intelligence) to tackle the riddle - and it cracked it.

GettyRobot
Artificial Intelligence can get a job at Google no problem

If you love puzzles, but would like to have a go at something humans can solve, see if you can crack this simple brainteaser designed for children - which got the better of a lot of adults.

"Music gives a soul to the universe, wings to the mind, flight to the imagination and life to everything." --Plato
  - E-mail - orgNote - Report post to moderator
Reply #1 posted 03/03/16 8:24pm

princeiscool

avatar

purplethunder3121 said:






Could you work for Google? If you can solve the '100 hat riddle' you're in with a chance









Artificial intelligence has no problem coming up with the answer - but can you?












Google

Are you smart enough to work for Google? Solve the riddle below

While the rigour of the questions asked in job interviews may vary, there are some stock favourites which come up again and again.


What are your three greatest strengths and weaknesses? And the perennial classic: Where do you see yourself in five years time?


But if you want a job at Google, you'll need more than your five year plan to cut the mustard - their interview involves solving a fiendish riddle which artificial intelligence has no problem getting to the bottom of.



Have your say in the comments section below



The 100 hat riddle



Jakob FoersterGoogle interview hat riddle

Google interview hat riddle - can you come up with a solution?


1. 100 prisoners stand in line, one in front of the other, each wearing either a red hat or a blue hat.


2. Every prisoner can see the hats of the people in front but not their own hat, or the hats worn by anyone behind.


3. A prison guard starts at the back of the line and asks each prisoner the colour of their hat. If they answer correctly, they will be pardoned, if they get it wrong, they’ll be executed.


4. Before lining up, the prisoners are allowed to collectively come up with a strategy.


What should they do?


The good news is, there IS a way for 99 of the prisoners to definitely survive and the remaining prisoner to have a respectable shot at 50 per cent.



  • To get this result, the first prisoner in the line must say "blue" if he sees an even number of hats in front of him.




  • If he sees an odd number of hats in front of him, he must say "red".



  • This information, coupled with the responses other prisoners have already given and the hats in front is enough to work out what colour hat is on your head.

So, everyone except the first prisoner will definitely answer correctly


A team from the University of Oxford and Google's DeepMind created an AI (artificial intelligence) to tackle the riddle - and it cracked it.



GettyRobot

Artificial Intelligence can get a job at Google no problem


If you love puzzles, but would like to have a go at something humans can solve, see if you can crack this simple brainteaser designed for children - which got the better of a lot of adults.
















15?
"this is where the PURPLE PARTY PEOPLE be"
  - E-mail - orgNote - Report post to moderator
Reply #2 posted 03/03/16 9:08pm

KingBAD

16 on the fruit

i have no idea why the answer (100 hats)

would be 'red' 'red'

........................................................

i am KING BAD!!!
you are NOT...
evilking
"KingBAD, well you are just a troll" (an emotional fan)
  - E-mail - orgNote - Report post to moderator
Reply #3 posted 03/04/16 3:58am

OnlyNDaUsa

avatar

fruit math: 14

the hat one seems to be like the loins and sheep riddle

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #4 posted 03/04/16 4:16am

OnlyNDaUsa

avatar

there seems to be something wrong with the question. Saying "blue" or "red" based on the number of total hats is not helpful... they would all know how many were in fount of them...anyway there is something eles to this riddle...

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #5 posted 03/04/16 7:23am

XxAxX

avatar

um... giggle i googled the answer:

.

The solution

For the sake of explanation let's label the prisoners in line order B, C and D. Thus C can see B (and B's hat color) and D can see B and C.

The prisoners know that there are only two hats of each color. So if D observes that B and C have hats of the same color, D would deduce that his own hat is the opposite color. However, if B and C have hats of different colors, then D can say nothing. The key is that prisoner C, after allowing an appropriate interval, and knowing what D would do, can deduce that if D says nothing the hats on B and C must be different. Being able to see B's hat he can deduce his own hat color.

In common with many puzzles of this type, the solution relies on the assumption that all participants are totally rational and are intelligent enough to make the appropriate deductions.

After solving this puzzle, some insight into the nature of communication can be gained by pondering whether the meaningful silence of prisoner D violates the "No communication" rule (given that communication is usually defined as the "transfer of information").

  - E-mail - orgNote - Report post to moderator
Reply #6 posted 03/04/16 9:08am

RodeoSchro

avatar

Fruit is 15.

Second Funkiest White Man in America

P&R's Palladin
  - E-mail - orgNote - Report post to moderator
Reply #7 posted 03/04/16 10:22am

morningsong

The fruit is 14.

1 coconut half = 1, 1 apple = 10, 3 bananas = 3.

It's a trick on scanning ability. (Sorry scanning and reasoning ability)




I don't get the reasoning about the hats yet. Maybe I'll make an effort maybe I won't.

[Edited 3/4/16 10:23am]

  - E-mail - orgNote - Report post to moderator
Reply #8 posted 03/04/16 11:29am

XxAxX

avatar

KingBAD said:

16 on the fruit

i have no idea why the answer (100 hats)

would be 'red' 'red'

........................................................

i got sixteen too.

apple = 10

banana bunch = 4

coconut half =2

  - E-mail - orgNote - Report post to moderator
Reply #9 posted 03/04/16 12:19pm

Hudson

avatar

There are only 3 bananas on the last equation as opposed to 4 in the previous equations. Also half as many coconuts as before.


3 Apples = 30 which is 10 per apple

apple (10) + 4 bananas (4) + 4 bananas (4) = 18

4 bananas (4) - 2 coconut halves (2) = 2

1 coconut half (1) + apple (10) + 3 bananas (3) = 14

I don't want to get eaten alive
'cause you're so dangerous
No more hearts I can trust, you see
I don't want to get eaten alive
To be eaten alive
Eaten alive
I don't ever want to be
Eaten alive
  - E-mail - orgNote - Report post to moderator
Reply #10 posted 03/04/16 12:26pm

babynoz

sad dunce headlp

Prince, in you I found a kindred spirit...Rest In Paradise.
  - E-mail - orgNote - Report post to moderator
Reply #11 posted 03/04/16 1:33pm

morningsong

Okay this right here makes no sense to me:

- To get this result, the first prisoner in the line must say "blue" if he sees an even number of hats in front of him.



If there are 100 prisoners and the first one can see everyone in front of him, wouldn't he see 99 prisoners? So that's odd, therefore he can't say "blue" he'd have to say "red". But if that's the solution then how is there a guarantee for 99 other prisoners if the color of the hats are randomly lined up?

I mean the picture above the 3rd hat would say "red" then the next would say "blue" then "red" then "blue" but that only works if they are lined up alternating.


I don't get it.

  - E-mail - orgNote - Report post to moderator
Reply #12 posted 03/04/16 1:44pm

purplethunder3
121

avatar

Hudson said:

There are only 3 bananas on the last equation as opposed to 4 in the previous equations. Also half as many coconuts as before.


3 Apples = 30 which is 10 per apple

apple (10) + 4 bananas (4) + 4 bananas (4) = 18

4 bananas (4) - 2 coconut halves (2) = 2

1 coconut half (1) + apple (10) + 3 bananas (3) = 14

doh! It's obvious now that you point it out. That's why I got 15 instead of 14. Boy, my powers of observation ain't as sharp as they used to be. lol Forget the 100 hats! razz

"Music gives a soul to the universe, wings to the mind, flight to the imagination and life to everything." --Plato
  - E-mail - orgNote - Report post to moderator
Reply #13 posted 03/04/16 1:53pm

XxAxX

avatar

purplethunder3121 said:

Hudson said:

There are only 3 bananas on the last equation as opposed to 4 in the previous equations. Also half as many coconuts as before.


3 Apples = 30 which is 10 per apple

apple (10) + 4 bananas (4) + 4 bananas (4) = 18

4 bananas (4) - 2 coconut halves (2) = 2

1 coconut half (1) + apple (10) + 3 bananas (3) = 14

doh! It's obvious now that you point it out. That's why I got 15 instead of 14. Boy, my powers of observation ain't as sharp as they used to be. lol Forget the 100 hats! razz

me too. i only glanced at it. couldn't work for google. sad oh well biggrin

  - E-mail - orgNote - Report post to moderator
Reply #14 posted 03/04/16 2:36pm

morningsong

{To make sure most of them survive, the prisoners must agree on the message communicated with each colour. The first prisoner to speak will say blue if the number of blue hats he sees in front of him is even, or red if he sees otherwise.}


Would that work?

  - E-mail - orgNote - Report post to moderator
Reply #15 posted 03/04/16 2:50pm

lazycrockett

avatar

Screw that NASA wants to pay me $1,200 a week to lay in bed and smoke weed.

The Most Important Thing In Life Is Sincerity....Once You Can Fake That, You Can Fake Anything.
  - E-mail - orgNote - Report post to moderator
Reply #16 posted 03/04/16 2:58pm

morningsong

lazycrockett said:

Screw that NASA wants to pay me $1,200 a week to lay in bed and smoke weed.

spit falloff And there you go.

  - E-mail - orgNote - Report post to moderator
Reply #17 posted 03/04/16 2:59pm

morningsong

XxAxX said:

um... giggle i googled the answer:

.

:facepalm: Talk about delayed reaction. Sometimes I wonder about me.

  - E-mail - orgNote - Report post to moderator
Reply #18 posted 03/04/16 3:06pm

OnlyNDaUsa

avatar

RodeoSchro said:

Fruit is 15.

14

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #19 posted 03/04/16 3:13pm

babynoz

lazycrockett said:

Screw that NASA wants to pay me $1,200 a week to lay in bed and smoke weed.



Damn skippy, cool

Prince, in you I found a kindred spirit...Rest In Paradise.
  - E-mail - orgNote - Report post to moderator
Reply #20 posted 03/04/16 3:20pm

purplethunder3
121

avatar

lazycrockett said:

Screw that NASA wants to pay me $1,200 a week to lay in bed and smoke weed.

Where does one apply? blunt

"Music gives a soul to the universe, wings to the mind, flight to the imagination and life to everything." --Plato
  - E-mail - orgNote - Report post to moderator
Reply #21 posted 03/05/16 6:45am

KingBAD

i think folks look and still miss the thing...

apples= 10

bananas= 4

coconuts= 2

2+10+4= 16 everywhere i ever been...

i am KING BAD!!!
you are NOT...
evilking
"KingBAD, well you are just a troll" (an emotional fan)
  - E-mail - orgNote - Report post to moderator
Reply #22 posted 03/05/16 6:46am

KingBAD

OnlyNDaUsa said:

fruit math: 14

the hat one seems to be like the loins and sheep riddle

i know how hard it is for you to just accept what i say

so i drew you a map...

the answer is 16

lol lol lol

i am KING BAD!!!
you are NOT...
evilking
"KingBAD, well you are just a troll" (an emotional fan)
  - E-mail - orgNote - Report post to moderator
Reply #23 posted 03/05/16 6:50am

KingBAD

XxAxX said:

KingBAD said:

16 on the fruit

i have no idea why the answer (100 hats)

would be 'red' 'red'

........................................................

i got sixteen too.

apple = 10

banana bunch = 4

coconut half =2

you ever notice

that it's basically the same people

they have the most to say on 'other' subjects

so vehemately (no matter how wrong)

are pretty much the same folks that cannot

GET THIS

lol lol lol lol lol lol lol lol lol lol

i really do love walkin through puddles

i am KING BAD!!!
you are NOT...
evilking
"KingBAD, well you are just a troll" (an emotional fan)
  - E-mail - orgNote - Report post to moderator
Reply #24 posted 03/05/16 7:17am

OnlyNDaUsa

avatar

KingBAD said:

XxAxX said:

i got sixteen too.

apple = 10

banana bunch = 4

coconut half =2

you ever notice

that it's basically the same people

they have the most to say on 'other' subjects

so vehemately (no matter how wrong)

are pretty much the same folks that cannot

GET THIS

lol lol lol lol lol lol lol lol lol lol

i really do love walkin through puddles

the irony is the answer is 14...you are mistaken. See each coconut half is 1, each banana is 1, and each apple is 10.

1+10+ (1+1+1)= 14

just like

10+10+10 = 30

10 + (1+1+1+1) + (1+1+1+1) = 18

(1+1+1+1) - (1+1) = 2

1+10+ (1+1+1)= 14

you just do not get the trick is in the number of coconut halves and you number of bananas is the different bunches....


I did a topic on this trick math things a wile back:

like what is 1 X 2 + 3 x 4 + 5 x 0 + 1?

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #25 posted 03/05/16 7:23am

OnlyNDaUsa

avatar

KingBAD said:

OnlyNDaUsa said:

fruit math: 14

the hat one seems to be like the loins and sheep riddle

i know how hard it is for you to just accept what i say

so i drew you a map...

the answer is 16

lol lol :lol:

the irony is you did not read the legend on your own map and you got lost along the way.

the answer is 14

it is fine to point out when someone makes an error. I respect that. I can accept being wrong. But in doing so, how one goes about it is important. It is important to not over do it becase as is the case here if you are in error and you are mocking in how you made the 'correction' it really makes you look worst.

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #26 posted 03/05/16 7:27am

OnlyNDaUsa

avatar

KingBAD said:

i think folks look and still miss the thing...

apples= 10

bananas= 4

coconuts= 2

2+10+4= 16 everywhere i ever been...



ok i can not help it but YES i am replying to all 3 of KB's replies:



an apple is 10 (well we assume it is a whole apple)
a bunch of 4 bananas is 4
and 2 coconut halves are 2

In the last sentence we have one coconut half, an apple, and a bunch of 3 bananas- for a totall established value of 14.

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #27 posted 03/05/16 7:51am

OnlyNDaUsa

avatar

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Reply #28 posted 03/05/16 8:22am

XxAxX

avatar

KingBAD said:

OnlyNDaUsa said:

fruit math: 14

the hat one seems to be like the loins and sheep riddle

i know how hard it is for you to just accept what i say

so i drew you a map...

the answer is 16

lol lol lol

.

this is one of those trick questions they throw on IQ tests. it is not a measure of intelligence, it is a measure of whether or not you are paranoid enough to expect a trick question.

.

it's not about math, it's about whether you noticed that only one half of the coconut, and only three bananas instead of four, are in the bunches in the last question.

.

once a person comes to expect trick questions, they are easy to solve.

  - E-mail - orgNote - Report post to moderator
Reply #29 posted 03/05/16 8:28am

OnlyNDaUsa

avatar

XxAxX said:

KingBAD said:

i know how hard it is for you to just accept what i say

so i drew you a map...

the answer is 16

lol lol lol

.

this is one of those trick questions they throw on IQ tests. it is not a measure of intelligence, it is a measure of whether or not you are paranoid enough to expect a trick question.

.

it's not about math, it's about whether you noticed that only one half of the coconut, and only three bananas instead of four, are in the bunches in the last question.

.

once a person comes to expect trick questions, they are easy to solve.

it has to be either a trick or rely on a common error people make. Like what is 1 X 2 + 3 x 4 + 5 x 0 + 1 = ? not a trick but dose allow for a basic common error.

No one is coming for your abortion: they just want common-sense abortion regulations: background checks, waiting periods, lifetime limits, take a class, and a small tax.
  - E-mail - orgNote - Report post to moderator
Page 1 of 2 12>
  New topic   Printable     (Log in to 'subscribe' to this topic)
« Previous topic  Next topic »
Forums > General Discussion > Could you work for Google? If you can solve the '100 hat riddle' you're in with a chance