cs0205011/DAM.tex
1: \documentstyle[12pt,fullpage,epsfig]{article}
2: 
3: \newcommand{\fig}[3] %usage:\fig{file}{label}{caption}
4: {%
5:  \begin{figure}[t]
6:  \begin{center}
7:  \input{#1}
8:  \end{center}
9:  \caption{#3}
10:  \label{#2}
11:  \end{figure}
12: }
13: 
14: \newtheorem{theorem}{Theorem}[section]
15: \newtheorem{lemma}[theorem]{Lemma}
16: \newtheorem{corollary}[theorem]{Corollary}
17: \newtheorem{proposition}[theorem]{Proposition}
18: \newtheorem{example}{Example}
19: \newtheorem{property}{Property}
20: \newtheorem{definition}{Definition}
21: \newtheorem{definitions}{Definitions}
22: 
23: 
24: \newcommand{\M}[1]{\mbox{#1}}
25: \newcommand{\Opt}[1]{\mbox{${\cal OPT}(#1)$}}
26: \newcommand{\MaxCycle}[1]{{\cal C}}
27: 
28: \newcommand{\Rise}[2]{{#1}^{\overline{#2}}}
29: \newcommand{\ContractCycles}{\M{\sc Contract-Cycles}}
30: \newcommand{\Exchange}{\M{\sc Exchange}}
31: 
32: \newcommand{\Find}{\M{\sc Find}}
33: \newcommand{\MakeSet}{\M{\sc Make-Set}}
34: \newcommand{\Union}{\M{\sc Union}}
35: 
36: \newcommand{\TRUE}{\M{\bf true}}
37: \newcommand{\FALSE}{\M{\bf false}}
38: \newcommand{\NIL}{\M{\bf nil}}
39: \newcommand{\CURRENT}{\M{\bf current}}
40: \newcommand{\IF}{\M{\bf if }\=}
41: \newcommand{\THEN}{\M{\bf then }\=}
42: \newcommand{\ELSE}{\M{\bf else }}
43: \newcommand{\WHILE}{\M{\bf while }\=}
44: \newcommand{\FOR}{\M{\bf for }\=}
45: \newcommand{\DO}{\M{\bf do }\=}
46: \newcommand{\RETURN}{\M{\bf return }}
47: 
48: \newcommand{\Visited}{\M{visited}}
49: \newcommand{\ToActive}{\M{to-active}}
50: \newcommand{\ToRoot}{\M{to-root}}
51: \newcommand{\FromRoot}{\M{from-root}}
52: \newcommand{\DFS}{\M{\sc DFS}}
53: \newcommand{\ContractCycle}{\M{\sc Contract-Cycle}}
54: 
55: \newenvironment{tabAlgorithm}[2]{
56: \setcounter{algorithmLine}{1}
57: \samepage
58: \begin{tabbing}
59: 999\=\kill
60: #1 \ \ --- \ \ \parbox{4in}{\it #2}
61: }{
62: \end{tabbing}
63: }
64: \newcounter{algorithmLine}
65: \newcommand{\algline}{\\\thealgorithmLine\hfil\>\stepcounter{algorithmLine}}
66: \newcommand{\algcont}{\\\hfil\>}
67: 
68: 
69: 
70: 
71:   %Miscellaneous commands for proofs
72: \newenvironment{proof}{\par\noindent {\em Proof. }}{\myendproof}
73: \def\myendproof{\hfill{\vbox{\hrule\hbox{%
74:    \vrule height1.3ex\hskip0.8ex\vrule}\hrule}}}
75: 
76: 
77: % \title{{\large\bf Improved Approximations for the Minimum Equivalent Digraph
78: % Problem}}
79: 
80: %rbk-3-6-94 : I like the new title better, but it sounds grammatically
81: % incorrect.  Any small changes to correct it?
82: \title{\large\bf On Strongly Connected Digraphs with Bounded Cycle Length}
83: 
84: \author{Samir Khuller
85:   \thanks{Computer Science Department and Institute for Advanced Computer
86:     Studies, University of Maryland, College Park, MD~20742.
87:     Research supported by NSF Research Initiation Award CCR-9307462.
88:     E-mail~: {\tt samir@cs.umd.edu}.}
89:   \and Balaji Raghavachari
90:   \thanks{Department of Computer Science, The University of Texas at Dallas,
91:     Box 830688, Richardson, TX 75083.
92:     Research supported by NSF grant CCR-9409625.
93:     E-mail : {\tt rbk@utdallas.edu}.}
94:   \and Neal Young
95:   \thanks{Corresponding author.
96:     Department of Computer Science, Dartmouth College, Hanover, NH 03755,
97:     USA. E-mail: neal.young@dartmouth.edu.
98:     Part of this research was done while at
99:     School of ORIE, Cornell University, Ithaca NY 14853
100:     and supported by \'Eva Tardos' NSF PYI grant DDM-9157199.
101:   }
102: }
103: 
104: \date{ }
105: 
106: \begin{document}
107: 
108: \maketitle
109: 
110: \begin{abstract}
111:   Given a directed graph $G=(V,E)$, a natural problem
112:   is to choose a minimum number of the edges in $E$
113:   such that, for any two vertices $u$ and $v$,
114:   if there is a path from $u$ to $v$ in $E$,
115:   then there is a path from $u$ to $v$ among the chosen edges.
116:   We show that in graphs having no directed cycle with more than three edges,
117:   this problem is equivalent to Maximum Bipartite Matching.
118:   This leads to a small improvement in the performance guarantee
119:   of the  previous best approximation algorithm for the general problem.
120: \end{abstract}
121: \section{Introduction}
122: Let $G=(V,E)$ be a directed graph. 
123: The minimum equivalent graph (MEG) problem is the following:
124: find a smallest subset $S\subseteq E$ of the edges
125: such that, for any two vertices $u$ and $v$,
126: if there is a path from $u$ to $v$ in $E$
127: then there is a path from $u$ to $v$ using only edges in $S$.
128: The problem is NP-hard~\cite{GJ}.
129: A $c$-approximate solution is a subset of edges
130: providing the necessary paths
131: of size at most $c$ times the minimum.
132: A $c$-approximation algorithm is a polynomial-time algorithm
133: guaranteeing a $c$-approximate solution.
134: 
135: Moyles and Thompson \cite{MT} observed that
136: any solution to the MEG problem 
137: decomposes into solutions for each strongly connected component
138: and a solution for the component graph
139: (the graph obtained by contracting each strongly connected component).
140: Thus, the problem reduces in linear time to two cases:
141: the graph is either acyclic or strongly connected.
142: If the graph is acyclic, the MEG problem
143: is equivalent to the {\em transitive reduction}\/ problem,
144: which was shown by Aho, Garey and Ullman
145: to be equivalent to transitive closure~\cite{AGU}.
146: Thus, we assume the graph is strongly connected,
147: so that the problem is to find a small subset of the edges
148: preserving the strong connectivity.
149: We refer to this problem as
150: {\em the strongly connected spanning subgraph (SCSS)}\/ problem.
151: 
152: The only known $c$-approximation algorithm for any $c<2$
153: works by repeatedly contracting cycles \cite{KRY-JOURNAL}.
154: Each cycle contracted is either a longest cycle in the current graph,
155: or has length at least some constant $k$.
156: The set of contracted edges yields the set $S$.
157: As $k$ grows, the performance guarantee of this algorithm
158: rapidly tends to $\pi^2/6\approx 1.64$.
159: 
160: A natural modification is to solve the problem optimally
161: as soon as the maximum cycle length in the current graph
162: drops below some threshold.
163: The problem remains NP-hard even when the maximum cycle length is five,
164: but we conjectured in \cite{KRY-JOURNAL}
165: that it was solvable in polynomial time
166: if the maximum cycle length is three.
167: We use SCSS$_3$ to denote the SCSS problem with this restriction.
168: In this paper we confirm the conjecture:
169: \begin{theorem} \label{main-result}
170:   The SCCS$_3$ problem in $n$-vertex digraphs
171:   reduces in $O(n^2)$ time to Minimum Bipartite Edge Cover.
172: \end{theorem}
173: This gives an $O(n^2+m\sqrt{n})$-time algorithm for the SCCS$_3$ problem,
174: since Minimum Bipartite Edge Cover is trivially equivalent
175: to Maximum Bipartite Matching~\cite{NR},
176: which can be solved in $O(m\sqrt{n})$ time \cite{HK}.
177: Modifying the cycle-contraction algorithm correspondingly
178: reduces its performance guarantee by $1/36$:
179: \begin{corollary} \label{corollary}
180:   For any $c > \pi^2/6 - 1/36 \approx 1.61$,
181:   there exists a $c$-approximation algorithm for the MEG problem.
182: \end{corollary}
183: (For graphs with bounded cycle size,
184: a slightly stronger performance guarantee can be shown
185: as described at the end of Section~\ref{appl_sec}.)
186: This corollary follows from a straightforward modification
187: to the analysis in \cite{KRY-JOURNAL} of the algorithms described above.
188: 
189: Here is an overview of the reduction of SCSS$_3$ to Edge Cover.
190: We classify each edge as either {\em necessary}\/
191: (removal of the edge leaves the graph not strongly connected)
192: or {\em redundant}\/ (otherwise).
193: It turns out that any SCSS consists of the necessary edges
194: together with a set of redundant edges sufficient to ensure
195: that each necessary edge lies on some cycle in the SCSS.
196: We characterize the manner in which redundant edges
197: can lie on such cycles --- specifically, each cycle can
198: have at most one redundant edge and each redundant edge
199: lies on exactly one cycle (and thus ``provides a cycle''
200: for at most two necessary edges).  This allows the reduction.
201: 
202: A natural question is whether SCSS$_3$ is fundamentally simpler than
203: Bipartite Edge Cover.  In Section \ref{inv_sec} we show it is not:
204: \begin{theorem} \label{converse}
205:   Minimum Bipartite Edge Cover reduces in linear time to SCSS$_3$.
206: \end{theorem}
207: 
208: \paragraph{Comparison to undirected graphs: }
209: When the maximum cycle length is three,
210: the SCSS problem is as hard as Bipartite Matching.
211: When it is five, the problem is NP-hard.
212: When it is seventeen, the problem is MAX-SNP-hard \cite{KRY-JOURNAL}.
213: The latter precludes even a polynomial-time approximation scheme unless P=NP.
214: Thus, digraphs with bounded cycle length can have rich connectivity structure.
215: 
216: This highlights the fundamental difference between
217: connectivity in directed and undirected graphs.
218: The analogous problem in undirected graphs is to
219: find a minimum-size subset of edges preserving $2$-edge connectivity.
220: This problem (and many others that are NP-hard in general)
221: can be solved optimally in polynomial time
222: for graphs with bounded cycle length~\cite{ALS}.
223: 
224: \paragraph{Other related work: }
225: Moyles and Thompson \cite{MT} gave an exponential-time algorithm
226: for the MEG problem;
227: Hsu~\cite{Hsu} gave a polynomial-time algorithm for the acyclic case.
228: 
229: \paragraph{Contents: }
230: The body of the paper is organized as follows.
231: Section \ref{red_sec} contains the reduction of SCSS$_3$ to Edge Cover
232: (proving Theorem~\ref{main-result}).
233: Section \ref{inv_sec} notes that Edge Cover reduces in linear time to SCSS$_3$,
234: so that (with respect to quadratic time reductions)
235: the problems are equivalent.
236: Section \ref{appl_sec} describes the application:
237: the improved approximation algorithm for the general MEG problem.
238: 
239: \section{Reduction: SCSS$_3$ to Edge Cover} \label{red_sec}
240: Let $G=(V,E)$ be a strongly connected digraph with maximum cycle length $3$
241: or less. Assume that $G$ has at least four vertices,
242: none of which are cut vertices
243: (that is, vertices whose removal disconnects the underlying undirected graph).
244: This is without loss of generality,
245: because by standard techniques, in $O(n+m)$ time,
246: the cut vertices can be found
247: and the graph partitioned into 2-connected components.
248: Clearly a $c$-approximation for each component
249: yields a $c$-approximation for $G$.
250: 
251: \begin{definitions}
252:   An edge is {\em redundant}\/ if deleting the edge from $G$
253:   leaves a strongly connected graph.  Otherwise it is {\em necessary}.
254: 
255:   An edge $(u,v)$ is {\em unsatisfied}\/
256:   if there is no path from $v$ to $u$ consisting of necessary edges.
257: 
258:   A redundant edge $e$ {\em provides a cycle}\/ for an unsatisfied edge $(u,v)$
259:   if there is a path from $v$ to $u$ consisting of necessary edges and $e$.
260: \end{definitions}
261: 
262: Here is an outline of the reduction.
263: Since the necessary edges are in any SCSS,
264: the question is which redundant edges to add.
265: It turns out that each redundant edge lies on exactly one cycle
266: (Lemma \ref{property})
267: and thus provides a cycle for at most two unsatisfied edges.
268: Further, no cycle has more than one redundant edge,
269: so that a set of edges is an SCSS if and only if
270: it contains the necessary edges
271: and, for each unsatisfied edge $e$,
272: a redundant edge providing a cycle for $e$
273: (Lemma~\ref{properties}).
274: 
275: We construct an equivalent instance of Edge Cover --- an undirected graph $G'$
276: that has a vertex $w'$ for each unsatisfied edge $w$ in $G$
277: and an edge $r'$ for each redundant edge $r$ in $G$,
278: where $r'$ is incident to $w'$ if $r$ provides a cycle for $w$.
279: It turns out that the graph $G'$ is acyclic (in the undirected sense)
280: and thus bipartite (Lemma \ref{bipartite_lem}).
281: 
282: Finally, the redundant edges and the graph $G'$ can be computed
283: in $O(n^2)$ time (Lemmas  \ref{classifying} and \ref{building}).
284: 
285: \subsection{Reduction to Bipartite Edge Cover}
286: 
287: Here is the first essential fact:
288: \begin{lemma} \label{property}
289:   Each redundant edge lies on exactly one cycle in $G$.
290: \end{lemma}
291: \begin{proof}
292:   We use here the assumption that $G$ has at least four vertices,
293:   none of which are cut vertices.
294: 
295:   Since $G$ is strongly connected, each edge lies on at least one cycle.
296:   Suppose for contradiction that some redundant edge $(u,v)$
297:   lies on more than one cycle.
298:   There are (at least) two distinct paths from $v$ to $u$.
299:   At least one of the paths is of length two.
300:   Denote this path $(v,x,u)$.
301: 
302:   Since edge $(u,v)$ is redundant,
303:   there is a path $P_{uv}$ from $u$ to $v$ other than edge $(u,v)$.
304:   $P_{uv}$ must contain $x$, for otherwise $P_{uv}$ and the path $(v,x,u)$ 
305:   would form a cycle of more than three edges.  
306: 
307:   If the edge $(v,u)$ is present in $G$, then $P_{uv}$ is of length two
308:   (as it forms a cycle with $(v,u)$) and hence is the path $(u,x,v)$.  
309:   Thus, in this case,
310:   all six possible edges are present
311:   between the three vertices $u$, $x$, and $v$.
312:   Let $V_u$ denote the vertices reachable from $u$
313:   without going through $v$ or $x$.  Define $V_v$ and $V_x$ similarly.
314:   Using the strong connectivity of the graph and its lack of long cycles,
315:   one can easily show that these sets are disjoint
316:   and have no edges between them.
317:   Thus, either at least one of $u$, $x$, or $v$ is a cut vertex
318:   or the graph has only these three vertices.
319:   This contradicts our assumption about $G$.
320:   
321:   Thus, the edge $(v,u)$ is not present
322:   and there exists a path distinct from $(v,x,u)$ and $(v,u)$
323:   from $v$ to $u$.
324:   Denote this path, which must be of length two, by $(v,y,u)$.
325:   The path $P_{uv}$ must contain $y$
326:   for the same reason $P_{uv}$ contains $x$.  
327: %samir (switched x and y to make it consistent with  the figure)
328:   Thus, there is a path $Q$, without loss of generality from $y$ to $x$,
329:   that does not contain $u$ or $v$ (see Figure~\ref{pathBackFig}).
330:   \fig{pathBack}{pathBackFig}{No cycle has two redundant edges.}
331:   This is a contradiction, because the edges $(x,u)$, $(u,v)$, and $(v,y)$
332:   would form a cycle of length at least four with the path $Q$.
333: \end{proof}
334: 
335: 
336: \begin{lemma} \label{properties}
337:   A set of edges is an SCSS iff it contains the necessary edges
338:   and, for each unsatisfied edge $e$,
339:   some redundant edge providing a cycle for $e$.
340: \end{lemma}
341: \begin{proof}
342:   The ``if'' direction is straightforward.  To see the converse,
343:   first note that each cycle in $G$ contains at most one redundant edge
344:   (otherwise each redundant edge would lie on more than one cycle,
345:   violating Lemma~\ref{property}). In fact, this also implies that 
346: %samir
347:   unsatisfied edges are not redundant, otherwise we would have a cycle with
348:   two redundant edges.
349: 
350:   Since the SCSS strongly connects the graph,
351:   any unsatisfied edge must form a cycle with the edges in the SCSS.
352:   By the preceding observation, this cycle has one redundant edge.
353: \end{proof}
354: 
355: By Lemma~\ref{properties},
356: the problem reduces to identifying a smallest set
357: of redundant edges such that for each unsatisfied edge $e$ in $G$,
358: some redundant edge in the set provides a cycle for $e$.
359: By Lemma~\ref{property},
360: each redundant edge provides a cycle for at most two unsatisfied edges.
361: 
362: Build a graph $G'$ whose vertices correspond to the unsatisfied edges.
363: For each redundant edge $e$,
364: if $e$ provides a cycle for two unsatisfied edges,
365: add an edge between the two corresponding vertices;
366: if $e$ provides a cycle for one unsatisfied edge,
367: add a self-loop at the corresponding vertex.
368: 
369: By the above discussion,
370: a set of edges in $G'$ forms an edge cover
371: if and only if the corresponding set of redundant edges in the original graph,
372: together with the necessary edges, form an SCSS\@.
373: 
374: So far, we have reduced our problem to Minimum Edge Cover.
375: The next lemma shows that the reduction
376: is in fact to Minimum {\em Bipartite}\/ Edge Cover.
377: \begin{lemma} \label{bipartite_lem}
378:   $G'$ is bipartite.
379: \end{lemma}
380: \begin{proof}
381:   We will show that the unsatisfied edges in $G$ can be two-colored
382:   so that no adjacent edges have the same color.
383:   This gives the result as follows:  color each vertex in $G'$
384:   with the color of its corresponding unsatisfied edge in $G$;
385:   by Lemma~\ref{property},
386:   vertices that share an edge in $G'$ correspond to adjacent
387:   (and therefore differently colored) unsatisfied edges in $G$.
388:   Thus, no edge in $G'$ has two vertices of the same color.
389:   
390:   Assume for contradiction that the unsatisfied edges of $G$
391:   cannot be legally two-colored.  Then some set $C$ of the edges
392:   corresponds to an (odd) cycle in the underlying undirected graph.
393:   Let edge $(u,v)$ be one of the edges in $C$.
394:   We will show that there is an alternate path from $u$ to $v$,
395:   so that $(u,v)$ is redundant.  Since unsatisfied edges are not redundant,
396:   this is a contradiction.
397: 
398:   It suffices to show that, for each edge $(a,b)$ on $C$,
399:   there is a path from $b$ to $a$ that does not use $(u,v)$.
400:   Suppose the return path for $(a,b)$ does contain $(u,v)$.
401:   The return path must have length two, so either $u=b$ or $v=a$.
402: 
403:   We consider only the first case; the other is similar.
404:   Since $u=b$, this case reduces to finding a path from $u$ to $a$
405:   that does not use $(u,v)$, given that $(u,v,a)$ is a return path for $(a,u)$
406:   and that $(u,v)$ and $(a,u)$ are unsatisfied and therefore necessary.
407: 
408:   Suppose edge $(v,a)$ was necessary.  Then cycle $(a,u,v,a)$ would consist
409:   of necessary edges, so none of its edges would be unsatisfied.
410:   Thus, $(v,a)$ is redundant.
411:   Let $P_{va}$ be an alternate path from $v$ to $a$.
412:   $P_{va}$ must go through $u$, 
413:   for otherwise $P_{va}$ and the edges $(a,u)$ and $(u,v)$
414:   would form a cycle of length more than three.
415:   Thus, $P_{va}$ contains a path from $u$ to $a$ 
416:   that does not go through $v$.
417:   This portion of $P_{va}$ is the desired path.
418: \end{proof}
419: 
420: \subsection{Complexity}
421: To finish the proof of Theorem~\ref{main-result},
422: we show that the reduction can be computed in $O(n^2)$ time.
423: 
424: \begin{lemma} \label{classifying}
425:   Classifying the edges as redundant or necessary requires $O(n^2)$ time.
426: \end{lemma}
427: \begin{proof}
428:   Let $G$ have $n$ vertices and $m$ edges.
429:   Fix a root $r$ and find an incoming and an outgoing branching
430:   (spanning trees rooted at $r$ with all edges directed towards
431:   or, respectively, away from $r$).
432:   This can be done in $O(n+m)$ time using depth-first search.
433:   Let $B$ be the union of the sets of edges in the two branchings.
434:   There are at most $2n-2$ edges in $B$
435:   and the edges not in $B$ are redundant.
436:   This leaves $O(n)$ edges to be classified.
437:   Classify them using $O(n)$ time per edge as follows.
438:   
439:   Consider an edge $(u,v)$.
440:   Enumerate the other vertices
441:   to check for alternate paths from $u$ to $v$ of length two.
442:   If such a path exists, the edge is redundant.
443:   Otherwise, check for the edge $(v,u)$.
444:   If it exists, the edge $(u,v)$ is necessary,
445:   because any alternate path from $u$ to $v$ would have to have length two
446:   and all such paths have been checked.
447:   Otherwise, check all return paths of length two.
448:   If at least two of these paths exist,
449:   the edge is necessary by Lemma~\ref{property}.
450: 
451:   Otherwise $(u,v)$ has a unique return path $(v,w,u)$.
452:   If an alternate path from $u$ to $v$ exists,
453:   then it must use $w$ (else we get a cycle of
454:   length at least four).  Because of the edge $(w,u)$,
455:   the path from $u$ to $w$ can have length at most two.
456:   Similarly, the path from $w$ to $v$ can have length at most two.
457:   Thus, $w$ and the existence of the paths from $u$ to $w$ and $w$ to $v$
458:   can be determined by enumeration in $O(n)$ time.
459: \end{proof}
460: 
461: \begin{lemma} \label{building}
462:   Building the graph $G'$ requires $O(n^2)$ time.
463: \end{lemma}
464: \begin{proof}
465:   Once the edges have been classified as redundant or necessary,
466:   the unsatisfied edges and the return paths for the redundant edges
467:   can be identified in $O(n^2)$ time as follows.
468:   Each edge $(u,v)$ is redundant, or necessary but {\em not}\/ unsatisfied,
469:   if and only if it has a return path of one or two necessary edges.
470:   Enumerate each path of one or two necessary edges;
471:   let $u$ and $v$ be the first and last vertices on the path;
472:   if there is an edge $(v,u)$,
473:   then either note its return path (if it is redundant)
474:   or note that it is not unsatisfied (if it is necessary).
475:   There are $O(n^2)$ such paths, since there are $O(n)$ necessary edges.
476: \end{proof}
477: 
478: This proves Theorem~\ref{main-result}.
479: 
480: \section{Reduction: Edge Cover to SCSS$_3$} \label{inv_sec}
481: The proof of Theorem~\ref{converse} (Minimum Bipartite Edge Cover
482: reduces in linear time to SCSS$_3$) is somewhat simpler:
483: 
484: \noindent {\em Proof of Theorem~\ref{converse}. }
485:   Given an undirected bipartite graph,
486:   construct a directed graph as shown in Figure~\ref{bipartite}.
487:   Direct all the edges from the first part to the second part.
488:   Add a root vertex with edges to each vertex in the first part
489:   and from each vertex in the second part.
490:   Any edge cover in the original graph
491:   (together with the added edges) yields an SCSS and vice versa.
492: \myendproof
493: 
494: \fig{bipartite}{bipartite}{Bipartite Edge Cover reduces to SCSS$_3$.}
495: 
496: \section{Application to the General MEG Problem} \label{appl_sec}
497: Here we describe the improvement to the approximation algorithm
498: for the general MEG problem in \cite{KRY-JOURNAL}.
499: As usual, without loss of generality, assume the graph is strongly connected.
500: The algorithm in \cite{KRY-JOURNAL} works by repeatedly contracting cycles.
501: Each cycle contracted is either a longest cycle in the current graph,
502: or has length at least some constant $k$.
503: The set of contracted edges yields the set $S$.
504: As $k$ grows, the performance guarantee of the algorithm
505: tends rapidly to $\pi^2/6\approx 1.64$.
506: 
507: Assume $k \ge 4$.
508: Modify the algorithm so that as soon as the current graph
509: has maximum cycle size three or less,
510: it solves the problem optimally (using Theorem~\ref{main-result})
511: and returns the edges in the solution for the current graph
512: together with the edges on previously contracted cycles.
513: 
514: To {\em contract}\/ an edge is to identify its endpoints in the graph
515: as a single vertex;
516: to contract a cycle is to identify all vertices on the cycle.
517: We use the following result from \cite{KRY-JOURNAL}:
518: \begin{proposition}[\cite{KRY-JOURNAL}] \label{lower-bound}
519:   If the maximum cycle length in an $n$-vertex graph is $\ell$,
520:   then any SCSS has at least $(n-1)\ell/(\ell-1)$ edges.
521: \end{proposition}
522: The proof is that any strongly connected graph can be contracted
523: to a single vertex by repeatedly contracting cycles whose edges
524: are in the SCSS; the ratio of edges contracted to vertices lost
525: when one of these cycles is contracted is at least $\ell/(\ell-1)$.
526: 
527: {\em Proof of Corollary~\ref{corollary}.}\/
528: {%
529:   Initially, let the graph have $n$ vertices.
530:   Assume $n_i$ vertices remain in the contracted graph
531:   after contracting cycles with $i$ or more edges ($i=k,k-1,\ldots,4$).  
532:   Finally, we get a graph $H$ (with $n_4$ vertices) that has no cycles of
533:   length four or more;
534:   the algorithm solves the SCSS problem for $H$ optimally.
535: 
536:   How many edges are returned?
537:   Let $\Opt{G}$ denote the minimum size of an SCSS of $G$.
538:   In contracting cycles with at least $k$ edges,
539:   at most $\frac{k}{k-1}(n-n_k)$ edges are contributed to the solution.
540:   For $4 \le i<k$, in contracting cycles with $i$ edges,
541:   $\frac{i}{i-1}(n_{i+1}-n_i)$ edges are contributed.
542:   The number of edges returned is thus at most
543:   \begin{displaymath}
544:     \frac{k}{k-1}(n-n_k)
545:     + \sum_{i=4}^{k-1}\frac{i}{i-1}(n_{i+1}-n_i)
546:     + \Opt{H}.
547:   \end{displaymath}
548:   A little work shows this is equal to
549:   \begin{displaymath}
550:     \frac{k}{k-1}(n-1)
551:     + \sum_{i=5}^k \frac{n_i-1}{(i-1)(i-2)}
552:     - \frac{4}{3} (n_4-1)
553:     + \Opt{H}.
554:   \end{displaymath}
555:   Since $\Opt{H} \le 2(n_4-1)$, substituting for $n_4$ gives the upper bound
556:   \begin{displaymath}
557:     \frac{k}{k-1}(n-1)
558:     + \sum_{i=5}^k \frac{n_i-1}{(i-1)(i-2)}
559:     + \frac{1}{3} \Opt{H}.
560:   \end{displaymath}
561:   Clearly $\Opt{G} > n-1$.  For $4\le i \le k$,
562:   when $n_i$ vertices remain, no cycle has more than $i-1$ edges.
563:   By Proposition~\ref{lower-bound},
564:   any SCSS of the current graph (and therefore any SCSS of $G$)
565:   has at least $(n_i-1)(i-1)/(i-2)$ edges.
566:   Also $\Opt{G}\ge\Opt{H}$.
567:   Using these three facts, the above quantity, divided by \Opt{G}, is less than
568:   \begin{eqnarray*}
569:     \lefteqn{\frac{k}{k-1}
570:       + \sum_{i=5}^k \frac{1}{(i-1)(i-1)}
571:       + \frac{1}{3}}
572:     \\ &=&
573:         \frac{1}{k-1} + \sum_{i=1}^{k-1} \frac{1}{i^2} -\frac{1}{36}.
574:   \end{eqnarray*}
575:   Using the identity (from \cite[p.75]{Knuth1}) 
576:   $\sum_{i=1}^\infty \frac{1}{i^2} = \frac{\pi^2}{6}$,
577:   this is equal to
578:   \begin{eqnarray*}
579:     \lefteqn{
580:       \frac{\pi^2}{6} - \frac{1}{36} +\frac{1}{k-1}
581:       - \sum_{i=k}^\infty \frac{1}{i^2}}
582:     \\&\le& \frac{\pi^2}{6} -\frac{1}{36}+ \frac{1}{k-1} 
583:     - \sum_{i=k}^\infty \frac{1}{i\,(i+1)}
584:     \\&=& \frac{\pi^2}{6}-\frac{1}{36} + \frac{1}{k-1} - \frac{1}{k}
585:     \\&=& \frac{\pi^2}{6}-\frac{1}{36} + \frac{1}{k(k-1)}.
586:   \end{eqnarray*}
587:   }
588: \myendproof
589: 
590: Similarly to \cite{KRY-JOURNAL},
591: standard techniques can yield more accurate estimates,
592: e.g.,
593: \(\frac{\pi^2}{6} -\frac{1}{36}
594: + \frac{1}{2k^2} + O\left(\frac{1}{k^3}\right).\)
595: Also following \cite{KRY-JOURNAL},
596: if the graph initially has no cycle longer than $\ell$ ($\ell \ge k$),
597: then the analysis can be generalized to show a performance guarantee
598: of $\frac{k^{-1}-\ell^{-1}}{1-k^{-1}}
599: +\sum_{i=1}^{k-1}\frac{1}{i^2} - \frac{1}{36}$.
600: For instance, in a graph with no cycle longer than $5$,
601: the analysis bounds the performance guarantee (when $k=5$) by $1.396$.
602: 
603: 
604: \paragraph{Acknowledgments: }
605: We thank R.~Ravi and Klaus Truemper for helpful discussions.
606: %samir
607: We also thank the referees for useful comments on a preliminary draft
608: of this paper.
609: 
610: \begin{thebibliography}{99}
611: 
612: \bibitem{AGU}
613: A.~V.~Aho, M.~R.~Garey and J.~D.~Ullman,
614: \newblock The transitive reduction of a directed graph,
615: \newblock {\em SIAM J. Comput.}, 1 (2), pp.~131--137, (1972).
616: 
617: \bibitem{ALS}
618: S.~Arnborg, J.~Lagergren and D.~Seese,
619: \newblock Easy problems for tree-decomposable graphs,
620: \newblock {\em J. Algorithms}, 12 (2), pp.~308--340, (1991).
621: 
622: %\bibitem{CLR}
623: %T. H. Cormen, C. E. Leiserson, and R. L. Rivest,
624: %\newblock Introduction to Algorithms, The MIT Press, 1989.
625: 
626: 
627: \bibitem{GJ}
628: M.~R.~Garey and D.~S.~Johnson, 
629: \newblock Computers and Intractability: A guide to the
630: theory of NP-completeness, W.~H.~Freeman and co., New York, 1979.
631: 
632: \bibitem{HK}
633: J.~E.~Hopcroft and R.~M.~Karp,
634: \newblock An $n^{\frac{5}{2}}$ algorithm for maximum  matching in bipartite
635: graphs,
636: \newblock {\em SIAM J. Comput.}, 2, pp.~225--231, (1973).
637: 
638: \bibitem{Hsu}
639: H.~T.~Hsu,
640: \newblock An algorithm for finding a minimal equivalent graph of a digraph,
641: \newblock {\em Journal of the ACM}, 22 (1), pp.~11--16, (1975).
642: 
643: 
644: %rbk-3-6-94 : Do we need to cite this?
645: \iffalse
646: \bibitem{KRY-SODA94}
647: S.~Khuller, B.~Raghavachari and N.~Young,
648: \newblock Approximating the minimum equivalent digraph,
649: \newblock {\em 5th ACM-SIAM Symposium on Discrete Algorithms (SODA)},
650: January 1994.
651: \fi
652: 
653: \bibitem{KRY-JOURNAL}
654: S.~Khuller, B.~Raghavachari and N.~Young,
655: \newblock Approximating the minimum equivalent digraph,
656: \newblock {\em SIAM J. Comput.} 24 (4), pp.~859--872, (1995).
657: 
658: \bibitem{Knuth1}
659: D.~E.~Knuth,
660: \newblock Fundamental Algorithms, Addison-Wesley, Menlo Park, CA, 1973.
661: 
662: 
663: \bibitem{MT}
664: D.~M.~Moyles and G.~L.~Thompson,
665: \newblock An algorithm for finding the minimum equivalent graph of a digraph,
666: \newblock {\em Journal of the ACM}, 16 (3), pp.~455--460, (1969).
667: 
668: %rbk-3-6-94 added this (taken from Papadimitriou and Steiglitz):
669: \bibitem{NR}
670: R.~Z.~Norman and M.~O.~Rabin,
671: \newblock An algorithm for a minimum cover of a graph,
672: \newblock {\em Proc. Amer. Math. Soc.}, 10, pp.~315-319, (1959).
673: 
674: \end{thebibliography}
675: 
676: \end{document}
677: