CEMC Banner

Problem of the Week
Problem E and Solution
Octosquares?

Problem

The eight vertices of a regular octagon are randomly labelled \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), and \(H\). Each letter is used exactly once. For example, the images below show three different ways to label the vertices of the octagon.

Three regular octagons. Starting with the top left vertex
and moving clockwise around the perimeter, the vertices of the first
octagon are labelled A, B, C, D, E, F, G, H. The corresponding labels on
the second octagon are G, H, A, B, C, D, E, F, and on the third octagon
are B, G, C, H, D, F, A, E, B.

It can be shown that the only way to form a square whose vertices are also vertices of the octagon is by drawing a line segment between every other vertex in the regular octagon.

For example, in the first labelling example, both \(ACEG\) and \(BDFH\) are squares. These are the only two squares that can be formed using that specific labelling of the octagon. Similarly, in the second example, \(ACEG\) and \(BDFH\) are the only two squares that can be formed, and in the third example, \(ABCD\) and \(EGHF\) are the only two squares that can be formed.

If the vertices of a regular octagon are randomly labelled \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), and \(H\) and each letter is used exactly once, what is the probability that \(ABCD\) is a square?

That is, what is the probability that the shape formed by connecting the vertex labelled \(A\) to the vertex labelled \(B\), the vertex \(B\) to the vertex labelled \(C\), the vertex labelled \(C\) to the vertex labelled \(D\), and the vertex labelled \(D\) to the vertex labelled \(A\), is a square?

Solution

Solution 1

To determine the probability, we determine the number of ways to label the vertices of the regular octagon so that \(ABCD\) forms a square and divide by the total number of ways the regular octagon can be labelled.

First, we determine the total number of ways that the vertices of a regular octagon can be labelled \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), and \(H\).

Let’s start with the top left vertex. There are \(8\) possible ways to label it (it can be labelled as \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), or \(H\)). Moving clockwise, the next vertex can be labelled \(7\) different ways (it can be assigned any letter other than the letter assigned to the previous vertex). Moving clockwise, the next vertex can be labelled \(6\) different ways (it can be assigned any letter other than the \(2\) that have already been used). Moving clockwise, the next vertex can be assigned \(5\) different ways, and so on. Once we reach the last vertex there will only be \(1\) letter left, so it can be assigned a letter only \(1\) way.

A regular octagon. Starting with the top left
vertex and moving clockwise around the perimeter, the labels on the
vertices are 8, 7, 6, 5, 4, 3, 2, 1.

Therefore, there are \[8\times 7\times 6\times 5\times 4\times 3\times 2\times 1 = 8! = 40\,320\] different ways to label the regular octagon with the letters \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), and \(H\).

Now, let’s determine how many of the \(40\,320\) labellings result in \(ABCD\) forming a square.

Let’s suppose vertex \(A\) is the top left vertex. Then there are two possible ways to label \(B\), \(C\), and \(D\) so that \(ABCD\) forms a square.

For each of these two labellings, there are \(4\) choices for labelling the vertex to the right of \(A\) (it can be assigned \(E\), \(F\), \(G\), or \(H\)). Given the labelling of that vertex, moving clockwise, there are \(3\) choices for the next unlabelled vertex, then \(2\) choices for the next unlabelled vertex, and then \(1\) choice for the last unlabelled vertex.

Two regular octagons. Starting with the top left vertex and
moving clockwise, the labels on the first octagon are A, 4, B, 3, C, 2,
D, 1, and the labels on the second octagon are A, 4, D, 3, C, 2, B, 1.
Square ABCD is drawn in both octagons.

Therefore, for each case, there are \(4\times 3\times 2\times 1 = 24\) ways to label the remaining vertices. Therefore, there are \(24 + 24 = 48\) ways to label the regular octagon with \(A\) being the top left vertex and \(ABCD\) forming a square.

Using a similar argument, we can see that for any vertex that \(A\) can be assigned to, there will be \(48\) ways to label the regular octagon so that \(ABCD\) forms a square. Since \(A\) can be assigned to \(8\) different vertices, there are \(8\times 48 = 384\) different ways to label the regular octagon so that \(ABCD\) forms a square.

Therefore, the probability that \(ABCD\) forms a square is \(\dfrac{384}{40\,320} = \dfrac{1}{105}.\)

Solution 2

The first solution counts the number of arrangements where \(ABCD\) forms a square, and divides by the total number of possible arrangements. This solution uses a more direct probability argument.

The label \(A\) can go anywhere.

There is now two spots where label \(B\) can be placed to form a square, so a \(\frac{2}{7}\) chance that the \(B\) will be placed in a location to form a square.

There is now one spot where \(C\) must be placed (across from the \(A\)), so a \(\frac{1}{6}\) chance that the \(C\) will be placed in a location to form a square.

Since there are \(5\) vertices left to be labelled, there is now a \(\frac{1}{5}\) chance that the \(D\) will be placed in the only valid location to form a square.

Thus, the probability that \(ABCD\) forms a square is \[\frac{2}{7}\times \frac{1}{6}\times \frac{1}{5}=\frac{2}{210}=\frac{1}{105}\]