Puzzle – Secret Phrase – GeeksforGeeks

A instructor writes six phrases on a board: “cat canine has max dim tag.” She offers three college students, Albert, Bernard, and Cheryl every a chunk of paper with one letter from one among these above written phrases on the board.
Then she asks, “Albert, have you learnt the phrase?” Albert instantly replies sure.
She asks, “Bernard, have you learnt the phrase?” He thinks for a second and replies sure.
Then she asks Cheryl the identical query. She thinks after which replies sure. What’s the phrase?

Puzzle – Secret Phrase
Answer:
We’re going to research the letters in every of the phrases in relation to the responses that Albert, Bernard, and Cheryl give.
The instructor first requested if Albert is aware of the phrase and he responds that he does know the phrase. Which means Albert’s letter can uniquely establish a phrase. In different phrases, the frequency of the letter that he bought is precisely one.
For instance, think about if Albert had gotten the letter ‘c’. The letter ‘c’ solely seems within the phrase cat, so if Albert had gotten the letter ‘c’ he would be capable to determine that the phrase is a cat. In distinction, suppose Albert had gotten the letter ‘a’. the letter ‘a’ seems in a number of phrases, so there would have been no approach for Albert to determine which phrase was the phrase that they bought. Since Albert replied he was capable of establish the phrase meaning he didn’t get the letter A so we have to discover out which letters seem precisely as soon as on this listing of phrases.
We will undergo all the phrases and we are able to determine which of those letters uniquely seem one time on this listing. These are the letters: c, o, h or s, x, or i.

Albert’s Reply Justification
Discover within the phrase tag that the letters t, a, and g all seem a number of instances on this listing. So since Albert replied that he may establish the phrase, meaning he didn’t have any of those letters. The phrase can’t be TAG.
The instructor then requested Bernard if he is aware of the phrase. Bernard, after a second of considering, additionally replies sure so Bernard has heard Albert’s reply and desires to proceed the logic, so from the remaining listing of phrases, Bernard would be capable to uniquely establish which phrase all of them had. so we undergo this listing. It might be the letters t, g, h, or s. These are the choices the opposite letters seem greater than as soon as on this listing of remaining letters that Bernard may have gotten. What this implies is that the phrase couldn’t be ‘max’ or ‘dim’ so we are able to get rid of these phrases.

Bernard’s Reply Justification
Now Cheryl, who has heard all of those, is then requested if she is aware of the phrase. She appears at her letter and thinks about what Albert & Bernard mentioned and in addition says, “Sure, I can determine what the phrase is.” So, persevering with the logic, one of many remaining letters has to uniquely establish the phrase. Nicely, there are solely two letters left there’s a letter a and there’s a letter d. The distinctive letter left is letter d as a result of the letter a seems in each the phrases ‘cat’ and ‘has’ so Cheryl will need to have gotten the letter D and it couldn’t have been the phrase cat or has.

Cheryl’s Reply Justification
So, we are able to conclude that Albert would have gotten the letter O, Bernard would have gotten the letter G, and Cheryl would have gotten the letter D.
So, the key phrase must be ‘canine’.