Math Question-Logic

Started by Bogey, October 05, 2011, 05:54:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bogey

This is a problem on my lad's homework tonight.  We are clueless.  This is it (nothing more to add).  We are not sure what they are even asking fo.  Any help appreciated. :)

Deduce the answer to the following game of cows and bulls:

(Reminder: A cow means a number is correct in value but in the wrong position and the bull indicates that a number is both correct in value and in the correct position.  ie 2 cows and 1 bull would indicate that all three numbers were correct but two in the wrong positions.)


Guess                       Cows                        Bulls
2  4  5                             2                             -
3  5  4                             2                             -
4  2  3                             2                             -
There will never be another era like the Golden Age of Hollywood.  We didn't know how to blow up buildings then so we had no choice but to tell great stories with great characters.-Ben Mankiewicz

DavidW

4 can't be right because it appears in all three places but there are no bulls.

I suspect it must be 5 3 2 since there are no bulls, look where the 5, 3 and 2s are in each place.

Bogey

Quote from: DavidW on October 05, 2011, 06:04:14 PM
4 can't be right because it appears in all three places but there are no bulls.

I suspect it must be 5 3 2 since there are no bulls.

What did you do to figure it out?
There will never be another era like the Golden Age of Hollywood.  We didn't know how to blow up buildings then so we had no choice but to tell great stories with great characters.-Ben Mankiewicz

DavidW

Alright I'll go ahead and cheat leech block to explain in enough detail:

Suppose 4 is right.  It must appear in either left, middle or right.  But if it appears in the middle the first guess would have a bull.  If it appears in the right the second guess would have a bull.  If it appears in the left the third guess would have a bull.  No guess has a bull thus by contradiction 4 is not right.

That leaves 2, 3 and 5.  2 appears on the left on the first row, and in the middle on the third row yet no bulls... therefore it can't be on the left or middle, it must be on the right.  Using the same logic you can figure out the places for 3 and 5.

Bogey

Quote from: DavidW on October 05, 2011, 06:10:01 PM
Alright I'll go ahead and cheat leech block to explain in enough detail:

Suppose 4 is right.  It must appear in either left, middle or right.  But if it appears in the middle the first guess would have a bull.  If it appears in the right the second guess would have a bull.  If it appears in the left the third guess would have a bull.  No guess has a bull thus by contradiction 4 is not right.

That leaves 2, 3 and 5.  2 appears on the left on the first row, and in the middle on the third row yet no bulls... therefore it can't be on the left or middle, it must be on the right.  Using the same logic you can figure out the places for 3 and 5.

Ah....we get it!  Thanks.  He said it reminded him of Mastermind.  Thank you much, David!

There will never be another era like the Golden Age of Hollywood.  We didn't know how to blow up buildings then so we had no choice but to tell great stories with great characters.-Ben Mankiewicz

DavidW