In this paper, we investigate some basic connectivity problems in directed
graphs (digraphs). Let G be a digraph with m edges and n vertices, and
let Gβe be the digraph obtained after deleting edge e from G. As
a first result, we show how to compute in O(m+n) worst-case time: (i) The
total number of strongly connected components in Gβe, for all edges
e in G. (ii) The size of the largest and of the smallest strongly
connected components in Gβe, for all edges e in G.
Let G be strongly connected. We say that edge e separates two vertices
x and y, if x and y are no longer strongly connected in Gβe.
As a second set of results, we show how to build in O(m+n) time O(n)-space
data structures that can answer in optimal time the following basic
connectivity queries on digraphs: (i) Report in O(n) worst-case time all
the strongly connected components of Gβe, for a query edge e.
(ii) Test whether an edge separates two query vertices in O(1) worst-case
time. (iii) Report all edges that separate two query vertices in optimal
worst-case time, i.e., in time O(k), where k is the number of separating
edges. (For k=0, the time is O(1)).
All of the above results extend to vertex failures. All our bounds are tight
and are obtained with a common algorithmic framework, based on a novel compact
representation of the decompositions induced by the 1-connectivity (i.e.,
1-edge and 1-vertex) cuts in digraphs, which might be of independent
interest. With the help of our data structures we can design efficient
algorithms for several other connectivity problems on digraphs and we can also
obtain in linear time a strongly connected spanning subgraph of G with O(n)
edges that maintains the 1-connectivity cuts of G and the decompositions
induced by those cuts.Comment: An extended abstract of this work appeared in the SODA 201