Get the Princess!

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
GeoTrail
Addict
Addict
Posts: 2799
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: Get the Princess!

Post by GeoTrail »

This sounds really similar http://en.wikipedia.org/wiki/The_Lady,_or_the_Tiger%3F

I've made a simple graphic that might help figure out the solution
Image
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Get the Princess!

Post by Trond »

Demivec wrote:@Trond: Thanks for correcting my typo in the 'given' statement. The rest of the logic holds however. Do you see any logical errors in what I posted?
I will have a look at it. Actually, I have a typo as well, because it can be logically proven that there must be a tiger in room 2 and 8, not 3 and 8 as I wrote. Room 3 can never have a tiger.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Get the Princess!

Post by Trond »

If #3 is True then room #2 is empty
Nope. If 3 is true, then 2 cannot be empty.
3. Room 2 and 7 are not empty.
but we know that room #2's sign is both True and False ( and thus contains neither the princess (True) nor the tiger (False)
No, it contains a tiger and is false. The whole concept of "fluctuating thruthness" just doesn't work.
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Get the Princess!

Post by Demivec »

Trond wrote:
but we know that room #2's sign is both True and False ( and thus contains neither the princess (True) nor the tiger (False)
No, it contains a tiger and is false. The whole concept of "fluctuating thruthness" just doesn't work.
@Trond: From my perspective that would be the heart of the matter. A better term would be infinite regress.

As I mentioned earlier, I observed that there were three sets of them, {2, 5, 6}, {3, 8}, and {1, 4}. In each case the truth of a sign directly affects the truthfullness of another sign. I'll walk through the simplest one involving #1 and #4, it only regresses under some of the possibilities.

I'll walk through the example.

#1 -- Room #4 is not empty.
#4 -- Room #1 is not empty.

Both signs state that another room contains something. If the room contains the princess the room's sign is true, if it contains a tiger the room's sign is false.

If #1 contains the princess then it's sign is true and room #4 must contain a tiger (the princess is in room #1).
--> If room #4 contains a tiger, it's sign is false. Room #1 is therefore empty.
--> If room #1 is empty it cannot contain the princess.
**dead end**
A dead end is also reached if #4 contains the princess.

If #1 contains the tiger then it's sign is false and room # 4 must be empty.
**this conclusion is possible**
If #4 contains the tiger then it's sign is false and room #1 must be empty.
**this conclusion is possible**
Either one of the above conclusions is true or both rooms are empty and have false signs. All that matters is that the princess be in neither #1 nor #4.


The other signs involve conjunctive conditions and I provided some long winded examples already of those.



I regret I don't have anything additional to add. I have simply (or not so simply) come to a different conclusion. :wink: Thanks for the puzzle challenge, it was fun. :)


@GeoTrail: Nice illustration. :)
User avatar
GeoTrail
Addict
Addict
Posts: 2799
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: Get the Princess!

Post by GeoTrail »

Demivec wrote:@GeoTrail: Nice illustration. :)
Thanks :oops:
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: Get the Princess!

Post by utopiomania »

"The sign on the door of the princess was true"

"7. The princess is in a room with an odd number."

The sign on door 7 is unchallenged, isn't it? So she is in room 7. The rest is just smoke and mirrors.
Thorium
Addict
Addict
Posts: 1314
Joined: Sat Aug 15, 2009 6:59 pm

Re: Get the Princess!

Post by Thorium »

utopiomania wrote:"The sign on the door of the princess was true"

"7. The princess is in a room with an odd number."

The sign on door 7 is unchallenged, isn't it? So she is in room 7. The rest is just smoke and mirrors.
No. You dont know if it's true and if it's true it could be any other room with a odd number.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: Get the Princess!

Post by utopiomania »

No. You dont know if it's true
Why not?

Which of the other signs says that 7 is not true?

And if it IS true, "The sign on the door of the princess was true" says that she is behind sign 7.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Get the Princess!

Post by nco2k »

maybe the "princess" is a female tiger of noble blood? :D

edit: no wait.. the tiger ate the princess. :lol:

Image

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Get the Princess!

Post by Trond »

A better term would be infinite regress.
Ok, I understand now. I think your basic logic is solid, but you overinterpret it when making it into sign truth values.

8. This room contains a tiger and sign 3 is false. == If (#8 contains tiger) and (#3 is false) then #8 is true, else #8 is false.
3. Room 2 and 7 are not empty. == If (#2 <> empty) and (#7 <> empty) then #3 is true, else #3 is false.
If #8 is true the room contains a tiger -> if #8 contains a tiger it has to be False -> if #8 is False it cannot contain a tiger or sign #3 is True ( via !(A and B) = (!A or !B) ).
The key here is realizing that 8 only is fluctuating if it contains a tiger and sign 3 is false. If sign 3 is true, then the truth value of 8 stop fluctuating. Thus we know that sign 3 must be true.
but we know that room #2's sign is both True and False
No sign can be both true and false. Either it's true, or it's false. It can be logically proven that sign 2 is always false. Thus it cannot contain the princess, but it may contain a tiger. Here too is the key in realizing that the truth value of 2 is fluctuating if you set the sign to true, but it is not fluctuating (it stays false) if you set the sign to false. Thus we know it must be false.
Thorium
Addict
Addict
Posts: 1314
Joined: Sat Aug 15, 2009 6:59 pm

Re: Get the Princess!

Post by Thorium »

utopiomania wrote: Which of the other signs says that 7 is not true?
No, but no sign says that it is true. So you dont know it. You have to look at the other rooms.
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: Get the Princess!

Post by PMV »

No one read my post? :shock: ... was that english so bad? :oops:
I could write it in german and another can translate it :lol:

MFG PMV
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Get the Princess!

Post by Trond »

PMV wrote:No one read my post? :shock: ... was that english so bad? :oops:
I could write it in german and another can translate it :lol:

MFG PMV
If princess in room 1 or 4, then one is true and not empty, so the other room must contain the tiger and the sign must be false, but then the sign is true. No princess.
Correct.
If princess in room 2, the sign must be true, but then it can't be true, because then princess is not allowed to be in this room. No princess.
Correct.
If princess in room 3, sign 2 and 7 are true.
Nope. If princess is in room 3, sign 2 and 7 must be false. Because sign 3 says room 2 and 7 are not empty. So there must be something in them. In other words, if princess is in room 3, there must be tigers in room 2 and 7. And that means these have to be false, not true.
If princess in room 5, sign 6 must be true. Sign 6 needs sign 2 to be false. Sign 2 needs sign 5 to be false, but there should be the princess, impossible. No princess.
If princess in room 6, the problem will be repeated. No princess.
Correct.
If princess in room 7, the 7 must be a odd number, true. Princess can be here.
Correct.
If princess in room 8, the sign says there is a tiger, so it can't be. No princess
Correct.
User avatar
GeoTrail
Addict
Addict
Posts: 2799
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Re: Get the Princess!

Post by GeoTrail »

The Princess didn't want to wait anymore, so she has gone to a spa. She's going to be back soon, to room 7.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: Get the Princess!

Post by PMV »

Trond wrote:
If princess in room 3, sign 2 and 7 are true.
Nope. If princess is in room 3, sign 2 and 7 must be false. Because sign 3 says room 2 and 7 are not empty. So there must be something in them. In other words, if princess is in room 3, there must be tigers in room 2 and 7. And that means these have to be false, not true.
lol, i should read carefully, i had read "room 2 or 7" but it is "room 2 and 7" :|

correction:
if princess in room 3, sign 7 must be false because there must be a tiger. 3 is an odd number, so sign 7 would be true. No princess.


the result is the same :lol:
:D

MFG PMV
Post Reply