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

Home > Logic
Professor Perception (Posted on 2013-04-25) Difficulty: 3 of 5
Amelia, Beulah, Carrie, Dennis and Elwood attended a supper party with their spouses at Loverly's Restaurant. Chairs for the five couples were arranged around an L-shaped table as shown in the diagram below.
    
         a   
     +---------+        
     |         | 
     |         |   
    j|         |b    
     |         |      
     |         |    
     |         |
    i|         |c   
     |         |   
     |         |  d
     |         +---------+       
    h|                   |
     |                   |e
     |                   | 
     +-------------------+
        g        f 
At the table:
  1. Amelia's husband sat next to Dennis' wife.
  2. Beulah's husband was the only man who sat alone at one side of the table.
  3. Carrie's husband was the only man who sat between two women.
  4. No woman sat between two women.
  5. Each man sat opposite his wife.
  6. Elwood's wife sat on the Professor's right.
Who was the Professor?

Notes:

(i) "Between two women" means to the left of one woman and to the right of another woman, around the perimeter of the table.

(ii) Similarly "sat next to" means either immediately to the right or, immediately to the left of a given seat around the perimeter of the table. For example, chair-e and chair-f are next to each other.

No Solution Yet Submitted by K Sengupta    
Rating: 3.5000 (2 votes)

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

DECLARE SUB permute (a$)
CLS

OPEN "profper3.txt" FOR OUTPUT AS #2

a$ = "AaBbCcDdEe": h$ = a$
'     abcdefghij

DO
  IF LCASE$(MID$(a$, 1, 1)) = LCASE$(MID$(a$, 7, 1)) THEN
  IF LCASE$(MID$(a$, 2, 1)) = LCASE$(MID$(a$, 10, 1)) THEN
  IF LCASE$(MID$(a$, 3, 1)) = LCASE$(MID$(a$, 9, 1)) THEN
  IF LCASE$(MID$(a$, 4, 1)) = LCASE$(MID$(a$, 6, 1)) THEN
  IF LCASE$(MID$(a$, 5, 1)) = LCASE$(MID$(a$, 8, 1)) THEN
   dbl$ = a$ + a$
     AmHus$ = "A"
     IF INSTR(dbl$, AmHus$ + "d") > 0 OR INSTR(dbl$, "d" + AmHus$) > 0 THEN
      BeHus$ = "B"
      ix = INSTR(a$, BeHus$)
      IF ix = 1 OR ix = 4 OR ix = 5 THEN
        CaHus$ = "C"
        ix = INSTR(2, dbl$, CaHus$)
        IF MID$(dbl$, ix - 1, 1) + MID$(dbl$, ix + 1, 1) = LCASE$(MID$(dbl$, ix - 1, 1) + MID$(dbl$, ix + 1, 1)) THEN
          mw$ = ""
          FOR i = 1 TO LEN(dbl$)
           IF UCASE$(MID$(dbl$, i, 1)) = MID$(dbl$, i, 1) THEN mw$ = mw$ + "m":  ELSE mw$ = mw$ + "w"
          NEXT
          IF INSTR(2, mw$, "wmw") = ix - 1 AND (INSTR(ix, mw$, "wmw") = 0 OR INSTR(ix, mw$, "wmw") > 19 + ix) THEN
            IF INSTR(mw$, "www") = 0 THEN
              ElW = INSTR(dbl$, "e")
              PRINT a$
              PRINT MID$(dbl$, ElW + 1, 1)
              PRINT
              PRINT #2, a$
              PRINT #2, hus$
              PRINT #2, MID$(dbl$, ElW + 1, 1)
              PRINT #2,
            END IF
          END IF
        END IF
      END IF
     END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  permute a$
LOOP UNTIL a$ = h$
CLOSE

finds

ecDBabEAdC
c

Interpreted as follows:


position person
a     Elwood's wife
b     Carrie
c     Dennis
d     Beulah's husband
e     Amelia
f     Beulah
g     Elwood
h     Amelia's husband
i     Dennis's wife
j     Carrie's husband

(in ecDBabEAdC, lower case is for the female partner and upper case for the male)

Carrie (c) is the professor.

Edited on April 25, 2013, 9:44 pm
  Posted by Charlie on 2013-04-25 21:43:36

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 (21)
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