On Approximating Restricted Cycle Covers

Size: px
Start display at page:

Download "On Approximating Restricted Cycle Covers"

Transcription

1 On Approximting Restricted Cycle Covers Bodo Mnthey Universität zu Lüeck, Institut für Theoretische Informtik Rtzeurger Allee 160, Lüeck, Germny Astrct. A cycle cover of grph is set of cycles such tht every vertex is prt of exctly one cycle. An L-cycle cover is cycle cover in which the length of every cycle is in the set L. A specil cse of L-cycle covers re k-cycle covers for k N, where the length of ech cycle must e t lest k. The weight of cycle cover of n edge-weighted grph is the sum of the weights of its edges. We come close to settling the complexity nd pproximility of computing L-cycle covers. On the one hnd, we show tht for lmost ll L, computing L-cycle covers of mximum weight in directed nd undirected grphs is APX-hrd nd NP-hrd. Most of our hrdness results hold even if the edge weights re restricted to zero nd one. On the other hnd, we show tht the prolem of computing L-cycle covers of mximum weight cn e pproximted with fctor 2.5 for undirected grphs nd with fctor 3 in the cse of directed grphs. Finlly, we show tht 4-cycle covers of mximum weight in grphs with edge weights zero nd one cn e computed in polynomil time. As y-product, we show tht the prolem of computing minimum vertex covers in λ-regulr grphs is APX-complete for every λ 3. 1 Introduction The trvelling slesmn prolem (TSP) is perhps the est-known comintoril optimistion prolem. An instnce of the TSP is complete grph with edge weights, nd the im is to find minimum or mximum weight cycle tht visits every vertex exctly once. Such cycle is clled Hmiltonin cycle. Since the TSP is NP-hrd [10, ND22+23], we cnnot hope to lwys find n optiml cycle efficiently. For prcticl purposes, however, it is often sufficient to otin cycle tht is close to optiml. In such cses, we require pproximtion lgorithms, i.e. polynomil-time lgorithms tht compute such ner-optiml cycles. The prolem of computing cycle covers is relxtion of the TSP: A cycle cover of grph is spnning sugrph such tht every vertex is prt of exctly one simple cycle. Thus, solution to the TSP is cycle cover consisting of single cycle. In nlogy to the TSP, the weight of cycle cover in n edge-weighted grph is the sum of the weights of its edges. A full version of this work is ville t Supported y DFG reserch grnt RE 672/3. 3rd Workshop on Approximtion nd Online Algo. (WAOA 2005) c Springer

2 In contrst to the TSP, cycle covers of mximum weight cn e computed efficiently. This fct is exploited in pproximtion lgorithms for the TSP; the computtion of cycle covers forms the sis for the currently est known pproximtion lgorithms for mny vritions of the TSP. These lgorithms usully strt y computing n initil cycle cover nd then join cycles to otin Hmiltonin cycle. Short cycles in cycle cover limit the pproximtion rtios chieved y such lgorithms. In generl, the longer the cycles in the initil cover re, the etter the pproximtion rtio. Thus, we re interested in computing cycle covers without short cycles. Moreover, there re pproximtion lgorithms tht ehve prticulrly well if the cycle covers tht re computed do not contin cycles of odd length [6]. Finlly, some so-clled vehicle routing prolems (cf. e.g. Hssin nd Ruinstein [12]) require covering vertices with cycles of ounded length. Therefore, we consider restricted cycle covers, where cycles of certin lengths re ruled out priori: Let L N, then n L-cycle cover is cycle cover in which the length of ech cycle is in L. To fthom the possiility of designing pproximtion lgorithms sed on computing cycle covers, we im to chrcterise the sets L for which L-cycle covers of mximum weight cn e computed efficiently. 1.1 Preliminries A cycle cover of grph G = (V, E) is sugrph of G tht consists solely of cycles such tht ll vertices in V re prt of exctly one cycle. The length of cycle is the numer of edges it consists of. We re concerned with simple grphs, i.e. the grphs do not contin multiple edges or loops. Thus, the shortest cycles of undirected nd directed grphs hve length three nd two, respectively. An L-cycle cover is cycle cover in which the length of every cycle is in the set L N. For undirected grphs, we hve L U = {3, 4, 5,...}, while L D = {2, 3, 4,...} in cse of directed grphs. A k-cycle cover is {k, k + 1,...}-cycle cover. Let L = U \ L in the cse of undirected grphs nd L = D \ L in the cse of directed grphs (this will e cler from the context). Given n edge weight function w : E N, the weight w(c) of suset C E of the edges of G is w(c) = e C w(e). This prticulrly defines the weight of cycle cover since we view cycle covers s sets of edges. Let U V e ny suset of the vertices of G. The internl edges of U re ll edges of G tht hve oth vertices in U. We denote y w U (C) the sum of the weights of ll internl edges of U in C. The externl edges t U re ll edges of G with exctly one vertex in U. For L U, the set L-UCC contins ll undirected grphs tht hve n L-cycle cover s spnning sugrph. Mx-L-UCC is the following optimistion prolem: Given complete undirected grph with edge weights zero nd one, find n L-cycle cover of mximum weight. We cn lso consider the grph s eing not complete nd without edge weights. Then we try to find n L-cycle cover with minimum numer of nonedges ( non-edges correspond to weight zero edges, edges to weight one edges). Thus, Mx-L-UCC cn e viewed s generlistion of L-UCC.

3 Mx-W-L-UCC is the prolem of finding mximum-weight L-cycle covers in grphs with ritrry non-negtive edge weights. For k 3, k-ucc, Mx-k-UCC, nd Mx-W-k-UCC re defined like L-UCC, Mx-L-UCC nd Mx-W-L-UCC except tht k-cycle covers insted of L-cycle covers re sought. L-DCC, Mx-L-DCC, Mx-W-L-DCC, k-dcc, Mx-k-DCC, nd Mx-W-k-DCC re defined for directed grphs like L-UCC, Mx-L-UCC, Mx-W-L-UCC, k-ucc, Mx-k-UCC, nd Mx-W-k-UCC for undirected grphs except tht L D nd k 2. An instnce of Min-Vertex-Cover is n undirected grph H = (X, F ). A vertex cover of H is suset X X such tht t lest one vertex of every edge in F is in X. The im is to find vertex cover of minimum crdinlity. Min-Vertex-Cover(λ) is Min-Vertex-Cover restricted to λ-regulr grphs, i.e. to simple grphs in which every vertex is incident to exctly λ edges. Alredy Min-Vertex-Cover(3) is APX-complete [2]. We refer to Ausiello et l. [3] for survey on NP optimistion prolems. 1.2 Existing Results Undirected Grphs. U-UCC, Mx-U-UCC, nd Mx-W-U-UCC cn e solved in polynomil time vi reduction to the clssicl perfect mtching prolem, which cn e solved in polynomil time [1, Chp. 12]. Hrtvigsen presented polynomil-time lgorithm for computing mximum-crdinlity tringle-free two-mtching [11] (see lso Sect. 5). His lgorithm cn e used to decide 4-UCC in polynomil time. Furthermore, it cn e used to pproximte Mx-4-UCC within n dditive error of one ccording to Bläser [4]. Mx-W-k-UCC dmits simple fctor 3/2 pproximtion for ll k: Compute mximum weight cycle cover, rek the lightest edge of ech cycle, nd join the cycles to otin Hmiltonin cycle, which is sufficiently long if the grph contins t lest k vertices. Unfortuntely, this lgorithm cnnot e generlised to work for Mx-W-L-UCC with ritrry L. For the prolem of computing k- cycle covers of minimum weight in grphs with edge weights one nd two, there exists fctor 7/6 pproximtion lgorithm for ll k [8]. Cornuéjols nd Pulleylnk presented proof due to Ppdimitriou tht 6- UCC is NP-complete [9]. Vornerger showed tht Mx-W-5-UCC is NP-hrd [14]. For k 7, Mx-k-UCC nd Mx-W-k-UCC re APX-complete [5]. Hell et l. [13] proved tht L-UCC is NP-hrd for L {3, 4}. For most L, L-UCC, Mx-L-UCC, nd Mx-W-L-UCC re not even recursive since there re uncountly mny L. Thus for most L, L-UCC is not in NP nd Mx-L-UCC nd Mx-W-L-UCC re not in NPO. This does not mtter for hrdness results ut my cuse prolems when one wnts to design pproximtion lgorithms tht se on computing L-cycle covers. However, our pproximtion lgorithms work for ritrry L, independently of the complexity of L. Directed Grphs. D-DCC, Mx-D-DCC, nd Mx-W-D-DCC cn e solved in polynomil time y reduction to the mximum weight perfect mtching prolem

4 L-UCC Mx-L-UCC Mx-W-L-UCC L = in P in PO in PO L = {3} in P in PO L = {4} L = {3, 4} APX-complete else NP-hrd APX-hrd APX-hrd () Undirected cycle covers. L-DCC Mx-L-DCC Mx-W-L-DCC L = {2} L = D in P in PO in PO else NP-hrd APX-hrd APX-hrd () Directed cycle covers. Tle 1. The complexity of computing L-cycle covers. in iprtite grphs [1, Chp. 12]. But lredy 3-DCC is NP-complete [10, GT13]. Mx-k-DCC nd Mx-W-k-DCC re APX-complete for ll k 3 [5]. Similr to the fctor 3/2 pproximtion lgorithm for undirected cycle covers, Mx-W-k-DCC hs simple fctor 2 pproximtion lgorithm for ll k: Compute mximum weight cycle cover, rek the lightest edge of every cycle, nd join the cycles to otin Hmiltonin cycle. Agin, this lgorithm cnnot e generlised to work for Mx-W-L-DCC with ritrry L. There re fctor 4/3 pproximtion lgorithm for Mx-W-3-DCC [7] nd fctor 3/2 pproximtion lgorithm for Mx-k-DCC for k 3 [5]. As in the cse of cycle covers in undirected grphs, for most L, L-DCC, Mx-L-DCC, nd Mx-W-L-DCC re not recursive. 1.3 New Results We come close to settling the complexity nd pproximility of restricted cycle covers. Only the complexity of the five prolems 5-UCC, {4}-UCC Mx-5-UCC, Mx-{4}-UCC, nd Mx-W-4-UCC remins open. Tle 1 shows n overview on the complexity of computing restricted cycle covers. Hrdness Results. We prove tht Mx-L-UCC is APX-hrd for ll L with L {3, 4} (Sect. 3). We lso prove tht Mx-W-L-UCC is APX-hrd if L {3} (this follows from the results of Sect. 3 nd the APX-completeness of Mx-W-5-UCC nd Mx-W-{4}-UCC shown in Sect. 2). The hrdness results for Mx-W-L- UCC hold even if we llow only the edge weights zero, one, nd two. We show dichotomy for cycle covers of directed grphs: For ll L with L {2} nd L D, L-DCC is NP-hrd (Theorem 6) nd Mx-L-DCC nd Mx-W-L-DCC re APX-hrd (Theorem 5), while it is known tht ll three prolems re solvle in polynomil time if L = {2} or L = D. To show the hrdness of directed cycle covers, we show tht certin kinds of grphs, clled L-clmps, exist for non-empty L D if nd only if L D (Theorem 4). This grph-theoreticl result might e of independent interest.

5 As y-product, we prove tht Min-Vertex-Cover(λ) is APX-complete for ll λ 3 (Sect. 6). We need this result for the APX-hrdness proofs in Sect. 3. Algorithms. We present polynomil-time fctor 2.5 pproximtion lgorithm Mx-W-L-UCC nd fctor 3 pproximtion lgorithm for Mx-W-L-DCC (Sect. 4). Both lgorithms work for ritrry L. Finlly, we prove tht Mx-4-UCC is solvle in polynomil time (Sect. 5). 2 A Generic Reduction for L-Cycle Covers In this section, we present generic reduction from Min-Vertex-Cover(3) to Mx- L-UCC or Mx-W-L-UCC. To instntite the reduction for certin L, we use smll grph, which we cll gdget, the specific structure of which depends on L. Such gdget together with the generic reduction is n L-reduction from Min- Vertex-Cover(3) to Mx-L-UCC or Mx-W-L-UCC. The mere im is to prove the APX-hrdness of Mx-W-{4}-UCC nd Mx-W-5-UCC. 2.1 The Generic Reduction Let H = (X, F ) e cuic grph with vertex set X nd edge set F s n instnce of Min-Vertex-Cover(3). Let n = X nd m = F = 3n/2. We construct n undirected complete grph G with edge weight function w s generic instnce of Mx-L-UCC or Mx-W-L-UCC. For ech edge = {x, y} F, we construct sugrph F of G clled the gdget of. We define F s set of vertices, thus w F (C) for suset C of the edges of G is well defined. This gdget contins four distinguished vertices x in, x out, y in, nd y out. These four vertices re used to connect F to the rest of the grph. Wht such gdget looks like depends on L. If ll edges in such gdget hve weight zero or one, we otin n instnce of Mx-L-UCC since ll edges etween different gdgets will hve weight zero or one. Otherwise, we hve n instnce of Mx-W-L-UCC. Figure 2 shows n exmple of such gdget. Let,, c F e the three edges incident to vertex x X (the order is ritrry). Then we ssign weight one to the edges connecting x out to x in nd x out to x in c nd weight zero to the edge connecting x out c to x in. We cll the three edges {x out, x in }, {xout, x in c }, nd {x out c, x in } the junctions of x. We sy tht {x out, x in } nd {xout c, x in } re the junctions of x t F. Figure 1 shows n exmple. We cll n edge illegl if it connects two different gdgets ut is not junction. Thus, n illegl edge is n externl edge t two different gdgets. All illegl edges hve weight zero, i.e. there re no edges of weight one tht connect two different gdgets except for the junctions. The weights of the internl edges of the gdgets depend on the gdget, which in turn depends on L. The following terms re defined for ritrry susets C of the edges of G, nd so in prticulr for L-cycle covers. We sy tht C leglly connects F if C contins no illegl edges incident to F,

6 y x y c y () Vertex x nd its edges. x in y in F x out y out x in y in F x out y out x in c y in c F c x out c y out c () The gdgets F, F, nd F c nd their connections vi the three junctions of x. The dshed edge hs weight zero. Other weight zero edges nd the junctions of y, y, nd y re not shown. Fig. 1. The construction for vertex x X incident to,, c F. C contins exctly two or four junctions t F, nd if C contins exctly two junctions t F, then these elong to the sme vertex x. We cll C legl if C leglly connects ll gdgets. If C is legl, then for ll x X, either ll junctions of x re in C or no junction of x is in C. Furthermore, from legl set C we otin vertex cover X = {x the junctions of x re in C}. Let us now define the requirements the gdgets must fulfil. In the following, let C e n ritrry L-cycle cover of G nd = {x, y} F e n ritrry edge of H. R0: There exists fixed numer s N, which we cll the gdget prmeter, tht depends only on the gdget. The role of the gdget prmeter will ecome cler in the susequent requirements. R1: w F (C) s 1. R2: If C contins 2α externl edges t F, then w F (C) s α. R3: If C contins exctly one junction of x t F nd exctly one junction of y t F, then w F (C) s 2. (In this cse, C does not leglly connect F.) R4: Let C e n ritrry suset of the edges of G tht leglly connects F. Assume tht there re 2α junctions (α {1, 2}) t F in C. Then there exists C with the following properties: C differs from C only in F s internl edges nd w F (C ) = s α. Thus, given C, C cn e otined y loclly modifying C within F. We cll the process of otining C from C rerrnging C in F. R5: Let C e legl suset of the edges of G. Then there exists suset C of edges otined y rerrnging ll gdgets s descried in R4 such tht C is n L-cycle cover. The requirements ssert tht connecting the gdgets leglly is never worse thn connecting them illeglly. This yields the min result of this section. Lemm 1. Assume tht gdget s descried exists for L U. Then the reduction presented is n L-reduction from Min-Vertex-Cover(3) to Mx-W-L-UCC. If the gdget contins only edges of weight zero or one, then the reduction is n L-reduction from Min-Vertex-Cover(3) to Mx-L-UCC.

7 x in x out y in y out Fig. 2. The edge gdget F for n edge = {x, y} tht is used to prove the APXcompleteness of Mx-W-5-UCC. Bold edges re internl edges of weight two, solid edges re internl edges of weight one, internl edges of weight zero re not shown. The dshed nd dotted edges re the junctions of x nd y, respectively, t F. () x X. () y X. (c) x, y X. Fig. 3. Trversls of the gdget for Mx-W-5-UCC tht chieve mximum weight. 2.2 Mx-W-5-UCC nd Mx-W-{4}-UCC The gdget for Mx-W-5-UCC is shown in Fig. 2. Let G e the grph constructed vi the reduction presented in Sect. 2.1 with the gdget of this section. Let C e n ritrry L-cycle cover of G nd = {x, y} F. By proving tht it fulfils ll requirements, we otin the following result. Theorem 1. Mx-W-5-UCC is APX-hrd, even if the edge weights re restricted to e zero, one, or two. Although the sttus of Mx-5-UCC is still open, llowing only one dditionl edge weight of two lredy yields n APX-complete prolem. The generic reduction together with the gdget used for Mx-W-5-UCC works lso for Mx-W-{4}-UCC. The gdget only requires tht cycles of length four re foridden since otherwise R1 is not stisfied. Thus, ll requirements re fulfilled for Mx-W-{4}-UCC in exctly the sme wy s for Mx-W-5-UCC. Theorem 2. Mx-W-{4}-UCC is APX-hrd, even if the edge weights re restricted to e zero, one, or two. 3 A Uniform Reduction for L-Cycle Covers 3.1 Clmps We now define so-clled clmps, which were introduced y Hell et l. [13]. Clmps re crucil for the hrdness proof presented in this section. Let K = (V, E) e n undirected grph, let u, v V e two vertices of K, nd let L U. We denote y K u nd K v the grphs otined from K y deleting u nd v, respectively, nd their incident edges. Moreover, K u v denotes the

8 v } {{ } Λ 3 vertices u Fig. 4. An L-clmp for finite L with mx(l) = Λ. grph otined from K y deleting oth u nd v. Finlly, for k N, K k is the following grph: Let y 1,..., y k e vertices with y i / V, dd edges {u, y 1 }, {y i, y i+1 } for 1 i k 1, nd {y k, v}. For k = 0, we directly connect u to v. The grph K is clled n L-clmp if the following properties hold: Both K u nd K v contin n L-cycle cover. Neither K nor K u v nor K k for ny k N contins n L-cycle cover. We cll u nd v the connectors of the L-clmp K. Lemm 2 (Hell et l. [13]). Let L U e non-empty. Then there exists n L-clmp if nd only if L {3, 4}. Figure 4 shows n exmple of n L-clmp for finite L. If there exists n L-clmp for some L, then we cn ssume tht the connectors u nd v oth hve degree two since we cn remove ll edges tht re not used in the L-cycle covers of K v nd K u. For our purpose, consider ny non-empty set L {3, 4, 5,...} with L {3, 4}. We fix one L-clmp K with connectors u, v V ritrrily nd refer to it in the following s the L-clmp, lthough there exists more thn one L-clmp. Let σ e the numer of vertices of K. We re concerned with edge-weighted grphs. Therefore, we trnsfer the notion of clmps to grphs with edge weights zero nd one in the ovious wy: Let G e n undirected complete grph with vertex set V nd edge weights zero nd one nd let K e n L-clmp. Let U V. We sy tht U is n L-clmp with connectors u, v U if the sugrph of G induced y U restricted to the edges of weight one is isomorphic to K with u nd v mpped to connectors of K. 3.2 The Reduction Let L U e non-empty with L {3, 4}. Thus, L-clmps exist nd we fix one s in the previous section. Let σ e the numer of vertices in the L-clmp. Let λ = min(l). (This choice is ritrry. We could choose ny numer in L.) We will reduce Min-Vertex-Cover(λ) to Mx-L-UCC. Min-Vertex-Cover(λ) is APX-complete since λ 3 (see Sect. 6). Let H = (X, F ) e n instnce of Min-Vertex-Cover(λ) with n = X vertices nd m = F = λn/2 edges. Our instnce G for Mx-L-UCC consists of λ sugrphs G 1,..., G λ, ech contining 2σm vertices. We strt y descriing G 1.

9 X 1 Y 1 x 1 z 1 p 1 y 1 q 1 t 1 Fig. 5. The edge gdget for = {x, y} consisting of two L-clmps. The vertex z 1 is the only vertex tht elongs to oth clmps X 1 nd Y 1. Then we stte the differences etween G 1 nd G 2,..., G λ nd sy to which edges etween these grphs we ssign weight one. Let = {x, y} F e ny edge of H. We construct n edge gdget F for tht consists of two L-clmps X 1 nd Y 1 nd one dditionl vertex t 1 s shown in Fig. 5. The connectors of X 1 re x 1 nd z 1 while the connectors of Y 1 re y 1 nd z, 1 i.e. X 1 nd Y 1 shre the connector z. 1 Let p 1 nd q 1 e the two unique vertices in Y 1 tht shre weight one edge with z. 1 (The choice of Y 1 is ritrry, we could choose the corresponding vertices in X 1 s well.) We ssign weight one to oth {p 1, t 1 } nd {q, 1 t 1 }. Thus, the vertex t 1 cn lso serve s connector for Y 1. Now let x X e ny vertex of H nd let 1,..., λ F e the λ edges tht re incident to x. We connect the vertices x 1 1,..., x 1 λ to form pth y ssigning weight one to the edges {x 1 η, x 1 η+1 } for η {1,..., λ 1}. Together with edge {x 1 λ, x 1 1 }, these edges form cycle of length λ L, ut note tht w({x 1 λ, x 1 1 }) = 0. These λ edges re clled the junctions of x. The junctions t F for some = {x, y} F re the junctions of x nd y tht re incident to F. Overll, the grph G 1 consists of 2σm vertices since every edge gdget consists of 2σ vertices. The grphs G 2,..., G λ re lmost exct copies of G 1. The grph G ξ, ξ {2,..., λ} hs clmps X ξ nd Y ξ nd vertices x ξ, y, ξ z, ξ t ξ, p ξ, q ξ for ech edge = {x, y} F, just s ove. The edge weights re lso identicl with the single exception tht the edge {x ξ λ, x ξ 1 } lso hs weight one. Note tht we only use the term gdget for the sugrphs of G 1 defined ove lthough lmost the sme sugrphs occur in G 2,..., G λ s well. Similrly, the term junction refers only to n edge in G 1 s defined ove. Finlly, we descrie how to connect G 1,..., G λ with ech other. For every edge F, there re λ vertices t 1,..., t λ. These re connected to form cycle consisting solely of weight one edges, i.e. we ssign weight one to ll edges {t ξ, t ξ+1 } for ξ {1,..., λ 1} nd to {t λ, t 1 }. Figure 6 shows n exmple of the whole construction from the viewpoint of single vertex. As in the previous section, we cll edges tht re not junctions ut connect two different gdgets illegl. Edges with oth vertices in the sme gdget re gin clled internl edges. In ddition to junctions, illegl edges, nd internl edges, we hve fourth kind of edges: The t-edges of F for F re the two edges {t 1, t 2 } nd {t 1, t λ }. The t-edges re not illegl. All other edges connecting G 1 to G ξ for ξ 1 re illegl.

10 F F F c x 1 t 1 y 1 x 1 t 1 y 1 x 1 c t 1 c y 1 c x 2 t 2 y 2 x 2 t 2 y 2 x 2 c t 2 c y 2 c x 3 t 3 y 3 x 3 t 3 y 3 x 3 c t 3 c y 3 c Fig. 6. The construction for vertex x X incident to edges,, c F for λ = 3 (Fig. 1() on pge 6 shows the corresponding grph). The drk grey res re the edge gdgets F, F, nd F c. Their copies in G 2 nd G 3 re light grey. The cycles connecting the t-vertices re dotted. The cycles connecting the x-vertices re solid, except for the edge {x 1 c, x 1 }, which hs weight zero nd is dshed. The vertices z, 1..., zc 3 re not shown for legiility. Let C e ny suset of the edges of the grph G thus constructed, nd let = {x, y} F e n ritrry edge of H. We sy tht C leglly connects F if the following properties re fulfilled: C contins no illegl edges incident to F nd exctly two or four junctions t F. If C contins exctly two junctions t F, then these elong to the sme vertex nd there re two t-edges t F in C. If C contins four junctions t F, then these re the only externl edges in C incident to F. In prticulr, C does not contin t-edges t F. We cll C legl if C leglly connects ll gdgets. We cn prove tht the construction descried ove is n L-reduction from Min-Vertex-Cover(λ) to Mx-L-UCC for ll L with L {3, 4}. Theorem 3. For ll L U with L {3, 4}, Mx-L-UCC is APX-hrd. 3.3 Clmps in Directed Grphs The im of this section is to introduce directed L-clmps. Let K = (V, E) e directed grph nd u, v V. Agin, K u, K v, nd K u v denote the grphs otined y deleting u, v, nd oth u nd v, respectively. For k N, Ku k denotes the following grph: Let y 1,..., y k / V e new vertices nd dd edges (u, y 1 ), (y 1, y 2 ),..., (y k, v). For k = 0, we dd the edge (u, v). The grph Kv k is similrly defined, except tht we now strt t v, i.e. we dd the edges (v, y 1 ), (y 1, y 2 ),..., (y k, u). Kv 0 is K with the dditionl edge (v, u). Now we cn define clmps for directed grphs: Let L D. A directed grph K = (V, E) with u, v V is directed L-clmp with connectors u nd v if the following properties hold:

11 Both K u nd K v contin n L-cycle cover. Neither K nor K u v nor K k u nor K k v for ny k N contins n L-cycle cover. Theorem 4. Let L D e non-empty. Then there exists directed L-clmp if nd only if L D. 3.4 L-Cycle Covers in Directed Grphs From the hrdness results in the previous sections nd the work y Hell et l. [13], we otin the NP-hrdness nd APX-hrdness of L-DCC nd Mx- L-DCC, respectively, for ll L with 2 / L nd L {2, 3, 4}: We use the sme reduction s for undirected cycle covers nd replce every undirected edge {u, v} y pir of directed edges (u, v) nd (v, u). However, this does not work if 2 L nd lso leves open the cses when L {2, 3, 4}. We will show tht L = {2} nd L = D re the only cses in which directed L-cycle covers cn e computed efficiently y proving the NP-hrdness of L-DCC nd the APX-hrdness of Mx- L-DCC for ll other L. Thus, we settle the complexity for directed grphs. The APX-hrdness of the directed cycle cover prolem is otined y proof similr to the proof for undirected cycle covers. All we need is λ L with λ 3 nd the existence of n L-clmp. Theorem 5. Let L D e non-empty set. If L {2} nd L D, then Mx-L-DCC nd Mx-W-L-DCC re APX-hrd. We cn lso prove tht for ll L / {{2}, D}, L-DCC is NP-hrd. Theorem 6. Let L D e non-empty set. If L {2} nd L D, then L-DCC is NP-hrd. Let L / {{2}, D}. L-DCC is in NP nd therefore NP-complete if nd only if the lnguge {1 λ λ L} is in NP. 4 Approximtion Algorithms The gol of this section is to devise pproximtion lgorithms for Mx-W-L- UCC nd Mx-W-L-DCC tht work for ritrry L. The ctch is tht for most L it is impossile to decide whether some cycle length is in L or not. One possiility would e to restrict ourselves to sets L such tht {1 λ λ L} is in P. For such L, Mx-W-L-UCC nd Mx-W-L-DCC re NP optimistion prolems. Another possiility for circumventing the prolem is to include the permitted cycle lengths in the input. However, it turns out tht such restrictions re not necessry since we cn restrict ourselves to finite sets L. A necessry nd sufficient condition for complete grph with n vertices to hve n L-cycle cover is tht there exist (not necessrily distinct) lengths λ 1,..., λ k L for some k N with k i=1 λ i = n. We cll such n n L- dmissile nd define L = {n n is L-dmissile}.

12 Input: n undirected grph G = (V, U(V )) with V = n; n edge weight function w : U(V ) N Output: n L-cycle cover C px of G if n is L-dmissile, otherwise 1. If n / L, then return. 2. Compute cycle cover C init of mximum weight. 3. Compute suset P C init of mximum weight such tht (V, P ) consists of n/5 pths of length two nd n 3 n/5 isolted vertices. 4. Join the pths to otin n L-cycle cover C px, return C px. Fig. 7. A fctor 2.5 pproximtion lgorithm for Mx-W-L-UCC. Lemm 3. For ll L N, there exists finite set L L with L = L. Insted of computing L -cycle covers in the following, we ssume without loss of generlity tht L is lredy finite set. The min ide of the two pproximtion lgorithms is s follows: We strt y computing cycle cover C init of mximum weight. Then we tke suset S of the edges of C init tht weighs s much s possile under the restriction tht there exists n L-cycle cover tht includes ll edges of S. We dd edges to otin n L-cycle cover C px S. Let C e n L-cycle cover of mximum weight, nd ssume tht we cn gurntee ρ w(s) w(c init ) for some ρ 1. Then w(c ) w(c init ) ρ w(s) ρ w(c px ). Thus, we hve computed fctor ρ pproximtion to n L-cycle cover of mximum weight. 4.1 Approximting Undirected Cycle Covers The input of our lgorithm for undirected grphs is n undirected complete grph G = (V, U(V )) with V = n nd n edge weight function w : U(V ) N. The min ide of the pproximtion lgorithm is s follows: Every cycle cover cn e decomposed into n/5 vertex-disjoint pths of length two nd n 3 n/5 isolted vertices. Conversely, every collection P of n/5 pths of length two together with n 3 n/5 isolted vertices cn e extended to form n L-cycle cover, provided tht n is L-dmissile. Theorem 7. For every fixed L, the lgorithm shown in Fig. 7 is fctor 2.5 pproximtion lgorithm for Mx-W-L-UCC with running time O(n 3 ). 4.2 Approximting Directed Cycle Covers Now we present n pproximtion lgorithm for Mx-W-L-DCC tht chieves n pproximtion rtio of 3. The input consists of directed complete grph G = (V, D(V )) with V = n nd n edge weight function w : D(V ) N. Given cycle cover C, we cn otin mtching M C consisting of n/3 edges such tht w(m) w(c)/3. Conversely, if n is L-dmissile, then every mtching of crdinlity n/3 cn e extended to form n L-cycle cover.

13 Input: directed grph G = (V, D(V )) with V = n; n edge weight function w : D(V ) N Output: n L-cycle cover C px of G if n is L-dmissile, otherwise 1. If n / L, then return. 2. Compute mximum weight mtching M init of G of crdinlity n/3. 3. Join the edges in M init to otin n L-cycle cover C px, return C px. Fig. 8. A fctor 3 pproximtion lgorithm for Mx-W-L-DCC. Insted of computing n initil cycle cover, the lgorithm shown in Fig. 8 directly computes mtching of crdinlity n/3. Theorem 8. For every fixed L, the lgorithm shown in Fig. 8 is fctor 3 pproximtion lgorithm for Mx-W-L-UCC with running time O(n 3 ). 5 Solving Mx-4-UCC in Polynomil Time The im of this section is to show tht Mx-4-UCC cn e solved deterministiclly in polynomil time. To do this, we exploit Hrtvigsen s lgorithm for computing mximum-crdinlity tringle-free two-mtching. A two-mtching of n undirected grph G is spnning sugrph in which every vertex of G hs degree t most two. Thus, two-mtchings consist of disjoint simple cycles nd pths. A two-mtching is relxtion of cycle cover (or two-fctor): In cycle cover, every vertex hs degree exctly two. A tringlefree two-mtching is two-mtching in which ech cycle hs length of t lest four. The pths cn hve ritrry lengths. A tringle-free two-mtching of mximum weight in grphs with edge weights zero nd one cn e computed deterministiclly in time O(n 3 ), where n is the numer of vertices [11, Chp. 3]. We wnt to solve Mx-4-UCC, i.e. ll cycles must hve length of t lest four nd no pths re llowed. Therefore, let M e mximum weight tringlefree two-mtching of grph G of n vertices. If M does not contin ny pths, then M is lredy 4-cycle cover of mximum weight. Let l e the numer of vertices of G tht lie on pths in M. If l 4, then we connect these pths to get cycle of length l. No weight is lost in this wy, nd the result is mximum weight 4-cycle cover. We run into troule if l {1, 2, 3}. Let Y = {y 1,..., y l } e the set of vertices tht lie on pths in M. Let l e the numer of edges of weight one in M tht connect two vertices of Y. Then 0 l l 1 nd w(m) = n l + l n 1. An ovious wy to otin cycle cover from M is to rek one edge of one cycle nd connect the vertices of Y to this cycle. Unfortuntely, reking n edge might cuse loss of weight one. This yields the forementioned pproximtion within n dditive error of one. We cn prove the following with more creful nlysis: Either we cn void the loss of weight one, or indeed mximum weight 4-cycle cover hs only weight w(m) 1. This yields the following result.

14 Theorem 9. Mx-4-UCC cn e solved deterministiclly in time O(n 3 ). 6 Vertex Cover in Regulr Grphs We cn prove tht Min-Vertex-Cover(λ) is APX-complete for every λ 3. Previously, this ws only known for cuic, i.e. three-regulr, grphs [2]. We need the APX-hrdness of Min-Vertex-Cover(λ) for ll λ 3 in Sect. 3. Theorem 10. For every λ N, λ 3, Min-Vertex-Cover(λ) is APX-complete. References 1. Rvindr K. Ahuj, Thoms L. Mgnnti, nd Jmes B. Orlin. Network Flows: Theory, Algorithms, nd Applictions. Prentice-Hll, Pol Alimonti nd Viggo Knn. Some APX-completeness results for cuic grphs. Theoret. Comput. Sci., 237(1 2): , Giorgio Ausiello, Pierluigi Crescenzi, Giorgio Gmosi, Viggo Knn, Alerto Mrchetti-Spccmel, nd Mrco Protsi. Complexity nd Approximtion: Comintoril Optimiztion Prolems nd Their Approximility Properties. Springer, Mrkus Bläser. Approximtionslgorithmen für Grphüerdeckungsproleme. Hilittionsschrift, Institut für Theoretische Informtik, Universität zu Lüeck, Lüeck, Germny, Mrkus Bläser nd Bodo Mnthey. Approximting mximum weight cycle covers in directed grphs with weights zero nd one. Algorithmic, 42(2): , Mrkus Bläser, Bodo Mnthey, nd Jiří Sgll. An improved pproximtion lgorithm for the symmetric TSP with strengthened tringle inequlity. J. Discrete Algorithms, to pper. 7. Mrkus Bläser, L. Shnkr Rm, nd Mxim I. Sviridenko. Improved pproximtion lgorithms for metric mximum ATSP nd mximum 3-cycle cover prolems. In Proc. of the 9th Workshop on Algorithms nd Dt Structures (WADS), vol of Lecture Notes in Comput. Sci., pp Springer, Mrkus Bläser nd Bodo Sieert. Computing cycle covers without short cycles. In Proc. of the 9th Ann. Europen Symp. on Algorithms (ESA), vol of Lecture Notes in Comput. Sci., pp Springer, Bodo Sieert is the irth nme of Bodo Mnthey. 9. Gérrd P. Cornuéjols nd Willim R. Pulleylnk. A mtching prolem with side conditions. Discrete Mth., 29(2): , Michel R. Grey nd Dvid S. Johnson. Computers nd Intrctility: A Guide to the Theory of NP-Completeness. W. H. Freemn nd Compny, Dvid Hrtvigsen. An Extension of Mtching Theory. PhD thesis, Deprtment of Mthemtics, Crnegie Mellon University, Refel Hssin nd Shlomi Ruinstein. On the complexity of the k-customer vehicle routing prolem. Oper. Res. Lett., 33:1, Pvol Hell, Dvid G. Kirkptrick, Jn Krtochvíl, nd Igor Kríz. On restricted two-fctors. SIAM J. Discrete Mth., 1(4): , Oliver Vornerger. Esy nd hrd cycle covers. Technicl report, Universität/Gesmthochschule Pderorn, 1980.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of

More information

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997.

F. R. K. Chung y. University ofpennsylvania. Philadelphia, Pennsylvania R. L. Graham. AT&T Labs - Research. March 2,1997. Forced convex n-gons in the plne F. R. K. Chung y University ofpennsylvni Phildelphi, Pennsylvni 19104 R. L. Grhm AT&T Ls - Reserch Murry Hill, New Jersey 07974 Mrch 2,1997 Astrct In seminl pper from 1935,

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

A dual of the rectangle-segmentation problem for binary matrices

A dual of the rectangle-segmentation problem for binary matrices A dul of the rectngle-segmenttion prolem for inry mtrices Thoms Klinowski Astrct We consider the prolem to decompose inry mtrix into smll numer of inry mtrices whose -entries form rectngle. We show tht

More information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Adm Sheffer. Office hour: Tuesdys 4pm. dmsh@cltech.edu TA: Victor Kstkin. Office hour: Tuesdys 7pm. 1:00 Mondy, Wednesdy, nd Fridy. http://www.mth.cltech.edu/~2014-15/2term/m006/

More information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Instructor: Adm Sheffer. TA: Cosmin Pohot. 1pm Mondys, Wednesdys, nd Fridys. http://mth.cltech.edu/~2015-16/2term/m006/ Min ook: Introduction to Grph

More information

Graphs with at most two trees in a forest building process

Graphs with at most two trees in a forest building process Grphs with t most two trees in forest uilding process rxiv:802.0533v [mth.co] 4 Fe 208 Steve Butler Mis Hmnk Mrie Hrdt Astrct Given grph, we cn form spnning forest y first sorting the edges in some order,

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

Slides for Data Mining by I. H. Witten and E. Frank

Slides for Data Mining by I. H. Witten and E. Frank Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully

More information

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

More information

Pointwise convergence need not behave well with respect to standard properties such as continuity.

Pointwise convergence need not behave well with respect to standard properties such as continuity. Chpter 3 Uniform Convergence Lecture 9 Sequences of functions re of gret importnce in mny res of pure nd pplied mthemtics, nd their properties cn often be studied in the context of metric spces, s in Exmples

More information

Lexical Analysis: Constructing a Scanner from Regular Expressions

Lexical Analysis: Constructing a Scanner from Regular Expressions Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction

More information

Presentation Martin Randers

Presentation Martin Randers Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes

More information

Notes for Graph Theory

Notes for Graph Theory Notes for Grph Theory These re notes I wrote up for my grph theory clss in 06. They contin most of the topics typiclly found in grph theory course. There re proofs of lot of the results, ut not of everything.

More information

What are suffix trees?

What are suffix trees? Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl

More information

Typing with Weird Keyboards Notes

Typing with Weird Keyboards Notes Typing with Weird Keyords Notes Ykov Berchenko-Kogn August 25, 2012 Astrct Consider lnguge with n lphet consisting of just four letters,,,, nd. There is spelling rule tht sys tht whenever you see n next

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

MTH 146 Conics Supplement

MTH 146 Conics Supplement 105- Review of Conics MTH 146 Conics Supplement In this section we review conics If ou ne more detils thn re present in the notes, r through section 105 of the ook Definition: A prol is the set of points

More information

arxiv: v1 [math.co] 18 Sep 2015

arxiv: v1 [math.co] 18 Sep 2015 Improvements on the density o miml -plnr grphs rxiv:509.05548v [mth.co] 8 Sep 05 János Brát MTA-ELTE Geometric nd Algeric Comintorics Reserch Group rt@cs.elte.hu nd Géz Tóth Alréd Rényi Institute o Mthemtics,

More information

Lecture 8: Graph-theoretic problems (again)

Lecture 8: Graph-theoretic problems (again) COMP36111: Advned Algorithms I Leture 8: Grph-theoreti prolems (gin) In Prtt-Hrtmnn Room KB2.38: emil: iprtt@s.mn..uk 2017 18 Reding for this leture: Sipser: Chpter 7. A grph is pir G = (V, E), where V

More information

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl

More information

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22)

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22) Homework Context Free Lnguges III Prse Trees nd Homework #5 (due 10/22) From textbook 6.4,b 6.5b 6.9b,c 6.13 6.22 Pln for tody Context Free Lnguges Next clss of lnguges in our quest! Lnguges Recll. Wht

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016 Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl

More information

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers?

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers? 1.1 TEXAS ESSENTIAL KNOWLEDGE AND SKILLS Prepring for 2A.6.K, 2A.7.I Intervl Nottion nd Set Nottion Essentil Question When is it convenient to use set-uilder nottion to represent set of numers? A collection

More information

Lily Yen and Mogens Hansen

Lily Yen and Mogens Hansen SKOLID / SKOLID No. 8 Lily Yen nd Mogens Hnsen Skolid hs joined Mthemticl Myhem which is eing reformtted s stnd-lone mthemtics journl for high school students. Solutions to prolems tht ppered in the lst

More information

MATH 25 CLASS 5 NOTES, SEP

MATH 25 CLASS 5 NOTES, SEP MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid

More information

Theory of Computation CSE 105

Theory of Computation CSE 105 $ $ $ Theory of Computtion CSE 105 Regulr Lnguges Study Guide nd Homework I Homework I: Solutions to the following problems should be turned in clss on July 1, 1999. Instructions: Write your nswers clerly

More information

The Complexity of Nonrepetitive Coloring

The Complexity of Nonrepetitive Coloring The Complexity of Nonrepetitive Coloring Dániel Mrx Institut für Informtik Humoldt-Universitt zu Berlin dmrx@informtik.hu-erlin.de Mrcus Schefer Deprtment of Computer Science DePul University mschefer@cs.depul.edu

More information

9 Graph Cutting Procedures

9 Graph Cutting Procedures 9 Grph Cutting Procedures Lst clss we begn looking t how to embed rbitrry metrics into distributions of trees, nd proved the following theorem due to Brtl (1996): Theorem 9.1 (Brtl (1996)) Given metric

More information

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search. CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence

More information

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the LR() nlysis Drwcks of LR(). Look-hed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.

More information

Fixed Parameter Algorithms for one-sided crossing minimization Revisited

Fixed Parameter Algorithms for one-sided crossing minimization Revisited Fixed Prmeter Algorithms for one-sided crossing minimiztion Revisited Vid Dujmović 1, Henning Fernu 2,3, nd Michel Kufmnn 2 1 McGill University, School of Computer Science, 3480 University St., Montrel,

More information

Greedy Algorithm. Algorithm Fall Semester

Greedy Algorithm. Algorithm Fall Semester Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion

More information

Two Approximation Algorithms for 3-Cycle Covers

Two Approximation Algorithms for 3-Cycle Covers Two Approximation Algorithms for 3-Cycle Covers Markus Bläser and Bodo Manthey Institut für Theoretische Informatik Universität zu Lübeck Wallstraße 40, 2350 Lübeck, Germany blaeser/manthey@tcs.mu-luebeck.de

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

Single-Player and Two-Player Buttons & Scissors Games

Single-Player and Two-Player Buttons & Scissors Games Single-Plyer nd Two-Plyer Buttons & Scissors Gmes The MIT Fculty hs mde this rticle openly ville. Plese shre how this ccess enefits you. Your story mtters. Cittion As Pulished Pulisher Burke, Kyle, et

More information

The Complexity of Nonrepetitive Coloring

The Complexity of Nonrepetitive Coloring The Complexity of Nonrepetitive Coloring Dániel Mrx Deprtment of Computer Science nd Informtion Theory Budpest University of Technology nd Econonomics Budpest H-1521, Hungry dmrx@cs.me.hu Mrcus Schefer

More information

Efficient Algorithms For Optimizing Policy-Constrained Routing

Efficient Algorithms For Optimizing Policy-Constrained Routing Efficient Algorithms For Optimizing Policy-Constrined Routing Andrew R. Curtis curtis@cs.colostte.edu Ross M. McConnell rmm@cs.colostte.edu Dn Mssey mssey@cs.colostte.edu Astrct Routing policies ply n

More information

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have Rndom Numers nd Monte Crlo Methods Rndom Numer Methods The integrtion methods discussed so fr ll re sed upon mking polynomil pproximtions to the integrnd. Another clss of numericl methods relies upon using

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) Numbers nd Opertions, Algebr, nd Functions 45. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) In sequence of terms involving eponentil growth, which the testing service lso clls geometric

More information

OUTPUT DELIVERY SYSTEM

OUTPUT DELIVERY SYSTEM Differences in ODS formtting for HTML with Proc Print nd Proc Report Lur L. M. Thornton, USDA-ARS, Animl Improvement Progrms Lortory, Beltsville, MD ABSTRACT While Proc Print is terrific tool for dt checking

More information

An Algorithm for Enumerating All Maximal Tree Patterns Without Duplication Using Succinct Data Structure

An Algorithm for Enumerating All Maximal Tree Patterns Without Duplication Using Succinct Data Structure , Mrch 12-14, 2014, Hong Kong An Algorithm for Enumerting All Mximl Tree Ptterns Without Dupliction Using Succinct Dt Structure Yuko ITOKAWA, Tomoyuki UCHIDA nd Motoki SANO Astrct In order to extrct structured

More information

Compilers Spring 2013 PRACTICE Midterm Exam

Compilers Spring 2013 PRACTICE Midterm Exam Compilers Spring 2013 PRACTICE Midterm Exm This is full length prctice midterm exm. If you wnt to tke it t exm pce, give yourself 7 minutes to tke the entire test. Just like the rel exm, ech question hs

More information

The Basic Properties of the Integral

The Basic Properties of the Integral The Bsic Properties of the Integrl When we compute the derivtive of complicted function, like + sin, we usull use differentition rules, like d [f()+g()] d f()+ d g(), to reduce the computtion d d d to

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy RecogniNon of Tokens if expressions nd relnonl opertors if è if then è then else è else relop è

More information

such that the S i cover S, or equivalently S

such that the S i cover S, or equivalently S MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i

More information

ORDER AUTOMATIC MAPPING CLASS GROUPS. Colin Rourke and Bert Wiest

ORDER AUTOMATIC MAPPING CLASS GROUPS. Colin Rourke and Bert Wiest PACIFIC JOURNAL OF MATHEMATICS ol. 94, No., 000 ORDER AUTOMATIC MAPPING CLASS GROUPS Colin Rourke nd Bert Wiest We prove tht the mpping clss group of compct surfce with finite numer of punctures nd non-empty

More information

From Indexing Data Structures to de Bruijn Graphs

From Indexing Data Structures to de Bruijn Graphs From Indexing Dt Structures to de Bruijn Grphs Bstien Czux, Thierry Lecroq, Eric Rivls LIRMM & IBC, Montpellier - LITIS Rouen June 1, 201 Czux, Lecroq, Rivls (LIRMM) Generlized Suffix Tree & DBG June 1,

More information

TO REGULAR EXPRESSIONS

TO REGULAR EXPRESSIONS Suject :- Computer Science Course Nme :- Theory Of Computtion DA TO REGULAR EXPRESSIONS Report Sumitted y:- Ajy Singh Meen 07000505 jysmeen@cse.iit.c.in BASIC DEINITIONS DA:- A finite stte mchine where

More information

COMBINATORIAL PATTERN MATCHING

COMBINATORIAL PATTERN MATCHING COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized

More information

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

Lecture 7: Integration Techniques

Lecture 7: Integration Techniques Lecture 7: Integrtion Techniques Antiderivtives nd Indefinite Integrls. In differentil clculus, we were interested in the derivtive of given rel-vlued function, whether it ws lgeric, eponentil or logrithmic.

More information

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1): Overview (): Before We Begin Administrtive detils Review some questions to consider Winter 2006 Imge Enhncement in the Sptil Domin: Bsics of Sptil Filtering, Smoothing Sptil Filters, Order Sttistics Filters

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component

More information

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem Announcements Project : erch It s live! Due 9/. trt erly nd sk questions. It s longer thn most! Need prtner? Come up fter clss or try Pizz ections: cn go to ny, ut hve priority in your own C 88: Artificil

More information

Algorithm Design (5) Text Search

Algorithm Design (5) Text Search Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:

More information

Finite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015

Finite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015 Finite Automt Lecture 4 Sections 3.6-3.7 Ro T. Koether Hmpden-Sydney College Wed, Jn 21, 2015 Ro T. Koether (Hmpden-Sydney College) Finite Automt Wed, Jn 21, 2015 1 / 23 1 Nondeterministic Finite Automt

More information

cisc1110 fall 2010 lecture VI.2 call by value function parameters another call by value example:

cisc1110 fall 2010 lecture VI.2 call by value function parameters another call by value example: cisc1110 fll 2010 lecture VI.2 cll y vlue function prmeters more on functions more on cll y vlue nd cll y reference pssing strings to functions returning strings from functions vrile scope glol vriles

More information

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011 CSCI 3130: Forml Lnguges nd utomt Theory Lecture 12 The Chinese University of Hong Kong, Fll 2011 ndrej Bogdnov In progrmming lnguges, uilding prse trees is significnt tsk ecuse prse trees tell us the

More information

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chpter 9 Greey Tehnique Copyright 2007 Person Aison-Wesley. All rights reserve. Greey Tehnique Construts solution to n optimiztion prolem piee y piee through sequene of hoies tht re: fesile lolly optiml

More information

Introduction to Computer Engineering EECS 203 dickrp/eecs203/ CMOS transmission gate (TG) TG example

Introduction to Computer Engineering EECS 203  dickrp/eecs203/ CMOS transmission gate (TG) TG example Introduction to Computer Engineering EECS 23 http://ziyng.eecs.northwestern.edu/ dickrp/eecs23/ CMOS trnsmission gte TG Instructor: Robert Dick Office: L477 Tech Emil: dickrp@northwestern.edu Phone: 847

More information

Subtracting Fractions

Subtracting Fractions Lerning Enhncement Tem Model Answers: Adding nd Subtrcting Frctions Adding nd Subtrcting Frctions study guide. When the frctions both hve the sme denomintor (bottom) you cn do them using just simple dding

More information

The Greedy Method. The Greedy Method

The Greedy Method. The Greedy Method Lists nd Itertors /8/26 Presenttion for use with the textook, Algorithm Design nd Applictions, y M. T. Goodrich nd R. Tmssi, Wiley, 25 The Greedy Method The Greedy Method The greedy method is generl lgorithm

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

arxiv: v1 [cs.cg] 9 Dec 2016

arxiv: v1 [cs.cg] 9 Dec 2016 Some Counterexmples for Comptible Tringultions rxiv:62.0486v [cs.cg] 9 Dec 206 Cody Brnson Dwn Chndler 2 Qio Chen 3 Christin Chung 4 Andrew Coccimiglio 5 Sen L 6 Lily Li 7 Aïn Linn 8 Ann Lubiw 9 Clre Lyle

More information

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded

More information

CS 241 Week 4 Tutorial Solutions

CS 241 Week 4 Tutorial Solutions CS 4 Week 4 Tutoril Solutions Writing n Assemler, Prt & Regulr Lnguges Prt Winter 8 Assemling instrutions utomtilly. slt $d, $s, $t. Solution: $d, $s, nd $t ll fit in -it signed integers sine they re 5-it

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

Qubit allocation for quantum circuit compilers

Qubit allocation for quantum circuit compilers Quit lloction for quntum circuit compilers Nov. 10, 2017 JIQ 2017 Mrcos Yukio Sirichi Sylvin Collnge Vinícius Fernndes dos Sntos Fernndo Mgno Quintão Pereir Compilers for quntum computing The first genertion

More information

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this

More information

2014 Haskell January Test Regular Expressions and Finite Automata

2014 Haskell January Test Regular Expressions and Finite Automata 0 Hskell Jnury Test Regulr Expressions nd Finite Automt This test comprises four prts nd the mximum mrk is 5. Prts I, II nd III re worth 3 of the 5 mrks vilble. The 0 Hskell Progrmming Prize will be wrded

More information

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility

More information

Misrepresentation of Preferences

Misrepresentation of Preferences Misrepresenttion of Preferences Gicomo Bonnno Deprtment of Economics, University of Cliforni, Dvis, USA gfbonnno@ucdvis.edu Socil choice functions Arrow s theorem sys tht it is not possible to extrct from

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

Integration. October 25, 2016

Integration. October 25, 2016 Integrtion October 5, 6 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my hve

More information

Chapter44. Polygons and solids. Contents: A Polygons B Triangles C Quadrilaterals D Solids E Constructing solids

Chapter44. Polygons and solids. Contents: A Polygons B Triangles C Quadrilaterals D Solids E Constructing solids Chpter44 Polygons nd solids Contents: A Polygons B Tringles C Qudrilterls D Solids E Constructing solids 74 POLYGONS AND SOLIDS (Chpter 4) Opening prolem Things to think out: c Wht different shpes cn you

More information

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it. 6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted

More information

Determining Single Connectivity in Directed Graphs

Determining Single Connectivity in Directed Graphs Determining Single Connectivity in Directed Grphs Adm L. Buchsbum 1 Mrtin C. Crlisle 2 Reserch Report CS-TR-390-92 September 1992 Abstrct In this pper, we consider the problem of determining whether or

More information

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) * Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte

More information

Basic Geometry and Topology

Basic Geometry and Topology Bsic Geometry nd Topology Stephn Stolz Septemer 7, 2015 Contents 1 Pointset Topology 1 1.1 Metric spces................................... 1 1.2 Topologicl spces................................ 5 1.3 Constructions

More information

Premaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018

Premaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018 Premster Course Algorithms Chpter 6: Shortest Pths Christin Scheieler SS 8 Bsic Grph Algorithms Overview: Shortest pths in DAGs Dijkstr s lgorithm Bellmn-For lgorithm Johnson s metho SS 8 Chpter 6 Shortest

More information

UT1553B BCRT True Dual-port Memory Interface

UT1553B BCRT True Dual-port Memory Interface UTMC APPICATION NOTE UT553B BCRT True Dul-port Memory Interfce INTRODUCTION The UTMC UT553B BCRT is monolithic CMOS integrted circuit tht provides comprehensive MI-STD- 553B Bus Controller nd Remote Terminl

More information

Integration. September 28, 2017

Integration. September 28, 2017 Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my

More information

LR Parsing, Part 2. Constructing Parse Tables. Need to Automatically Construct LR Parse Tables: Action and GOTO Table

LR Parsing, Part 2. Constructing Parse Tables. Need to Automatically Construct LR Parse Tables: Action and GOTO Table TDDD55 Compilers nd Interpreters TDDB44 Compiler Construction LR Prsing, Prt 2 Constructing Prse Tles Prse tle construction Grmmr conflict hndling Ctegories of LR Grmmrs nd Prsers Peter Fritzson, Christoph

More information

Section 3.1: Sequences and Series

Section 3.1: Sequences and Series Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one

More information

Solutions to Math 41 Final Exam December 12, 2011

Solutions to Math 41 Final Exam December 12, 2011 Solutions to Mth Finl Em December,. ( points) Find ech of the following its, with justifiction. If there is n infinite it, then eplin whether it is or. ( ) / ln() () (5 points) First we compute the it:

More information

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets

More information

Summer Review Packet For Algebra 2 CP/Honors

Summer Review Packet For Algebra 2 CP/Honors Summer Review Pcket For Alger CP/Honors Nme Current Course Mth Techer Introduction Alger uilds on topics studied from oth Alger nd Geometr. Certin topics re sufficientl involved tht the cll for some review

More information

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information