graphs A faster algorithm to recognize even-hole-free Series B Journal of Combinatorial Theory,

21  Download (0)

Full text


Contents lists available atScienceDirect

Journal of Combinatorial Theory, Series B

A faster algorithm to recognize even-hole-free graphs

Hsien-Chih Changa,1, Hsueh-I Lub,2

aDepartmentofComputerScience,UniversityofIllinoisatUrbana-Champaign, USA

bDepartmentofComputerScienceandInformationEngineering, National Taiwan University,Taiwan

a r t i c l e i n f o a b s t r a c t


Received10August2013 Availableonline11February2015



Decomposition-baseddetection algorithm

Extendedcliquetree 2-join

Star-cutset Diamond Beetle Tracker

We study the problem of determining whether an n-node graphG contains anevenhole,i.e.,aninducedsimplecycle consistingofanevennumberofnodes.Conforti,Cornuéjols, Kapoor, and Vušković gave the first polynomial-time algo- rithm for the problem, which runs in O(n40) time. Later, Chudnovsky,Kawarabayashi,andSeymourreducedtherun- ningtime to O(n31).The best previouslyknown algorithm fortheproblem,duetoda SilvaandVušković,runsinO(n19) time.Inthispaper,wesolvetheprobleminO(n11) timeviaa decomposition-basedalgorithmthatreliesonthedecomposi- tiontheoremofda SilvaandVušković.Moreover,ifG contains

Thecurrentversionslightlyimprovesuponthepreliminaryversion[4]appearedinSODA 2012:(a) The time complexity for recognizing even-hole-free n-node m-edge graphs G is reduced from O(m2n7) to O(m3n5), which is an improvementif m = o(n2); and(b) if G containseven holes, then the current versionshowshowtooutputanevenholeof G alsoinO(m3n5) time. Chang), Lu).

URL: Lu).

1 ThisresearchwasperformedwhilethisauthorwasaffiliatedwithDepartmentofComputerScienceand InformationEngineering,NationalTaiwanUniversity.

2 ThisauthoralsoholdsjointappointmentsintheGraduateInstituteofNetworkingandMultimediaand theGraduateInstituteofBiomedicalElectronicsandBioinformatics,NationalTaiwanUniversity.Address:

1 RooseveltRoad,Section 4,Taipei106,Taiwan,ROC. Researchofthisauthoris supportedinpartby NSCgrant 101-2221-E-002-062-MY3. 0095-8956/© 2015ElsevierInc.All rights reserved.


evenholes,thenouralgorithmalsooutputsanevenholeof G inO(n11) time.

© 2015ElsevierInc.All rights reserved.

1. Introduction

Forany graphsG andF ,wesaythatG contains F ifF isisomorphicto aninduced subgraph of G.If G doesnot containF ,then G is F -free. Forany family F ofgraphs, G is F-free if G is F -free for each graph F in F. A hole is an induced simple cycle consisting of at least four nodes. A hole is even (respectively, odd) if it consists of an even (respectively, odd) numberof nodes. Even-hole-free graphshave been extensively studiedintheliterature (see,e.g.,[1,13–15,20,21,30,38]).SeeVušković[43] forarecent survey. This paper studies the problem of determining whethera graph containseven holes. Letn bethenumber ofnodes ofthe inputgraph.Conforti,Cornuéjols,Kapoor, and Vušković [12,16] gave the first polynomial-time algorithm for the problem, which runs inO(n40) time[7]. Later, Chudnovsky,Kawarabayashi, and Seymour [7]reduced therunningtimetoO(n31).Chudnovskyet al.[7]alsoobservedthattherunningtimecan be furtherreducedto O(n15) aslongas prismscanbe detectedefficiently, butMaffray andTrotignon[31]showedthatdetectingprismsisNP-hard.Thebestpreviouslyknown algorithm for theproblem,due toda Silva and Vušković[21],runsinO(n19) time.We solvetheprobleminO(n11) time, asstatedinthefollowing theorem.

Theorem 1.1.IttakesO(m3n5) time todeterminewhether ann-node m-edgeconnected graph contains evenholes.

Technical overview. The O(n40)-time algorithmof Confortiet al.[16] isbasedontheir decompositiontheorem[15]statingthataconnectedeven-hole-freegrapheither(i) isan extendedcliquetree, or(ii) containsnon-path2-joinsork-star-cutsetswithk∈ {1,2,3}.

Themain bodyoftheiralgorithm recursivelydecomposestheinput graphG into alist L ofapolynomialnumberofsmallerorsimplergraphsusingnon-path2-joinsork-star- cutsets with k∈ {1,2,3} untileachgraph inL does notcontainany of the mentioned cutsets. Since even holes inextended clique treescan be detected in polynomialtime, it suffices for their algorithm to ensure the even-hole-preserving condition of L: G is even-hole-free ifand onlyif allgraphsin L areeven-hole-free.To ensurethe condition of L, their algorithm requires acleaning process to eitherdetect an even holein G or removebadstructuresfromG beforeobtainingL from G.TheO(n31)-timealgorithmof Chudnovskyet al. [7], whichisnotbaseduponany decompositiontheorembutstillre- quiresthecleaningprocess,looksforevenholesdirectly.(ThealgorithmsofChudnovsky et al.[6]forrecognizingperfectgraphsarealsoofthistypeofnon-decomposition-based algorithms.) The O(n19)-time algorithm of da Silva and Vušković [21], adopting the


decomposition-basedapproach,relies onastrongerdecompositiontheoremstatingthat ifaconnected even-hole-freegraphhas nostar-cutsets and non-path 2-joins, thenit is an extended clique tree. Since k-star-cutsets with k ∈ {2,3} need not be taken into account,the decomposition process is significantly simplified,leading to a much lower time complexity. Our O(n11)-time algorithm is also based on the brilliant decomposi- tion theorem of da Silva and Vušković[21]. Our improvement is obtained viathe new ideaoftrackers,which allowforfewer graphstobe generated intheprocess ofdecom- position using star-cutsets. The cleaning process is also sped up by an algorithm for recognizingbeetle-freegraphs,baseduponthethree-in-a-tree algorithmofChudnovsky andSeymour[10].


Throughout thepaper, a k-hole (respectively,k-cycle andk-path)isak-nodehole(re- spectively, cycle and path). The first phase (see Lemma 2.3) either (1) ensures that the input graph G contains even holes via the existence of a “beetle” (see Section 2 and Fig. 2(a)) or a 4-hole in G, or (2) produces a set T of “trackers” (H,u1u2u3) of G, where H is a beetle-free and 4-hole-free induced subgraph of G and u1u2u3 is a 3-path of H. T satisfies the following even-hole-preserving condition (see Condi- tion L1):If G containsevenholes,thenatleastoneelement(H,u1u2u3) ofT is“lucky”

such that a shortest even hole C of G is a subgraph of H and the following holds:

(a) u1u2u3 is a path of C and (b) the neighborhood of C in H is “super clean” (i.e., MH(C)= NH2,2(C)= NH1,2(C)= NH4(C)=∅ using notationdefinedin Section2).The secondphaseapplies analgorithm(seeLemma 2.4)oneachtracker(H,u1u2u3)∈ T to eitherensurethatH contains even holesor ensurethat(H,u1u2u3) is notlucky.If all trackersinT arenotlucky,thentheeven-hole-preservingconditionofT impliesthatG is even-hole-free.Otherwise,aninducedsubgraph H of G containsanevenhole,implying thatG containsevenholes.

Therecognitionalgorithm forbeetle-freegraphs(seetheproof ofLemma 2.3)inthe first phase is based on Chudnovsky and Seymour’s three-in-a-tree algorithm [10] (see Theorem 3.1).IfG containsbeetlesor4-holes,thenG containsevenholes.Otherwise,if G containsevenholes,thentheneighborhoodofeachshortestevenholeC of G is“clean”

(i.e., NG1,2(C)= NG4(C)=∅, see theproof of Lemma 2.2). To furtherensure thatthe neighborhood of C issuperclean,we generate aset S of “supercleaners” (S,u1u2u3), where S isanode subset of G andu1u2u3 is apathof G, suchthatat leastonesuper cleaner(S,u1u2u3)∈ S satisfiesu1u2u3⊆ C ⊆ H = G\S andMH(C)= NH2,2(C)=∅ for someshortestevenholeC of G (seetheproofofLemma 2.3).ThesetT consistingofthe trackers(G\ S,u1u2u3) with(S,u1u2u2)∈ S satisfiestherequiredeven-hole-preserving condition.Theunderlyingtechniqueofguessing“badnodes”of G (usingLemmas 3.4, 3.5, and 3.6)toberemovedbysupercleanersiscalled “cleaning”intheliterature(see,e.g., Vušković[43, §4]).

ThealgorithmappliedoneachtrackerT = (H,u1u2u3)∈ T inthesecondphaserelies on the decomposition theorem of da Silva and Vušković [21] (see Theorem 4.9). Since evenholescanbeefficientlydetectedinanextendedcliquetree (seeLemma 4.6, which


is aslightlyfaster implementation of thealgorithm of da Silvaand Vušković [21]), our algorithm performs two stages of even-hole-preserving decompositions on H, first via star-cutsetsandthenvianon-path2-joins,untileachoftheresultinggraphseitherisan extendedcliquetree orhasO(1) nodes. Ifalloftheresultinggraphsare even-hole-free, then T is not lucky; otherwise, H contains even holes. As noted by Chvátal [11] (see Lemma 4.3), if H has no dominated nodes, then a star-cutset of H has to be a full star-cutset of H,which canbe efficiently detected. Thus, at the beginningof each de- compositioninthefirststage,wepreprocess(H,u1u2u3) bydeletingalldominatednodes of H andcarefullyupdatingnodesu1,u2,andu3suchthattheluckinessof(H,u1u2u3) is preserved (see Lemma 4.4). The correctness of this preprocessing step relies on the fact that H is beetle-free and the requirement for (H,u1u2u3) to be lucky that the neighborhood ofsomeshortestevenholeC in H withu1u2u3⊆ C is superclean.Path u1u2u3iscrucialinthestage ofdecompositionsviastar-cutsetsforthegraphH having no dominated nodes. Specifically, ifS is astar-cutset of H,then by merelyexamining the neighborhood of pathu1u2u3 inH,we canefficientlyidentify aconnected compo- nent B of H \ S such that (H[S∪ B],u1u2u3) preserves the luckiness of (H,u1u2u3) (see Step 3 in the proof of Lemma 4.1). We then let H = H[C ∪ B] and repeat the aboveprocedureforO(n) iterations until H hasnostar-cutsets. Thesecondstage,i.e., decompositionsvianon-path2-joinsforgraphshavingnostar-cutsets,isbaseduponthe detectionalgorithmfornon-path2-joinsofCharbitet al.[5](seeLemma 4.8).Thisstage decomposes anm-edge graphhavingnostar-cutsets intoaset ofO(m) smaller graphs, each ofwhicheitherconsists of O(1) nodesor isan extendedcliquetree (seetheproof of Lemma 4.2).

Related work. Even-hole-free planargraphs[34] canbe recognized inO(n3) time.It is NP-completetodeterminewhetheragraphcontainsaneven(respectively,odd)holethat passesagivennode[2,3].TheStrongPerfectGraphTheoremofChudnovsky,Robertson, Seymour, and Thomas[8] statesthat a graph G is perfect if and only if both G and the complement of G are odd-hole-free. Although perfect graphs canbe recognized in O(n9) time [6], the tractability of recognizing odd-hole-free graphsremains open (see, e.g., [26]). Polynomial-time algorithms for detecting odd holes are known for planar graphs [25], claw-free graphs [29,37], and graphs with bounded clique numbers [17].

Graphscontainingnoholes(i.e.,chordalgraphs)canberecognizedinO(m+n) time[35, 36,39,40].Graphscontainingnoholesconsistingoffiveormorenodes(i.e.,weaklychordal graphs) canbe recognized in O(m2+ n) time [32,33]. It takes O(n2) time to detect a holethatpassesany o((log n/log log n)2/3) givennodes inanO(1)-genus graph[27,28].


Roadmap. Therestofthepaperisorganizedasfollows.Section2givesthepreliminaries andprovesTheorem 1.1byLemmas 2.3 and 2.4.Section3provesLemma 2.3.Section4 proves Lemma 2.4. Section 5 concludes the paper by explaining how to augment our proof of Theorem 1.1intoan O(m3n5)-timealgorithm thatoutputsan evenholeof an n-node m-edgegraphcontainingevenholes.


Fig. 1. C = v1c2c3v2c7c8v1 isaclean evenholeofthe 11-nodegraphG,sinceMG(C)= NG2,2(C) = ∅.

C= c1c2· · · c9c1isanoddholewithMG(C)={v2}.

2. Preliminariesandthetopmoststructureofour proof

Unless clearly specified otherwise, all graphs throughout the paper are simple and undirected.Let|S| denotethecardinalityofset S.LetG beagraph.LetV (G) consist ofthenodesinG.ForanysubgraphH of G,letG[H] denotethesubgraphof G induced byV (H).SubgraphsH andH ofgraphG areadjacent in G ifsomenodeof H andsome nodeofH areadjacent inG.Forany subset U ofV (G),letG\ U = G[V (G)\ U].For anysubgraphH of G,letNG(H) consistofthenodesofV (G)\ V (H) thatareadjacent toH in G andletNG[H]= NG(H)∪ V (H).

LetC beaholeof G.Letx beanode inV (G)\ V (C).LetNC(x)= NG(x)∩ V (C).

We saythat x isa major node [7] of C in G if at least three distinct nodes of NC(x) are pairwise non-adjacent inG.Let MG(C) consist ofthe major nodes of C inG. For instance,inFig. 1,MG(C)=∅ andMG(C)={v2}.

Lemma2.1(Chudnovskyet al. [7,Lemma2.2]).If C isashortestevenhole ofgraph G andx∈ MG(C),then|NC(x)| iseven.

Ifx∈ NG(C)\MG(C),then1≤ |NC(x)|≤ 4 andC[NC(x)] hasatmosttwoconnected components. Moreover, if C[NC(x)] is not connected, then each connected component of C[NC(x)] has at most two nodes. Let NGi(C) with 1 ≤ i ≤ 4 consist of the nodes x ∈ NG(C)\ MG(C) such that |NC(x)| = i and C[NC(x)] is connected. Let NGi,j(C) with 1 ≤ i ≤ j ≤ 2 consist of the nodes x ∈ NG(C)\ MG(C) such that C[NC(x)]

is not connected and the two connected components of C[NC(x)] has i and j nodes, respectively.Wehave

NG(C) = NG1(C)∪ NG2(C)∪ NG3(C)∪ NG4(C)∪ NG1,1(C)∪ NG1,2(C)

∪ NG2,2(C)∪ MG(C). (1)

We say that C is a clean hole of G if MG(C) = NG2,2(C) = ∅. We say that C is a u1u2u3-hole of G if u1u2u3 is a 3-path of C and C is a clean shortest even hole of G. Forinstance,ifG isas showninFig. 1, then C = v1c2c3v2c7c8v1 is av1c2c3-hole


Fig. 2. (a) AbeetleB,whereB[{b1,b2,b3,b4}] isadiamond.(b) Ifx∈ NG4(C),thenG[C∪{x}] isabeetle B, whereB[{u1,u2,u3,x}] isadiamond.(c) A nodex∈ NG1,2(C).

of G. If H is an induced subgraph of G and u1u2u3 is a 3-path of H, then we call (H,u1u2u3) atracker of G.A tracker (H,u1u2u3) of G islucky ifthereisau1u2u3-hole of H.If thereareluckytrackersof G,thenG containsevenholes.Therefore,a setT of trackersof G satisfyingthefollowingeven-hole-preservingconditionreducestheproblem of determining whether G is even-hole-freeto the problem of determining whether all trackers inT arenotlucky:

Condition L1: IfG containsevenholes,thenatleastoneelementofT isaluckytracker of G.

AninducedsubgraphB of G is abeetle of G ifB consists of(1) a 4-cycle b1b2b3b4b1

withexactlyonechordb2b4(i.e.,a diamond[16,30]of G)and(2) a treeI ofG\{b4} having exactlythreeleaves b1,b2,andb3withthepropertythatI\{b1,b2,b3} isaninducedtree of G notadjacenttob4.SeeFig. 2(a)foranillustration.Nodeb5(respectively,b6andb7) istheneighborofb1(respectively,b2andb3)inI.Nodeb8istheonlydegree-3 nodeof I.

Note thatatleastoneofthethreecyclesinB\ {b2},B\ {b1,b4},andB\ {b3,b4} is an evenholeof G.Nodesb5,b6,b7,andb8neednotbedistinct.Forinstance,as illustrated by Fig. 2(b),ifC is aholeof G andx is anode ofNG4(C),then G[C∪ {x}] isabeetle of G.

Lemma2.2.IfG isabeetle-freegraph,thenNG(C)⊆ NG1,1(C)∪NG1(C)∪NG2(C)∪NG3(C) holds forany cleanshortesteven holeC of G.

Proof. ByMG(C)= NG2,2(C)=∅ andEq.(1),itsufficesto showNG1,2(C)= NG4(C)=

∅. If x ∈ NG4(C) as illustrated by Fig. 2(b), then G[C∪ {x}] is abeetle of G, a con- tradiction. If x ∈ NG1,2(C),then let u, v1, and v2 be the nodes of NC(x) such thatv1 and v2 are adjacent in C, as illustrated by Fig. 2(c). Let P1 be the path of C \ {v2} betweenu andv1.LetP2 bethepathof C\ {v1} between u andv2.EitherG[{x}∪ P1] or G[{x}∪ P2] isanevenholeof G shorterthan C,a contradiction. 2


2.1. Proving Theorem 1.1

Lemma 2.3. It takes O(m3n5) time to complete either one of the following tasks for any n-node m-edge graph G. Task 1: Ensuring that G contains even holes. Task 2:

(a) EnsuringthatG isbeetle-freeand(b) obtainingasetT ofO(m2n) trackersof G that satisfiesCondition L1.

Lemma2.4. Given atracker T = (H,u1u2u3) of ann-node m-edge beetle-freegraph G, ittakesO(mn4) timetoeither ensurethatH containsevenholesorensurethatT isnot lucky.

Proof of Theorem 1.1. We apply Lemma 2.3 on G in O(m3n5) time. If Task 1 is completed, then the theorem is proved. If Task 2 is completed, then G is beetle-free and we have aset T of O(m2n) trackers of G that satisfies Condition L1. ByCondi- tion L1ofT andLemma 2.4,onecandeterminewhetherG containsevenholesintime

|T|· O(mn4)= O(m3n5). 2

3. ProvingLemma 2.3

A clique of G is a complete subgraph of G. A clique of G is maximal if it is not contained by other cliques of G. We need the following theorem and three lemmas to proveLemma 2.3.

Theorem 3.1 (Chudnovsky and Seymour [10]). Letz1, z2,and z3 be three nodes of an n-node graph. It takesO(n4) time todetermine whether thegraph contains an induced treeI with {z1,z2,z3}⊆ V (I).

Lemma 3.2 (Farber [23, Proposition 2] and da Silva and Vušković [20]). Let G be an n-nodem-edge 4-hole-freegraph.IttakesO(mn2) timetoeither ensurethat G contains evenholes orobtain allO(n2) maximal cliques of G.

Lemma3.3 (da Silva andVušković [20]).The number of maximal cliques in ann-node m-edgeeven-hole-free graph isatmostn+ 2m.

Lemma3.4(Chudnovsky,Kawarabayashi,andSeymour[7,Lemma 4.2]).Forany short- est even hole C of a 4-hole-free graph G, there is an edge v1v2 of C with NG2,2(C) NG(v1)∩ NG(v2).

Lemma3.5. For any shortesteven hole C ofa4-hole-freegraph G, ifG[MG(C)] is not acliqueof G, thenthere isanodeu of C withMG(C)⊆ NG(u).

Before working on the proof of Lemma 3.5, we first proveLemma 2.3 using Theo- rem 3.1andLemmas 3.2, 3.3, 3.4, and 3.5.


ProofofLemma2.3. WeclaimthatG containsbeetlesifandonlyifatleastoneofthe O(m3n) choicesofnodeb4 andthreedistinctedgesb1b5,b2b6,andb3b7of G satisfiesall of thefollowing fourconditions:

• G[{b1,b2,b3,b4}] isthe4-cycleb1b2b3b4b1 withexactlyonechord b2b4.

• Theedgesbetween{b1,b2,b3} and{b5,b6,b7} areexactlyb1b5,b2b6,andb3b7.

{b5,b6,b7}∩ {b1,b2,b3,b4}=∅,butnodes b5,b6,andb7 neednotbe distinct.

• There is an induced tree I of G \ ((NG[b1]∪ · · · ∪ NG[b4])\ {b5, b6, b7}) with {b5,b6,b7}⊆ V (I).

The claim can be verified by seeing that if I is the minimal subtree of I satisfying {b5,b6,b7}⊆ V (I),then I = I∪ {b1b5,b2b6,b3b7} is atree of G\ {b4} withleaf set {b1,b2,b3} havingthepropertythatI\ {b1,b2,b3} isaninducedtreeof G notadjacent tob4.BytheclaimaboveandTheorem 3.1,ittakes O(m3n5) timetodeterminewhether G contains beetles. It takes O(n4) time to determine whether G contains 4-holes. If G contains 4-holes or beetles, then G contains even holes. The lemma is proved by completingTask 1inO(m3n5) time.TherestoftheproofassumesthatG is4-hole-free and beetle-free.

By Lemma 3.2, it takes O(mn2) time to either ensure that G contains even holes or obtaintheO(n2) maximal cliquesof G. IfG containseven holes,thenthe lemmais provedbycompletingTask 1inO(mn2) time.Otherwise,wehavealltheO(n2) maximal cliquesof G.IfthenumberofmaximalcliquesinG islargerthann+2m,thenLemma 3.3 impliesthatG containsevenholes,alsoprovingthelemmabycompletingTask 1.Ifthe number of maximal cliquesin G isn+ 2m or fewer, then let T consistof the trackers of G that areintheform of (G\ S1,u1u2u3) or (G\ S2,u1u2u3) with

S1 = S1(u1, u2, u3, v1, v2) = (NG(v1)∩ NG(v2))∪ (NG(u2)\ {u1, u3});

S2 = S2(u1, u2, K) = (NG(u1)∩ NG(u2))∪ V (K),

where u1u2 and v1v2 are edges of G and K is amaximal clique of G. We have|T| = O(m2n).Since allO(n+ m) maximalcliquesof G are available,T canbecomputed in timeO(m2n)· O(n+ m)= O(m3n) time.ToensurethecompletionofTask 2,itremains toprovethatT satisfiesCondition L1.SupposethatG containsevenholes.LetC bean arbitraryshortestevenholeof G.Thefollowingcaseanalysisshowsthattherearelucky trackers of G inT.

Case 1:MG(C)⊆ NG(u2) holdsforanodeu2 of C.Letu1andu3betheneighborsof u2in C.ByMG(C)⊆ NG(u2)\ {u1,u3} andLemma 3.4,thereisanedgev1v2ofC with MG(C)∪NG2,2(C)⊆ S1.Bythechoicesofu1andu3,wehave(NG(u2)\{u1,u3})∩C = ∅.

Since v1v2 isanedgeofholeC,wehaveNG(v1)∩ NG(v2)∩ C = ∅. Thus,S1∩ C = ∅, implyingthatC isacleanholeofG\ S1andu1u2u3isapathofC.SinceC isashortest evenholeof G,C isalsoashortestevenholeofG\ S1.Therefore,C isau1u2u3-holeof G\ S1.


Fig. 3. (a)Edgeu1u2isagateofthe8-holeC inducedbynodesotherthanx1andx2,whicharethemajor nodesof C.(b) and(c)IllustrationsfortheproofofLemma 3.5.

Case 2: MG(C)  NG(u) holds for all nodes u of C. By Lemma 3.5, G[MG(C)]

is a clique of G. Let K be a maximal clique of G with MG(C) ⊆ V (K). Combining with Lemma 3.4, there is an edge u1u2 of C with MG(C)∪ NG2,2(C) ⊆ S2. We have V (K)∩ C = ∅ or else MG(C)∩ C = ∅ implies MG(C) ⊆ V (K)\ {u} ⊆ NG(u) for any node u ∈ V (K)∩ C, a contradiction. Since u1u2 is an edge of C, we have NG(u1)∩ NG(u2)∩ C = ∅.Thus,S2∩ C = ∅,implyingthatC isacleanholeofG\ S2. Letting u3 be the neighbor of u2 inC other than u1, u1u2u3 is apath of C. Since C isashortest evenholeof G, C is alsoashortest evenholeof G\ S2. Therefore,C is a u1u2u3-holeof G\ S2. 2

Therestof thesectionproves Lemma 3.5.Anedge u1u2 ofholeC isagate [7] ofC withrespectto majornodesx1 andx2 ofC ifbothofthefollowingconditionshold:

Condition G1: There aretwo edges u1x2 and u2x1 and atleast oneof edges u1x1 and u2x2.

Condition G2: Thereis anodeu0 ofC\ {u1,u2} suchthatx1 (respectively,x2)isnot adjacenttoC\ V (P1) (respectively,C\ V (P2)),where P1 (respectively, P2)isthepathofC betweenu2 (respectively,u1)andu0 thatpassesu1 (respectively,u2).

SeeFig. 3(a)foranillustration.

Lemma3.6(Chudnovskyet al.[7,Lemmas 2.3and 2.4]).The followingstatements hold forany shortestevenhole C ofa4-hole-freegraph G:

1. Ifx1andx2 arenon-adjacentnodesofMG(C),thenthereisagateofC withrespect tox1 andx2 in G.

2. IfX is asubsetof MG(C) with|X|= 3 suchthat G[X] hasatmost oneedge, then X ⊆ NG(u) holdsforsomenode u of C.


Fig. 4. Illustrations for the proof ofLemma 3.5.

ProofofLemma 3.5. Letx1andx2betwonon-adjacentnodesofMG(C).LetU consist of the nodes u of C that are adjacent to both of x1 and x2. By Lemma 3.6(1), there is agateu1u2 of C with respect to x1 and x2. We have ∅= U ⊆ {u1,u2,u0}, where u0 is anode of C ensuredby Condition G2. Assumeu0 ∈ U. By Condition G1, u0 is adjacent tou1 oru2 inG or elseoneofu1x1u0x2u1 andu2x1u0x2u2 wouldbe a4-hole of G. If u0 is adjacent to u1 as illustrated by Fig. 3(b), then Condition G2 implies NC(x1) = {u0,u1,u2}, which contradicts with x1 ∈ MG(C). If u0 is adjacent to u2 as illustrated by Fig. 3(c), then Condition G2 implies NG(x2) = {u0,u1,u2}, which contradicts with x2 ∈ MG(C). Therefore, u0 ∈ U,/ and thus U ⊆ {u1,u2}.The lemma holds trivially if |MG(C)| = 2. To prove the lemma for |MG(C)| ≥ 3, we first show the claim: “Each node x∈ MG(C)\ {x1,x2} is adjacent to U .” If oneof x1 and x2 is not adjacentto x, then theclaim followsfrom Lemma 3.6(2). If both ofx1 and x2 are adjacent to x, then eachnode u∈ U is adjacentto x in G orelse ux1xx2u isa4-hole, a contradiction.Theclaimisproved.

By the claim above, the lemma holds if |MG(C)| = 3 or |U| = 1. It remains to consider thecaseswith |MG(C)|≥ 4 and U ={u1,u2} (thus,there areedgesu1x1 and u2x2) by showing that either u1 or u2 is adjacent to each node x ∈ MG(C). Assume x3∈ MG(C)\ NG(u2) andx4∈ MG(C)\ NG(u1) forcontradiction.Bytheclaimabove, u1x3 andu2x4areedgesof G.Weknowx3∈ N/ G(x4) orelseu1u2x4x3u1isa4-hole.See Fig. 4(a).Observethatx4cannotbeadjacenttobothofx1andx2orelseu1x1x4x2u1is a4-hole.Case 1:x4 isnotadjacent tox2.ByLemma 3.6(2),a nodeu3ofC isadjacent toallofx2,x3,andx4.Sinceu3 isadjacenttobothofx3andx4,wehaveu3∈ {u/ 1,u2}.

SeeFig. 4(b).Ifu2u3isanedgeofC,thenu1x3u3u2u1isa4-hole;otherwise,u2x2u3x4u2

is a4-hole, a contradiction.Case 2: x4 is notadjacent tox1.ByLemma 3.6(2),a node u3ofC isadjacenttoallof x1,x3,andx4.Sinceu3isadjacenttobothofx3 andx4,we haveu3∈ {u/ 1,u2}.SeeFig. 4(c).If u2u3 isanedge ofC,then u1x3u3u2u1 isa4-hole;

otherwise,u2x1u3x4u2 isa4-hole,a contradiction. 2 4. ProvingLemma 2.4

Subset S ofV (H) isastar-cutset [11]ofgraphH ifS⊆ NH[s] holdsforsomenode s of S and thenumberofconnectedcomponentsofH\ S islargerthanthatof H.


Lemma4.1. Foranytracker T = (H,u1u2u3) of ann-node m-edge beetle-freeconnected graph G, it takes O(mn3) time to complete one of the following three tasks. Task 1:

Ensuring that H contains even holes. Task 2: Ensuring that T is not lucky. Task 3:

Obtaining an induced subgraph H of H having no star-cutsetssuch that if T is lucky, thenH contains evenholes.

Lemma 4.2. It takes O(mn4) time to determine if an n-node m-edge graph having no star-cutsetscontainseven holes.

Proofof Lemma 2.4. Weapply Lemma 4.1 ontheinput trackerT = (H,u1u2u3) of G in O(mn3) time. If Task 1 or 2 is completed, then the lemma is proved. If Task 3 is completed,then sinceH hasnostar-cutsets, Lemma 4.2 impliesthatittakes O(mn4) time to determine whether H contains even holes. Since H is an induced subgraph of H,ifH containsevenholes,thenso doesH;otherwise,T isnotlucky. 2

Section4.1proves Lemma 4.1.Section4.2proves Lemma 4.2.

4.1. Proving Lemma 4.1

Astar-cutsetS ofgraphH is full ifS = NH[s] holdsforsomenodes ofS.Fullstar- cutsetsinan n-node m-edgegraphcanbe detected inO(mn) time. Nodex dominates node y ingraphH ifx= y and NH[y]⊆ NH[x].Nodey isdominated inH ifsomenode of H dominatesy in H.Weneedthefollowing threelemmasto proveLemma 4.1.

Lemma 4.3 (Chvátal [11, Theorem 1]). A graph having no dominated nodes and full star-cutsetshas nostar-cutsets.

Lemma 4.4. If T = (H,u1u2u3) isa tracker of an n-node m-edge beetle-freeconnected graph G, then ittakes O(mn2) time to obtain atracker T = (H,u1u2u3) of G, where H isaninducedsubgraphof H havingnodominatednodes,suchthatifT islucky,then soisT.

Proof. Wefirstprovethefollowingclaimforanybeetle-freegraphH:“Ifanodex of H dominates a node y ofa clean shortesteven hole C of H, then C = H[C∪ {x}\ {y}]

is a clean shortest even hole of H.” Let u andv be the neighbors of y onC. Since C is ahole and y ∈ C,we know x ∈ C,/ implying x ∈ NH(C).Since x dominates y and

|NC[y]| = 3, there is a connectedcomponent of C[NC(x)] havingat least 3 nodes.By Lemma 2.2, we have x ∈ NH3(C), implying NC(x) = {u,y,v}. Thus, C is a shortest even hole of H. Assume z ∈ MH(C)∪ NH2,2(C) for contradiction. By y ∈ NH3(C), z = y. By C\ {y} = C\ {x}, exactly one of x and y is adjacent to z in H or else z ∈ MH(C)∪ NH2,2(C), contradicting the fact thatC is clean. Case 1: z ∈ NH2,2(C).

If z ∈ NH(y)\ NH(x),then wehave z ∈ MH(C),contradicting theassumption thatC isacleanholeof H.If z∈ NH(x)\ NH(y),then z∈ NH1,2(C),contradictingLemma 2.2.


Fig. 5. An illustration for the proof ofLemma 4.4.

Case 2: z ∈ MH(C). By |NC(z)| ≥ 3 and Lemma 2.1, |NC(z)| ≥ 4. By MH(C) = NH2,2(C) = ∅ and Lemma 2.2, |NC(z)| ≤ 3. By C \ {x} = C \ {y}, we have z NH(x)\ NH(y),|NC(z)|= 3, and|NC(z)|= 4. ByLemma 2.2, z∈ NH3(C).SeeFig. 5 for anillustration.Thus, C[NC(z)] isa3-path,implyingthatH[C∪ {z}] isabeetleB of H in whichB[NB[z]] is adiamond,a contradiction.Theclaimisproved.

Thealgorithmfirstiterativelyupdates(H,u1u2u3) bythefollowingstepsuntilH has nodominated nodes,andthenoutputstheresulting(H,u1u2u3) as(H,u1u2u3):

Step 1: Let x andy betwonodesof H suchthatx dominatesy.

Step 2: Ifthereis ani∈ {1,2,3} withy = ui,then letui= x.

Step 3: Let H = H\ {y}.

It takes O(mn) timeto detect nodesx and y such thatx dominates y.Each iteration of the loop decreases |V (H)| by onevia Step 3.Therefore, the overall runningtime is O(mn2).GraphHisaninducedsubgraphoftheinitialH.Hhasnodominatednodes.It sufficestoensurethatifthetrackerT = (H,u1u2u3) of G atthebeginningofaniteration islucky,thenthetrackerattheendoftheiteration,denotedT= (H,u1u2u3),remains lucky.LetC beau1u2u3-holeof H.Ify /∈ C,thenC isau1u2u3-holeofH= H\{y}.If y ∈ C,thentheclaimaboveensuresthatC= H[C∪ {x}\ {y}] isaclean shortesteven holeof H. Sincex dominatesy, u1u2u3 isapathof holeC. Thus,C isau1u2u3-hole of H. Eitherway,(H,u1u2u3) islucky. 2

Lemma4.5.If(H,u1u2u3) isaluckytrackerofgraph G andS isafullstar-cutsetof H, then oneof thefollowingtwoconditions holds:

Condition B1: For each u1u2u3-hole C of H, there exists aconnected component B of H\ S satisfyingC⊆ H[B ∪ S].

Condition B2: There are two non-adjacent nodes s1 and s2 of S and two connected componentsB1 andB2 of H\ S with{s1,s2}⊆ NH(B1) and{s1,s2}⊆ NH(B2).


Proof. Let s be a node of S with NH[s] = S. Let C be a u1u2u3-hole of H. Assume thatCondition B1doesnothold withrespect toC. Thereexist twodistinct connected componentsB1 andB2 ofH\ S suchthatV (C)∩ V (B1)= ∅ andV (C)∩ V (B2)= ∅.

Thus,C[S] hasatleasttwoconnectedcomponents.Lets1ands2betwonodesindistinct connected componentsof C[S]. By{s1,s2}⊆ NH[s], we haves ∈ C or/ else s, s1, and s2 areinthesameconnectedcomponentofC[S].ByLemma 2.2,wehaves∈ NH1,1(C), implying{s1,s2}= V (C)∩S.Itfollowsthatboths1ands2areadjacenttobothB1and B2.LetpathsP1andP2bethetwoconnectedcomponentsofC\{s1,s2}.OneofP1and P2 hastobeinB1andtheotherofP1andP2 hastobeinB2.Therefore,Condition B2 holds. 2

ProofofLemma 4.1. LetT0 betheinitialgiventracker(H,u1u2u3) of G.Thealgorithm iteratively updates (H,u1u2u3) by the following three steps until Task 1, 2, or 3 is completed:

Step 1: Apply Lemma 4.4 in O(mn2) time on tracker T = (H,u1u2u3) to obtain a tracker T = (H,u1u2u3) of G, where H is an induced subgraph of H hav- ing no dominated nodes, such that if T is lucky, then so is T. Determine in O(mn) timewhetherHhasfullstar-cutsets.IfH hasfullstar-cutsets,thenlet (H,u1u2u3)= (H,u1u2u3) andproceed toStep 2;Otherwise, completeTask 3 byoutputtingH.

Step 2: Let S be a full star-cutset of H. If Condition B2 of Lemma 4.5 holds, then complete Task 1byoutputting thatG containseven holes.Otherwise,proceed to Step 3.

Step 3: Ifeitheroneof thefollowing statementshold forU ={u1,u2,u3}:

• U ⊆ S andaconnectedcomponentB ofH\ S isadjacenttobothu1andu3;

• U  S andU ⊆ B ∪ S holdsforaconnectedcomponentB ofH\ S,

thenletH = H[B∪ S] andproceedtothenextiterationoftheloop.Otherwise, complete Task 2byoutputtingthatT0 isnotlucky.

Step 1 does notincrease |V (H)|.If Step 3 updates H, then |V (H)| isdecreased byat least one, since H \ S has more than one connected component. The algorithm halts inO(n) iterations.Step 1 takes O(mn2) time.Step 2takes O(mn2) time:For anytwo non-adjacentnodes s1and s2 inS, ittakesO(m) timeto determinewhethers1 ands2

have two or more common neighboring connected components of H \ S. Step 3 takes O(m) time.TheoverallrunningtimeisO(mn3).

We first show the following claim for each iteration of the algorithm: “If the (H,u1u2u3) atthebeginningofaniterationisaluckytrackerof G,then(1) theinterme- diate(H,u1u2u3) throughouttheiterationremainsaluckytrackerof G,and(2) Step 3, ifreached,proceedstothenextiteration.” ItsufficestoconsiderthesituationthatStep 3 isreachedandfocusontheupdateoperationthatreplacesH withH[B∪ S] viaStep 3.

BydefinitionofStep 2,Condition B2doesnothold.ByLemma 4.5,Condition B1holds.


Fig. 6. An illustration for the proof ofLemma 4.1.

Thatis, someu1u2u3-holeC of H is inaconnectedcomponentB ofH \ S.Weprove theclaimbyshowingthatBhastobetheconnectedcomponentB ofH\ S inStep 3.

Since B = B holdstriviallyforthecase {u1,u2,u3} S,we assume{u1,u2,u3}⊆ S.

Ifs∈ C,thenexactlytwonodesofC areadjacenttos inH;andotherwise,Lemma 2.2 impliesthats hasatmostthreeneighborsof H inC.Eitherway,wehave|V (C)∩S|≤ 3.

Since u1u2u3 is apath of even hole C, nodes u1 and u3 are not adjacent inH. Since Condition B2 does not hold, at most one connected component of H \ S can be ad- jacent to both u1 and u3 in H. By V (C) ⊆ B ∪ S and |V (C)∩ S| ≤ 3, we have (NC(u1)∪ NC(u3))\ {u2}⊆ B,implyingB= B.Theclaimisproved.

For the correctnessof the algorithm,we consider the three possible stepsvia which the algorithm halts. Step 1: Since H has no dominated nodes and full-star-cutsets, Lemma 4.3impliesthatHhasnostar-cutsets.Bytheclaimabove,Task 3iscompleted.

Step 2: Condition B2 holds. Let P1 be a shortest path between s1 and s2 in H[B1 {s1,s2}]. Let P2 be a shortest path between s1 and s2 in H[B2 ∪ {s1,s2}]. Since s1

and s2 are not adjacent, at least oneof the three cycles of graph P1∪ P2∪ {ss1,ss2} is an even hole of H. Since H is an induced subgraph of G, G contains even holes.

See Fig. 6foran illustration.Task 1is completed.Step 3: By theclaim above,ifT0 is lucky, then Step 3 always proceeds to the next iteration of the loop. Thus, Task 2 is completed. 2

4.2. ProvingLemma 4.2

4.2.1. Extendedclique trees

GraphH isanextendedcliquetree[21]ifthereisasetS oftwoorlessnodesof H such thateach biconnectedcomponentofH\ S isaclique. da Silva and Vušković[21, §2.3]

describedan O(n5)-timealgorithmtodeterminewhetherann-nodeextendedcliquetree containseven holes,whichcanactuallybeimplementedtoruninO(n4) time.

Lemma 4.6. It takes O(n4) time to determine whether an n-node extended clique tree contains evenholes.

Proof. LetH0bethen-nodeextendedcliquetree.Letx andy betwonodesofH0 such thateachbiconnectedcomponentofH = H0\ {x,y} isaclique.Fornodesu andv of H,




Related subjects :