Get the Princess!
Re: Get the Princess!
I read it in swedish and I'm convinced that the princess is in room 7.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Re: Get the Princess!
Given: If a room contains a tiger, it's sign must always be false; if a room contains the princess it's sign must always be truee.Trond wrote:You can logically prove that there must be a tiger in room 3 and 8. Thus your assumption that these rooms are empty can not be right.Logic proceeds this way, if a room's sign contains fluctuating truthness (i patented that term ) then the room must be empty. This applies to the group of rooms {2, 5, 6}, {1, 4}, and {3, 8}.
Here are the evaluations for the signs and status of rooms #8 and 3. Each sign is followed by a translation into a conditional statement.
- 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.
The wordy evaluations are as folows:
- 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) ).
If #3 is True then room #2 is 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) ) -> if #3 is False then either #2 is empty or #7 is empty ( via !(C and D) = (!C or !D) ) -> Room #3 sign is False because #7 contains the princess AND #2 contains nothing.
Since #3 is False, none of the conditions on the sign for #8 are True and #8 is thus completely False -> because #8 is completely False it must contain either a tiger or sign #3 is True -> #8 is empty because it cannot contain a tiger and also because it cannot be True and False, regarding sign #3, at the same time (thus no princess and no tiger).
An even wordier explanation:
Code: Select all
s3 = sign #3, s8 = sign #8, c2 = contents of #2, c7 = contents of #7, c8 = contents of #8
sign 3:
A B
If (c2 = #Empty) And (c7 = #Empty)
s3 = #True
Else
s3 = #False
Endif
Condition B is True because the princess is in room #7.
Condition A fluctuates between True ane False.
s3
A B result
-- -- ------
1. T And T TRUE
3. F And T FALSE
s3 fluctuates between True and False which means that room #3 contains nothing.
sign 8:
C D
If (c8 = #Tiger) And (s3 = #False)
s8 = #True
Else
s8 = #False
Endif
If Condition C = #True then s8 = #False and either C or D must be False.
C cannot be False and True at the same time.
D is a fluctuating condition and cannot be False and True all the time.
s8
C D result
-- -- ------
1. F And T FALSE
2. F And F FALSE
3. T And T TRUE
4. T And F TRUE
s8 fluctuates between True and False which means that room #8 contains nothing and results in condition C always being False.
Last edited by Demivec on Sat Sep 11, 2010 4:13 pm, edited 1 time in total.
Re: Get the Princess!
blueznl wrote:You're right, my coding for rule 8 is wrong. I will change it and try again. It should be something like:
... but I will check later.Code: Select all
if room(8) <> #tiger or room(3) = #tiger found = #false endif
Mmmm. Let's read the rule:
> ; 8. This room contains a tiger And sign 3 is false.
If the room would contain a tiger the sign should be false, thus this rule is false. If it is false it must contain a tiger. This in turn means sign 3 must be true, otherwise the rule for room 8 would be true.
Which leads to:
Code: Select all
if room(8) <> #tiger or room(3) = #tiger
found = #false
endif
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: Get the Princess!
I dont get it.
Sign on room 8 is clearly false.
That means sign on room 3 is true.
That means in room 2 is a tiger or the princess.
The princess cant be in room 2 because the sign on the room sais so and the sign on the room of the princess must be true.
But there cant be a tiger in it because signs with tiger are false, and if it's false the princess must be in there.
So room 2 is not empty, no tiger in there and no princess.
Sign on room 8 is clearly false.
That means sign on room 3 is true.
That means in room 2 is a tiger or the princess.
The princess cant be in room 2 because the sign on the room sais so and the sign on the room of the princess must be true.
But there cant be a tiger in it because signs with tiger are false, and if it's false the princess must be in there.
So room 2 is not empty, no tiger in there and no princess.
Re: Get the Princess!
No, if a room contains a tiger, its sign must always be false. And the sign of the princess is always true.Given: If a room contains a tiger, it's sign must always be true; if a room contains the princess it's sign must always be false.
Re: Get the Princess!
That cant be. If sign 2 is false the princess is in room 2, because the sign sais so. But that cant be because the sign of the princess have to be true.Trond wrote:Yes, an unresolvable conflict occurs if sign 2, 5 or 6 is true. So we know all of them must be false. Because we can't have any unresolvable conflicts in our logic.Arctic Fox wrote:If sign 6 is false, and it says that sign 2 is false (which is a false statement), then sign 2 must be true? And then sign 6 must be true, too - I am confusedTrond wrote:H. If the truth value of sign 2 is true, the truth value of sign 6 must be true, but sign 6 can only be true if sign 2 is false. It thus leads that 2, 5 and 6 cannot be true, they must be false.
Re: Get the Princess!
If the Tiger is in Room 8 Then Sign 3 Must be True
Sign 3 is True only in case of NOT(2 And 7)=NOT(0 AND 1)
So Sign 2 is False and Sign 7 is True
If 2 is False Then 5 is False then 6 is False(NO Princess)
1 and 4 are out
The Tiger is in Room 8 the Sign is False
The Princess is in Room 3 the Sign is True (Can not be The Tiger)
Sign 7 is True The Princess is in an Odd No.Room
Sign 3 is True only in case of NOT(2 And 7)=NOT(0 AND 1)
So Sign 2 is False and Sign 7 is True
If 2 is False Then 5 is False then 6 is False(NO Princess)
1 and 4 are out
The Tiger is in Room 8 the Sign is False
The Princess is in Room 3 the Sign is True (Can not be The Tiger)
Sign 7 is True The Princess is in an Odd No.Room
Egypt my love
Re: Get the Princess!
As i pointed out: if sign 2 is false the princess must be in room 2 because it sais it's no in this room.RASHAD wrote: So Sign 2 is False and Sign 7 is True
For my understanding the whole thing doesnt work out.
Well and you say sign 7 is true and not empty because sign 3 is true so in room 7 is a princess too?
Re: Get the Princess!
The Sign of an empty Room can be True or False but still empty
Sign 7 is True The Princess must be in an odd No. Room (Room 3) but Room 7 still empty
Oh man and cas came up with the 15 clue quiz.
Sign 7 is True The Princess must be in an odd No. Room (Room 3) but Room 7 still empty
Oh man and cas came up with the 15 clue quiz.
Egypt my love
Re: Get the Princess!
This is sign 2:Thorium wrote:That cant be. If sign 2 is false the princess is in room 2, because the sign sais so. But that cant be because the sign of the princess have to be true.Trond wrote:Yes, an unresolvable conflict occurs if sign 2, 5 or 6 is true. So we know all of them must be false. Because we can't have any unresolvable conflicts in our logic.Arctic Fox wrote:If sign 6 is false, and it says that sign 2 is false (which is a false statement), then sign 2 must be true? And then sign 6 must be true, too - I am confusedTrond wrote:H. If the truth value of sign 2 is true, the truth value of sign 6 must be true, but sign 6 can only be true if sign 2 is false. It thus leads that 2, 5 and 6 cannot be true, they must be false.
2. Sign 5 is true and the princess is not in this room.
If sign 5 is false and the princess is not in room 2, sign 2 will be false, but the princess won't be in there either.
Re: Get the Princess!
Room 7 is not empty if sign on room 3 is true because sign on room 3 sais that room 7 is not empty. And if it's true there must be a princess in there.RASHAD wrote:The Sign of an empty Room can be True or False but still empty
Sign 7 is True The Princess must be in an odd No. Room (Room 3) but Room 7 still empty
Re: Get the Princess!
Thats unlogical. So the first part of the sign is false and the second is true? That makes no sense.Trond wrote: If sign 5 is false and the princess is not in room 2, sign 2 will be false, but the princess won't be in there either.
-
Little John
- Addict

- Posts: 4871
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Get the Princess!
It looks to me that here is some disagreement concerning the truth table of a logical conjunction. 
Regards, Little John
Regards, Little John
Re: Get the Princess!
@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?
@Thorium: If a sign contains two conditions joined by 'and' it is only true if both conditions are true. See my longwinded proof.Thorium wrote:Thats unlogical. So the first part of the sign is false and the second is true? That makes no sense.Trond wrote: If sign 5 is false and the princess is not in room 2, sign 2 will be false, but the princess won't be in there either.
@Little John: I agree. :roll:Little John wrote:It looks to me that here is some disagreement concerning the truth table of a logical conjunction.


