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

Home > Logic
Clean Tops (Posted on 2006-09-11) Difficulty: 3 of 5
Three girls went on a vacation, each wearing a red "Love to travel" T-shirt. They each have brought 9 other clean tops, but are fairly active, and as a result each top becomes dirty after wearing it for a day,

They wanted to wear a clean top each day, so fortunately, their cabin came with a washer and drier, however, they could only wash two girls' clothes at a time, so the first and third girls had to wait until the next day to wash their clothes once each.

Their vacation lasted 3 weeks (including the day they left), so each girl washes her clothes twice while on vacation.

Here is a list of when they wore what. (Note they wore only one top per day.)

First girl:
  1. Red "Love to travel" T-shirt
  2. Floral tank top
  3. Green camisole
  4. White "I *heart* levik" T-shirt
  5. Gray short-sleeve shirt
  6. Blue long-sleeve shirt
  7. Pink poodle T-shirt
  8. Orange tank top
  9. Green camisole
  10. Yellow "Sled Shiver Sally" T-shirt
  11. Floral tank top
  12. Gray short-sleeve shirt
  13. Black "Night Owl" T-shirt
  14. Pink poodle T-shirt
  15. Red "Love to travel" T-shirt
  16. Yellow "Sled Shiver Sally" T-shirt
  17. Blue long-sleeve shirt
  18. Orange tank top
  19. Floral tank top
  20. Green camisole
  21. "I *heart* levik" T-shirt

Second girl:
  1. Red "Love to travel" T-shirt
  2. Floral short-sleeve shirt
  3. Orange tank top
  4. Green cougar T-shirt
  5. Gray long-sleeve shirt
  6. White "Mind your Pids and Queues" T-shirt
  7. Yellow sunshine shirt
  8. Black "Dark as Night" T-shirt
  9. Green cougar T-shirt
  10. Orange tank top
  11. Red "Love to travel" T-shirt
  12. Gray long-sleeve shirt
  13. Pink tank top
  14. Floral short-sleeve shirt
  15. White "Mind your Pids and Queues" T-shirt
  16. Blue tank top
  17. Yellow sunshine shirt
  18. Orange tank top
  19. Floral short-sleeve shirt
  20. White "Mind your Pids and Queues" T-shirt
  21. Red "Love to travel" T-shirt

Third girl:
  1. Red "Love to travel" T-shirt
  2. Floral long-sleeve shirt
  3. Gray "Undecision" T-shirt
  4. Pink "Pretty in Pink" T-shirt
  5. Blue coy toy T-shirt
  6. Orange short-sleeve shirt
  7. Yellow tank top
  8. Floral long-sleeve shirt
  9. Blue coy toy T-shirt
  10. White "Welcome to Truth Town" T-shirt
  11. Yellow tank top
  12. Black "Fun at Night" T-shirt
  13. Pink "Pretty in Pink" T-shirt
  14. Orange short-sleeve shirt
  15. Green long-sleeve shirt
  16. Gray "Undecision" T-shirt
  17. Blue coy toy T-shirt
  18. Floral long-sleeve shirt
  19. Yellow tank top
  20. Black "Fun at Night" T-shirt
  21. Red "Love to travel" T-shirt
From this information, what day did each girl wash her clothes?

Notes: Each girl washes her current top when she washes her other dirty clothes, so it is clean for following days. Differences between lights/darks or types of tops do not matter in the washing process.

See The Solution Submitted by Gamer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution 6 solutions? (spoiler -- computer used) | Comment 3 of 10 |

I initially misunderstood this to mean there were 3 washing days, and one of the girls in each instance had to wait until the next washing day, rather than the next calendar day.

Now that I see what is meant, the below chart lists the four dates, followed by a colon and the girl(s) washing on that day:

 7 : 2  3      8 : 1          14 : 1  3      15 : 2
 7 : 1  3      8 : 2          14 : 1  3      15 : 2
 7 : 2  3      8 : 1          15 : 1  3      16 : 2
 7 : 2  3      8 : 1          15 : 1  2      16 : 3
 7 : 1  3      8 : 2          15 : 1  3      16 : 2
 7 : 1  3      8 : 2          15 : 1  2      16 : 3

The washing is understood to be in the evening, after wearing that day's top.

DIM top$(3, 21), dt(2)
CLS
OPEN "cleantop.txt" FOR INPUT AS #1
DO
 LINE INPUT #1, l$
 l$ = LTRIM$(RTRIM$(l$))
 IF l$ > "" THEN
   IF INSTR(l$, "girl:") THEN
     g = g + 1
     n = 0
     DO: a$ = INKEY$: LOOP UNTIL a$ > ""
   ELSE
     n = n + 1
     top$(g, n) = l$
     PRINT n; l$; TAB(50);
     FOR i = 1 TO n - 1
       IF top$(g, i) = l$ THEN PRINT i;
     NEXT
     PRINT
   END IF
 END IF
LOOP UNTIL EOF(1)
CLOSE

FOR i = 2 TO 3
 FOR j = 1 TO i - 1
   FOR k = 1 TO 21
    FOR l = 1 TO 21
      IF top$(i, k) = top$(j, l) THEN
        PRINT i; k, j; l, top$(j, l)
      END IF
    NEXT
   NEXT
 NEXT
NEXT

FOR d1 = 1 TO 18
FOR d2 = d1 + 1 TO 19
 FOR excl1 = 1 TO 3
 FOR excl2 = 1 TO 3
    FOR g = 1 TO 3
     d = 1
     IF g <> excl1 THEN dt(d) = d1:  ELSE dt(d) = d1 + 1
     d = d + 1
     IF g <> excl2 THEN dt(d) = d2:  ELSE dt(d) = d2 + 1
     d = d + 1
     good = 1
     FOR i = 1 TO dt(1) - 1
      FOR j = i + 1 TO dt(1)
       IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
      NEXT
     NEXT
     FOR i = dt(1) + 1 TO dt(2) - 1
      FOR j = i + 1 TO dt(2)
       IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
      NEXT
     NEXT
     FOR i = dt(2) + 1 TO 20
      FOR j = i + 1 TO 21
       IF top$(g, i) = top$(g, j) THEN good = 0: GOTO notThis
      NEXT
     NEXT
    NEXT
    IF good THEN
      PRINT d1; ":";
      FOR g = 1 TO 3
       IF g <> excl1 THEN PRINT g;
      NEXT
      PRINT TAB(15);
      PRINT d1 + 1; ":"; excl1; TAB(30);
      PRINT d2; ":";
      FOR g = 1 TO 3
       IF g <> excl2 THEN PRINT g;
      NEXT
      PRINT TAB(45);
      PRINT d2 + 1; ":"; excl2
     
    END IF
    ct = ct + 1
notThis:
 NEXT
 NEXT
NEXT
NEXT
PRINT ct

The "cleantop.txt" file contains the list, with "I *heart* levik" T-shirt" amended to add "White" in front, to result in an equal comparison with the first occurence for girl 1.


  Posted by Charlie on 2006-09-12 00:02:45
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 (6)
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