# Problem of the Month (March 2015)

Consider putting the letters A and B on a square grid so that each A is adjacent to exactly m B's, and each B is adjacent to exactly n A's. ("Adjacent" means horizontally, vertically, or diagonally adjacent.) What are the smallest arrangements that work, for various values of m and n? ("Smallest" means smallest number of letters, or in the smallest bounding box.) We can extend this problem to A's touching m B's, B's touching n C's, and C's touching p A's, or to even more letters.

We can also use other definitions of adjacent. Instead of king moves, we could use moves of another piece with 8 symmetric moves: a knight, congo elephant (which moves 1 or 2 squares horizontally or vertically), phoenix (which moves 1 square horizontally or vertically or 2 squares diagonally), frog (which moves 3 squares horizontally or vertically or 1 square diagonally), or zebra (which moves 2 squares horizontally or vertically, and 3 squares in a perpendicular direction).

Contributors this month include Bryce Herdt, Maurizio Morandi, Joe DeVincentis, George Sicherman, and Johannes Waldmann.

The smallest known configurations are shown below.

m → n12345678
1
 A B
 A B A
 A B A A
 A B A A A
 A B A A A A
 A A B A A A A
 A A A B A A A A
 A A A A B A A A A
2
 A B A B
 A B A A B
 A B A A B A
 A A B A B A B A A A B A A A A A A B A A A B A B A B A A
(Joe DeVincentis)

(Joe DeVincentis)
3
 A B A B B B A B A A A B B A A A B A B B B A B A
(George Sicherman)
 A B A B A B A B A A A A B B B B A A A A B A B A B A B A

(Joe DeVincentis)

(Joe DeVincentis)
4
(Joe DeVincentis)

(Joe DeVincentis)

(Joe DeVincentis)

1 → m → n1234567
1
 A C B
 A B A C
 A B A C A
 A B A A C A
 A A A B C C B A A A
(George Sicherman)
 A A A A B C C B A A A A
(George Sicherman)
 A B A A A A C A C B A A A A A A B C A C A A A A B A
(George Sicherman)
2
 C A B A C
(George Sicherman)
 A C A B A C A
 A C A A B A A C A
 A A A A A B C C B A A C A A C A A C A A C A A B C C B A A A A A
shown here
(Johannes Waldmann)

(Joe DeVincentis)
3
 A C A C B C A
 A C B C A A A A C B C A
(George Sicherman)
 A A A C B C A A A A C B C A A A
(George Sicherman)
shown here
(Johannes Waldmann)
?
(Joe DeVincentis)
4
 A C A C B C A C A
 C A A B A A C C C C B C A B A A A C C C A B A C A
(Johannes Waldmann)

(Johannes Waldmann)
?
(Joe DeVincentis)

(Joe DeVincentis)
5
 A C C C C A C B A A B C A C C C C A
(George Sicherman)
shown here
(Johannes Waldmann)
2 → m → n234
6
 C A C C A C A B C A C B A C C C B C C C A B C A C B A C A C C A C
(Johannes Waldmann)
? 2
 C A C B A B C A C
 A C A C A B B A B B A C A C A
 A B B A B C A C A C B A C A B A C A B C A B C A B A C A B A C A B C A C A C B A B B A
(Johannes Waldmann)
7
(Joe DeVincentis)

(Joe DeVincentis)
3
 A B A B C B C C B C C A C A A A A A C B A C C B C B C B A A B C A C C A A C C A A C B A A B C B C B C C A B C A A A A B C A C C B C A B A B A C A C
(Johannes Waldmann)
?

Maurizio Morandi pointed out that the 2 letter knight adjacency problem had been studied in the February 2007 Math Magic problem, though there the point was the smallest box, not the smallest number of pieces.

m → n12345678
1
 A B
 A B A
 B A A A
 B A A A A
 A B A A A A
 A A B A A A A
 A A A B A A A A
 A A A A B A A A A
2
 A B B A
 A A B A B B A A B A
 A A A B B B A A A
(George Sicherman)
 A A A B A A B B A A B A A A
 A A A A B A A B B A A B A A A A
?
3
 A B B A B A A B
 A A A B A B B B B A B A A A
shown here
(Johannes Waldmann)
?
4
 B A A A B A B B B B A B A A A B
shown here
(Johannes Waldmann)

1 → m → n1234567
1
 B B A A C C
 A A B B C C A A
(George Sicherman)
 A B B A C C A B B A A A
(George Sicherman)
 B B A A A A C C A A A A B B
 B B B B A A A A A A C C A A A A C C A A A A A A B B B B
 B B B B A A A A A A A A C C A A A A C C A A A A A A A A B B B B
?
2
 A C A A C A B B A C A A C A
(George Sicherman)
 A A C C B A C C A B A C C A A B B A A A A A C C
(Johannes Waldmann)
 A A A A B A A C C A A B B C A A A A C B B A A C C A A B A A A A
(Johannes Waldmann)

(Johannes Waldmann)
? ?
3
 A A C C C C B B A A A A C C
(George Sicherman)
 A A A A A A C C C B C B C A B B C A B B A C A A A A C C C B A C A A C A B B B C A B A A C C A A A A
(Johannes Waldmann)

(Johannes Waldmann)
? ? ?
4
 A A C C A C C A A B B A A A C B B C A C C A C C C A A C
(Johannes Waldmann)

(Johannes Waldmann)
2 → m → n234
5
(Johannes Waldmann)
? 2
 A A B A A B B C C B A B C C B A B C C B B A A B A A
(Johannes Waldmann)
 A A A A C C C B B B B A B B A A A A B A A C C B C C A A C C B C C B A A A A B B B B B A B A C C C A A A
(Johannes Waldmann)

(Johannes Waldmann)

m → n12345678
1
 A B
 A B A
 A B A A
 A A B A A
 A B A A A A
 A A B A A A A
 A A A B A A A A
 A A A A B A A A A
2
 A B B A
 B A A B A A B A A B
(George Sicherman)
 A A B A A B A B B A A A
(George Sicherman)
 A A B A B A B A A A B A A A A A A B A A A B A B A B A A
(Joe DeVincentis)

(Johannes Waldmann)

(Joe DeVincentis)
3
 B A A B A B B A
 A B A B A B A A B A B A B A
? ?
(Joe DeVincentis)
4
 A B B A B A B A A B A B A B B A
(Joe DeVincentis)
?
(Joe DeVincentis)

(Joe DeVincentis)

1 → m → n123456
1
 A B C C B A
(Bryce Herdt)
 A B C A A B C A
(George Sicherman)
 A A A A C B A B C A A C B
(George Sicherman)
 A A A B B A A C C A A C A A B A
(George Sicherman)
 A A A B B B A A C A C A A C A C A A B A A A B
(George Sicherman)

(Johannes Waldmann)
2
 A B C A C A A B B A A C A C B A
(Bryce Herdt)

(Johannes Waldmann)

(Johannes Waldmann)

(Johannes Waldmann)
?
3
 A A C A A C B C B C B C B C B A A A A A
(George Sicherman)

(Johannes Waldmann)
shown here
(Johannes Waldmann)
? ?
4
(Johannes Waldmann)

(Johannes Waldmann)
2 → m → n23
5
(Johannes Waldmann)
? 2
(Johannes Waldmann)

(Johannes Waldmann)

m → n12345678
1
 A B
 A A B
 A B A A
 A A B A A
 A A B A A A
 A A A B A A A
 A A A A B A A A
 A A A A B A A A A
2
 B A A B
 A B A B A A B A B A
(George Sicherman)
 A A B A B A A B A B A A
(George Sicherman)

(Johannes Waldmann)

(Johannes Waldmann)

(Joe DeVincentis)
3
 B A A A B B B A
 A A A B B B A A B B B A A A

(Johannes Waldmann)
?
(Joe DeVincentis)
4
 B A A A B B B A A B B B A A A B

(Johannes Waldmann)

(Joe DeVincentis)

(Joe DeVincentis)

1 → m → n1234567
1
 A B C C B A
(Bryce Herdt)
 A A B C C B A A
 A B A C B A B B A B C A B A
(George Sicherman)
 A A B C A B A C A A A A C A B C A B A A
(George Sicherman)

(Johannes Waldmann)

(Johannes Waldmann)
?
2
 A A C A B A B C B C A C A B A A
(George Sicherman)

(Johannes Waldmann)

(Johannes Waldmann)
? ? ?
3
(Johannes Waldmann)

(Johannes Waldmann)
? ? ? ?
4
(Johannes Waldmann)
? 2 → m → n234
5 ? ? 2
(Johannes Waldmann)

(Johannes Waldmann)
shown here
(Johannes Waldmann)

m → n12345678
1
 A B
 A B A
 A B A A
 A A B A A
 A A B A A A
 A A A B A A A
 A A A B A A A A
 A A A A B A A A A
2
 A B B A
 A B A B A B A A A B
(George Sicherman)
 A A B A B A B A A

(Johannes Waldmann)
 A A B A A B A A A B A A A A B A B A A A A A A B A A A B B A A A A A A B B A A A B A A A A A A B A B A A A A B A A A B A A B A A
(George Sicherman)
3
 B A A B A B B A
(George Sicherman)
 B A A A B B A A B B A A A B
?
(Joe DeVincentis)
4
 B A A B A B B A A B B A B A A B

(Joe DeVincentis)

(Joe DeVincentis)

1 → m → n1234567
1
 A B C
 A B C A
 A B A B C A
 A B A B C A A
 A B A A C B A A B C A A B A
(George Sicherman)
 A A B A A C B A A B C A A B A A
(George Sicherman)
?
2
 A A B C A C A
(George Sicherman)
 A C B A A B C A A A
 A A A C B A A B C A A A

(Johannes Waldmann)
? ?
3
 A C B C A A A A C B C A
(George Sicherman)
 A A A B C A A C B A A C B A A B C A A A
(George Sicherman)

(Johannes Waldmann)
? ? ?
4
 C B A C A C C B B C C A C A B C
(Bryce Herdt)

(Johannes Waldmann)
2 → m → n234
5
(Johannes Waldmann)
shown here
(Johannes Waldmann)
2
 C A B A B C B C A
(Bryce Herdt)
 A B C A A B C A B B C A C C A A A B C A B
(George Sicherman)

(Johannes Waldmann)
6 shown here
(Johannes Waldmann)
? 3
(Johannes Waldmann)
?

m → n12345678
1
 A B
 A A B
 A A A B
 A A A A B
 A A A A B A
 A A A A B A A
 A A A A B A A A
 A A A A B A A A A
2
 A B B A
 A A A B B B B A A A
(Bryce Herdt)
 A A A A B B B B A A A A
(Bryce Herdt)
 A A A A A B B B B A A A A A A A A A A B B B B A A A A A
(Johannes Waldmann)
 A A A A A A B B B B A A A A A A A A A A A A B B B B A A A A A A
(Johannes Waldmann)
?
3
 A B B B A A A B
(Bryce Herdt)
 A A A A B B B B B B A A A A
(Bryce Herdt)
shown here
(Johannes Waldmann)
?
4
 B A A A A B B B B B B A A A A B
(Bryce Herdt)
shown here
(Johannes Waldmann)

1 → m → n12345
1
 B C A A C B
(Bryce Herdt)
 A B C A A C B A
 B B B A A A C C A A A B B B
(George Sicherman)
 A A A A A A B A A A C B B A A A C A B C C B A B B C A A C A A A A A A A B A
(Johannes Waldmann)
 A A A A A A A B B B A A A A C C A A A A A B B A B A B C C A A B A C B B B A A B A C C A A B A A A B A A A A A A A A A
(Johannes Waldmann)
2
 C B A A A C A A B C C A A C C B A A C A A A B C
 A C A A A C A A A A A A B A A B C C A A C A C B C B A C A A B B C C A A A B C B B B A A B C B C A A C C A A A B A A A A A C A A
(Johannes Waldmann)

(Johannes Waldmann)
?
3
 C A A A C A B A A A A C B C C A C B A C C A C A A C C B C C B C A A B A C B A A C A A A A A C C C
(Johannes Waldmann)

(Johannes Waldmann)
2 → m → n2
4
(Johannes Waldmann)
? 2
(Johannes Waldmann)

If you can extend any of these results, please e-mail me. Click here to go back to Math Magic. Last updated 3/1/15.