A dragon has 100 heads. A knight can cut off 15, 17, 20, or 5 heads, respectively, with one blow of his sword. In each of these cases 24, 2, 14, or 17 new heads grow on its shoulders, respectively. If all heads are blown off, the dragon dies. Can the dragon ever die?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Not perfect; if the knight can cut off a number of heads congruent to 1 mod 3, then the knight can still kill the dragon. Think of something like this: the knight can cut 100 heads, where 97 grows after each cut. By your reasoning, the knight still can't finish the dragon off, but it's obvious that a single slash wins.
Log in to reply
That's a very good point!
Oh, that's right. Lucky for me that it wasn't the case in this problem.
actually the values cut off and added respectively have the same remainder when divided by 3
It's not sufficient to check that 100 is not divisible by 3.
Let's take up a scenario: We have a blow which cuts 17 heads and re-grows 2 heads. If, instead we had 16 heads cut and 1 head regrown.
It would seem, that now it is still not possible to kill the dragon (16 - 1 = 15)
Observe 16 + (16 - 1) = 31
If, we can bring the head count to 31, then now it is reducable to 0.
Now, is it reducable to 31 heads.
Let us only use the blows which reduce the heads:
15k + 6l = 69
5k + 2l = 23
l = 4 k = 3
So, we have to check one thing in this question:
each Individual cuts are of the form 3k or 3k+2
and we start with the initial number of heads as 100, viz. 3k + 1
Now, we can definitely say, it is not reducable to 0
Question is not very simple as it seems at face value ... Double thumbs up for this beautiful question :)
We just have to check whether 15,17,20,or 5 will be the the number of remaining heads after the second last blow, which means the reachable states will not be 85 83 80 or 95
This is the perfect answer.
H e r e w e h a v e t o u n d e r s t a n d t h a t
1 5 = 2 4 ( m o d 3 )
1 7 = 2 ( m o d 3 )
2 0 = 1 4 ( m o d 3 )
5 = 1 7 ( m o d 3 ) . i s i n v a r i a n t
S o t h e D r a g o n w i l l n e v e r d i e
just what I had thought...bravo.:)
There is no possible last move since any of the 4 possible moves leaves a positive number of heads on the dragon.
Thus no strategy can reduce the number of heads to zero.
Note that the loss (or gain) of heads at each stroke is divisible by 3. But the total number of heads isn't.
Exactly!The non divisibility by 3 is the invariance relation . At least I did the problem like that.
Log in to reply
here we have to understand that 15=24 (mod 3) 17=2 (mod 3) 20=14 (mod 3) 5 =17 ( mod 3 ) is invariance So the dragon will never die
Hi Paramjit, this is not a sufficient check ... Check my solution
Log in to reply
Of course, thanks. :)
Problem Loading...
Note Loading...
Set Loading...
Notice, that in every case the "delta of heads" (heads cut - heads grown) is divisible by 3. That means, that the number of heads will always have the same rest dividing by 3 - beacause we subtract only multiples of 3. Since 100 has rest 1 when dividing by 3, number of heads will always give rest 1 when dividing by 3, and thus it will never be 0 (which is divisible by 3.)