Longest line inside polygon must pass through two vertices

832 Views Asked by At

Given a non-convex polygon and I need to find the longest line inside it. Intuitively I fill it must pass at least through two vertices of the polygon, but I can't prove it. How to prove it?

2

There are 2 best solutions below

1
On

If the line does not end on the boundary, we can extend it. Hence we need only consider lines starting and ending on the boundary.

If no vertex is on the line, we can rotate it around its midpoint slightly without touching a vertex. Similarly, if exactly one vertex is on the line, we can rotate the line around that vertex slightly without touching another vertex. In at least one direction, the rotation will make the line longer, contradicting its maximality.

Remains to show that there exists a maximal line to begin with. The choice of the four coordinates of the two endpoints is from a closed and bounded subset of $\Bbb R^4$. The condition that the line is inside the polygon (including its boudary) is a closed condition: If some point of the line is exterior, then small changes to the endpoints cannot mend that. Thus even with this condition added, we consider the distance function on a compact set. Every continuous function on a compact has a maximum.

3
On

Note that the longest line does not necessarily start and end at vertices: it may touch two or more vertices in the middle. This must still be counted as "inside" the polygon.

enter image description here