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.
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?