1

I'm having trouble finding an efficient algorithm for the next problem: Given a convex polygon of size N (when N > 4), find a quadrilateral which is inclosed in the polygon with a maximal area

You can solve it in O(N^4) by choosing 4 points on the polygon and calculating the area (and finding the max area one) but I'm looking for a more efficient solution

Ofer Magen
  • 942
  • 1
  • 9
  • 19
  • 2
    What is a "convex"? Do you mean a convex polygon? – Henry Jan 10 '18 at 08:13
  • yes a convex polygon , thank you I edited that – Ofer Magen Jan 10 '18 at 08:17
  • 1
    Do you select the vertices of the polygon? Please describe your algorithm in more detail. – Codor Jan 10 '18 at 08:21
  • 1
    I don't see how your O(N^4) solution would work. Choosing 4 points on the polygon does not necessarily give a square. – Henry Jan 10 '18 at 08:21
  • so filter out those who aren't quadraticals, please notice I'm looking for a quadratical and not a square – Ofer Magen Jan 10 '18 at 08:22
  • 1
    So all four corners of the square have to touch the polygon? Only at corners or is it also possible on the edges? – Henry Jan 10 '18 at 08:23
  • it's not possible that a max area quadratical will have a point on the edge of the convex because you could increase the area by moving the point that is on the edge and keeping the other points on the same places – Ofer Magen Jan 10 '18 at 08:27
  • 2
    There are some recent (2017) papers about this that prove an earlier approach was incorrect, it doesn't look that easy to extract a *working* algorithm from them however – harold Jan 10 '18 at 08:27
  • If your polygon is a rectangle that is not a square, how would you place a square inside it that touches only at corners? – Henry Jan 10 '18 at 08:29
  • you can assume that N > 4 – Ofer Magen Jan 10 '18 at 08:30
  • I guess I still don't fully understand what you are asking. Can't you just chose two corners of the polygon and check if the square with this diagonal also has its other two corners on the polygon? That would give O(N^3). – Henry Jan 10 '18 at 08:35
  • 1
    [This problem?](https://arxiv.org/pdf/1708.00681.pdf) (oops; maybe harold meant the same link) – sascha Jan 10 '18 at 08:36
  • @Henry I already wrote that but i'll write it again, please notice I'm looking for a quadratical and not a square, those are 2 completely different things – Ofer Magen Jan 10 '18 at 08:37
  • Ok, so what is a "quadratical"? – Henry Jan 10 '18 at 08:39
  • quadrilateral* sorry, edited that – Ofer Magen Jan 10 '18 at 08:40
  • @sascha looks like it, thank you very much, i'll read it. could you post that as an answer? – Ofer Magen Jan 10 '18 at 08:50
  • @sascha it looks like the writer of the paper described an algorithm with lower complexity which fails to find the true answer – Ofer Magen Jan 10 '18 at 08:57

0 Answers0