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

Home > Logic
Twins and their mistakes (Posted on 2006-04-17) Difficulty: 4 of 5
Six sets of twins ( a boy and a girl in every case) made several errors in their history and geography examinations; and it was noted that every girl made precisely the same number of errors as her brother in the two subjects. Name each pair of siblings and their surname and work out how many mistakes each made in their history and geography examination papers.

1. The boy ( not Luke ) whose sister is Louella made more history errors than Sammy.
2. George did better in history than the boy surnamed O'Connell, who made either one more or one less geography error than the twins surnamed Dean.
3. Anne made either one more or one less geography error than Louella.
4. The twins who made 11 geography errors didn't make exactly 11 history errors.
5. David and his sister made either one more or one less mistake in the history exam than the twins who made 14 geography errors.
6 Edward and his sister did worse at history than the pair who made 15 geography errors. Edward made one more error in the geography exam than Luke.
7. The McCall twins didn't make one less history mistake than the Vole twins
8. Susan ( who made seven history errors ) made one less geography error than the girl who made one less history error than Anne.
9. The twins surnamed Waters made one more history mistake than the twins surnamed Seal, who made more geography errors than the McCall twins.
10. Gail made one more geography error than the girl who made one more history error than Louella.
11. Martin made either one more or one less geography error than his best friend and his sister, who made more history mistakes than Diane.
12. Wendy and her brother ( who didn't make a total of eight history mistakes ) didn't make as many errors in geography as George and his sister.

Brothers are - David, Edward, George, Luke, Martin & Sammy.
Sisters are - Anne, Diane, Gail, Louella, Susan & Wendy.
Surnames are- Dean, McCall, O'Connell, Seal, Vole & Waters.
Geography errors are - 10, 11, 12, 14, 15 & 16.
History errors are 6, 7, 8, 10, 11 & 12.

See The Solution Submitted by Salil    
Rating: 4.0000 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution -- spoiler | Comment 3 of 7 |

The following program permutes the strings of initials of sisters, brothers, surnames and history errors, to be matched against an assumed sequence of 10,11,12,14,15 and 16 geography errors. A space is inserted in the middle of each to account for the missing 13 geography errors.

It is assumed that when the puzzle refers to a pair of twins making a given number of mistakes, it applies to each individually, as otherwise, for example "the twins surnamed Waters [couldn't have] made one more history mistake than the twins surnamed Seal," as each pair together must have made an even number of errors.

DECLARE SUB permute (a$)
sis1$ = "adglsw"
bro1$ = "deglms"
sur1$ = "dmosvw"
hist1$ = CHR$(6) + CHR$(7) + CHR$(8) + CHR$(10) + CHR$(11) + CHR$(12)
CLS

sish$ = sis1$
DO
  sis$ = LEFT$(sis1$, 3) + " " + RIGHT$(sis1$, 3)
  IF INSTR(sis$, "al") OR INSTR(sis$, "la") THEN ' rule 3
   susan = INSTR(sis$, "s")
   anne = INSTR(sis$, "a")
   louella = INSTR(sis$, "l")
   gail = INSTR(sis$, "g")
   wendy = INSTR(sis$, "w")
   diane = INSTR(sis$, "d")

histh$ = hist1$
DO
  hist$ = LEFT$(hist1$, 3) + " " + RIGHT$(hist1$, 3)
  IF MID$(hist$, 2, 1) <> CHR$(11) THEN ' rule 4
    anneHist = ASC(MID$(hist$, anne, 1))
    g$ = CHR$(anneHist - 1)
    g = INSTR(hist$, g$)
    louellaHist = ASC(MID$(hist$, louella, 1))
    g$ = CHR$(louellaHist + 1)
    g2 = INSTR(hist$, g$)
    susanHist = ASC(MID$(hist$, susan, 1))
    IF g > 0 AND g2 > 0 AND susan = g - 1 AND gail = g2 + 1 AND susanHist = 7 THEN ' rules 8 & 10
     IF MID$(hist$, wendy, 1) <> CHR$(8) THEN ' rule 12a

broh$ = bro1$
DO
  bro$ = LEFT$(bro1$, 3) + " " + RIGHT$(bro1$, 3)
  IF INSTR(bro$, "le") THEN ' rule 6b
    david = INSTR(bro$, "d")
    edward = INSTR(bro$, "e")
    IF MID$(hist$, edward, 1) > MID$(hist$, 6, 1) THEN ' rule 6a
      IF ABS(ASC(MID$(hist$, david, 1)) - ASC(MID$(hist$, 5, 1))) = 1 THEN ' rule 5
        george = INSTR(bro$, "g")
        sammy = INSTR(bro$, "s")
        luke = INSTR(bro$, "l")
        IF MID$(hist$, louella, 1) > MID$(hist$, sammy, 1) AND luke <> louella THEN ' rule 1
          IF wendy < george THEN 'rule 12b
           martin = INSTR(bro$, "m")
           martinPlus = martin + 1
           martinMinus = martin - 1
           dianeHist$ = MID$(hist$, diane, 1)
           good = 0
           IF martinPlus < 8 AND martinPlus <> 4 THEN
             mpHist$ = MID$(hist$, martinPlus, 1)
             IF mpHist$ > dianeHist$ THEN good = 1
           END IF
           IF martinMinus > 0 AND martinMinus <> 4 THEN
             mpHist$ = MID$(hist$, martinMinus, 1)
             IF mpHist$ > dianeHist$ THEN good = 1
           END IF
           IF good THEN ' rule 11

surh$ = sur1$
DO
  sur$ = LEFT$(sur1$, 3) + " " + RIGHT$(sur1$, 3)
  IF INSTR(sur$, "od") OR INSTR(sur$, "do") THEN ' rule 2b
    oconnell = INSTR(sur$, "o")
    IF MID$(hist$, george, 1) < MID$(hist$, oconnell, 1) THEN ' rule 2a
     mccall = INSTR(sur$, "m")
     vole = INSTR(sur$, "v")
     seal = INSTR(sur$, "s")
     IF seal > mccall THEN ' rule 9b
       waters = INSTR(sur$, "w")
       diff = ASC(MID$(hist$, waters, 1)) - ASC(MID$(hist$, seal, 1))
       IF diff = 1 THEN ' rule 9a
         diff = ASC(MID$(hist$, mccall, 1)) - ASC(MID$(hist$, vole, 1))
         IF diff <> -1 THEN ' rule 7
           ct = ct + 1
           PRINT bro$
           PRINT sis$
           PRINT sur$
           FOR ii = 1 TO LEN(hist$)
            IF ii <> 4 THEN
             PRINT ASC(MID$(hist$, ii, 1));
            END IF
           NEXT
           PRINT
           PRINT
         END IF
       END IF
     END IF
    END IF
  END IF
  permute sur1$
LOOP UNTIL sur1$ = surh$
        
           END IF
          END IF
        END IF
      END IF
    END IF
  END IF
  permute bro1$
LOOP UNTIL bro1$ = broh$

     END IF
    END IF
  END IF
  permute hist1$
LOOP UNTIL hist1$ = histh$

  END IF
  permute sis1$
LOOP UNTIL sis1$ = sish$
PRINT ct

The permute subroutine is shown elsewhere on the site.

The results show up as (with annotations added):

geography errors 10  11  12  14  15 16
brother's name l e m s g d
sister's name w a l s d g
surname m o d s v w
history errors  6  12  10  7  11  8

So:

Luke and Wendy McCall had 10 geography errors and 6 history errors each.
Edward and Anne O'Connell had 11 geography and 12 history errors each.
Martin and Louella Dean had 12 geography and 10 history errors each.
Sammy and Susan Seal had 14 geography and 7 history errors each.
George and Diane Vole had 15 geography and 11 history errors each.
David and Gail Waters had 16 geography and 8 history errors each.


  Posted by Charlie on 2006-04-17 21:00:23
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 (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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