Indeed, it’s a smart one. But it needs more explainations. Without yours, I would have skip the puzzle.
Hi,
I am having a hard time solving this puzzle, and I think I need a little bit more information. Here is what I understand after reading the problem description:
Maggie picks two digits a
and b
with 1 ≤ a
≤ 9, 1 ≤ b
≤ 9, and a
≤ b
.
She writes their sum on a blue piece of paper, folds it, and says “Here is the sum of the two digits I chose” while handing it to Burt.
She then writes their product on a red piece of paper, folds it, and says “Here is the product of the two digits I chose” while handing it to Sarah.
Burt and Sarah do not share the contents of their respective pieces of paper.
The game is played in rounds.
In each round, Burt plays first by announcing his guess for (a
, b
), in this case (n
, m
).
- If Burt guesses right, the game ends with “(
n
,m
) BURTround number
” - If Burt guesses wrong, then Sarah gets to announce her guess (
p
,q
).
If she guessed correctly, the game ends with “(p
,q
) SARAHround number
”.
Otherwise, we proceed to the next round.
If any of the players is out of guesses when his/her turn comes, the game ends with “IMPOSSIBLE”.
Did I understand correctly?
Not exactly, there are no “guesses”, either the player knows for sure what (a, b) is and tells it, or the players doesn’t say anything and we move to the next player.
So a typical game would look more like this:
B: “I don’t know”
S: “I don’t know”
B: “I don’t know”
S: “I don’t know”
B: “I don’t know”
S: “I know, it’s a = … and b = …”
Which might be a bit disturbing but that’s how it is ^^
Ok, let me try again (-_-)>.
So before the game starts, let say Ώ is the set of possible pairs (a
,b
) such that 1 ≤ a
≤ 9, 1 ≤ b
≤ 9, and a
≤ b
.
Maggie chooses an element (a
, b
) of Ώ and gives respectively the values s
= a
+ b
and p
= a
* b
to Burt and Sarah.
Knowing s
, Burt can narrow down Ώ to a subset S of possible solutions.
Sarah can also determine a subset P of Ώ from the value of p
.
The game is played in rounds. In each round, Burt plays first.
If Burt is certain of knowing the answer |P| = 1 (i.e. P contains only one element) he announces it and the game ends, otherwise he passes his turn.
Sarah can then announce her answer if |S| = 1 or passes.
If both pass their turn, we proceed to the next round.
The fact that Burt/Sarah passes his/her turn should help his/her opponent further narrow down his/her set of possible solutions.
Am I getting warmer?
Yes it’s exactly that.
It’s all about “if it was a = …, b = … he would have figured out by this turn and he didn’t, so it’s not that, let’s remove this one”.
Gosh! I would have been really deep in the weeds, without your assistance.
Now that I have a better understanding of the basic premise of this puzzle, time for the hard part…solving it!
You saved me from a huge headache, thanks! (^_^)b
Right, But the description doesn’t say how Sarah and Burt proceed to guess the numbers. (random or trying for the minor number to the greater, or from the greater combination to the minor one).
It’ s the worst puzzle description I ever seen.
It is the problem of Freudenthal. It is a difficult problem.
The problem with this task is that this puzzle has some wrong assumptions and errors in my opinion e.g.
- Maggie shared 11 and 24 the outcome should be “Impossible” where both can guess the right answer (3 & 8)
- If Sarah has les combination than Burt (or otherwise) she/he should win more often or quicker but when you’re testing your solution it shows different outcome, e.g. for 7 and 6, Sara has only two options (2,3) and (1,6) but outcome is (1,6) SARAH 3. How is it possible??? She doesn’t need three rounds to guess numbers. Also, assumption that she will take 1,6 instead of 2,3 is questionable because it depends how will you create your loops from 1 to 9 or from 9 to 1…
This puzzle deals with recursive logics, it’s not an easy concept.
There’s nothing wrong about the statement, it’s just that you didn’t understand the concept.
Maybe try an easier one, or if you really want to solve it, the first task is to understand why you are wrong, and I can try to explain it for you but you’ll learn more if you do the whole process yourself.
I write specifically for those who avoid tasks with a low rating:
I have now solved this puzzle.
This is an interesting challenge.
At 90% this is a logic problem, I had to think carefully about what was happening.
The programming of the solution itself is not difficult.
Straight up trash.
When the numbers are 1 and 9 the outpuit “shouls” be impossible???$
How cna bart not guess it??
dogshit puzzle and awful explanation… question yourself
You may criticise the puzzle, but please tone down your language.
I believe this puzzle is incorrect.
Let’s look at Test 3 which I believe is wrong.
Input 7 6 and expected output (1,6) SARAH 3
Burt can guess the correct answer on round 2 and here is how:
Burt receives 7, which can be made with the combinations [1,6] [2,5], [3,4]
In round 1 he doesn’t have enough info and passes.
Sarah also doesn’t have enough info and passes (I’ll skip why).
Burt knows the answer isn’t [2,5] because Sarah would have received 2x5=10, and therefore would have guessed [2,5] because that is the only valid combo for 10 (1,10 isn’t valid because only 1-9 is).
Burt also knows the answer isn’t [3.4] because Sarah would have received 1x7=7 and guessed [1,7].
Since [1,6] is the only pair left, Burt would guess it in round 2. Because of this I believe the published solution to this puzzle and the tests are flawed.
Hi,
If the anwser was [3 4] then Sarah would have received 3 * 4= 12 and not 7, Burt would have received 7.
you sir are correct. now I feel dumb