Logic
# Grid Puzzles

In the game Mastermind, I have to guess some permutation of five colors out of eight (being a permutation, all colors are different). I can submit a guess, and I receive a reply in the form of two numbers:

- The blue number tells the number of colors in my guess that exist in the secret pattern, which are also correct in position.
- The white number tells the number of colors in my guess that exist in the secret pattern, but which are incorrect in position.

When where there should be a number, it is empty instead, the number is assumed to be zero.

What is the secret pattern? Enter your answer in order from left to right, translating the color to a digit code according to this table:

Color | Green | Blue | Yellow | White |

Code | 1 | 2 | 3 | 4 |

Color | Black | Red | Purple | Orange |

Code | 5 | 6 | 7 | 8 |

As an example, if the answer is orange-blue-yellow-white-black, enter $82345$.

Imagine that you are walking along the lines of the grid of unit squares below.

If you start from the bottom left-hand corner and walk along the lines until you return to your starting point, what is the length of the longest path you can make if you can't travel on the same line segment or pass through the same point twice?

The picture above shows a Hidato puzzle. The aim of the puzzle is to fill each white/light blue cell with an integer between 1 and 85 (inclusive) so that each integer appears exactly once and consecutive integers appear in adjacent cells.

Let the number that takes place of the cell marked $A$ be denoted $A$, and so forth.

What is the value of $A+B+C$?

Aaron, Calvin, David, and Peter each live in one of 4 adjacent townhouses in a row, each of a single color.

Each owns one pet and imbibes one kind of drink.

- Aaron owns the dog.
- The bird lives in the red house.
- Calvin lives in the blue house.
- David does not live in the red house.
- The cat lives where the milk drinker lives.
- Either the fish lives next to the cat
**or**the bird lives next to the coffee drinker. - If the dog lives in the green house, then the cat lives next to the blue house.
- If Peter owns the fish, then
**either**Calvin owns the bird**or**else David owns the cat. - The tea drinker lives two houses away from the coffee drinker.
- The red house resident drinks water if and only if the yellow house resident drinks milk.

Who owns the fish?

Note: Color of residences as shown in photograph have nothing to do with this problem. Also, any pet "owned" is presumed to live in the same place as the owner lives.

$7\times7$ grid without any overlap?

What is the largest number of these tetrominoes which can fit on aThe pieces can be rotated and reflected. However, they cannot overlap and go off the grid.