# Square on the chessboard

talzamir
Posers and Puzzles 24 Apr '13 11:07
1. talzamir
Art, not a Toil
24 Apr '13 11:07
If I pick four different squares from a chessboard.. say, D1, F2, E4 and C3.. their center points can (and in this case do) form a square. If four different squares are chosen randomly, how likely is it that they do form a square?
2. joe shmo
Strange Egg
28 Apr '13 16:28
Originally posted by talzamir
If I pick four different squares from a chessboard.. say, D1, F2, E4 and C3.. their center points can (and in this case do) form a square. If four different squares are chosen randomly, how likely is it that they do form a square?
I'm not much for Combinatorics, but here is what I got

First the number of distinct ways of selecting 4, boxes out of 64

C(4,64) = 64!/(4!*60!) = 635376

Next, looking at each column

The number of ways of selecting 2, of 8 boxes

C(2,8) = 8!/(2*6!) = 28

In order to make a square we need to select 4 points, 2 points in each column.
Number of ways of doing this

"Possible" square configurations = 28*7 = 196

of those 196 combinations, 1/7 are square configurations

Square configurations = 28

Probability of selecting a square configuration = 28/635376
3. joe shmo
Strange Egg
28 Apr '13 17:44
Originally posted by joe shmo
I'm not much for Combinatorics, but here is what I got

First the number of distinct ways of selecting 4, boxes out of 64

C(4,64) = 64!/(4!*60!) = 635376

Next, looking at each column

The number of ways of selecting 2, of 8 boxes

C(2,8) = 8!/(2*6!) = 28

In order to make a square we need to select 4 points, 2 points in each column.
Number of ...[text shortened]...

Square configurations = 28

Probability of selecting a square configuration = 28/635376
Nevermind, pretty sure my answer is wrong. Back to the drawing board!
4. forkedknight
Defend the Universe
28 Apr '13 17:511 edit
Originally posted by joe shmo
Nevermind, pretty sure my answer is wrong. Back to the drawing board!
Yes, it seems like you're missing all of the diagonal squares that you can make on the board.

e.g.:
B1 - A2 - B3 - C2
B1 - A3 - C4 - D2
B1 - A4 - D5 - E2
B1 - A5 - E6 - F2
etc...
5. joe shmo
Strange Egg
29 Apr '13 01:56
Originally posted by forkedknight
Yes, it seems like you're missing all of the diagonal squares that you can make on the board.

e.g.:
B1 - A2 - B3 - C2
B1 - A3 - C4 - D2
B1 - A4 - D5 - E2
B1 - A5 - E6 - F2
etc...
I think I missed some other things as well.
6. forkedknight
Defend the Universe
29 Apr '13 22:392 edits
I'm trying to do this without writing a program, so I'm determining some limitations first.

Including reflections and rotations, there are a total of 10 unique starting locations on the chessboard.
(A1, A2, A3, A4, B2, B3, B4, C3, C4, D4)

Including reflections and rotations, there are a total of 19 edges that make it possible to form a square on the chessboard.
(0, 1-7)
(1, 1-6)
(2, 2-5)
(3, 3-4)

Now, to pare down which of the 19 edges can be used with each of the 10 starting squares, and I should have the number.

Feel free to correct me if I'm wrong on either of these points.
7. talzamir
Art, not a Toil
30 Apr '13 05:48
Sounds like much the same way I was thinking of it, though in a diferent order. I was thinking of starting with with the various shapes, then calculating how many of each there are. I got 24 different kinds of squares on first count, and between 1 and 49 of each type.
8. talzamir
Art, not a Toil
05 May '13 13:34
I wonder if this is correct, or if it could be made more elegant.

Types of squares:
a1-b1-b2-a2 (1,0 square. from first square to the next, one step to the right, none towards the 8th row)
..
a1-h1-h8-a8. (7,0 square)

Then there are some in a 45 degree angle.
b1-c2-b3-a2. (1,1 square).
..
d1-g4-d7-a4 (3,3 square).

And the rest.
b1-d2-c4-a3 (2,1 square)

A square with dimensions (x,y) as defined above are possible as long as x + y < 8, and fit on the board in (8 - (x+y))^2 positions. Also, due to symmetry squares (0,1) and (1,0) are the same square, but (1,2) and (2,1) are not.

Thus,
(0,1): 49
(0,2) and (1,1): 36
(0,3), (1,2), and (2,1): 25
(0,4), (1,3), (2,2) and (3,1): 16
(0,5), (1,4), (2,3), (3,2), (4,1): 9
(0,6), (1,5), (2,4), (3,3), (4,2), (5,1): 4
(0,7): 1

1x49 + 2x36 + 3x25 + 4x16 + 4x9 + 6x4 + 1x1 = 50 + 72 + 124 = 266 different quadruplets that form a square out of a total of 64! / (60!4!) = 635,376 so the probability of randomly picking a foursome that forms a square on the chessboard is about 0.04%.