# Logik game

Letter game Logik is a two player game, which has the following rules:
1. The first player thinks five-letter word in which no letter is not
repeated.
2. The second player writes a five-letter word.
3. The first player answers two numbers - the first number indicates how many letters written word coincides with the imaginary word, and is also on the correct position; the second number indicates how many letters written word is contained in the imaginary word, but is not the right place.
4. Steps 2 and 3 are repeated until the second player imaginary word guess.
Recording one game of two friends looked like this:
SONET 1 2
MUDRC 0 2
PLAST 0 2
KMOTR 0 4
ATOLY 1 1
DOGMA 0 2

The next move was meant by the word guessed. Determine which word
it was.

Note:
Our presented solution contains a program in PHP language, which will solve the given combination of letters - by brute force, quickly and painlessly.

Result

x = (Correct answer is: STROM)

#### Solution:

x = STROM
```function match(\$s1, \$s2, \$q, \$w)
{
\$a = \$b = 0;
for(\$i=0;\$i<5;\$i++)
{
if(\$s1{\$i} == \$s2{\$i})
{
\$a++;
}
else
{
\$b += strpos(\$s2, \$s1{\$i})!==false;
}
}

return \$a == \$q && \$b == \$w;
}

for(\$a=65; \$a<91; \$a++)
{
for(\$b=65; \$b<91; \$b++)
{
for(\$c=65; \$c<91; \$c++)
{
for(\$d=65; \$d<91; \$d++)
{
for(\$e=65; \$e<91; \$e++)
{
\$s=chr(\$a).chr(\$b).chr(\$c).chr(\$d).chr(\$e);
if(!match(\$s,"SONET", 1, 2)) continue;
if(!match(\$s,"MUDRC", 0, 2)) continue;
if(!match(\$s,"PLAST", 0, 2)) continue;
if(!match(\$s,"KMOTR", 0, 4)) continue;
if(!match(\$s,"ATOLY", 1, 1)) continue;
if(!match(\$s,"DOGMA", 0, 2)) continue;

echo \$s;
exit;
}
}
}

}
}
```

We would be pleased if you find an error in the word problem, spelling mistakes, or inaccuracies and send it to us. Thank you!

Tips to related online calculators
Would you like to compute count of combinations?

## Next similar math problems:

• Phone numbers
How many 7-digit telephone numbers can be compiled from the digits 0,1,2,..,8,9 that no digit is repeated?
• Five letters
How many ways can five letters be arranged?
• Digits
How many natural numbers greater than 4000 which are formed from the numbers 0,1,3,7,9 with the figures not repeated, B) How many will the number of natural numbers less than 4000 and the numbers can be repeated?
• How many
How many double-digit numbers greater than 30 we can create from digits 0, 1, 2, 3, 4, 5? Numbers cannot be repeated in a two-digit number.
• Three digits number 2
Find the number of all three-digit positive integers that can be put together from digits 1,2,3,4 and which are subject to the same time has the following conditions: on one positions is one of the numbers 1,3,4, on the place of hundreds 4 or 2.
• Numbers
How many different 3 digit natural numbers in which no digit is repeated, can be composed from digits 0,1,2?
• Three-digit numbers
How many three-digit numbers are from the numbers 0 2 4 6 8 (with/without repetition)?
• How many 4
How many 4 digit numbers that are divisible by 10 can be formed from the numbers 3, 5, 7, 8, 9, 0 such that no number repeats?
A license plate has 3 letters followed by 4 numbers. Repeats are not allowed for the letters, but they are for the numbers. If they are issued at random, what is the probability that the 3 letters are in alphabetical order and the 3 numbers are consecutiv
• Digits
How many five-digit numbers can be written from numbers 0.3,4, 5, 7 that is divided by 10 and if digits can be repeated.
• Solve 2
Solve integer equation: a +b+c =30 a, b, c = can be odd natural number from this set (1,3,5,7,9,11,13,15)
• Three-digit numbers
We have digits 0,1,4,7 that cannot be repeated. How many three-digit numbers can we write from them? You can help by listing all the numbers.
• Three digits number
From the numbers 1, 2, 3, 4, 5 create three-digit numbers that digits not repeat and number is divisible by 2. How many numbers are there?