Interesting Problem/Puzzle/Game
Submitted by dukerox7593 on Sun, 05/03/2009 - 22:32.
ok here is the game:
your opponent has a secret number that is 4 digits long. the digits are 0-9 and no digit can be repeated in the number (in other words all 4 numbers are different)
examples: 1234, 1948, 4950
you have to guess the number
when you guess a number: your opponent gives you back 2 numbers (x,y)
number x is the amount of numbers in the right place
number y is the amount of numbers right but in the wrong place
anyone have an algorithm to solve this problem using the 2 numbers given back?
your opponent has a secret number that is 4 digits long. the digits are 0-9 and no digit can be repeated in the number (in other words all 4 numbers are different)
examples: 1234, 1948, 4950
you have to guess the number
when you guess a number: your opponent gives you back 2 numbers (x,y)
number x is the amount of numbers in the right place
number y is the amount of numbers right but in the wrong place
anyone have an algorithm to solve this problem using the 2 numbers given back?