Page 3 of 5

Re: Get the Princess!

Posted: Fri Sep 10, 2010 11:15 pm
by GeoTrail
I read it in swedish and I'm convinced that the princess is in room 7.

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:40 am
by Demivec
Trond wrote:
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}.
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.
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.

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: :D

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.
@Edit: corrected what was 'given', twas a typo pointed out by Trond.

Re: Get the Princess!

Posted: Sat Sep 11, 2010 9:37 am
by Num3
Image

Re: Get the Princess!

Posted: Sat Sep 11, 2010 9:49 am
by blueznl
blueznl wrote:You're right, my coding for rule 8 is wrong. I will change it and try again. It should be something like:

Code: Select all

if room(8) <> #tiger or room(3) = #tiger
  found = #false
endif
... but I will check later.

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
Nevertheless, the princess is still in room 7. I guess she's hungry by now :-)

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:04 pm
by Thorium
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. :|

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:05 pm
by Trond
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.
No, if a room contains a tiger, its sign must always be false. And the sign of the princess is always true.

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:11 pm
by Thorium
Trond wrote:
Arctic Fox wrote:
Trond 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.
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 confused :?
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.
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.

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:21 pm
by RASHAD
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

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:31 pm
by Thorium
RASHAD wrote: So Sign 2 is False and Sign 7 is True
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.

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? :wink:

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:42 pm
by RASHAD
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. :twisted:

Re: Get the Princess!

Posted: Sat Sep 11, 2010 1:46 pm
by Trond
Thorium wrote:
Trond wrote:
Arctic Fox wrote:
Trond 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.
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 confused :?
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.
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.
This is sign 2:
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!

Posted: Sat Sep 11, 2010 2:59 pm
by Thorium
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
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. :wink:

Re: Get the Princess!

Posted: Sat Sep 11, 2010 3:01 pm
by Thorium
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.
Thats unlogical. So the first part of the sign is false and the second is true? That makes no sense.

Re: Get the Princess!

Posted: Sat Sep 11, 2010 4:14 pm
by Little John
It looks to me that here is some disagreement concerning the truth table of a logical conjunction. :-)

Regards, Little John

Re: Get the Princess!

Posted: Sat Sep 11, 2010 4:22 pm
by Demivec
@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 wrote:
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.
Thats unlogical. So the first part of the sign is false and the second is true? That makes no sense.
@Thorium: If a sign contains two conditions joined by 'and' it is only true if both conditions are true. See my longwinded proof.

Little John wrote:It looks to me that here is some disagreement concerning the truth table of a logical conjunction. :-)
@Little John: I agree. :roll: