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

 River Trip (Posted on 2013-08-26)
Nine Minikins, looking for adventure, decided to float down a nearby river on rafts. Three rafts, identified as #1, #2, and #3, were constructed from bundles of reeds tied with vines. A destination down the river was identified and the three rafts were launched.

One of the rafts, passing under a bridge, was pulled underwater by a troll; the three occupants were able to swim to safety. One raft became waterlogged mid-trip and had to be beached. Only one raft arrived at the predetermined destination.

Based on the following statements, which three Minikins were on which raft and how did each three fare?
1. Neither Ekum, Elfum, nor Egum was on raft #2, nor were all three on the same raft.
2. Epum and Edum were on the same raft. It was not the one that became waterlogged.
3. Evum, whose raft was not pulled underwater by the troll, was not on the same raft as either Egum or Ekum.
4. Ebum and Ekum were on the same raft. It was not the one that became waterlogged.
5. Egum was on raft #3 along with Eskum.
6. Efrum was not on the raft that was pulled underwater by the troll.

 See The Solution Submitted by K Sengupta No Rating

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

DECLARE SUB place (which!)
CLEAR , , 25000
DIM SHARED troll, wlog, succ, name\$, raft\$(3), fullname\$(9)
DATA Ekum,Elfum,Egum,Epum,Edum,Eskum,Ebum,Efrum,Evum
FOR i = 1 TO 9: READ fullname\$(i): NEXT

name\$ = "klgpdsbfv"

CLS
FOR troll = 1 TO 3
FOR wlog = 1 TO 3
IF wlog <> troll THEN
succ = 6 - wlog - troll
place 1
END IF
NEXT
NEXT

SUB place (which)
n\$ = MID\$(name\$, which, 1)
FOR b = 1 TO 3
IF LEN(raft\$(b)) < 3 AND (b <> 2 OR n\$ <> "k" AND n\$ <> "g" AND n\$ <> "l") THEN
raft\$(b) = raft\$(b) + n\$

good = 1
IF n\$ = "g" AND raft\$(b) = "kl" THEN good = 0
IF n\$ = "d" AND (INSTR(raft\$(b), "p") = 0 OR b = wlog) THEN good = 0
IF n\$ = "v" THEN
IF b = troll THEN good = 0
IF INSTR(raft\$(b), "g") > 0 OR INSTR(raft\$(b), "k") > 0 THEN good = 0
END IF
IF n\$ = "b" AND INSTR(raft\$(b), "k") = 0 THEN good = 0
IF n\$ = "k" AND b = wlog THEN good = 0
IF (n\$ = "g" OR n\$ = "s") AND b < 3 THEN good = 0
IF n\$ = "f" AND b = troll THEN good = 0

IF good THEN
IF which = 9 THEN

PRINT "troll", "waterlogged", "success"
PRINT troll, wlog, succ
FOR p = 1 TO 3
PRINT fullname\$(INSTR(name\$, MID\$(raft\$(troll), p, 1))),
PRINT fullname\$(INSTR(name\$, MID\$(raft\$(wlog), p, 1))),
PRINT fullname\$(INSTR(name\$, MID\$(raft\$(succ), p, 1)))
NEXT

ELSE
place which + 1
END IF
END IF

raft\$(b) = LEFT\$(raft\$(b), LEN(raft\$(b)) - 1)
END IF
NEXT b
END SUB

finds (each column has status, raft number and three riders):

`troll         waterlogged   success 1             3             2Ekum          Egum          EpumElfum         Eskum         EdumEbum          Efrum         Evum`

 Posted by Charlie on 2013-08-26 17:11:39
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 (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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