All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Murderous Performer (Posted on 2013-03-22) Difficulty: 3 of 5
+---+-------+---+
| 1 |   2   |   |
+---+---+---| 3 |  
|   4   | 5 |   |
+-------+---+---+
Vera,one of the performers in a play,was murdered in her dressing room. The following facts refers to the dressing rooms shown above. Each of the five performers in the play - Vera, Adam, Babe, Clay and Dawn - had his or her own dressing room.
  1. The killer's dressing room and Vera's dressing room border on the same number of rooms.
  2. Vera's dressing room borders on Adam's dressing room and on Babe's dressing room.
  3. Clay's dressing room and Dawn's dressing room are the same size.
  4. Babe's dressing room does not border on Clay's dressing room.
  5. The five rooms come in precisely two distinct sizes. (For example, rooms 2, 3 and 4 have the same size.)
Who killed Vera?

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution the computer method Comment 3 of 3 |

DATA 42,1453,25,125,423
FOR i = 1 TO 5: READ adj$(i): NEXT

DATA 1,2,2,2,1
FOR i = 1 TO 5: READ size(i): NEXT

vabcd$ = "12345": h$ = vabcd$
DO
  FOR k = 1 TO 4 ' a to d
    kdress = VAL(MID$(vabcd$, k + 1, 1))
    vdress = VAL(LEFT$(vabcd$, 1))
    IF LEN(adj$(kdress)) = LEN(adj$(vdress)) THEN
      adress$ = MID$(vabcd$, 2, 1)
      bdress$ = MID$(vabcd$, 3, 1)
      IF INSTR(adj$(vdress), adress$) > 0 AND INSTR(adj$(vdress), bdress$) > 0 THEN
        cdress = VAL(MID$(vabcd$, 4, 1))
        ddress = VAL(MID$(vabcd$, 5, 1))
        IF size(cdress) = size(ddress) THEN
          IF INSTR(adj$(cdress), bdress$) = 0 THEN
            PRINT vabcd$, MID$("ABCD", k, 1)
          END IF
        END IF
      END IF
    END IF
  NEXT k
  permute vabcd$
LOOP UNTIL vabcd$ = h$

finds

45132         A 
as the rooms for
VABCD and the ^

respecively |
murderer

 


  Posted by Charlie on 2013-03-22 15:51:12
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (17)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information