DISCRETE
N~THEMATICS ELSEVIER Discrete Mathematics 170 (1997) 223-230N o t e
Proper interval graphs and the guard problem 1
C h i u y u a n C h e n * , C h i n - C h e n C h a n g , G e r a r d J. C h a n g Department of Applied Mathematics, National Chiao Tung University, Hsinchu 30050, TaiwanReceived 26 September 1995; revised 27 August 1996
Abstract
This paper is a study of the hamiltonicity of proper interval graphs with applications to the guard problem in spiral polygons. We prove that proper interval graphs with ~> 2 vertices have hamiltonian paths, those with ~>3 vertices have hamiltonian cycles, and those with />4 vertices are hamiltonian-connected if and only if they are, respectively, 1-, 2-, or 3-connected. We also study the guard problem in spiral polygons by connecting the class of nontrivial connected proper interval graphs with the class of stick-intersection graphs of spiral polygons.
Keywords." Proper interval graph; Hamiltonian path (cycle); Hamiltonian-connected; Guard; Visibility; Spiral polygon
I. Introduction
The main purpose o f this paper is to study the hamiltonicity o f proper interval graphs with applications to the guard problem in spiral polygons. Our terminology and graph notation are standard, see [2], except as indicated.
The intersection graph o f a family ~ o f nonempty sets is derived by representing each set in ~ with a vertex and connecting two vertices with an edge if and only if their corresponding sets intersect. An interval graph is the intersection graph G o f a family J o f intervals on a real line. J is usually called the interval model for G. A proper interval graph is an interval graph with an interval model ~¢ such that no interval in J properly contains another. Proper interval graphs are also referred to in the literature as unit interval graphs, indifference graphs, and time graphs.
Bertossi [1] proved that a proper interval graph has a hamiltonian path if and only if it is connected. He also gave a condition under which a proper interval graph will have t This research was partially supported by the National Science Council under grants NSC83-0208-M009-054 and NSC84-2121-M009-023.
* Correspondence address: 1915 Maple #611, Evanston, IL 60201, USA.
0012-365X/97/$17.00 Copyright (~) 1997 Elsevier Science B.V. All rights reserved PII SOO12-365X(96)OO307-X
2 2 4 C Chen et al. / Discrete Mathematics 170 (1997) 223-230
a hamiltonian cycle. Using this, he proposed an algorithm for finding the hamiltonian cycle of a proper interval graph.
In Section 2, we derive alternative conditions under which a proper interval graph will have a hamiltonian path, have a hamiltonian cycle, and be hamiltonian-connected. Algorithmic results follow easily from these conditions. Recall that a graph is
hamiltonian-connected if there is a hamiltonian path between any two distinct vertices.
A polygon P is simple if no pair of nonconsecutive edges share a point. All polygons
discussed in this paper are assumed to be simple. A vertex v of P is convex (concave)
if its interior angle is less than (greater than) 180 °. A convex (concave) chain of P is
a sequence of consecutive convex (concave) vertices. P is a spiral polygon if it has
exactly one concave subchain, see Fig. 1 for an example.
A point p in a polygon P is said to see or cover another point q if the line segment
p~ does not intersect the exterior of P. For example, in Fig. 1, wl, ul, and p can see each other, but wl cannot see w4. A set of points (vertices) that cover the interior
and the boundary of P are called point (vertex) guards. Vertex guards are also point
guards, but the converse is not true. Note that two point guards {p,q} are sufficient
to cover the polygon P in Fig. 1 but three vertex guards are necessary to cover P. For surveys of the guard problem, refer to [12, 14].
The visibility graph G of a polygon P is the graph whose vertices correspond to the vertices of P, and two vertices of G are adjacent if and only if their corresponding vertices in P can see each other. In general, the recognition problem for visibility graphs is unresloved. Everett and Corneil [7] gave a linear-time algorithm for recognizing visibility graphs of spiral polygons, which are interval graphs under certain conditions. Consequently, a minimum set of vertex guards for a spiral polygon can be determined by solving the domination problem of an interval graph. Nilsson and Wood, on the other hand, proposed a linear-time algorithm for finding a minimum set of point guards for a spiral polygon [10, 11].
In Section 3, we consider the problem of finding a minimum set of point guards for a spiral polygon. We first prove that the class of stick-intersection graphs associated with spiral polygons equals the class of nontrival, connected, proper interval graphs. We then give alternative verification of the validity of Nilsson and Wood's algorithm.
w4 w s a 3 . . . - _ s 3 u 2 u
w3
~
w6
-,ir~--.Wl
w2
w 7 F i g . 1. A s p i r a l p o l y g o n in s t a n d a r d f o r m , c o n c a v e e d g e ~ , a n d s t i c k s3 = a3b3.C. Chen et al./Discrete Mathematics 170 (1997) 223~30 225 2. Hamiltonicity in proper interval graphs
The hamiltonicity o f proper interval graphs is addressed in this section.
The closed neighborhood N[v] of a vertex v is the set of vertices adjacent to v along
with v itself. An ordering [v~, v2 . . . vn] o f the vertices o f G is a consecutive ordering
if for every i, N[vi] is consecutive; i.e., N[vi]=
{vt:il
<~t<<.i2} for some il~<i2.
Notethat, for i < j , we have il <~jl and i2 ~<j2. Consequently, [vl, v2,..., v~] is a consecutive
ordering o f G = (V,E) if and only if
i < j < k and vivkEE imply vivjEE and vjvkEE.
Also, if [Vl,V 2 . . . Vn] is a consecutive ordering, then so is [Vn,V,,-t . . . Vl].
Roberts [13] proved that G is a proper interval graph if and only if its augmented adjacency matrix, which is the adjacency matrix plus the identity matrix, satisfies the consecutive l ' s property for columns; see also [6]. This fact can be restated as
Theorem 1. A graph G = ( V , E ) is a proper interval graph if and only if G has
a consecutive ordering.
Booth and Leuker's [3] consecutive 1 's testing algorithm provides a way to determine whether a graph is a proper interval graph, and gives a consecutive ordering if the answer is positive. Corneil et al. [4] and de Figueiredo et al. [5] proposed simpler methods for accomplishing these by using a breadth-first search and a lexicographic breadth-first search, respectively.
We are now ready to study the hamiltonicity o f proper interval graphs.
Theorem 2. For any positive integer k and any proper &terval graph G = (V,E) o f
n>~k + 1 vertices with a consecutive ordering [vl,v2 . . . v,], G is k-connected if and only if viv j E E whenever 1 <~ li - Jl <- k.
Proof. ( 3 ) Suppose G is k-connected and 1 ~< ]i - . J l ~<k. Without loss o f generality, we m a y assume that i < j ~< i + k. Since G is k-connected and S = {vt : i < t < j } has at
most k - 1 vertices, G - S is connected. There is a shortest vi-vj path P = (vi,, vi2 . . . vi,)
in G - S, where vi, =vi and vi, = v]. Let ip (iq) be the minimum ( m a x i m u m ) index
in {il,i2 . . . it}. Since [Vl,Ve,...,vn] is a consecutive ordering o f G, if 1 < p < r
(1 < q < r), then vi,,_, vi,,+, E E (vi,,_, vi,+, E E). This contradicts the assumption that P is
a shortest path in G - S . Therefore, {ip, iq} =-{il,ir} = {i,j}. Since P is a path in G - S ,
P contains no vertex vt such that i < t < j. Consequently, r = 2 and
vivjEE.
(¢=) On the other hand, suppose vivj E E whenever 1 ~ < l i - Jl ~<k. For any subset
S C V o f size ISI < k, remove all vertices o f S from [vl, v2 . . . v,] to get a subsequence
[vi,,vi. . . vi,.]. For each p with l<~p<~rn- 1, since ] S l < k , l i p - ip+ll<~k and so vi,,vi,,,, EE. Therefore, G - S is connected and so, G is k-connected. []
226 C. Chen et al./ Discrete Mathematics 170 (1997) 223-230
Theorem 3 (Bertossi [ 1 ]). For any proper in terval 9raph G = ( V, E ) o f n >~ 2 vertices,
G has a harniltonian path i f and only i f G is 1-connected.
Proof. ( 3 ) If G has a hamiltonian path, then G is certainly 1-connected.
(¢=) Suppose G is 1-connected. By Theorem 2, for any consecutive ordering [Vl,
V 2 . . . Vn] o f G, viv j E E whenever li - Jl = 1. Thus, (Vl, v2 . . . Vn) is a hamiltonian path of G. []
Theorem 4. For any proper interval graph G = ( V , E ) o f n >>. 3 vertices, G has a hamil-
tonian cycle i f and only i f G is 2-connected.
Proof. ( 0 ) Suppose G has a hamiltonian cycle. For any IS[ ~< 1, G - S has a hamil- tonian path and hence is connected. This proves that G is 2-connected.
(¢=) Suppose G is 2-connected. By Theorem 2, for any consecutive ordering [vl,
V 2 . . . Vn] of G, viv j E E whenever 1~<[i-j]~<2. Thus, ( V b U 3 , V5, U 7 . . . Vn_2,Vn, Vn_l,
vn-3, vn-5 . . . v4, v2, vl) is a hamiltonian cycle of G if n is odd, and (Vl,V3,V5,V7 . . . Vn-l,Vn,V~-2,v,-4 . . . Va, V2,Vl) is a hamiltonian cycle of G if n is even. []
Theorem 5. For any proper interval graph G = ( V , E ) o f n >>-4 vertices, G is
hamiltonian-connected i f and only i f G is 3-connected.
Proof. (=~) Suppose G is hamiltonian-connected. For any IS] ~<2, choose two distinct vertices u and v such that SC_{u,v}. Since there is a hamiltonian path from u to v in G, G - S has a hamiltonian path and hence is connected. This proves that G is 3-connected.
( ~ ) Suppose G is 3-connected. By Theorem 2, for any consecutive ordering [vl,
v2 . . . vn] of G, VivjCE whenever 1 ~<li-jl~<3. Suppose vf and Vm, f < m, are two arbitrary distinct vertices of G. A hamiltonian path from v/ to vm can be constructed
as follows. First let P1 =(1)f, Vf-2,Vf-a, Vf-6,'",Vl,V2, V4, V6 . . . V f _ l ) when f is odd
and let Pl = (re, re_2, re-4, re-6 . . . v2, vl, v3, vs, v7 . . . r e - l ) when f is even. P1 is then
a re-re, path with f - 1 ~< f'~< f and passing through every vertex in {vl, v2,..., re} ex- actly once. Similarly, there is a vm,-V,n path P2 with m ~< mP~< m + 1 and passing through
every vertex in {Vm,Vm+ 1 . . . Vn} exactly once. Thus, (Pl,Ve+l,V¢+2 . . . Vm-l,P2) is
a hamiltonian path from v.e to Vm. Therefore G is hamiltonian-connected. Note that for the case in which E l = f - 1 and f = m - 1 and r # = m + 1, we do use the condition that v i v j C E whenever [ i - j l = 3. []
3. Guard problem in spiral polygons
In this section, we consider the problem of finding a minimum set of point guards for a spiral polygon. We first prove that the class of stick-intersection graphs associated with spiral polygons equals the class of nontrivial, connected, proper interval graphs.
C. Chen et al./Discrete Mathematics 170 (1997) 223-230 227 We then give alternative verification of the validity of Nilsson and Wood's algorithm [10, 11] for resolving the point guard problem with respect to spiral polygons.
We assume that a spiral polygon P is given in standard form: the vertices of P
are listed as a concave chain [uj,u2 . . . urn] in clockwise order (m>~ 1), and a convex
chain [wl, w2 . . . Wn] in clockwise order such that ul and wl are adjacent and Um and
wn are adjacent; see Fig. 1. An edge e of P is called concave if it contains at least one
concave vertex. A stick s of P is a longest line segment containing a concave edge and
lying inside P. Denote sl = albl, s2 = a2b2 . . . Sm+l = am+lbm+l as the sticks containing
concave edges WlUl,UlU2 . . . UmWn, respectively; see Fig. 1 and Fig. 2(a). For each i,
R i denotes the region bounded by stick si and the convex chain of P and aib i denotes
the boundary of R i extending from ai to bi in clockwise order; see Fig. 2(b). It is easy
to see that si intersects sj if and only if Ri intersects Rj if and only if aibi intersects
ajbj.
Lemma 6. The intersection graph Gp(S) o f S = {S1,S 2 . . . Sm+l} equals the intersec-
tion graph Gp(R) o f R = { R I , R 2 . . .
Rm+I}
and also equals the intersection graphr
Gp(B) o r b = {albl,a2b2 . . . am+lbm+l ).
The intersection graphs Gp(S),Gp(R),Gp(B), which are equal by Lemma 6, are
called respectively, the stick, region, and boundary intersection graphs associated
with P. Note that the intersection graph of the sticks in Fig. 2(a) equals the proper
interval graph in Fig. 2(c), in which vertex vi corresponds to stick si. This is not an
accident, since we have the following theorem.
Theorem 7. The class o f stick-intersection graphs associated with spiral polygons
equals the class o f nontrivial, connected, proper interval graphs. Moreover, for a spiral polygon P, [R1,Rz,...,Rm+I] is a consecutive ordering o f Ge(R).
Proof. (=~) Suppose P is a spiral polygon with m concave vertices. Since m>~l and
Ge(S) has m + 1 vertices, Gp(S) is nontrivial. Since sticks si and sj intersect whenever
w4 w 5 Vl v2
w2 w 7 v5 v4
(a) Sticks. (b) Region R 3 (shaded) and boundary a3"~3 (bold). (c) A proper interval graph.
228 C Chen et al. / Discrete Mathematics 170 (1997) 223-230
l i - Jl = 1, Gp(S) is connected. By L e m m a 6, G p ( S ) = G p ( R ) = Ge(B). Consider the
convex chain o f P as ' e m b e d d e d ' in a real line, and {albl,a2b2 . . . am+Ibm+l} as a set o f intervals on a real line. Since bi lies to the left o f bj whenever a i lies to the left o f aj, no interval properly contains another. Hence Gp(R) has the consecutive ordering [Rx,R2,...,Rm+I], and so, is a proper interval graph.
(¢=) Suppose G = ( V , E ) is a nontrivial, connected, proper interval graph o f n
vertices. By Theorems 1 and 2, G has a consecutive ordering [vl,v2 . . . v,] such
that vivj E E whenever l i -
Jl
= 1. We shall construct a spiral polygon whose stick-intersection graph is G by means o f a unit circle.
For any two points a and b on the unit circle C, denote ab as the arc from a to
b in clockwise order and denote
l abl
as the length o f ab. We shall construct a seto f chords {albl,a2b2 . . . a,bn } on C such that aibi corresponds to vi as follows; see Fig. 3(a) for an illustration o f constructing a spiral polygon from Fig. 2(c).
(1) Choose a chord albl on C such that lalb---~l < ½(2re).
(2) Since vl EN[v2], choose a chord azb2 on C such that azb2 intersects albl at el and Iblb2] < (1)2(27c).
To choose a3b3 . . . anbn on C, we use the following lemma, which is clearly valid, repeatedly.
A
L e m m a 8. Suppose a' E ab and c E ab. For any e > 0, there is a point b' on the unit
__ A
circle such that a , a ' , b , b I are in clockwise order, a'b ~ intersects cb at c' and
Ibb'l
< 5.(See Fig. 3(b).)
Assume that a l b l , a 2 b 2 . . . a i _ l b i _ 1 have already been chosen. We choose aibi as
follows, where 3<~i<~n. Assume that N [ v i ] = { v t ' i l <~t<~i2}. Note that il < i. List
a l , b l . . . a i - l , b i - a starting from al and ending at bi-1 in clockwise order, say, al . . . x, bi, . . . bi-~, where x is the point immediately preceding bi,. Choose a point ai from the open arc xbi,. By L e m m a 8, we can choose bi on C such that a . . . x, ai, bi, . . . bi-1,
j f r j ~
/ / / ~ s
at i
3 " ~ ~ b
a4 / /
(a) Constructing a spiral polygon, (b) Lemma 9 illustrated.
c Chen et al./Discrete Mathematics 170 (1997) 223-230 229
A
bi a r e in clockwise order, chords aibi and ¢i-2bi-1 intersect at ci-l, and ]bi-lbi] < (½)i(2x) •
It is not difficult to verify that if N[vi] = {vt : i l ~< t ~< i2}, then aibi intersects ai, bi, . . . ai-! bi- 1, ai+l b,+l . . . ai, bi:. Therefore the intersection graph for { a l b l, a z b 2 . . . anbn } equals G.
Consider a spiral polygon P whose concave chain is [ct,c2 . . . cn-1] and whose
convex chain contains all ai's and hi's in clockwise order on C; see Fig. 3(a). Then
aibi's a r e precisely the sticks o f P. Therefore G equals the stick-intersection graph o f
the spiral polygon P. []
Recall that Nilsson and W o o d ' s algorithm [10, 11] for finding a minimum set o f point guards can be stated as follows. Let P be a spiral polygon with m concave vertices
in standard form. First find the m + 1 sticks sl = a l b t , s2 : a 2 b 2 . . . Sm+l :am+lbm+l
o f P. Then find a maximal sequence o f points bi,, bi2 . . . bi, in the following manner:
bi, : b l ; bi/ is the first point in [bl,b2 . . . bm+l], and follows b!/_ , such that stick sij
does not intersect stick si, ,. A minimum set o f point guards for P is {bi,, bi2 . . . bi, }.
We give an alternative p r o o f for the correctness o f the algorithm by means o f an argument for the m a x i m u m independent set problem in chordal graphs.
A graph is chordal if every cycle o f length greater than 3 possesses a chord, which
is an edge joining two nonconsecutive vertices o f the cycle. It was proved in [8] that
G is chordal if and only if G has a perfect elimination scheme, which is an ordering
[vl,v2 . . . vn] o f vertices such that
i < j < k , v i v j E E and vivkEE imply vjvkEE.
Since a consecutive ordering is a perfect elimination scheme, a proper interval graph is chordal.
A clique cover of a graph G = ( V , E ) is a partition of the vertex set V = A I + A 2 + - . . +
At such that each A i induces a clique o f G. A minimum clique cover of G is a clique
cover o f m i n i m u m cardinality. Gavril [9] proposed an algorithm for finding a m a x i m u m
independent set and a minimum clique cover o f a chordal graph. B y Theorem 7, Gp(R)
is a proper interval graph in which [RI,R2 . . . Rm+l] is a consecutive ordering and also a perfect elimination scheme. Therefore Nilsson and W o o d ' s algorithm is in fact a slight modification o f Gavril's algorithm for finding a m a x i m u m independent set and
a minimum clique cover o f Gp(R) in terms of the ordering [R1,R2 . . . Rm+l]: Induc-
tively define a maximal sequence o f regions Ri,,Ri, . . . Ri, such that Ri, : R 1 and Ri/
is the first region in the sequence [R1,R2 . . . Rm+l] and follows Ri:_, but is not in
N+[R 6 ,], where N+[Ri] : {Rj : j>~i and Rj NRi • ~}. Since the ordering [R1,R2 . . .
Rm+l] is consecutive, Ri/CN+[R!:_~] implies that Ri/CN+[Ri,]UN+[Ri2]U...UN+[Ri/_,].
Hence, N+[Ri, ] UN+[Ri2] U . . . UN+[Ri,] = {R1 ,R2 . . . Rm+l }. By the arguments in [9],
we have:
Lemma 9. The set {Ri,,Ri2 . . . Ri,} is a m a x i m u m independent set o f Gp(R) and {N+[Ri,],N+[Ri2] . . . N+[Ri,]} is a minimum clique cover o f Gp(R).
230 C. Chen et al. / Discrete Mathematics 170 (1997) 223-230
Lemma 10. P requires at least t point 9uards.
Proof. For each i, denote p~ as the middle of the concave edge containing stick s i.
Since only points in Rij c a n cover Pij and {Ri~,Ri2 . . . Ri, } is an independent set, no
single point o f P can cover two distinct points in {Pi,,P6 . . . Pi,}. This proves the
lemma. []
Theorem 11. {biL, bi: . . . bit } is a minimum set of point 9uards for P.
Proof. Since P is spiral, bi covers Rj for all Rj EN+[Ri]. By L e m m a 9, N+[Ri,] U
N+[Ri2] U .. • UN+[Rit] = {RI,R2 . . . Rm+l}. Therefore, {bi,,bg 2 .. . . . be,} covers P. This,
together with L e m m a 10, proves the theorem. []
Acknowledgements
The authors thank the referees for m a n y constructive suggestions for revision o f this paper.
References
[1] A.A. Bertossi, Finding hamiltonian circuits in proper interval graphs, Inform. Process. Lett. 17 (1983) 97-101.
[2] J.A. Bondy and U.S.R. Murty, Graph Theory with Applications (North-Holland, New York, 1976). [3] K.S. Booth and G.S. Leuker, Testing for the consecutive ones property, interval graphs, and graph
planarity using PQ-tree algorithms, J. Comput. System Sci. 13 (1976) 335-379.
[4] D.G. Comeil, H. Kim, S. Natarajan, S. Olariu and A.P. Sprague, Simple linear time recognition of unit interval graphs, inform. Process. Lett. 55 (1995) 99-104.
[5] C.M.H. de Figueiredo, J. Meidanis and C.P. de Mello, A linear-time algorithm for proper interval graph recognition, Inform. Process. Lett. 56 (1995) 179-184.
[6] G. Ding, Covering the edges with consecutive sets, J. Graph Theory 15 (1991) 559-562.
[7] H. Everett and D.G. Corneil, Recognizing visibility graphs of spiral polygons, J. Algorithms 11 (1990) 1-26.
[8] D.R. Fulkerson and O.A. Gross, Incidence matrices and interval graphs, Pacific J. Math. 15 (1965) 835-855.
[9] F. Gavril, Algorithms for minimum coloring, maximum clique, minimum covering by cliques, and maximum independent set of a chordal graph, SIAM J. Comput. 1 (1972) 180-187.
[10l B.J. Nilsson and D. Wood, Watchmen routes in spiral polygons, Technical Report LU-CS-TR:90-55, Lund University, Sweden, 1990.
[11] B.J. Nilsson and D. Wood, Optimum Watchmen routes in spiral polygons, in: Proc. 2nd Canadian Conf. Computational Geometry, Ottawa (1990) 269-272.
[12] J. O'Rourke, Art Gallery Theorems and Algorithms (Oxford Univ. Press, New York, 1987). [13] F.S. Roberts, On the compatibility between a graph and a simple order, J. Combin. Theory Ser. B 11
(1971) 28-38.