## Three princesses

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Posts: 69
Joined: Sat Mar 21, 2009 3:45 am UTC
Location: Perth, Western Australia

### Re: Three princesses

When I give this logic puzzle to people (I'm a hit at parties), I usually explain her as answering "yes" or "no" in whatever way she can to try and get you to marry her. So she's not "random", she has free will, and apparently wants nothing more than to have an arranged marriage to a person she's never met.
I'm writing a supernatural romance novel, it updates the first weekend of every month. You can find it here.

douglasm
Posts: 630
Joined: Mon Apr 21, 2008 4:53 am UTC

### Re: Three princesses

Madge wrote:she has free will, and apparently wants nothing more than to have an arranged marriage to a person she's never met.

This is far from being the most implausible element of the logic puzzle.

gmalivuk
GNU Terry Pratchett
Posts: 26836
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Three princesses

Cauchy wrote:I do agree that the original puzzle would benefit from a clarification on the middle princess's behavior, pushing it squarely into the strong random territory of "disregards the question, picks 'yes' or 'no' as she sees fit".
But once again, the beauty of the solution is that it doesn't matter what you assume about the middle princess, beyond the given fact that you can't depend on whatever answer she gives being either definitely true or definitely false.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

Paper_Weasel
Posts: 6
Joined: Thu Apr 09, 2009 3:02 am UTC

### Re: Three princesses

Klear wrote:I find it more interesting to search for a solution without the strong random assumption.

Actually, I'm now kinda curious about the opposite. What solutions are there which work only with particular formulations and not others? What kind of solutions do the true/false and yes/no conditions actually permit that the broader question does not? I can't actually think of any offhand.

phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

### Re: Three princesses

Paper_Weasel wrote:What solutions are there which work only with particular formulations and not others? What kind of solutions do the true/false and yes/no conditions actually permit that the broader question does not? I can't actually think of any offhand.

More formally: say X is the true-or-false value of the statement the princess is responding to. True's process is to respond X, False's process is to respond !X. A weak-random process is to generate a random bit R and respond "R xor X" while a strong-random process is to generate a random bit R and respond R. The difference comes in if you can craft it so that the truth or falsity of X depends on R... make it so that X = "R xor Y" where Y is what we actually want to find out.

You end up with a spectrum of randomness models for different puzzles: from weakly (and manipulatably) random, to strongly random, to malicious (which looks at your overall strategy, and if there's a response they can give that'll break your strategy, they'll give that)... and each one gives you strictly less information than the one before it. If you can make a strategy that works for malicious-mode randomness, then that means there is nothing that the random answerer could do to break your strategy, it works regardless. So that strategy will work for everything. A step down from that is something that relies on probability... something that doesn't work 100% of the time, but will work if the randomness falls the right way... so it will fail for maliciousness (since it'll manage to find the case where it fails) but if it's actually random then you can have a chance (for instance, the 100 prisoners puzzle is unsolvable if the guard is malicious, but you can work to maximise your chance if it's random). And failing that you can fall back to the manipulatable-randomness model... which basically always means breaking out the "if instead I asked you X" solution template and calling it a day, and not really discovering anything new.

In this case, the standard solution works even with a malicious Random princess... even if the Random princess is a super-intelligent perfect logician who knows your entire strategy, there's no way they can trick you to end up married to them (within the constraints of the puzzle, ie by answering yes or no to questions they're asked).

Code: Select all

`enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}`
[he/him/his]

Paper_Weasel
Posts: 6
Joined: Thu Apr 09, 2009 3:02 am UTC

### Re: Three princesses

Ah, so an example of what I'm looking for would be if the middle sister was restricted to only true or false answers and you asked
Spoiler:
"Are you exactly one of the middle sister and currently lying?", which gets a 'no' from the eldest princess, as she isn't; a 'no' from the youngest princess, as she is but is lying about it; or a 'yes' from a middle sister who is either both and lying about it or just one and telling the truth. It is an answer to the question posed in the op, but not to the current version.

douglasm
Posts: 630
Joined: Mon Apr 21, 2008 4:53 am UTC

### Re: Three princesses

rajabeta wrote:he asked one question that who is the king.???
the girl who always speaks true will give the right answer...
the girl who always lie will obiviously give wrong answer.....
nd the third one automaticly recognise....
so simple......

You don't get answers from all three girls. You pick just one girl, and only that girl answers your question.