# Binary Puzzle

> Paint every cell red or blue: half of each in every row and column, never three alike in a row, and no two lines the same.

Kind of puzzle: Paint

Web page: https://inkit.games/puzzles/binary-puzzle

## Origin

Peter De Schepper and Frank Coussement published this puzzle in Belgium in 2009 as Binairo, and since Binairo and its other name, Takuzu, are trademarks, we use the generic name.

## Credit

- Inventor: Peter De Schepper and Frank Coussement (2009)
- They named it Binairo. Binairo and Takuzu are trademarks, so we use the generic name.
- Source: [Wikipedia](https://en.wikipedia.org/wiki/Takuzu)

## Rules

1. Every row and every column is half red and half blue.
   - ✓ Right: Two of each
   - ✗ Wrong: Three red, one blue
2. No three cells in a row, across or down, are the same color.
   - ✓ Right: Never three
   - ✗ Wrong: Three blue
3. No two rows are painted the same, and no two columns are.
   - ✓ Right: All different
   - ✗ Wrong: Two rows alike

## Worked example: Red and Blue

A 6×6 Binary Puzzle puzzle, with exactly one solution.

The givens, as inkit's puzzle engine writes them (cells are [row, column] from 0 at the top left):

```json
[{"at":"cell","cell":[5,4],"kind":"color","value":1},{"at":"cell","cell":[3,2],"kind":"color","value":1},{"at":"cell","cell":[2,0],"kind":"color","value":1},{"at":"cell","cell":[1,2],"kind":"color","value":1},{"at":"cell","cell":[3,0],"kind":"color","value":1},{"at":"cell","cell":[5,3],"kind":"color","value":1},{"at":"cell","cell":[2,3],"kind":"color","value":2},{"at":"cell","cell":[0,1],"kind":"color","value":2},{"at":"cell","cell":[3,4],"kind":"color","value":2},{"at":"cell","cell":[0,3],"kind":"color","value":2}]
```

The solution, a line per row:

```
1 2 1 2 1 2
2 2 1 1 2 1
1 1 2 2 1 2
1 2 1 2 2 1
2 1 2 1 2 1
2 1 2 1 1 2
```

## Playing on inkit

Pick a pot (or press 1 or 2), then tap or drag across cells to paint them. The same color again clears a cell.
