Riddler Classic: September 17, 2021

David Ding

September 20, 2021

Polygon Segments

From Rushabh Mehta comes a highly irregular puzzle:

Lately, Rushabh has been thinking about very large regular polygons — that is, a polygon all of whose sides and angles are congruent. His latest construction is a particular regular 1,000-gon, which has 1,000 sides of length 2. Rushabh picks one of its longest diagonals, which connects two opposite vertices.

Now, this 1,000-gon has many diagonals, but only some are perpendicular to that first diagonal Rushabh picked. If you were to slice the polygon along all these perpendicular diagonals, you’d break the first diagonal into 500 distinct pieces. Rushabh is curious — what is the product of the lengths of all these pieces?

Product: 2

Explanation:

For a regular N-gon, we first define the circumcircle as the circle that just encloses the polygon, with each vertex of the polygon on the circle. Since we are dealing with a regular polygon, two radii connecting the center of the circumcircle to adjacent vertices of the polygon will form an isosceles triangle with the unique side being the segment connecting the two vertices. Since we have an isosceles triangle, dropping the altitude from the center of the circle to the unique side will also have that altitude being both an angular bisector and also a median of the triangle. The angle being bisected is \(2\pi/N\) since we have \(N\) congruent isosceles triangles dividing up the polygon. Therefore we end up with a right-angled triangle with hypotenuse \(R\), the short side being \(S/2\) where \(S = 2\) in our puzzle, and the angle between the hypotenuse and the long side being \(\pi/N\).

Applying trigonometry using sine, noting sine = opp/hyp, we have:

\begin{align} \sin(\frac{\pi}{N}) &= \frac{S/2}{R} \\ R\sin(\frac{\pi}{N}) &= \frac{S}{2} \\ R &= \frac{S}{2\sin(\frac{\pi}{N})} \\ R &= \frac{1}{\sin(\frac{\pi}{N})} \end{align}

For \(N = 1000\) as given in the puzzle, \(R \approx 318.3\), which makes sense to be much larger than 2 since each interior angle of this many-sided polygon is essentially a straight angle, ballooning the shape to almost a circle-like figure and making the circumcircle having a much larger radius.

Next, we take advantage of the fact that this polygon has even number of sides. This allows us to exploit a symmetry whereby we can place our initial longest diagonal exactly on the x-axis of a coordinate plane. Then, the entire set of diagonals that cut our first diagonal perpendicularly will be parallel to the y-axis. In doing so, using analytic geometry, we can simply obtain the lengths of each of the segments by finding the differences between adjacent x-coordinates of vertices in the \(\{y > 0\}\) half-plane, since all such crossing diagonals will be line segments formed by those vertices and their corresponding mirror images across the x-axis.

As we are dealing with a regular polygon, each of the vertices' coordinates will be \(2\pi/N\) apart. The x-coordinates in particular will be determined by the cosine of those angles, as follows:

\begin{align} \text{x-coordinate of kth vertex} &= R\cos\left(\frac{2\pi k}{N}\right) \\ \end{align}

And individual line segments therefore have lengths being the differences between adjacent x-coordinates, as follows:

\begin{align} \text{Length of kth segment} &= R\cos\left(\frac{2\pi k}{N}\right) - R\cos\left(\frac{2\pi (k+1)}{N}\right) \\ \end{align}

For \(k = 0, 1, 2, \dots, N/2 - 1\).

A simple MATLAB function then finds the lengths of all line segments as described above:

   
function lengthSegs = getLengthSegs()
    N = 1000;
    segCount = N/2; % N is assumed to be even
    R = 1/sin(pi/N);

    lengthSegs = NaN(segCount, 1);
    for k = 0:segCount-1
        lengthSegs(k+1) = R*(cos(2*pi*k/N) - cos(2*pi*(k+1)/N));
    end
end
		

Yielding the following result for all of the segments:

   
lengthSegs =

    0.0063
    0.0188
    0.0314
    0.0440
    0.0565
    0.0691
    0.0817
    0.0942
    0.1068
    0.1193
    0.1319
    0.1444
    0.1569
    0.1694
    0.1820
    0.1945
    0.2070
    0.2195
    0.2320
    0.2444
    0.2569
    0.2694
    0.2818
    0.2942
    0.3067
    0.3191
    0.3315
    0.3439
    0.3562
    0.3686
    0.3809
    0.3933
    0.4056
    0.4179
    0.4302
    0.4424
    0.4547
    0.4669
    0.4791
    0.4913
    0.5035
    0.5156
    0.5277
    0.5399
    0.5519
    0.5640
    0.5761
    0.5881
    0.6001
    0.6121
    0.6240
    0.6359
    0.6478
    0.6597
    0.6716
    0.6834
    0.6952
    0.7069
    0.7187
    0.7304
    0.7421
    0.7537
    0.7654
    0.7770
    0.7885
    0.8001
    0.8116
    0.8230
    0.8345
    0.8459
    0.8572
    0.8686
    0.8799
    0.8911
    0.9024
    0.9136
    0.9247
    0.9359
    0.9469
    0.9580
    0.9690
    0.9800
    0.9909
    1.0018
    1.0127
    1.0235
    1.0343
    1.0450
    1.0557
    1.0663
    1.0770
    1.0875
    1.0980
    1.1085
    1.1190
    1.1294
    1.1397
    1.1500
    1.1603
    1.1705
    1.1806
    1.1908
    1.2008
    1.2109
    1.2208
    1.2308
    1.2407
    1.2505
    1.2603
    1.2700
    1.2797
    1.2893
    1.2989
    1.3084
    1.3179
    1.3273
    1.3367
    1.3460
    1.3553
    1.3645
    1.3737
    1.3828
    1.3918
    1.4008
    1.4098
    1.4186
    1.4275
    1.4363
    1.4450
    1.4536
    1.4622
    1.4708
    1.4793
    1.4877
    1.4961
    1.5044
    1.5126
    1.5208
    1.5289
    1.5370
    1.5450
    1.5530
    1.5609
    1.5687
    1.5765
    1.5842
    1.5918
    1.5994
    1.6069
    1.6143
    1.6217
    1.6290
    1.6363
    1.6435
    1.6506
    1.6577
    1.6647
    1.6716
    1.6785
    1.6853
    1.6920
    1.6987
    1.7053
    1.7118
    1.7183
    1.7247
    1.7310
    1.7373
    1.7435
    1.7496
    1.7556
    1.7616
    1.7675
    1.7734
    1.7792
    1.7849
    1.7905
    1.7961
    1.8015
    1.8070
    1.8123
    1.8176
    1.8228
    1.8279
    1.8330
    1.8380
    1.8429
    1.8478
    1.8525
    1.8572
    1.8619
    1.8664
    1.8709
    1.8753
    1.8796
    1.8839
    1.8881
    1.8922
    1.8962
    1.9002
    1.9040
    1.9079
    1.9116
    1.9152
    1.9188
    1.9223
    1.9258
    1.9291
    1.9324
    1.9356
    1.9387
    1.9418
    1.9447
    1.9476
    1.9505
    1.9532
    1.9559
    1.9584
    1.9610
    1.9634
    1.9657
    1.9680
    1.9702
    1.9723
    1.9744
    1.9763
    1.9782
    1.9800
    1.9818
    1.9834
    1.9850
    1.9865
    1.9879
    1.9893
    1.9905
    1.9917
    1.9928
    1.9938
    1.9948
    1.9956
    1.9964
    1.9971
    1.9978
    1.9983
    1.9988
    1.9992
    1.9995
    1.9998
    1.9999
    2.0000
    2.0000
    1.9999
    1.9998
    1.9995
    1.9992
    1.9988
    1.9983
    1.9978
    1.9971
    1.9964
    1.9956
    1.9948
    1.9938
    1.9928
    1.9917
    1.9905
    1.9893
    1.9879
    1.9865
    1.9850
    1.9834
    1.9818
    1.9800
    1.9782
    1.9763
    1.9744
    1.9723
    1.9702
    1.9680
    1.9657
    1.9634
    1.9610
    1.9584
    1.9559
    1.9532
    1.9505
    1.9476
    1.9447
    1.9418
    1.9387
    1.9356
    1.9324
    1.9291
    1.9258
    1.9223
    1.9188
    1.9152
    1.9116
    1.9079
    1.9040
    1.9002
    1.8962
    1.8922
    1.8881
    1.8839
    1.8796
    1.8753
    1.8709
    1.8664
    1.8619
    1.8572
    1.8525
    1.8478
    1.8429
    1.8380
    1.8330
    1.8279
    1.8228
    1.8176
    1.8123
    1.8070
    1.8015
    1.7961
    1.7905
    1.7849
    1.7792
    1.7734
    1.7675
    1.7616
    1.7556
    1.7496
    1.7435
    1.7373
    1.7310
    1.7247
    1.7183
    1.7118
    1.7053
    1.6987
    1.6920
    1.6853
    1.6785
    1.6716
    1.6647
    1.6577
    1.6506
    1.6435
    1.6363
    1.6290
    1.6217
    1.6143
    1.6069
    1.5994
    1.5918
    1.5842
    1.5765
    1.5687
    1.5609
    1.5530
    1.5450
    1.5370
    1.5289
    1.5208
    1.5126
    1.5044
    1.4961
    1.4877
    1.4793
    1.4708
    1.4622
    1.4536
    1.4450
    1.4363
    1.4275
    1.4186
    1.4098
    1.4008
    1.3918
    1.3828
    1.3737
    1.3645
    1.3553
    1.3460
    1.3367
    1.3273
    1.3179
    1.3084
    1.2989
    1.2893
    1.2797
    1.2700
    1.2603
    1.2505
    1.2407
    1.2308
    1.2208
    1.2109
    1.2008
    1.1908
    1.1806
    1.1705
    1.1603
    1.1500
    1.1397
    1.1294
    1.1190
    1.1085
    1.0980
    1.0875
    1.0770
    1.0663
    1.0557
    1.0450
    1.0343
    1.0235
    1.0127
    1.0018
    0.9909
    0.9800
    0.9690
    0.9580
    0.9469
    0.9359
    0.9247
    0.9136
    0.9024
    0.8911
    0.8799
    0.8686
    0.8572
    0.8459
    0.8345
    0.8230
    0.8116
    0.8001
    0.7885
    0.7770
    0.7654
    0.7537
    0.7421
    0.7304
    0.7187
    0.7069
    0.6952
    0.6834
    0.6716
    0.6597
    0.6478
    0.6359
    0.6240
    0.6121
    0.6001
    0.5881
    0.5761
    0.5640
    0.5519
    0.5399
    0.5277
    0.5156
    0.5035
    0.4913
    0.4791
    0.4669
    0.4547
    0.4424
    0.4302
    0.4179
    0.4056
    0.3933
    0.3809
    0.3686
    0.3562
    0.3439
    0.3315
    0.3191
    0.3067
    0.2942
    0.2818
    0.2694
    0.2569
    0.2444
    0.2320
    0.2195
    0.2070
    0.1945
    0.1820
    0.1694
    0.1569
    0.1444
    0.1319
    0.1193
    0.1068
    0.0942
    0.0817
    0.0691
    0.0565
    0.0440
    0.0314
    0.0188
    0.0063
		

Here are their distributions along the x-axis, i.e. the longest diagonal:

Length Graph

So it turns out near the middle of the divisions, the longest lengths approaches 2, where as near the ends of the diagonal, the lengths are almost 0. There are 334 segments of lengths greater than or equal to 1, which helped offset those segments that are almost 0 to ensure the product isn't close to 0. In the end, the actual product is indeed 2.

   
prod(lengthSegs)

ans =

    2.0000