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

Home > Logic
Chair Cue (Posted on 2014-03-07) Difficulty: 3 of 5
       A
   +---+---+
   |   |   |
 J +---+---+ B
   |   |   | 
   |   |   |
   |   |   |
 I +---+---+ C
   |   |   |   D         
   |   |   +---+----+
   |   |       |    |
 H +---+-------+----+ E
   |   |       |    |
   +---+-------+----+
       G       F
Mr. and Mrs. Larchmont invited four married couples to a dinner party. For the party, chairs A to J were placed around an L-shaped table as shown above.
  1. Every woman sat next to her husband.
  2. A is next to B, B is next to C, C is next to D, D is next to E, E is next to F, F is next to G, G is next to I and, I is next to J.
  3. Every woman sat directly across from a man. (Chairs at the ends of a dashed line denotes "directly across" from each other.
  4. Mrs. Larchmont sat to the right of Mr. larchmont.
  5. Mrs. Larchmont was the only woman who did not sit next to a woman.
In which of the chairs from A to J inclusively did Mrs. Larchmont sit?

Notes:
(i) A person sitting next to another person implies that the other person is sitting next to the said person. For example, A is next to B implies that B is next to A and vice versa.

(ii) "To the right of" is defined as the one they see when they turn their head to their own right. For example, F to the right of G.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2

DECLARE SUB permute (a$)
CLS
OPEN "chair cue.txt" FOR OUTPUT AS #2
a$ = "LlWwXxYyZz": h$ = a$
DO
    tst$ = LCASE$(a$) + LCASE$(a$)
    good = 1
    IF INSTR(tst$, "ll") = 0 THEN good = 0
    IF INSTR(tst$, "xx") = 0 THEN good = 0
    IF INSTR(tst$, "yy") = 0 THEN good = 0
    IF INSTR(tst$, "zz") = 0 THEN good = 0
    IF INSTR(tst$, "ww") = 0 THEN good = 0
    IF good THEN
        s$ = a$
        FOR i = 1 TO LEN(s$)
            IF MID$(s$, i, 1) = UCASE$(MID$(s$, i, 1)) THEN
                MID$(s$, i, 1) = "m"
            ELSE
                MID$(s$, i, 1) = "w"
            END IF
        NEXT
        IF MID$(s$, 1, 1) = MID$(s$, 7, 1) THEN good = 0
        IF MID$(s$, 2, 1) = MID$(s$, 10, 1) THEN good = 0
        IF MID$(s$, 3, 1) = MID$(s$, 9, 1) THEN good = 0
        IF MID$(s$, 4, 1) = MID$(s$, 6, 1) THEN good = 0
        IF MID$(s$, 5, 1) = MID$(s$, 8, 1) THEN good = 0
        IF good THEN
            s$ = s$ + LEFT$(s$, 2)
            ct = 0: ix = 0
            DO
                ix = INSTR(ix + 1, s$, "mwm")
                IF ix THEN ct = ct + 1: saveloc = ix
            LOOP UNTIL ix = 0
            IF ct <> 1 THEN good = 0
            psn = saveloc + 1: IF psn > 12 THEN psn = psn - 12
            IF MID$(a$, psn, 1) <> "l" THEN good = 0
            s$ = a$ + LEFT$(a$, 1)
            IF INSTR(s$, "lL") = 0 THEN good = 0
            IF good THEN PRINT a$: PRINT #2, a$
        END IF
    END IF
    permute a$
LOOP UNTIL a$ = h$

finds

LWwxXYyzZl
LWwxXZzyYl
LWwyYXxzZl
LWwyYZzxXl
LWwzZXxyYl
LWwzZYyxXl
LXxwWYyzZl
LXxwWZzyYl
LXxyYWwzZl
LXxyYZzwWl
LXxzZWwyYl
LXxzZYywWl
LYywWXxzZl
LYywWZzxXl
LYyxXWwzZl
LYyxXZzwWl
LYyzZWwxXl
LYyzZXxwWl
LZzwWXxyYl
LZzwWYyxXl
LZzxXWwyYl
LZzxXYywWl
LZzyYWwxXl
LZzyYXxwWl

where capital letters refer to men, lower case to women and the sequence is positions A through J.

Mrs. Larchmont was in J in all cases, to the right of Mr. Larchmont in seat A. Only the letter identities in the "different" solutions varied; the gender locations and the coupling remain the same in what is basically one solution.


  Posted by Charlie on 2014-03-07 12:50:56
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
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