On the intersection graph of the disks with diameters the sides of a convex gon
Abstract
Given a convex gon, we can draw disks (called side disks) where each disk has a different side of the polygon as diameter and the midpoint of the side as its center. The intersection graph of such disks is the undirected graph with vertices the disks and two disks are adjacent if and only if they have a point in common. Such a graph was introduced by Huemer and PérezLantero in 2016, proved to be planar and Hamiltonian. In this paper we study further combinatorial properties of this graph. We prove that the treewidth is at most 3, by showing an time algorithm that builds a tree decomposition of width at most 3, given the polygon as input. This implies that we can construct the intersection graph of the side disks in time. We further study the independence number of this graph, which is the maximum number of pairwise disjoint disks. The planarity condition implies that for every convex gon we can select at least pairwise disjoint disks, and we prove that for every there exist convex gons in which we cannot select more than this number. Finally, we show that our class of graphs includes all outerplanar Hamiltonian graphs except the cycle of length four, and that it is a proper subclass of the planar Hamiltonian graphs.
1 Introduction
Let be a convex polygon of sides denoted counterclockwise. For , let denote the disk with diameter the length of and center the midpoint of . Since is constructed on the side of , we say that is a side disk of . Let denote the intersection graph of . Given a finite set of disks in the plane, the intersection graph of is the undirected graph , where and if and only if the intersection of and is not empty. See Figure 1. In this paper, all graphs are undirected. We say that a graph is sidedisk realizable if there exists a convex polygon such that . For two graphs and , we write to denote that and are isomorphic.
Given a graph , a tree decomposition of is a tree of nodes , which satisfies the following three properties:

(i.e. each is contained in at least one node).

For every edge , there exists a node such that .

If nodes and contain a vertex , then all nodes in the shortest path that connects and contain as well. (i.e. the nodes containing induce a connected subgraph of ).
The width of is , and the treewidth of , denoted , is the minimum width over all tree decompositions of .
Given an undirected graph , a subset is an independent set of if no pair of vertices in define an edge in . The set is a maximum independent set (MIS) if is an independent set of maximum cardinality among all independent sets of . Let denote the independence number of , which is the cardinality of a MIS of . Then, any independent set of is a subset of pairwise disjoint disks of .
We study the graph , which was introduced by Huemer and PérezLantero [9], motivated by the question whether in any convex pentagon there is a pair of disjoint side disks. The graph is Hamiltonian, with the Hamiltonian cycle , and they proved that for every convex polygon of sides, is also planar. Our results are the following ones:

We present an time algorithm that receives as input the polygon , and returns a tree decomposition of of width at most 3. This implies . Using this tree decomposition, we can identify all edges of in time as well (Section 2).

The famous 4color theorem implies . We prove that this bound is tight: For every , there exist convex polygons of sides for which (Section 3).

We prove that all outerplanar Hamiltonian graphs, except the cycle of length four, are sidedisk realizable, there exist convex polygons such that is not outerplanar, and there exist planar Hamiltonian graphs which are not sidedisk realizable. Then, the class of the intersection graphs of the side disks is a proper subclass of the planar Hamiltonian graphs (Section 4).
It is known that a graph has treewidth at most 2 if and only if it does not contain the complete graph as a minor [2]. Since there exist convex polygons such that contains as a minor (see for example Section 3, or Figure 1), the bound is tight. That is, such polygons satisfy . More importantly, the graph is planar and Hamiltonian, and in general planar Hamiltonian graphs can have unbounded treewidth. For example, the grid graph of vertices, where is even, is both planar and Hamiltonian and its treewidth is .
Since every polygon satisfies , we can use a known lineartime algorithm [3] to find a tree decomposition of of width at most . On one hand, the asymptotic running time of this algorithms encloses a big hidden constant. On the other hand, this algorithm uses explicitly the edges of the graph (there are at most edges [9]), which need to be obtained from the pairwise intersections between the side disks of (e.g. in time with a plane sweep [12]). In our result, a tree decomposition of of small width is found directly from in time, using the medial axis of as guide. Note that has nodes, each of at most 4 vertices. The edges of can be obtained by for each node of querying for the adjaceny of each pair of vertices of the node (which are side disks). Since has nodes, and we perform at most adjaceny queries in each of them, the edges of can be obtained from in time.
The fact that (i.e. the treewidth is bounded) implies that a large class of NPhard graph problems (such as maximum independent set, minimum dominating set, hamiltonian cycle, chromatic number, partition into triangles, etc.) can be solved in polynomial time in the graph , using dynamic programming [1, 2]. For example, if is the width of the tree decomposition given by our algorithm, finding a maximum independent set (MIS) of can be done in time [2]. This known algorithm for finding a MIS, and similar algorithms for other NPhard graph problems, are belived to be time optimal in graphs of bounded treewidth [10]. In general, finding a MIS in a planar Hamiltonian graph is NPhard [7], as well as finding a MIS in an intersection graph of disks, even if the disk representation is given as input [6, 13].
Further notation: Given three different points , , and in the plane, let be the line segment with endpoints and , be the triangle with vertex set , and be the angle not bigger than with vertex and sides through and , respectively. Given a segment , let be the length of , the line that contains , and the disk with diameter and center the midpoint of . Given a pair of disks, we say that and are intersecting if , and that has a proper intersection if the interiors of and have a nonempty intersection. We say that a set of disks is proper if every pair of intersecting disks in the set has a proper intersection.
2 Bound of treewidth
In this section, we present a lineartime algorithm that constructs from the polygon a tree decomposition of of width at most 3. Our algorithm uses (as a preprocessing) the medial axis of . The medial axis of a simple polygon of sides is the locus of the points of the polygon that have more than one closest point in the boundary [11], and can be computed in time [5]. If the polygon is convex, the medial axis is a tree made of line segments, each contained in the bisector of two sides (see Figure 2).
Given a convex polygon, a maximal disk is a disk contained in the polygon and tangent to (at least) three sides. Important properties of the medial axis in a convex polygon are as follows:

Every maximal disk is centered at a vertex of the medial axis.

If a maximal disk is tangent to three different sides and its center is denoted by , then the center of another maximal disk tangent to two sides in and another side , is such that or the segment is an edge of the medial axis.

The medial axis can be computed in time so that each vertex is associated with the sides of the polygon (there are at least three) tangent to the maximal disk centered at .
Let denote . Given with , let denote the set of consecutive side disks. Note that if then is the empty set. Two sets are called independent if every disk in is disjoint from every disk in .
Lemma 1
Let and , , be two sides of such that: there exists a maximal disk tangent to them, and either the lines and are parallel or for every the line separates the intersection point of and from the interior of . Then, the only disk in the set that can intersect a disk in is the disk , , such that the interior of is intersected by the bisector of and through .
Lemma 1 can be proved with the arguments used by Huemer and PérezLantero [9] to prove the 1Chord Lemma (see [9]).
Lemma 2
Let , , and , , be three sides of such that: there exists a maximal disk tangent to them, and intersect at point , and intersect at point , and . Then, the sets and are independent. Furthermore, the lemma still holds if and are parallel, or and are parallel.
Proof
Let , , and be the points of tangency between and , , and , respectively. Let (resp. ) denote the disk with center (resp. ) and radius (resp. ). Note that and are tangent and interior disjoint (see Figure 3). It can be proved that each disk in is contained in the interior of [9, Lemma 7]. Similary, each disk in is contained in the interior of . Then, the lemma follows. If and are parallel, then we can set as the halfplane bounded by that does not contain , which will contain every disk in . Similarly, if and are parallel, we can set as the halfplane bounded by that does not contain , which will contain every disk in .∎
Theorem 2.1
For any convex polygon of sides, a tree decomposition of of width at most 3 can be found in time.
Proof
Let be the following generic function, that will be used later in the construction of a tree decomposition of : The input consists of three integers and a disk , such that: , , is tangent to both and , no disk in intersects a disk in , and and are parallel, or for every the line separates the interior of from the intersection point of and . The output is a rooted tree decomposition of of width at most 3, whose root node contains .
We compute as follows: If , then we return the leaf node . Otherwise, if , then we find an index such that there exists a maximal disk tangent to , , and . Note that the centers of and are the endpoints of an edge of the medial axis of , or coincide. We can then compute both and in time from the medial axis. After that we create the root node of , which has at most two children, constructed recursively as follows:

If , then we set the following child: If the bisector of and through intersects , then we set the child . Otherwise, we set the child .

If , then we set the following child: If the bisector of and through intersects , then we set the child . Otherwise, we set the child .
Observe that and are independent (Lemma 2), which implies that the children of are not in conflict with property (2) of tree decompositions. Furthermore, Lemma 1 ensures that in each call to the way we choose the parameters, mainly the third one, is correct.
With described, we proceed to explain how to construct a rooted tree decomposition of . Using the medial axis of , we first find a maximal disk of maximum radius. Note that can be found in time. Assume w.l.o.g. that is tangent to the sides , , and , respectively. Further assume . The root of is the node , and we set to at most 3 children, constructed using as follows:

If , then we set as a child of .

If , then we set as a child of .

If , then we set as a child of .
Refer to Figure 4 for an example. Since , , and are pairwise independent (Lemma 2), this selection of children for is not in conflict with property (2) of tree decompositions. Furthermore, Lemma 1 ensures that in each call to the parameters, mainly the third one, satisfy the desired properties. The treewidth of is trivially at most 3, and using the above arguments, it can be proved formally by induction that is in fact a tree decomposition of . Observe that the running time can be charged to the number of nodes of . Except of the root node of , every other node contains a different side disk of . Then, has nodes and the running time is .∎
3 Bound of the size of a MIS
In this section, we show that for every , there exist convex polygons of sides such that . The idea is that in those polygons the vertices of can be partitioned into subsets, such that the induced subgraph of each subset is isomorphic to , except possibly one of them that is isomorphic to some with . Then, any independent set of cannot contain two vertices of the same subset; hence it must contain at most vertices.
Lemma 3
Let be a convex polygon of sides such that has an acute interior angle and is proper. For every , we can construct from a convex polygon of sides, where the side disks of can be partitioned into two sets and such that and . If , has also an acute interior angle and is proper.
Proof
Let be the vertex set of . Let be three consecutive vertices of in counterclockwise order along the boundary of , such that the interior angle at is acute. Since is proper, we can select points and in the interiors of and , respectively, such that: , and and are close enough to so that , where , and is also proper.
Let be the convex polygon with vertex set . If , then the polygon satisfies the desired properties, where .
Let be a point in the bisector of the angle , , that is close enough to so that and the angle is acute. Let be the convex polygon with vertex set . If , then the polygon satisfies the desired properties, where .
Let be a point in the interior of the segment such that the boundary of intersects twice the segment (see Figure 5). This latter condition can be ensured because angle is acute and is isosceles with base . Let be the intesection point between the boundary of and that is closer to . Let be the convex polygon with vertex set . If , then the polygon satisfies the desired properties, where .
Let be a point in the interior of the shortest arc of the boundary of that connects and , such that the pair has a proper intersection (see Figure 5). Let be the convex polygon with vertex set , and assume . Note that the interior angle of is acute because equals by Thales’ theorem. Furthermore, is proper. Hence, for the polygon satisfies the desired properties, where .∎
Theorem 3.1
For every , there exists a polygon of sides such that .
Proof
If , then every triangle satisfies and . Assume , and let and be the integer numbers such that . Let be a convex quadrilateral with an acute interior angle and such that is proper and . For example, can be the quadrilateral with vertices at coordinates , , , and , respectively. Consider the sequence of convex polygons, where for the polygon has sides and is constructed from by using Lemma 3 with . By construction, the vertices of can be partitioned into subsets of size 4, such that the graph induced by each is isomorphic to . Since any independent set of cannot contain two vertices of the same , .
If , let be the convex polygon of sides constructed from by using Lemma 3 with . The vertices of can be partitioned into subsets where the graph induced by each of is isomorphic to , and the graph induced by is isomorphic to . Since any independent set of cannot contain two vertices of the same , we obtain .
For any , let , which satisfies . Since is planar, its chromatic number is at most 4. Then, it can be colored with at most 4 colors, and the majority color induces an independent set of size at least . Hence, .∎
4 Classes of planar Hamiltonian graphs
In this section, we prove that our class of graphs, that is, the sidedisk realizable graphs, contains all outerplanar Hamiltonian graphs except the cycle of lengh four; and that it is a proper subclass of the planar Hamiltonian graphs. Let denote the cycle graph of length four.
Lemma 4
The graph is not sidedisk realizable.
Proof
It suffices to prove that in any (convex) quadrilateral of sides denoted , , , and counterclockwise, or . Let be the distance between the midpoints of and , and be the distance between the midpoints of and . Observe that if and only if . Similarly, if and only if . Since in any quadrilateral the total lenght of two opposite sides is at least twice the distance between the midpoints of the other two sides [4, Innequality 15.10], we have and . That is, . Hence, we must have or , which implies the result.∎
Lemma 5
Let points , , and be the vertices of an isosceles triangle of base , so that the interior angle at is at least . Let and be points such that belongs to the interior of , and belongs to the interior of . Let be an integer, and for every , let denote the point of such that . Then, for every , and for every .
Proof
We will prove the first part of the lemma. The proof for the second one is analogous. Let be the line through and perpendicular to . Note that separates the points , , from the disk (see Figure 6). Let , , and . Note that the radius of equals , and the distance from the midpoint of to equals
Since , the line separates from the interior of . This implies for every .∎
Theorem 4.1
Every outerplanar Hamiltonian graph, except , is sidedisk realizable.
Proof
We will prove the theorem by induction in the number of faces of the planar representation of the graph. More precisely, we prove that: For every outerplanar Hamiltonian graph different from , there exists a convex polygon such that , and is good. We say that a convex polygon is good if is proper, every vertex of is contained only in the side disks of the sides of adjacent to the vertex, and all interior angles of are at least .
The idea behind the induction is to start with realizing an internal face, or two neighboring internal faces, of the planar representation of the graph as a sidedisk intersection graph. Then, to incorporate to the realization a new internal face of the planar representation that is a neighbor of a face already realized; until all internal faces have been incoporated. If there are internal faces of the planar embedding with 3 or at least 5 vertices, then we start with any of them. Otherwise, if all internal faces have exactly 4 vertices, then there are at least two of them because the graph is not , and we start with realizing any two neighboring internal faces.
Let be an outerplanar Hamiltonian graph different from . We have two base cases in our induction: (1) is a cycle. Then or , and any regular polygon of vertices satisfies the desired properties. Note that this is not true when by Lemma 4. (2) has faces, one external of vertices, and two internals of four vertices each that share and edge of . Then, the hexagon with vertex set satisfies the desired properties.
Consider now the general case, and let be the number of faces of the planar representation of . Note that can be decomposed into two induced subgraphs and , where is an outerplanar Hamiltonian graph of faces, and is a path , , such that and are consecutive vertices of the outer face of , and are not vertices of . Using the inductive hypothesis, let be a convex polygon such that and is good. Let denote the vertex set of . Let be an isomorphism between and , and let be three consecutive vertices of such that and .
Since is good, we can select points and in the interiors of and , respectively, such that: , and and are close enough to so that the polygon with vertex set is good; for some isomorphism such that and ; and the side disk of only intersects its two neighbor side disks and (refer to Figure 7). If , note that satisfies . Otherwise, if , we proceed as follows: Let be points that split the segment into segments of equal length, and they appear in this order from to . Let and . By Lemma 5, we have that the disk sets and are independent. Furthermore, the intersection graph of is a path of length , connecting with , then isomorphic to . This implies that for we have . Now, observe that there exist points close enough to , respectively, so that the point set is the vertex set of a good convex polygon that ensures . The theorem thus follows.∎
Theorem 4.2
Let be the class of the sidedisk realizable graphs. Then, contains all outerplanar Hamiltonian graphs except , there are graphs in which are not outerplanar, and is a proper subclass of the planar Hamiltonian graphs.
Proof
Theorem 4.1 implies that contains all outerplanar Hamiltonian graphs except the cycle graph . To see that there are graphs in which are not outerplanar, consider any graph of with as a minor (see for example Section 3, or Figure 1). Such a graph has treewidth 3, whereas all outerplanar graphs have treewidth 2. Finally, to see that is a proper subclass of the planar Hamiltonian graphs, consider again the grid graph of vertices, with and even, which is both planar and Hamiltonian. Since its treewidth is , it does not belong to .∎
From the beggining of the study of the sidedisk realizable graphs, also in this paper, the side disks have been considered as closed disks [9]. If we consider the side disks as open disks, the intersection graph of them is also planar and Hamiltonian. Furthermore, the cycle graph is sidedisk realizable by a square, and all outerplanar Hamiltonian graphs are then sidedisk realizable. To note this last statement, observe that in the realization constructed in the proof of Theorem 4.1 all pairs of intersecting disks have a proper intersection, that is, the open versions of the disks have a nonempty intersection. Hence, in this case the class of the sidedisk realizable graphs is a proper superclass of the outerplanar Hamiltonian graphs, and a proper subclass of the planar Hamiltonian graphs.
Acknowledgements
We wish to thank the GeoGebra open source software and its developers [8]. This research has been supported by projects CONICYT FONDECYT/Regular 1160543 (Chile), and Millennium Nucleus Information and Coordination in Networks ICM/FIC RC130003 (Chile).
References
 [1] H. L. Bodlaender. Dynamic programming on graphs with bounded treewidth. Automata, Languages and Programming, pages 105–118, 1988.
 [2] H. L. Bodlaender. A tourist guide through treewidth. Acta Cybernetica, 11(12):1–21, 1993.
 [3] H. L. Bodlaender. A lineartime algorithm for finding treedecompositions of small treewidth. SIAM Journal on Computing, 25(6):1305–1317, 1996.
 [4] O. Bottema, R. Z. Djordjević, R. R. Janić, D. S. Mitrinović, and P. M. Vasić. Geometric inequalities. WoltersNoordhoff, 1969.
 [5] F. Chin, J. Snoeyink, and C. A. Wang. Finding the medial axis of a simple polygon in linear time. Discrete & Computational Geometry, 21(3):405–420, 1999.
 [6] B. N. Clark, C. J. Colbourn, and D. S. Johnson. Unit disk graphs. Discrete Mathematics, 86(13):165–177, 1990.
 [7] H. Fleischner, G. Sabidussi, and V. I. Sarvanov. Maximum independent sets in 3and 4regular hamiltonian graphs. Discrete Mathematics, 310(20):2742–2749, 2010.
 [8] M. Hohenwarter. GeoGebra: Ein Softwaresystem für dynamische Geometrie und Algebra der Ebene. Master’s thesis, Paris Lodron University, Salzburg, Austria, 2002. (In German.).
 [9] C. Huemer and P. PérezLantero. The intersection graph of the disks with diameters the sides of a convex gon. arXiv preprint arXiv:1410.4126, 2016.
 [10] D. Lokshtanov, D. Marx, and S. Saurabh. Known algorithms on graphs of bounded treewidth are probably optimal. In Proceedings of the Twentysecond Annual ACMSIAM Symposium on Discrete Algorithms, SODA ’11, pages 777–789, 2011.
 [11] F. P. Preparata. The medial axis of a simple polygon. In Mathematical Foundations of Computer Science 1977, volume 53 of LNCS, pages 443–450. 1977.
 [12] G. Swart and R. Ladner. Efficient algorithms for reporting intersections. Department of Computer Science, University of Washington, 1983.
 [13] D. Wang and Y.S. Kuo. A study on two geometric location problems. Information Processing Letters, 28(6):281–286, 1988.