Coloring Points with Respect to Squares

We consider the problem of 2-coloring geometric hypergraphs. Specifically, we show that there is a constant m such that any finite set of points in the plane S⊂R2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {S}} \subset {\mathbb {R}}^2$$\end{document} can be 2-colored such that every axis-parallel square that contains at least m points from S\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {S}}$$\end{document} contains points of both colors. Our proof is constructive, that is, it provides a polynomial-time algorithm for obtaining such a 2-coloring. By affine transformations this result immediately applies also when considering 2-coloring points with respect to homothets of a fixed parallelogram.


Introduction
In this paper we consider the problem of coloring a given set of points in the plane such that every region from a given set of regions contains a point from each color class. To state our results, known results and open problems, we need the following definitions and notations.
A hypergraph is a pair (V, E) where V is a set and E is a set of subsets of V. The elements of V and E are called vertices and hyperedges, respectively. For a hypergraph H := (V, E), let H | m := (V, {e ∈ E : |e| ≥ m}). A proper coloring of a hypergraph is a coloring of its vertex set such that in every hyperedge not all vertices are assigned the same color. Proper colorability of a hypergraph with two colors is also called Property B in the literature. A polychromatic k-coloring of a hypergraph is a coloring of its vertex set with k colors such that every hyperedge contains at least one vertex from each of the k colors.
Given a family of regions F in R d (e.g., all disks in the plane), there is a natural way to define two types of finite hypergraphs that are dual to each other. First, for a finite set of points S, let H F (S) denote the primal hypergraph on the vertex set S whose hyperedges are all subsets of S that can be obtained by intersecting S with a member of F. We say that a finite subfamily F 0 ⊆ F realizes H F (S) if for every hyperedge S ⊆ S of H F (S) there is F ∈ F 0 such that F ∩ S = S . The dual hypergraph H * (F 0 ) is defined with respect to a finite multi-subfamily 1 F 0 ⊆ F. Its vertex set is F 0 and for each point p ∈ R d it has one hyperedge that consists of exactly those regions in F 0 that contain p.
The main motivation for studying proper and polychromatic colorings of such geometric hypergraphs comes from cover-decomposability problems [25] and conflictfree coloring problems [35]. We concentrate on the first connection, as the problems we regard are in direct connection with cover-decomposability problems. We give a short introduction to this topic here, however we recommend the interested reader to consult the survey paper [25] or the webpage [32] that contains a summary of results about decomposition of multiple coverings and polychromatic colorings.
Multiple coverings and packings were first studied by Davenport and L. Fejes Tóth almost 50 years ago. Since then a wide variety of questions related to coverings and packings has been investigated. In 1986 Pach [23] published the first paper about decomposability problems of multiple coverings. It turned out that this area is rich of deep and exciting questions, and it has important practical applications as well (e.g., in the area of surveillance systems [10,25]). Following Pach's papers, most of the efforts were concentrated on studying coverings by translates of some given shape. Recently, several researchers started studying cover-decomposability of homothets of a given shape.
A family of planar sets is called an r -fold covering of a region R, if every point of R is contained in at least r members of the family. A 1-fold covering is simply called a covering. A family F of planar sets is called cover-decomposable, if there is an integer with the property that for any multi-subfamily of F that forms an -fold covering of the whole plane can be decomposed into two coverings. 2 A family F of planar sets is called totally-cover-decomposable, if there is an integer T with the property that for any region R, any multi-subfamily of F that forms an T -fold covering of R can be decomposed into two coverings.
One can also ask for a decomposition into more than two coverings. That is, whether there exists an integer k (resp., T k ) such that any multi-subfamily of F that forms an k -fold covering of the whole plane (resp., an T k -fold covering of R, for any region R), can be decomposed into k coverings of the plane (resp., of R).
If we consider only coverings with finite multi-subfamilies, then we call it the finite cover-decomposition problem. It is easy to see that the finite cover-decomposition problem is equivalent to Problems 1.1 (ii) and (iv).
One of the first observations of Pach was that if F is the family of translates of an open convex set, then finite cover-decomposability implies cover-decomposability. Thus for the family of the translates of an open convex set ≤ m * and k ≤ m * k in the notation above. Pach also observed that if F is the family of translates of some set, then Problems 1.1 (i) and (ii) are equivalent and also Problems 1.1 (iii) and (iv) are equivalent, i.e., m * = m and m * k = m k . Thus, for the family of translates of an open convex set ≤ m * = m and k ≤ m * k = m k and so it is enough to consider the primal hypergraph coloring problem.
Pach conjectured that the family of all translates of any open convex planar set is cover-decomposable [22]. During the years researchers acquired a good understanding of convex planar shapes whose translates are cover-decomposable. On the positive side, Pach's conjecture was verified for every open convex polygon: Pach himself proved it for every open centrally symmetric convex polygon [23], then Tardos and Tóth [37] proved the conjecture for every open triangle, and finally Pálvölgyi and Tóth [33] proved it for every open convex polygon. They also gave a complete characterization of open non-convex polygons whose translates are finite cover-decomposable. For open convex polygons it is even known that m k = m * k = O(k) [3,10,30]. However, Pach's conjecture was refuted in [24]. Specifically, it does not hold for disks and for convex shapes with a smooth boundary.
Considering the three dimensional space, it follows from cover-indecomposability of certain non-convex polygons [31] that every bounded polytope is not coverdecomposable. Thus, it is not easy to come up with a cover-decomposable set in the space. An important exception is the octant, 3 whose translates were proved to be cover-decomposable [14]. The currently best bounds for octants are 5 ≤ m ≤ 9 [17] and m k = m * = O(k 5.09 ) [7,16,17]. It is a challenging open problem whether m k = m * k = O(k) in this case. For a long time no positive results were known about cover-decomposability and geometric hypergraph coloring problems concerning homothets of a given shape. For disks, the answer is negative for all parts of Problem 1.1 [24,27]. As a first positive result, the cover-decomposability of octants along with a simple reduction implied that both the primal and dual hypergraphs with respect to homothets of a triangle are properly 2-colorable: This result was later used to obtain polychromatic colorings of the primal and dual hypergraphs defined by the family of homothets of a fixed triangle. For the dual hypergraph, the best bound comes from the corresponding result about octants and so it is m * k = O(k 5.09 ). For the primal hypergraph there is a better bound m k = O(k 4.09 ) [15,17]. An important tool for obtaining these results is the notion of self-coverability (see Sect. 2.2), which is also essential for proving our results. The questions whether m k = O(k) and m * k = O(k) for the homothets of a given triangle are still open. The web-page [32] contains an up-to-date collection of results considering all of these problems and related ones.
For polygons other than triangles, somewhat surprisingly, Kovács [20] recently provided a negative answer for Problems 1.1 (ii) and (iv). Namely, he showed that the homothets of any given convex polygon with at least four sides are not coverdecomposable. In other words, there is no constant m * for which the dual hypergraph consisting of hyperedges of size at least m * is 2-colorable. Our main contribution is showing that this is not the case when considering 2-coloring the primal hypergraph. Indeed, Problem 1.1 (i) has a positive answer for homothets of any given parallelogram.

Theorem 1.3
There is an absolute constant m q ≤ 215 such that the following holds.
Given an (open or closed) parallelogram Q and a finite set of points in the plane S ⊂ R 2 , the points of S can be 2-colored in polynomial time, such that any homothet of Q that contains at least m q points contains points of both colors. This is the first example that exhibits such different behavior for coloring the primal and dual hypergraphs with respect to the family of some geometric regions. Fur-thermore, combined with results about self-coverability, the proof of Theorem 1.3 immediately implies the following generalization to polychromatic k-colorings, thus partially answering also Problem 1.1 (iii) (it remains open whether linearly many points per hyperedge/parallelogram suffice). Corollary 1.4 Let Q be a given (open or closed) parallelogram and let S be a set of points in the plane. Then for every integer k ≥ 1 it is possible to color S with k colors, such that any homothet of Q that contains at least m k = (k 8.75 ) points from S contains points of all k colors.
Our proof of Theorem 1.3 also works for homothets of a triangle, i.e., we give a new proof for the primal case of Theorem 1.2 (with a larger constant though): Theorem 1.5 ([14]) There is an absolute constant m t such that the following holds.
Given an (open or closed) triangle T and a finite set of points in the plane S ⊂ R 2 , the points of S can be 2-colored in polynomial time, such that any homothet of T that contains at least m t points contains points of both colors.
This paper is organized as follows. In Sect. 2 we introduce definitions, notations, tools and some useful lemmas. In Sect. 3 we describe a general 2-coloring algorithm and then apply it for parallelograms and for triangles. Concluding remarks and open problems appear in Sect. 4. A preliminary version of this paper was presented at the 32nd International Symposium on Computational Geometry (SoCG 2016). In the current version some of the proofs are simplified, the constant in Theorem 1.3 is better, and the limitations of our techniques are discussed in more details.

Preliminaries
Unless stated otherwise, we restrict ourselves to the two-dimensional Euclidean space R 2 . For a point p ∈ R 2 let ( p) x and ( p) y denote the x-and y-coordinate of p, respectively. We denote by ∂ S the boundary of a subset S ⊆ R 2 and by Cl(S) the closure of S. A homothet of S is a translated and scaled copy of S. That is, a set S = αS + p for some number α > 0 and a point p ∈ R 2 . We will use the following folklore lemma: Lemma 2.1 Let C be a convex and compact set and let C 1 and C 2 be homothets of C. Then if ∂C 1 and ∂C 2 intersect finitely many times, then they intersect in at most two points.

Generalized Delaunay Triangulations
For proving Theorems 1.3 and 1.5 we will use the notion of generalized Delaunay triangulations, which are the dual of generalized Voronoi diagrams. In the generalized Delaunay triangulation of a point set S with respect to some compact convex set C, two points of S are connected by a straight-line segment if there is a homothet of C that contains these two points and does not contain any other point of S. The generalized Delaunay triangulation of S with respect to C is denoted by DT (C, S). Without causing confusion we also regard such a Delaunay triangulation as an abstract graph with S as its vertex set and the above defined segments correspond to its edges. We say that S is in general position with respect to (homothets of) C, if there is no homothet of C whose boundary contains four points from S. If S is in general position with respect to a convex polygon P and no two points of S define a line that is parallel to a line through two vertices of P, then we say that S is in very general position with respect to P. The following properties of generalized Delaunay triangulations will be useful. ([4,19,34]) Let C be a compact convex set and let S be a set of points in general position with respect to C. Then DT (C, S) is a well-defined connected plane graph whose inner faces are triangles.

Lemma 2.2
It would be convenient to consider generalized Delaunay triangulations in which the boundary of the outer face is a convex polygon. In such a case we say that DT (C, S) is nice.

Lemma 2.3
Let P be a closed convex polygon and let S be a set of points in the plane that is in very general position with respect to P. Suppose that P is a homothet of P and Z ⊆ S ∩ ∂ P . Then there is a homothet of P, denote it by P , such that Proof Since S is in general position, |∂ P ∩ S| ≤ 3.
If |Z | = 3, then there are no other points on ∂ P , thus shrinking P from an inner point gives us the required P .
If |Z | = 2, then if there is no other point on ∂ P , then we can again shrink from an inner point slightly to get the required P . Otherwise, there is exactly one point q on ∂ P besides the two points of Z . Now slightly shrink P from q. As the points are in very general position, the resulting homothet will contain exactly the points (P ∩ S) \ Z .
Finally, suppose that |Z | = 1 and let Z = {z}. We consider three cases.
Case 1: ∂ P ∩ S = {z}. In this case we slightly shrink P with respect to some point in its interior and obtain the desired homothet P .
Since S is in very general position, x and z are on different sides of ∂ P . Therefore if we slightly shrink P with respect to x, the resulting homothet of P contains x, does not contain z and contains all other points in P ∩ S. Case 3: |∂ P ∩ S| = 3. Let ∂ P ∩ S = {x, y, z}. In this case first we enlarge P from z to get a homothet P + . Since the points in S are in very general position with respect to P, this can be done so that ∂ P + ∩ S = {z} and P ∩ S = P + ∩ S. Then by slightly shrinking P + with respect to an interior point we get the desired homothet P .
For a homothet C of a compact convex set C we denote by DT (C, S)[C ] the subgraph of DT (C, S) that is induced by the points of S ∩ C . Note that it is not the same as DT (C, S ∩ C ), however the following is true.

Lemma 2.4 Let P be a closed convex polygon, let S be a set of points in very general position with respect to P, and let P be a homothet of P. Then DT (P, S)[P ] is a connected graph that is contained in P .
Proof Let DT := DT (P, S). Obviously all the points in DT [P ] are in P by definition. An edge in DT [P ] must also be in P , since P is convex. We prove that DT [P ] is connected by induction on |S ∩ P |. This is true by definition if there are at most two points from S in P . Suppose that the claim holds whenever a homothet of P contains k − 1 points from S and let P be a homothet of P that contains exactly k points from S with k ≥ 3. We may assume without loss of generality that P contains two points, x and z, on its boundary, for otherwise we can continuously shrink P until such points exist (first from an interior point, then from the point that first appears on the boundary). Now apply Lemma 2.3 twice: once with Z = {x} and once with Z = {z}. Denote the homothets of P that we get by P x and P y , respectively. By the induction hypothesis DT [P x ] and DT [P z ] are both connected, their intersection contains at least one point (as k ≥ 3), and their union is contained in DT [P ]. Thus, DT [P ] is also connected, as required.

Corollary 2.5
Let P be a closed convex polygon and let S be a set of points in very general position with respect to P. Suppose that P is a homothet of P and e is an edge of DT (P, S) that crosses ∂ P twice and thus splits P into two parts. Then one of these parts does not contain a point from S.
A rotation of a vertex v in a plane graph G is the clockwise order of its neighbors. For three straight-line edges vx, vy, vz we say that vy is between vx and vz if x, y, z appear in this order in the rotation of v and xvz < π ( xvz is the angle by which one has to rotate the vector vx around v clockwise until its direction coincides with that of vz) or if z, y, x appear in this order in the rotation of v and zvx < π. The following will be useful later on. Suppose that such an y does not exist, that is, x and z are also consecutive in the rotation of v in DT . Then the face that is incident to vx and vz and is to the right of vx and to the left of vz cannot be the outer face since xvz < π and DT is nice. However, since this face is an inner face, then by Lemma 2.2 it must be a triangle and so xz ∈ DT .
Thus we can conclude that such an y exists and from the definition of the rotation order it follows that y / ∈ C .

Lemma 2.7 For every closed convex polygon P there is a constant := (P) such that the following holds. Let S be a set of points in very general position with respect to P and such that DT := DT (P, S) is nice. If P is a homothet of P such that DT [P ] is a tree, then for every
Proof Let n be the number of vertices of P and let v 0 , v 1 , . . . , v n−1 be the vertices of P listed in their clockwise order around P . Let v ∈ S ∩ P be a point and let that are also in the triangle vv i v i+1 , for every i = 0, . . . , n − 1 (addition is modulo n).
Let α := α(P) be the smallest angle formed by three vertices of P (hence, also of P ).
Proof It is enough to consider the case when u and u follow each other immediately in the rotation of v. First note that uu is not an edge in DT [P ], since otherwise there would be a triangle in DT [P ]. It follows from Proposition 2.6 that there is a point z / ∈ P such that z is a neighbor of v in DT and is between u and u in the rotation of v. Thus, there is a homothet of P, denote it by P z , such that lies inside the wedge whose apex is v and whose boundary consists of the two rays that emanate from v and go through u and u , respectively. Therefore, v i vv i+1 < uvu . It follows from Observation 2. Fig. 1 An illustration for the proof of Proposition 2.9 To complete the proof of Lemma 2.7 consider the neighbors of v in DT [P ] in their clockwise order around v, and for every set N i remove the extreme neighbor in this order. It follows from Proposition 2.9 that the angle between any two remaining neighbors of u is at least α. Therefore, deg DT [P ] (v) ≤ n + 2π α . It follows that if P is an equilateral triangle, then Lemma 2.7 applies with (P) ≤ 3 + 2π π/3 = 9. By affine transformations we have:

Corollary 2.11
Let P be a convex polygon and let := (P) be the constant from Lemma 2.7. Suppose that S is a set of points in very general position with respect to P and such that DT is a tree, then DT [P ] contains a simple path of length at least 2 log |S ∩ P | .

Self-coverability of Convex Polygons and Polychromatic k-Coloring
Keszegh and Pálvölgyi introduced in [15] the notion of self-coverability and its connection to polychromatic k-coloring. In this section we list the definition and results from their work that we use.   8.75 ) for squares, and also for parallelograms by affine transformations.

A 2-Coloring Algorithm
In this section we prove Theorems 1.3 and 1.5. In fact, we prove a more general result, for which we need the following definitions. • Let x-y-z be a 2-path in DT (i.e., a simple path of length two). If Cl(P ) does not contain x and z and y is in the interior of P , then we say that it separates the 2-path x-y-z.
the edges yx and yz cross the same side of this homothet of P (see Fig. 2 for an example).
Observe that whether a 2-path x-y-z is good depends only on the direction of the vectors yx and yz. Definition 3.2 (Universally good polygons) We say that an (open or closed) convex polygon P is universally good with a constant c g := c g (P) if for any finite set of points S such that S is in very general position with respect to P and DT (P, S) is nice, every homothet of P that contains at least c g points from S is good.
such that it is possible to 2-color in polynomial time the points of any given finite set of points S such that every homothet of P that contains at least m points from S contains points of both colors.
x y q z Q Fig. 2 Considering homothets of an axis-parallel square, x-y-z is a good 2-path whereas x-y-q is not since the square Q separates it and both xy and qy cross the left side of Q We note that for the existence of m in Theorem 3.3 we need only that f (l) exists. However, using that it is upper bounded by c f l [15] we can get a more explicit bound on m. Theorems 1.3 and 1.5 immediately follow from Theorems 2.14, 2.15, 3.3, and the following two lemmas.

Lemma 3.4
Every triangle is a universally good polygon with a constant c g ≤ 7382.
Lemma 3.5 Every parallelogram is a universally good polygon with a constant c g ≤ 22.
In light of Theorem 3.3, it is enough to prove that a convex polygon is universally good to conclude that Problem 1.1 (i) has a positive solution with respect to homothets of that polygon. However, as it turns out, parallelograms and triangles are the only universally good polygons.

Theorem 3.6 Let P be a convex polygon which is neither a triangle nor a parallelogram. Then P is not universally good.
We proceed with the proof of Theorem 3.3, then prove that triangles and parallelograms are universally good, and conclude this section with a proof that no other universally good polygons exist.

Proof of Theorem 3.3
Let P be an (open or closed) convex polygon with n vertices and letP := Cl(P) be the closure of P (thus,P is a closed polygon andP = P if P is closed). Let us assume also that P is a universally good polygon with a constant c g := c g (P), and let f (l) ≤ c f l be a self-coverability function of the family of homothets ofP. Set m := (c g − 1) f (n) + n + 1 ≤ (c g − 1)c f n + n + 1. We first argue that it is enough to prove Theorem 3.3 when P is a closed polygon. Indeed, suppose that P is open and let P be the family of homothets of P. By slightly shrinking every homothet of P in P with respect to an interior point, we get a family P of homothets that realizes H P (S) such that there is no point p ∈ S and homothet P ∈ P with p ∈ ∂ P .
Note that by definitionP is universally good with the same constant c g and is selfcoverable with the same self-coverability function as P. LetP :={Cl(P ) : P ∈ P }. Since there is no homothet of P in P that contains a point of S on its boundary, every hyperedge of H P (S) appears also in HP (S). Thus, it is enough to show that P satisfies Theorem 3.3.
Suppose therefore that P is a closed convex polygon. Let P be the family of homothets of P and let P 0 ⊆ P be a smallest size subfamily that realizes H P (S). For convenience we pick P 0 such that no P ∈ P 0 contains a point from S on its boundary (this can be achieved by slightly inflating homothets if necessary).
We may also assume that S is in very general position with respect to P. Indeed, otherwise note that a small perturbation of the points will achieve that while P 0 will still realize the same hypergraph H P (S). It will also be convenient to assume that the boundaries of every two polygons in P 0 do not overlap, and no edge in DT := DT (P, S) crosses the boundary of a polygon in P 0 at one of its vertices. It follows from Lemma 2.1 that P 0 is a family of pseudo-disks. 5 This implies that |P 0 | = O(|S| 3 ) by a result of Buzaglo et al. [5] who proved the following: Suppose that (V, E) is a hypergraph where V is a set of points in the plane and for every hyperedge e ∈ E there is a region bounded by a simple closed curve that contains the points of e and no other points from V. If all the regions that correspond to E define a family of pseudo-disks, then |E| = O(|V| 3 ).
We can also assume that DT is nice, that is, the boundary of its outer face is a convex polygon: Set −P := {(−x, −y) : (x, y) ∈ P} and let −P be a homothet of −P that contains in its interior all the polygons in P 0 . By adding the vertices of −P to S (and perturbing again if needed) we obtain a set of points S such that −P is the boundary of the outer face in its generalized Delaunay triangulation with respect to P. Moreover, the hypergraph we get by intersecting homothets of P with S is a hypergraph that contains all the hyperedges that we get by intersecting polygons in P 0 with S. The latter hyperedges are exactly the hyperedges we get by intersecting homothets of P with S, since P 0 realizes H P (S). Therefore a valid 2-coloring of the new set of points induces a valid 2-coloring of the original set of points.
Recall that DT is a plane graph, and therefore, by the Four Color Theorem, we can color the points in S with four colors, say 1, 2, 3, 4, such that there are no adjacent vertices in DT with the same color. In order to obtain two color classes, we recolor all the vertices of colors 1 or 2 with the color light red and all the vertices of colors 3 or 4 with the color light blue.
Call a homothet P ∈ P 0 heavy monochromatic if it contains exactly c g points from S and all of them are of the same light color. If all of these points are colored light blue (resp., red), then we call P a heavy light blue (resp., red) homothet. Obviously, if there are no heavy monochromatic homothets, then we are done since m > c g and it follows from Lemma 2.3 that a monochromatic homothet with m > c g points from S can be shrinked to a monochromatic homothet with exactly c g points from S.
Suppose that P is a heavy monochromatic homothet of P. Observe that DT [P ] is a tree, for otherwise it would contain a cycle which in turn would contain a triangle by Lemma 2.2. That triangle must be 3-colored in the initial 4-coloring, so not all of its points can be light red or light blue, contradicting the monochromaticity of the points in P .
Since P is universally good, P contains c g points and DT [P ] is a tree, it follows that P contains a good 3-path x-y-z-w. We associate this 3-path with P . Suppose that P is a heavy light red homothet of P. Then one of y and z was originally colored 1 and the other was originally colored 2. Recolor the one whose original color was 1 with the color dark blue. Similarly, if P is a heavy light blue homothet of P, then one of y and z was originally colored 3 and the other was originally colored 4. In this case we recolor the one whose original color was 3 with the color dark red. Repeat this for every heavy monochromatic homothet, and, finally, in order to obtain a 2-coloring, merge the color classes light red and dark red into one color class, red; and merge the color classes light blue and dark blue into one color class, blue.

Lemma 3.7
There is no homothet P ∈ P 0 that contains m points from S all of which are of the same color.
Proof Suppose for contradiction that P is a homothet of P that contains m points from S all of which of the same color. We may assume without loss of generality that all the points in P are colored red, therefore, before the final recoloring each point in P was either light red or dark red. We consider two cases based on the number of dark red points in P . Recall that n is the number of vertices of P.
Case 1: There are at most n dark red points in P . By Definition 2.12 there is a set P of at most f (n) homothets of P whose union is P such that no dark red point in P is in the interior of one of these homothets. Using Lemma 2.3 we can change these homothets slightly such that none of them contains a dark red point yet all light red points are still covered by these homothets. Thus the at least m −n = (c g −1) f (n)+1 light red points are covered by these at most f (n) homothets. By the pigeonhole principle one of these homothets, denote it by P , contains at least = c g light red points and no other points. However, in this case it follows from Lemma 2.3 that there is a heavy light red homothet in P 0 that contains exactly c g points from S ∩ P . Therefore, the coloring algorithm should have found within this heavy light red homothet a good 3-path and recolored one of its vertices with dark blue and then blue. This contradicts the assumption that all the points in P are red.
Case 2: There are more than n dark red points in P . Let y be one of these dark red points. Then there is a good 3-path x-y-z-w within a heavy light blue homothet P y ∈ P 0 with whom this 3-path is associated. Furthermore, the original color of y is 3 and therefore the original color of x and z is 4, and thus their final color is blue. It follows that P separates x-y-z, moreover, since x-y-z is a good 2-path, the edges yx and yz cross different sides of P . Let s x be the side of P that is crossed by yx, and let q x be the crossing point of yx and s x . Similarly, let s z be the side of P that is crossed by yz, and let q z be the crossing point of yz and s z . See Fig. 3. Note that ∂ P and ∂ P y cross each other exactly twice. Indeed, this follows from Lemma 2.1 and the fact that there are points from S in each of P ∩ P y (e.g., y), P y \ P (e.g., x and z) and P \ P y (since |P ∩ S| ≥ m > c g = |P y ∩ S|). The points q x and q z partition ∂ P into two parts ∂ P 1 and ∂ P 2 . Note that since q x , q z ∈ P ∩ P y , the two crossing points between ∂ P and ∂ P y must lie either in ∂ P 1 or in ∂ P 2 . Assume without loss of generality that both of them lie in ∂ P 1 . Thus ∂ P 2 ⊂ P y . Let v be a vertex of P in ∂ P 2 (note that since s x = s z each of ∂ P 1 and ∂ P 2 contains a vertex of P ). We associate the vertex v with the dark red point y. We also define R y to be the region whose boundary consists of the segments yq x , yq z , and the part of ∂ P 2 whose endpoints are q x and q z (call this part ∂ P xz ). Observe that R y ⊆ P ∩ P y .

Proposition 3.8
There is no other point but y in S ∩ R y .
Proof Suppose that the claim is false and let y ∈ S ∩ R y be another point in R y . As y is in P , it must be red after the final coloring. Also, as it is also in P y , it must be a dark red point (which was light blue before having been recolored to dark red and finally to red). Thus, y is a dark red point in R y . Since x and y both lie in the heavy light blue homothet P y , they are connected by a path in DT [P y ] that alternates between points of colors 3 and 4 (considering the initial 4-coloring). We may assume without loss of generality that y is the first point in R y along this path from x to y : indeed, there are no points of color 4 in R y , and if there is a point of color 3 before y , then we can name it y . Denote by the path (in DT ) from y to y that consists of the edge yx and the above-mentioned path from x to y . Consider the polygonP whose boundary consists of and a straight-line segment yy (P is not a homothet of P). Since y and y are the only vertices ofP in R y , there is no edge of that crosses yy . Indeed, if there was such an edge, then it would split P into two parts such that one contains y and the other contains y . This would contradict Corollary 2.5. HenceP is a simple polygon.
Since every simple polygon has at least three convex vertices,P has a convex vertex different from y and y (thus this vertex is not in R y ). Denote this vertex by b and let a and c be its neighbors along such that abc < π. Since the initial colors of a and c are the same, we have ac / ∈ DT and so it follows from Proposition 2.6 that there is a neighbor d of b in DT in between a and c. Let us choose d such that it is the neighbor of b that is closest to a in the rotation of b. Thus, it is connected to both a and b. Since the initial colors of a and b are 3 and 4, the initial color of d was 1 or 2. Note thatP ⊆ P y since all of its edges are inside P y . Thus d / ∈P and also d / ∈ P y since P y does not contain vertices of color 1 or 2. Now consider the directed edge bd: it starts insideP (since d is in between a and c) and so it must cross yy . Before doing so bd must cross ∂ R y and so it crosses ∂ P xz , since it cannot cross yq z or yq x . After crossing yy , the directed edge bd must cross ∂ P xz again, since d / ∈ R y . But then bd splits P into two parts such that one contains y and the other contains y , which is impossible by Corollary 2.5.
In a similar way to the one described above, we associate a vertex of P with every dark red point in P . Since there are more than n dark red points in P , there are two of them, denote them by y and y , that are associated with the same vertex of P , denote it by v. Let x-y-z be the good 2-path that corresponds to y, let yq x and yq z be the edge-segments of yx and yz, and let R y be the region as defined above. Similarly, let x -y -z be the good 2-path that corresponds to y , let yq x and yq z be the edge-segments of y x and y z , and let R y be the region as defined above.
It follows from Proposition 3.8 that y / ∈ R y and y / ∈ R y . However, ∂ R y and ∂ R y both contain v. This implies that one of the segments yq x and yq z crosses one of the segments y q x and y q z , which is impossible since these are segments of edges of a plane graph. Lemma 3.7 is proved.
To complete the proof of Theorem 3.3, we need to argue that the described algorithm runs in polynomial time. Indeed, constructing the generalized Delaunay triangulation and then 4-coloring it can be done in polynomial time. Recall that there are at most O(|S| 3 ) combinatorially different homothets of P. Among them, we need to consider those that contain exactly c g points, and for each such heavy monochromatic homothet P we need to find a good 3-path in DT [P ], for the final recoloring step. This takes a constant time for every heavy monochromatic homothet, since c g is a constant. Therefore, the overall running time is polynomial with respect to the size of S.

Triangles are Universally Good
In this section we prove Lemma 3.4.
Let T be a triangle, let S be a set of points in very general position with respect to T , and let DT := DT (T, S) be the generalized Delaunay triangulation of S with respect to T such that DT is nice (i.e., the boundary of its outer face is a convex polygon). By applying an affine transformation, if needed, we may assume without loss of generality that T is an equilateral triangle. Suppose that T is a homothet of T that contains at least 7382 points from S and that DT [T ] is a tree. We will show that T contains a good 3-path.
By Corollary 2.10 for every point v ∈ T ∩ S we have deg DT [T ] (v) ≤ 9. Since DT [T ] is a tree with at least 7382 = 1 + 9 + 9 2 + 9 3 + 9 4 + 1 vertices of maximum degree 9, it contains a simple path of length 9. Let Z = v 1 -v 2 -· · · -v 10 be such a path. We will prove that there is 2 are good 2-paths, and therefore T contains the good 3- Denote the sides of T by s 1 , s 2 , s 3 . For j = 1, 2, 3, let B j be the set of bad 2-paths v i−1 -v i -v i+1 such that there is a homothet T i that contains v i and does not contain v i−1 and v i+1 , and the edges v i v i−1 and v i v i+1 both cross the side of T i that is homothetic to s j . Suppose for contradiction that Z does not contain two consecutive good 2-paths. Then, at least one of the sets B j contains two bad 2-paths. Assume without loss of generality that B 1 contains two bad 2- We may further assume that s 1 is horizontal and that T lies above it.
There is a homothet of T that separates v i−1 -v i -v i+1 such that v i−1 v i and v i v i+1 both cross its side that is homothetic to s 1 , therefore both v i−1 and v i+1 lie below v i . Similarly, both v k−1 and v k+1 lie below v k . Let v r be the lowest point among v i , . . . , v k . Since v i+1 is lower than v i and v k−1 is lower than v k it follows that r = i, k and so v r is lower than v r −1 and v r +1 . Suppose without loss of generality that v r +1 is to the right of the line through v r and v r −1 . By applying Proposition 2.6 to two vertices that are between v r −1 and v r +1 and follow each other immediately in the rotation of v r in DT [T ] (they can coincide with v r −1 and/or v r +1 ), we get that there is at least one neighbor of v r between v r −1 and v r +1 that lies outside of T . Let u be such a neighbor of v r and let T u be a homothet of T that contains v r and u and no other point from S. Note that u is higher than v r , thus v r u crosses either the right or the left side of T . Suppose without loss of generality that v r u crosses the right side of T at a point q u (refer to Fig. 4). It follows that the right side of T u is to the right of the right side of T . Thus, a horizontal ray that begins at v r and goes to the right will first cross the right side of T (denote this crossing point by q) and then cross the right side of T u (note that this ray does not cross the left sides of T u and T since v r ∈ T u ∩ T ). Now consider the triangle q u qv r . All of its vertices are in T u ∩ T , therefore q u qv r ∈ T u ∩ T . However, since v r +1 follows u in the rotation of v r , it follows that the edge v r v r +1 lies in q u qv r since it cannot cross none of its sides. This is impossible since v r +1 should be outside of T u and hence outside of q u qv r . Lemma 3.4 is proved.

Parallelograms are Universally Good
In this section we prove Lemma 3.5. Let Q be a parallelogram, let S be a set of points in very general position with respect to Q, and let DT := DT (Q, S) be the generalized Delaunay triangulation of S with respect to Q such that DT is nice (i.e., the boundary of its outer face is a convex polygon). By applying an affine transformation, we may assume without loss of generality that Q is an axis-parallel square. Since S is in very general position, no two points in S share the same x-or y-coordinate. Suppose that Q is a homothet of Q that contains at least 22 points from S and that DT [Q ] is a tree. We will show that Q contains a good 3-path.
Let q ∈ S be a point. We partition the points of the plane into four open quadrants according to their position with respect to q: NE(q) (North-East), NW(q) (North-West), SE(q) (South-East), and SW(q) (South-West). Proof Suppose for contradiction and without loss of generality that y ∈ NE(x) and z ∈ NE(y). Then the smallest rectangle that contains x and z has x at its bottom-left corner, z at its top-right corner and y in its interior. Therefore, there is no square that contains x and z and does not contain y and so xz cannot be an edge in DT . Proof Suppose for contradiction that q has two neighbors, x and y, that lie in the same quadrant. In this case we can choose them such that there is no other neighbor of q between them. Assume without loss of generality that x, y ∈ NE(q), such that qx forms a smaller angle with the x-axis than qy (refer to Fig. 5) and they follow each other immediately in the rotation of q. It follows from Proposition 2.6 that there is a point z / ∈ Q such that z is a neighbor of q in DT and is between x and y in the rotation of q. By Proposition 3.9 we have y / ∈ NE(x). Since qx forms a smaller angle with the x-axis than qy we have y / ∈ SE(x). If y ∈ SW(x), then x ∈ NE(y) which is impossible by Proposition 3.9. Thus, y ∈ NW(x). Using the same arguments we get that z ∈ NW(x) ∩ SE(y). However, this implies that z is contained in any axis-parallel rectangle that contains x and y and thus z ∈ Q , a contradiction.

Proposition 3.11 Let x and y be two neighbors of q in DT [Q ]. Let z /
∈ Q be a neighbor of q in DT that lies between x and y in the rotation of q and let Q z be a square that contains q and z and no other point from S. Then: • if x ∈ NW(q) and y ∈ NE(q), then qz crosses the top side of Q , x is to the left of Q z and y is to the right of Q z ; • if x ∈ NE(q) and y ∈ SE(q), then qz crosses the right side of Q , x is above Q z and y is below Q z ; • if x ∈ SE(q) and y ∈ SW(q), then qz crosses the bottom side of Q , x is to the right of Q z and y is to the left of Q z ; and • if x ∈ SW(q) and y ∈ NW(q), then qz crosses the left side of Q , x is below Q z and y is above Q z .
Proof By symmetry it is enough to consider the first case, that is, x ∈ NW(q) and y ∈ NE(q). Since z is between x and y in the rotation of q we have z / ∈ SW(x) and z / ∈ SE(y). By Proposition 3.9, z / ∈ NW(x) and z / ∈ NE(y). Thus z is to the right of x and to the left of y. It follows that z is above Q and qz crosses the top side of Q . Therefore, the top side of Q z is above Q . Thus, qx cannot cross the top side of Q z so it must cross its left side. This implies that x lies to the left of Q z . Similarly, qy cannot cross the top side of Q z so it must cross its right side. This implies that y lies to the right of Q z .
Call a (simple) path in DT x-monotone (resp., y-monotone) if there is no vertical (resp., horizontal) line that intersects the path in more than one point.

Proposition 3.12 Every path in DT [Q ] is x-monotone or y-monotone.
Proof Suppose for contradiction that there is a path p := q 1 -q 2 -· · · -q k which is neither x-monotone nor y-monotone. Since p is a polygonal path, it follows that there are two points, q i and q j , that are "witnesses" to the non-x-and non-y-monotonicity of p, respectively. That is, both q i−i and q i+1 are to the left of q i or both of them are to its right, and both q j−1 and q j+1 are above q j or both of them are below q j . We choose i and j such that |i − j| is minimized, and assume without loss of generality that i < j (note that it follows from Proposition 3.10 that i = j). Thus, the sub-path p := q i -q i+1 -· · · , q j−1 -q j is both x-monotone and y-monotone.
By reflecting about the x-and/or y-axis if needed, we may assume that p is ascending, that is, for every l = i, . . . , j − 1 we have q l+1 ∈ NE(q l ). Then it follows from Proposition 3.10 that q i−1 ∈ SE(q i ) and q j+1 ∈ SE(q j ). By applying Proposition 2.6 to two vertices that are between q i−1 and q i+1 and follow each other immediately in the rotation of q i in DT [Q ] (they can coincide with q i−1 and/or q i+1 ), we get that there is a point x / ∈ Q which is a neighbor of q i and is between q i−1 and q i+1 in the rotation of q i , and it follows from Proposition 3.11 that q i x crosses the right side of Q . The same argument implies that there is a point y / ∈ Q which is a neighbor of q j and is between q j+1 and q j−1 in the rotation of q j , such that q j y crosses the bottom side of Q . However, since q j is to the right of q i and above it, the edges q i x and q j y must cross, which is impossible.
Call a 2-path w-q-z bad if it is not good, that is, there is an axis-parallel square Q that contains q, does not contain w and z, and qw and qz are edges in DT that cross the same side of Q . We say that w-q-z is a bad left 2-path if qw and qz cross the left side of Q , and define right, top, and bottom bad 2-paths analogously.

Proposition 3.13
Let w-q-z be a 2-path. Then: • w-q-z is a bad left 2-path iff w ∈ SW(q) and z ∈ NW(q), or vice versa; • w-q-z is a bad right 2-path iff w ∈ SE(q) and z ∈ NE(q), or vice versa; • w-q-z is a bad top 2-path iff w ∈ NW(q) and z ∈ NE(q), or vice versa; and • w-q-z is a bad bottom 2-path iff w ∈ SW(q) and z ∈ SE(q), or vice versa.
Proof By symmetry it is enough to consider the first claim. If w-q-z is a bad left 2-path, then there is a square Q that separates it such that the edges qw and qz cross the left side of Q . Therefore, these edges go leftwards from q and so w, z ∈ SW(q)∪NW(q). It follows from Proposition 3.10 that w ∈ SW(q) and z ∈ NW(q), or vice versa. For the other direction, assume without loss of generality that w ∈ SW(q) and z ∈ NW(q). Let Q be the square whose left side is the straight-line segment between ((q) x − ε, (w) y ) and ((q) x − ε, (z) y ), for some small ε > 0. Then Q separates w-q-z and both qw and qz cross its left side, therefore, w-q-z is a bad left 2-path.

Proposition 3.14 Every path in DT [Q ] contains at most four bad 2-paths.
Proof Let p := q 1 -q 2 -· · · -q k be a simple path in DT [Q ] and suppose for a contradiction that p contains at least five bad 2-paths. By Proposition 3.12 the path p is x-monotone or y-monotone. Assume without loss of generality that p is y-monotone and that it goes upwards, that is, q i+1 is above q i for every i = 1, 2, . . . , k − 1. It follows that p does not contain bad top or bad bottom 2-paths, for otherwise it would not be y-monotone. It is not hard to see that bad left and bad right 2-paths must alternate along p, that is, between every two bad left 2-paths there is a bad right 2-path and vice versa.
Consider the first five such bad 2-paths along the path p, and denote them by By symmetry we may assume without loss of generality that q i 1 −1 -q i 1 -q i 1 +1 is a bad left 2-path, and therefore q i 3 −1 -q i 3 -q i 3 +1 and q i 5 −1 -q i 5 -q i 5 +1 are also bad left 2-paths, whereas the 2-paths q i 2 −1 -q i 2 -q i 2 +1 and q i 4 −1 -q i 4 -q i 4 +1 are bad right.
Note that we may assume without loss of generality that q i 1 is to the right of q i 4 , for otherwise q i 5 must be to the right of q i 2 and by reflecting about the x-axis and renaming the points we get the desired assumption. By applying Proposition 2.6 to two vertices that are between q i 1 −1 and q i 1 +1 and follow each other immediately in the rotation of q i 1 in DT [Q ] (they can coincide with q i 1 −1 and/or q i 1 +1 ), we get that q i 1 has a neighbor z / ∈ Q between q i 1 −1 and q i 1 +1 in the rotation of q i 1 . Let Q z be a square that contains q i 1 and z and no other point from S and let s z be its side length (refer to Fig. 6). It follows from Proposition 3.11 that q i 1 −1 lies below Q z , q i 1 +1 lies above Q z , and z lies to the left of Q . Therefore, (q i 1 +1 ) y − (q i 1 −1 ) y > s z . Similarly, q i 4 has a neighbor w / ∈ Q between q i 4 +1 and q i 4 −1 in the rotation of q i 4 . Let Q w be a square that contains q i 4 and w and no other point from S and let s w be its side length. Then q i 4 −1 lies below Q w , q i 4 +1 lies above Q w , and w lies to the right of Q . Therefore, (q i 4 +1 ) y − (q i 4 −1 ) y > s w .
Note that since q i 1 is to the right of q i 4 and z and w are to the left and to the right of Q , respectively, we have s z +s w > (( where s Q is the side length of Q . Observe also that since there are at least two other vertices between q i 1 and q i 4 along p, we have that q i 1 +1 = q i 4 −1 , and thus q i 1 +1 lies below q i 4 −1 . This implies that To complete the proof of Lemma 3.5 we will consider a path of length 11 in DT [Q ]. It follows from Proposition 3.10 that for every q ∈ S ∩ Q we have deg DT [Q ] (q) ≤ 4. This implies that if Q contains at least 1 + 5 i=1 4 i = 1366 points from S, then DT [Q ] contains a simple path of length at least 11. However, one can show that already 22 points suffice to guarantee the existence of a path of length 11. To prove this, we will need the following proposition.  Fig. 7 (a) for an example). Let p := q 0 -q 1 -q 2 -· · · -q k be the path connecting these points in the tree DT [Q ]. We may assume without loss of generality that q 1 ∈ SE(q 0 ) and that q 0 has a neighbor z 0 ∈ SW(q 0 ). In this case the path z 0 -q 0 -q 1 -q 2 -· · · -q k is not y-monotone. Therefore this path must be x-monotone by Proposition 3.12, and thus p is also x-monotone. It follows that q k−1 ∈ SW(q k ) ∪ NW(q k ). Since by Proposition 3.9 a point cannot have two neighbors in the same quadrant and the degree of q k is four, it has another neighbor z k = q k−1 in SW(q k ) ∪ NW(q k ). Therefore, the path z 0 -q 0 -q 1 -· · · -q k -z k is not monotone, a contradiction. Now suppose that each point in DT [Q ] has degree at most three, and suppose for contradiction that there are at least three points in S ∩ Q whose degree in DT [Q ] is three. Since DT [Q ] is a tree, there must exist a path p := q 0 -q 1 -q 2 -· · · -q k (k ≥ 2) between two points q 0 and q k with degree three that contains a third point q j (0 < j < k) with degree three. We can assume without loss of generality that q 1 ∈ SE(q 0 ). Since the degree of q 0 is three, it has a neighbor in NE(q 0 ) ∪ SW(q 0 ).
We can also assume that q 0 has a neighbor z 0 ∈ SW(q 0 ) (see Fig. 7 (b) for an example). In this case the path z 0 -q 0 -q 1 -· · · -q k is not y-monotone, thus it must be x-monotone and so p is also x-monotone. It follows, that if q i , for i ∈ { j, k}, has two neighbors in SW(q i )∪NW(q i ), then for one of them, denote it by z i = q i−1 , a path that ends with q i−1 -q i -z i is not x-monotone and hence the path z 0 -q 0 -q 1 -· · · -q i−1 -q i -z i is not monotone. Therefore, q i has two neighbors in SE(q i ) ∪ NE(q i ), for i ∈ { j, k}. It follows that q j has a neighbor y j = q j+1 such that a path that starts with y j -q j -q j+1 is not x-monotone, and q k has a neighbor y k such that a path that ends with q k−1 -q k -y k is not y-monotone. Therefore the path y j -q j -q j+1 -· · · -q k−1 -q k -y k is not monotone, a contradiction.  Fig. 7 Illustrations for the proof of Proposition 3.15. (a) The degree of q 0 is at least three and the degree of q k is four. The path z 0 -q 0 -q 1 -· · · -q k -z k is not monotone. (b) The degree of q 0 , q j and q k is three. We can assume that q 0 has a neighbor z 0 ∈ SW(q 0 ). In case none of q j and q k has a neighbor in both of their NW and SW quadrants, there is a path y j -q j -· · · -q k -y k which is not monotone contains a vertex q whose degree is four, then it follows from Proposition 3.15 that by deleting it we decompose the tree DT [Q ] into four paths, having 21 vertices altogether. By the pigeonhole principle either the first two or the second two together have at least 11 vertices. Along with q they form a path with 12 vertices, as required.
If DT [Q ] does not contain a vertex whose degree is four, then by Proposition 3.15 it contains at most two vertices with degree three, and no other vertex has degree greater than two. We can assume that we have exactly two vertices whose degree is three, q and q , and let p be the path connecting them in DT [Q ]. By deleting these two vertices we obtain five paths: a path that consists of p without its two endpoints, two paths p 1 , p 2 that are incident to q and two paths p 3 , p 4 that are incident to q . Considering the number of vertices in each of these paths we have |V ( p 1 )|+|V ( p 2 )|+ |V ( p)| + |V ( p 3 )| + |V ( p 4 )| + |V ( p)| ≥ 22 + 2 = 24, since |V ( p)| ≥ 2. Therefore, one of the paths formed by p 1 , p, p 3 and p 2 , p, p 4 must contain at least 12 vertices, as required.
Let p := q 1 -q 2 -· · · -q 12 be a simple path of length 11 in DT [Q ]. By Proposition 3.14 there are at most four bad 2-paths q i−1 -q i -q i+1 in p. Therefore, there is 2 ≤ i ≤ 10 such that q i−1 -q i -q i+1 and q i -q i+1 -q i+2 are good 2-paths, and therefore Q contains a good 3-path q i−1 -q i -q i+1 -q i+2 . Lemma 3.5 is proved.

A Universally Good Polygon is Either a Triangle or a Parallelogram
In this section we prove that triangles and parallelograms are the only universally good polygons. That is, for any other polygon P we can construct a set of points S such that there is a homothet of P that intersects DT (P, S) in a long path, while every other vertex of this path can be separated from its neighbors by the same side of a homothet of P (thus there is no good 3-path in P). See Fig. 8. The rest of this section contains the exact description and validity of this construction.
We start with a simple statement that will be used later.
showing that P is not universally good Proposition 3.17 Let P be a homothet of a convex closed polygon P that is contained in P. If ∂ P ∩ ∂ P = ∅, then an edge of P is contained in an edge of P (to which it is homothetic).
Proof Suppose for contradiction that ∂ P ∩ ∂ P = ∅ and no edge of P is contained in an edge of P. Then there is a vertex v of P that lies on ∂ P such that the edges that are incident to v lie in the interior of P. It is impossible thus that v coincides with v, the vertex to which it is homothet, since then these vertices would be incident to edges of different slopes. v cannot coincide with another vertex of P either, since then there is a direction in which v is extreme in P and a different vertex than v is extreme at P. Thus v lies on an edge of P. One of the endpoints of this edge must be v, for otherwise as before there is a direction in which v is extreme in P and a different vertex than v is extreme at P. But then, again, it follows that v and v are incident to edges of different slopes. Therefore, there is an edge of P which is contained in an edge of P, and since both P and P are on the same side of the line through this edge, it follows that these edges are homothetic to each other.
Suppose that P is a convex closed n-gon which is neither a triangle nor a parallelogram. We will show that P is not universally good. Let uv be an edge of P which is not parallel to any other edge of P if n = 4 and an arbitrary edge otherwise. Assume without loss of generality that uv is horizontal, u is left of v, and P lies above uv.
In order to have only a single case to deal with, if P has a unique highest vertex, then we regard this vertex as two vertices joined by a horizontal edge of length 0. This way P always has a top horizontal edge yz (possibly of length 0) such that y is left of z and P lies below yz. Since P is neither a triangle nor a parallelogram it has a vertex x / ∈ {u, v, y, z}. Assume without loss of generality that x is on the clockwise polygonal chain from y to v on the boundary of P. Denote by y 0 the point on the clockwise polygonal chain from u to y on the boundary of P that has the same y-coordinate as x and observe that the line-segment y 0 x lies in P.

Proposition 3.18
For every two distinct points a and b that lie on y 0 x there is a homothet of P, denote it by P , such that P is contained in P and y 0 x ∩ P = ab. Proof We can obtain such a homothet P as follows. Initially, set P := P. Now shrink P with respect to a until b lies on ∂ P . Then shrink P with respect to b until a lies on ∂ P . Since P is convex we have y 0 x ∩ P = ab.
For a polygon R and a vertex r ∈ R, we denote by r − and r + the vertices of R that precede and succeed r , respectively, in the clockwise order of the vertices of R. For a homothet P (resp., P i ) of P and a vertex r ∈ P, we denote by r (resp., r i ) the vertex of P (resp., P i ) that is homothetic to r . Since, e.g., (r i ) + = (r + ) i , we simply write r + i , r − i , r − , etc. Given an integer k ≥ 1, we describe a way to construct a set of k homothets of P, P 1 , P 2 , . . . , P k , such that: We will use the following proposition for the construction. Proof For an arbitrary u on u * x we can fix a homothet of P, denote it by P , such that its edge u v that is homothetic to uv coincides with u x (i.e., u = u and v = x). Clearly, by choosing u close enough to x, the intersection of ∂ P and ∂ P is contained in the edge x − x. Since P is convex, it follows that the vector − − → vv − forms a smaller angle with the positive x-axis than does the vector − − → x x − . Therefore, the (open) edge v v − of P homothetic to vv − lies outside of P. We now continuously shrink P with respect to u until it is contained in P. Let P be the resulting homothet of P (see Fig. 9). Clearly, P is contained in P. Note that an edge of P is contained in an edge of P by Proposition 3.17. Also, as P is in P and the intersection of ∂ P and ∂ P is contained in x − x, the only possibility is that x − x is contained in x − x. Observe also that since we had to shrink P , the vertex v of P that is homothetic to v lies on the open segment u x.
By reflecting P about the x-axis and applying Proposition 3.19 we get:  homothets P 1 , . . . , P i that satisfy Properties (1)- (3). For an even i we apply Proposition 3.19 with u * = v i to get P i+1 . For an odd i we apply Corollary 3.20 with u * = z i to get P i+1 . Thus we obtain homothets of P that satisfy Properties (1)-(3). Note that P i is contained in the closed half-plane that is bounded from below (resp., above) by the line containing y 0 x for every odd (resp., even) i ≥ 1. Suppose for contradiction that P is universally good with a constant c := c g (P). We may assume that c ≡ 0 mod 4 (by increasing c if necessary). We will construct a set of points S such that |S ∩ P| = c, DT (P, S)[P] is a path, and P does not contain a good 3-path. This will contradict the fact that P is universally good.
We begin with an empty set of points S and a set of homothets of P, P 1 , . . . , P k , as above, for k = c. Next, for every i = 1, . . . , c − 1 we add a point p i to S as follows: if i is odd, then p i = u i , that is, it coincides with the vertex of P i that is homothetic to u, whereas if i is even, then p i = y i , that is, it coincides with the vertex of P i that is homothetic to y.

Proposition 3.21
The points x − 1 , x − 3 , . . . , x − c−1 appear on x − x in this order. The points x − 2 , x − 4 , . . . , x − c appear on x + x in this order. Proof By symmetry it is enough to prove the first statement. Suppose for contradiction that there are two odd indices i 1 < i 2 such that x − i 1 is closer than x − i 2 to x. Consider the triangles u i 1 v i 1 x − i 1 and u i 2 v i 2 x − i 2 . Since u i 2 v i 2 is to the right of u i 1 v i 1 on y 0 x, it follows that their boundaries cross at four points (see Fig. 10). However, these triangles are homothetic, and thus such crossing is impossible.
It follows from Proposition 3.21 that x − i (resp., x + i ) is not contained in P i+2 j for every i ≥ 1 and every j for which P i+2 j exists.
Let ε > 0 be some small positive constant that is much smaller than the smallest distance between any pair of distinct points at vertices of the above mentioned polygons (that is, P and P 1 , . . . , P c ). For every odd i we fix a point q i outside of P at distance εi from x − i in the direction of the normal to x − x and add this point to S. Similarly, for every even i we fix a point q i outside of P at distance εi from x + i in the direction of the normal to x x + and add this point to S. Then, for every i, by slightly inflating P i with respect to some inner point, we obtain a homothet of P, denote it by P i , such that P i ∩ S = {p i , q i }. Fig. 10 An illustration for the proof of Proposition 3.21 Let DT := DT (P, S) be the generalized Delaunay triangulation of S with respect to P. It follows from the construction that ( p i , q i ) is an edge in DT , for every i = 1, . . . , c. By Proposition 3.18 it follows that DT also contains the edge ( p i , p i+1 ), for every i = 1, . . . , c − 1.
Next we apply a small perturbation of the points in S and slightly scale and translate the polygons P i , such that for every i = 1, . . . , c we have: 1. P i still contains the same (perturbed) points p i and q i and no other (perturbed) point from S; 2. if i is odd, then the point p i lies slightly below y 0 x; and 3. if i is even, then the point p i lies slightly above y 0 x. Thus, the above-mentioned edges of DT of type ( p i , q i ) and ( p i , p i+1 ) are still edges of DT . See Fig. 8 for an example of the construction at this point.
To complete the construction we add some points to S, as in the proof of Theorem 3.3, to obtain a nice set of points with respect to P and perturb the points to obtain a set of points in very general position with respect to P.
Observe that DT [P] consists of the path p 1p 2 -· · ·p c . Therefore, if P contains a good 3-path, then it must be of the form p ip i+1p i+2p i+3 for some 1 ≤ i ≤ c − 3. Thus, it is enough to prove that for every even i the 2-path p i−1p ip i+1 is not good. Suppose for contradiction that p i−1p ip i+1 is a good 2-path for some even i. Recall that while we allowed y = z, we know that u = v, that is, uv is an edge of positive length. Since i is even, p i lies slightly above y 0 x whereas p i−1 and p i+1 lie slightly below y 0 x. Let P be a homothet of P such that the endpoints of its edge u v that is homothetic to uv are on y 0 x, and u (resp., v ) has the same x-coordinate as p i−1 (resp., p i+1 ). It follows that p i lies inside P whereas p i−1 and p i+1 are outside of P . Moreover, the edges p i p i−1 and p i p i+1 both cross the edge u v of P i . Therefore, the 2-path p i−1p ip i+1 is not a good 2-path, a contradiction.

Discussion
The main open problem related to our work is the following. Problem 4.1 Is it true that for every convex polygon P there is a constant m := m(P) such that it is possible to 2-color any set of points S such that every homothet of P that contains at least m points from S contains points of both colors? By Theorem 3.3 it would be enough to show that every convex polygon is universally good. However Theorem 3.6 shows that no other polygon is universally good besides triangles and parallelograms, thus for other classes of convex polygons additional ideas are needed. We remark that in a recent manuscript using the techniques developed in this article Keszegh and Pálvölgyi [18] solved the above problem with three colors.
We conclude with two challenging related open problems. Considering coloring of points with respect to disks, recall that in [24] it is proved that there is no constant m such that any set of points in the plane can be 2-colored such that any (unit) disk that contains at least m points from the given set is non-monochromatic (that is, contains points of both colors). Coloring the points with four colors such that any disk that contains at least two points is non-monochromatic is easy since the (generalized) Delaunay graph is planar. Therefore, it remains an interesting open problem whether there is a constant m such that any set of points in the plane can be 3-colored such that any disk that contains at least m points is non-monochromatic (this problem was posed originally in [12,13], for more general variants see also [18]).
Perhaps the most interesting problem of coloring geometric hypergraphs is to color a planar set of points S with the minimum possible number of colors, such that every axis-parallel rectangle that contains at least two points from S is non-monochromatic. It is known that (log(|S|)/ log 2 log(|S|)) colors are sometimes needed [9], and it is conjectured that polylog(|S|) colors always suffice. The latter holds when considering rectangles that contain at least three points [1], however, for the original question only polynomial upper bounds are known [2,8,11,29].