## Introduction

Binary is one of several names, for example Binairo, Takuzu and Tic-Tac-Logic, for what are conceptually identical puzzles. The game is played on a rectangular grid and the aim, given a few starting values, is to complete the grid while obeying the Rules shown below. Any two symbols can be used and we use 0 and 1. Our game contains 3000 puzzles, one thousand each of sizes 8x8, 10x10 and 12x12, ordered by difficulty, easiest first.

## Rules

1. Each row and each column must contain equal occurrences of 0 and 1.

2. The No Triples Rule: If two adjacent items are equal, those either side must be different. i.e. the solution cannot contain three adjacent 0s or three adjacent 1s.

3. Rows and columns must be unique. i.e. no row can match another row and no column can match another column.

## Binary Example

A screenshot from binary showing a partially completed grid. The player has requested a hint and the program is indicating, with an orange background and question mark, a cell which is currently solvable.

## Playing

The program starts with a randomly selected puzzle displayed. It shows a grid of cells, a few containing clues. Players complete the grid using a left mouse click for a 0 and right click for a 1. Guesses can be removed with middle mouse. At the top of the display is a Toolbar. The jigsaw piece button at the left is a menu which has options for configuring the program and saving the current settings. The next button to the right is used for selecting puzzles: left mouse will select a random puzzle and right mouse the next one in sequence. Next is a wand for selecting and executing hints; a thumb for checking and correcting errors, and a sad smiley for showing the solution. To the right of this are 3 numbers. The first is the puzzle number, the second the puzzle difficulty score and the next a clock which ticks every 5 seconds. The puzzle number display is also an input box: players can position the cursor over this area and type in a number between 0 and 2999 followed by 'Enter' to load the corresponding puzzle. When a hint is requested using the wand a cell in the grid will be shaded the current hint colour (orange by default). If the player can work out the hint cell's correct value they can set it in the usual way. If not a further click on the wand will set it. When a hint is requested the clock display is used to show the code for the algorithm used. If the player clicks the thumb button the grid is checked for errors and they are reported as follows: the thumb turns down and the incorrect cells are shaded red. A further click on the thumb will remove the red shading and remove the erroneous guesses. If the player requests a hint when errors are present no hint will be given and the thumb will turn down and the mistakes marked. The errors must be corrected using the thumb button before a hint can be given. All the colours can be set using an option in the menu.

## Binary Worked Example

A video from binary showing a hesitant player making liberal use of the hint button and still managing to make errors.

## Algorithms

Algorithm | Percent |
---|---|

alg_0 | 51.1% |

alg_1 | 15.4% |

alg_2 | 18.1% |

alg_3 | 10.4% |

alg_4 | 5.0% |

Only 5 algorithms are required to solve these puzzles. The first 3 are quite simple, the fourth a bit harder, but the fifth is more complicated.

To solve the 3000 puzzles supplied with the game, always applying the simplest one which yielded a result, we found that the algorithms were used with the frequencies shown in the adjacent table

The algorithms are explained below with worked examples.

## Algorithm 0

If a strip (row or column) contains two adjacent 0s add a 1 to each side. Similarly for two adjacent 1s. Here there are two adjacent 1s so the hint cell is 0.

## Algorithm 1

If a strip (row or column) contains two 0s separated by a single empty cell add a 1 between them. Similarly for two 1s. Here there is a pair of 1s separated by a single empty cell so the hint cell is 0.

## Algorithm 2

If a strip has its full complement of 1s or 0s all empty cells can be filled with the other symbol. Here all the 0s are in place so the rest are 1s.

## Algorithm 3

If a strip needs only one more 0 add it where it allows the 1s to be added without breaking the No Triples Rule. Similarly for one more 1. Here we cannot place 0s in both columns 2 and 3, so the hint cell must be a 0.

## Algorithm 4

If a strip has only a few empty cells, try each of the permutations of the missing symbols to test all the possible strips. Remove those strips that would break the No Triples Rule and those that match already completed strips. If all the remaining strips have the same symbol in one position, that symbol must be the solution for that position.

Here the hint is on a row **1--10--0** missing two 0s and two 1s. The six possible permutations are 0011, 0101, 0110, 1001, 1010, 1100. The six rows of the table below show the original row with these permutations filling in the missing symbols. The bottom row contains three adjacent 0s so can be excluded and the two rows above match already completed rows, so can also be excluded. This leaves only the top three rows as possible solutions. We don't know which of these is the complete solution but they all have a 0 in column 2, so whichever is the answer it must have this 0.

Perm | Filled Strip | |||||||
---|---|---|---|---|---|---|---|---|

0011 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |

0101 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |

0110 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |

1001 | 1 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |

1010 | 1 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |

1100 | 1 | 1 | 1 | 1 | 0 |
0 |
0 |
0 |