## A dragon, a knight and poison fruits

Posted on: February 19th, 2015 by
2

A knight and a dragon were dueling on a remote island. After a long time, they were tired of battle and decided to instead fight with their wits. The island consists of 7 different kinds of poison fruits, namely type 1, type 2, ... type 7. These fruits are magical and they work in a special way. If you eat a fruit of type i, the only way to cure yourself is by eating a fruit of type higher than i. If not, you will die exactly 1 hour after eating the fruit. Thus if you eat a type 7 fruit to start with, you are guaranteed to die because there is no higher level fruit. A more complex example: If you eat a type 2 fruit followed by a type 1 fruit and then a type 2 fruit and finally a type 3 fruit, you are cured. The type 1 fruit is ineffective and you are still affected by type 2. The type 2 fruit is also ineffective. Finally, the type 3 fruit neutralizes the type 2 poison and you are cured. The catch is that the type 7 fruit is on top of a mountain and is accessible only by the dragon.

The knight and the dragon will meet for dinner and will give each other a fruit that they are supposed to eat. Is it possible for the knight to guarantee survival? Is it possible for the dragon to guarantee survival?

--- via n1b-algo blog.

#### 2 Responses to A dragon, a knight and poison fruits

1. George had this to say about that:

You can have with you two type 1 and one type 2 fruits, plus whatever you wish to give their opponent. Before the match eat a type 1 fruit. Then eat whatever the opponent gives you. Then eat your second type 1 fruit. You are certainly poisoned from a type 1 fruit regardless of what your opponent gave you. Finally eat your type two fruit and be cured.

(this works for both, of course the dragon has a much simpler plan that guarantees survival)

2. anon had this to say about that:

Level 0 = normal, non-poisonous fruit.

_ Knight:
Eat level 1 fruit before going. Then the dragon can give fruit of whatever level; the knight then can eat level 0 then level 3.

_ Dragon:
Eat level 6 before going. Then the knight can give anything; the dragon only has to eat level 7 afterwards.

{"result":"error", "message":"You can't access this resource as it requires an 'view' access for the website id = 1."}