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

Home > General
Dragon Hunting (Posted on 2004-12-10) Difficulty: 3 of 5
Prince Valiant went to fight a 3-headed, 3-tailed dragon.

He has a magic sword that can, in one stroke, chop off either one head, two heads, one tail, or two tails.

This dragon is of a type related to the hydra; if one head is chopped off, a new head grows. In place of one tail, two new tails grow; in place of two tails, one new head grows; if two heads are chopped off, nothing grows.

What is the smallest number of strokes required to chop off all the dragon's heads and tails, thus killing it?

See The Solution Submitted by SilverKnight    
Rating: 3.7778 (9 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution If temporary incapacitation is not death, then... | Comment 11 of 37 |

If the proper answer is indeed 9, then there are 166 ways of rearranging the 3*1 tail, 3*2 heads, 3*2 tails that work:

1T 1T 1T 2T 2T 2T 2H 2H 2H
1T 1T 1T 2T 2T 2H 2T 2H 2H
1T 1T 1T 2T 2T 2H 2H 2T 2H
1T 1T 1T 2T 2H 2T 2T 2H 2H
1T 1T 1T 2T 2H 2T 2H 2T 2H
1T 1T 1T 2T 2H 2H 2T 2T 2H
1T 1T 1T 2H 2T 2T 2T 2H 2H
1T 1T 1T 2H 2T 2T 2H 2T 2H
1T 1T 1T 2H 2T 2H 2T 2T 2H
1T 1T 2T 1T 2T 2T 2H 2H 2H
1T 1T 2T 1T 2T 2H 2T 2H 2H
1T 1T 2T 1T 2T 2H 2H 2T 2H
1T 1T 2T 1T 2H 2T 2T 2H 2H
1T 1T 2T 1T 2H 2T 2H 2T 2H
1T 1T 2T 1T 2H 2H 2T 2T 2H
1T 1T 2T 2T 1T 2T 2H 2H 2H
1T 1T 2T 2T 1T 2H 2T 2H 2H
1T 1T 2T 2T 1T 2H 2H 2T 2H
1T 1T 2T 2T 2H 1T 2T 2H 2H
1T 1T 2T 2T 2H 1T 2H 2T 2H
1T 1T 2T 2T 2H 2H 1T 2T 2H
1T 1T 2T 2H 1T 2T 2T 2H 2H
1T 1T 2T 2H 1T 2T 2H 2T 2H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 2H 2H
2H 1T 1T 2T 1T 2T 2H 2T 2H
2H 1T 1T 2T 1T 2H 2T 2T 2H
2H 1T 1T 2T 2T 1T 2T 2H 2H
2H 1T 1T 2T 2T 1T 2H 2T 2H
2H 1T 1T 2T 2T 2H 1T 2T 2H
2H 1T 1T 2T 2H 1T 2T 2T 2H
2H 1T 1T 2T 2H 2T 1T 2T 2H
2H 1T 2T 1T 1T 2T 2T 2H 2H
2H 1T 2T 1T 1T 2T 2H 2T 2H
2H 1T 2T 1T 1T 2H 2T 2T 2H
2H 1T 2T 1T 2T 1T 2T 2H 2H
2H 1T 2T 1T 2T 1T 2H 2T 2H
2H 1T 2T 1T 2T 2H 1T 2T 2H
2H 1T 2T 1T 2H 1T 2T 2T 2H
2H 1T 2T 1T 2H 2T 1T 2T 2H
2H 1T 2T 2H 1T 1T 2T 2T 2H
2H 1T 2T 2H 1T 2T 1T 2T 2H
2H 2T 1T 1T 1T 2T 2T 2H 2H
2H 2T 1T 1T 1T 2T 2H 2T 2H
2H 2T 1T 1T 1T 2H 2T 2T 2H
2H 2T 1T 1T 2T 1T 2T 2H 2H
2H 2T 1T 1T 2T 1T 2H 2T 2H
2H 2T 1T 1T 2T 2H 1T 2T 2H
2H 2T 1T 1T 2H 1T 2T 2T 2H
2H 2T 1T 1T 2H 2T 1T 2T 2H
2H 2T 1T 2H 1T 1T 2T 2T 2H
2H 2T 1T 2H 1T 2T 1T 2T 2H
2H 2T 2H 1T 1T 1T 2T 2T 2H
2H 2T 2H 1T 1T 2T 1T 2T 2H

DECLARE SUB move ()
DIM SHARED heads, tails, m$, ct
heads = 3: tails = 3
CLS
OPEN "drhunt.txt" FOR OUTPUT AS #2
move
CLOSE
PRINT ct

SUB move
 FOR i = 1 TO 3
  m$ = m$ + LTRIM$(STR$(i))
  good = 1
  SELECT CASE i
     CASE 1
       IF tails = 0 THEN good = 0
       tails = tails + 1
     CASE 2
       IF tails < 2 THEN good = 0
       tails = tails - 2: heads = heads + 1
     CASE 3
       IF heads < 2 THEN good = 0
       heads = heads - 2
  END SELECT
  IF good THEN
    IF heads = 0 AND tails = 0 THEN
     PRINT m$: ct = ct + 1
     ct1 = 0: ct2 = 0: ct3 = 0
     FOR pCt = 1 TO LEN(m$)
       SELECT CASE (MID$(m$, pCt, 1))
         CASE "1"
          PRINT #2, "1T ";
          ct1 = ct1 + 1
         CASE "2"
          PRINT #2, "2T ";
          ct2 = ct2 + 1
         CASE "3"
          PRINT #2, "2H ";
          ct3 = ct3 + 1
       END SELECT
     NEXT pCt
     IF ct1 <> 3 OR ct2 <> 3 OR ct3 <> 3 THEN
      PRINT #2, "*"
     ELSE
      PRINT #2,
     END IF
    ELSE
     IF LEN(m$) < 9 THEN
       move
     END IF
    END IF
  END IF
  SELECT CASE i
     CASE 1
       tails = tails - 1
     CASE 2
       tails = tails + 2: heads = heads - 1
     CASE 3
       heads = heads + 2
  END SELECT
  m$ = LEFT$(m$, LEN(m$) - 1)
 NEXT i
END SUB

This would find any solution of 9 or under regardless of its composition, so the three of each type of move are all needed.


  Posted by Charlie on 2004-12-10 16:49:54
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 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information