2
$\begingroup$

Given a set of N rectilinear line segments on 2N distinct points (with integer coordinates) on a square grid. Can we find a rectilinear polygon that passes through the endpoints of the N line segments while excluding the line segments from polygon's sides?

The 2N points are the only vertices of the polygon. Rectilinear polygon means all its angles are right angles (the sides are parallel to the coordinate axes). The given line segments are axis-parallel.

I am looking for constructive example.

$\endgroup$
10
  • $\begingroup$ What other requirements do you have for that rectilinear polygon? It passes through those $2N$ endpoints but can it have other vertices too? Do the other vertices have to be at integer coordinates? $\endgroup$ Commented Sep 10, 2021 at 14:20
  • $\begingroup$ @JukkaKohonen I edited the post. $\endgroup$ Commented Sep 10, 2021 at 14:26
  • $\begingroup$ Thanks. Rectilinear polygon means all its angles are right angles? Or also that the sides are parallel to the coordinate axes? Are the given line segments also axis-parallel? $\endgroup$ Commented Sep 10, 2021 at 14:28
  • $\begingroup$ @JukkaKohonen I would relax to your suggestion if there is a proof that my original requirements can not be met? $\endgroup$ Commented Sep 10, 2021 at 14:29
  • $\begingroup$ It's certainly impossible without further assumptions. Consider the case of $N$ line segments with end points $(j,0)$ and $(j,1)$ where $1 \le j \le N$. $\endgroup$ Commented Sep 10, 2021 at 14:32

1 Answer 1

2
$\begingroup$

If I understand the question correctly, it is impossible. From each polygon vertex there are three outgoing lines: two edges of the polygon, and one given line segment. They are going in three different axis-parallel directions.

Now consider 45-degree slanted lines in the plane (southwest to northeast). Take the highest such line that touches one of the polygon vertices. From that vertex you can only draw 2 axis-parallel lines (east and south), because otherwise you would have vertices above the line, which would contradict the choice of the line. So you cannot have the three axis-parallel lines.

Rectilinear polygon

$\endgroup$
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .