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

Home > Logic
Host Colligation (Posted on 2013-10-02) Difficulty: 3 of 5
     +--+--+--+--+
     |1 |2 |3 |4 |       
  +--+--+--+--+--+--+
  |5 |           |6 |    
  +--+--+--+--+--+--+
     |7 |8 |9 |10|
     +--+--+--+--+
  1. A sat opposite G who was sitting next to C.
  2. C sat opposite F.
  3. D sat between F and H, but not in seat 8 or 9.
  4. E sat between G and A and opposite J.
  5. I sat between B and C but not in seat 9.
  6. The host sat in seat 5.
Who was the host?

No Solution Yet Submitted by K Sengupta    
Rating: 2.0000 (1 votes)

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

DECLARE FUNCTION opp! (x$, y$)
DECLARE SUB permute (a$)
CLS
DIM SHARED a$
a$ = "abcdefghij": h$ = a$
label$ = "12346x9875"
DO
  s$ = a$ + a$
  IF opp("a", "g") THEN
    IF INSTR(s$, "gc") OR INSTR(s$, "cg") THEN
     IF opp("c", "f") THEN
      IF INSTR(s$, "fdh") OR INSTR(s$, "hdf") THEN
       IF INSTR(a$, "d") <> 8 AND INSTR(a$, "d") <> 7 THEN
        IF opp("e", "j") THEN
         IF INSTR(s$, "gea") OR INSTR(s$, "aeg") THEN
           IF INSTR(s$, "bic") OR INSTR(s$, "cib") THEN
            IF INSTR(a$, "i") <> 9 THEN
              PRINT a$
            END IF
           END IF
         END IF
        END IF
       END IF
      END IF
     END IF
    END IF
  END IF
  permute a$
LOOP UNTIL a$ = h$

FUNCTION opp (x$, y$)
  psnx = INSTR(a$, x$)
  psny = INSTR(a$, y$)
  o = 0
  SELECT CASE psnx
    CASE 5, 6
     IF psnx + psny = 15 THEN o = 1
    CASE ELSE
     IF psny = 10 - psnx THEN o = 1
  END SELECT
  opp = o
END FUNCTION

finds

hdfaegcibj

as the sequence of participants going clockwise, starting at position 1, so the position in this string does not correspond to the numbering in the original diagram.

The host is J, as the last position clockwise from 1 is the one numbered 5 in the original diagram.


  Posted by Charlie on 2013-10-02 12:20:52
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 (10)
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