Diagonal of a convex polygon such that the obtained cuts have simmilar areas

121 Views Asked by At

Let $P$ be a convex polygon represented with a list of vertices specified by some orientation. Consider the following problem

Problem. Find in linear time a diagonal of $P$ such that the absolute difference of the areas of the obtained polygons is as small as possible.

It is easy to solve the problem if one knows through which vertex must the diagonal pass but I do not see if this sub-problem is solvable in linear time.

Anyone happens to see a linear time algorithm for the stated problem?

1

There are 1 best solutions below

2
On BEST ANSWER

Start with some diagonal $AB$ and alternate between moving $A$ along the boundary until the difference between the diagonals switches sign and doing the same with $B$ in the same direction. When they've both completed one revolution, you've spent linear time and you must have encountered the desired diagonal.