Once in a while I go out for a drink to my favourite bar. Normally is just drink a beer, eat some snacks and have a good time with my three friends. But last night I wanted to do some shots. The bartender said there were only 4 shots available:
1-digit : contains 2 types of high-percentage liquors and 3 types of low-percentage liquors
2-digit : contains 2 types of high-percentage liquors and 0 types of low-percentage liquors
..-digit : contains...
5-digit : contains 1 type of high-percentage liquors and 6 types of low-percentage liquors
But the bartender forgot the name of the third shot and what it contains… He told me: find out what shot it is, and the next shots are on the house! For all four! plus those other two at the bar. Can you guys help me out and getting free shots for everyone at the bar?
I asked the bartender for more information about the shots menu and he said: Actually there were 5 possible shots, but the fourth was taken of the menu because people said it tasted like it contained 0 types of high-percentage liquor and 0 types of low-percentage liquor. The fourth shot is called 4-digit.
The bartender said that the order of mixing is important to him. When he knows the name of the shots (by counting to 5), he knows how many high-percentage liquors he has to pour first and secondly how many low-percentage liquors he has to pour. Thus for the 1-digit shot he pours first 2 and then 3, for the 2-digit: 2,0; 4-digit: 0,0 and 5-digit: 1,6. The bartender also found out that the amount of people he would have to give a free shot, is an important number!
During deciphering the shot, we talked to the bartender. He just has a new hobby, encrypting messages. He mentioned he recently started, therefore only uses the basic method concerning letters and numbers. He is a more experienced mathematician and just had an exam last week. He knew for sure that he answered question 1a, 2b and 3c correctly by using multiplication, addition, brackets and subtraction to find the correct 2 digit number he could split. He told us this when he was preparing the two + four! free shots, because he thinks we can find the answer!
$2+4! = 2+4*3*2*1 = 26$
The solution can be found through dechipering the name of the shot by combining the number in the name of the shot, the word digit and mathematical operations. This will lead to a number which can be translated into a 2-digit number (23 for example). This only works one way, from the name of the shot to the 2-digit number.
The barman confirms to us that the letters of the word digit can be transformed using A1Z26 ciphering. Using multiplication and addition depending on the number of the shot (alle 5 letters in digit are used) a number comes out. By using the amount of people who get a free shot the different types of high-and low-percentage liqours can be found (this system only works one way!).