# Logic: Match the Potion to the Drinker

You are known as a great alchemist and potion master, and have spent the past decade developing a series of extremely powerful potions. You have made some great progress, but the potions are not ready for consumption as the side effects will cause the drinker to erupt with power, killing all around them. Despite this, the local soldiers do not believe your claims, and five of them broke into your laboratory last night and stole the potions. You have to give each soldier the correct antidote; if you give the wrong antidote or fail to give an antidote, the power eruption will blow up your lab, and cause a chain reaction that will decimate the entire kingdom.

The colors of the five potions were blue, green, red, yellow, and clear, and each has another unique side effect. The blue and green potions cause the drinker to always speak the truth. The red and yellow potions cause the drinker to always lie. The clear potion will cause the drinker to alternate telling the truth and telling a lie; if somebody drinks the clear potion their first statement can be either the truth or a lie, but each statement after that must alternate.

The five soldiers are Alice, Barry, Charlie, Dan, and Erica. You interrogate each of them and they make the following statements:

Alice: I drank the clear potion.
Barry: Dan and Erica are both going to lie to you.
Charlie: Alice drank the red potion.
Dan: Erica and I drank the same type of potion.
Erica: I drank the green colored potion.

You go back and ask them again, and this time they tell you:

Alice: Dan drank the clear potion.
Barry: Erica did not drink the clear potion.
Charlie: Dan is going to lie to you.
Dan: Alice drank the green potion.
Erica: The person who drank the clear potion lied in their first statement to you.

You would like to question them some more, but there is no time. You can already see the unstable power seeping from them, and you have to give them the correct antidotes quickly. So who drank which potion?

Assuming each person drank a different potion:

Alice = red, Barry = clear, Charlie = blue, Dan = yellow, Erica = green

Reasoning:

Alice says she drank the clear potion (alterante), so she can't have drunk blue or green Dan's two statements are both false, so he drank red or yellow. Barry says Erica is going to lie, so they are not the two truthful ones. The two who will be fully truthful must be Barry and Charlie, or Charlie and Erica. In either case, Charlie is truthful. By Charlie's statement, Alice drank red. By elimination, Dan drank yellow. If Barry drank blue or green, then by elimination Erica would have to drink clear, contradicting his second statement. Thf, Barry drank clear. By Erica's first statement, she drank green. By elimination, Charlie drank blue.

Charlie's second and Erica's second statements are superfluous.

Assuming each person drank different potion,

Alice must not drank the true potion as the clear potion will not be drunk by 2 person.
And so, Dan must not drank the true potion as the second statement of Dan must be wrong.

Assuming Dan drank the clear potion, then Alice should drank the clear potion also because the second statement of alice is telling the truth

-> Both Alice and Dan telling 2 lie and is drank the lie potion(red or yellow)

Assuming second statement of Erica tells lie, then the first statement should be true because there are no lie potions left and Erica can only tells 1 lie and 1 truth
However, Erica must not drank the green potion as second statement is a lie

-> Erica is telling the truth and is drank the green potion
-> The person who dranks the clear potion tells the first statement lie and the second statement truth

Barry is telling lie in first statement because Erica is telling the truth
-> Barry dranks the clear potion

-> Only blue potions is left for charlie
-> Charlie's first statement is true
-> Alice dranks the red potion
-> Only yellow potions is left for Dan