Upload
katzelad1
View
49
Download
0
Embed Size (px)
Citation preview
Improved Deterministic Algorithms for Decremental Reachability and Strongly Connected Componentsby Jakub ŁąckiA presentation by Elad
KatzAlgorithms Seminar
Instructed by Prof. Uri Zwick
Fall 2012-13Tel Aviv University
Greg’s Cable Map
What happened if Tamares Telecom (brown) went out of business?What about Med Nautilus (dark blue)?
Who got disconnected?
Problem DefinitionLet G=(V, E) be a directed graph, n=|V|, m=|E|.
query(u, v) – check if there is a directed path u → v
delete(u, v) – delete the edge (u, v)
Goal: O(1) query time, minimize deletion timeProblem: Deleting a single edge might affect possible queries!
2( )n
Solution: minimize deletion time of all edges in arbitrary order
Previous ResultsLa Poutre and van Leeuwen DeterministicFrigioni DeterministicDemetrescu and Italiano DeterministicHenzinger and King* Monte CarloBaswana Monte CarloRoditty and Zwick Las Vegas
For maintenance of strongly connected components:Frigioni** DeterministicRoditty and Zwick Las Vegas* query time ** when deleted edges are selected at random
2( )O m2( )O m
3( )O n2( log )O mn n
43 3( log )O mn n
( )O mn
2( )O m( )O mn
( )lognOn
( )O mn
Definitions
DefinitionsGu v u v if there is a directed path from to .
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
A is aninclusio
st rongly connen-maximal st ro
cted congly co
mponnenent
cted (SCC)
set .
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
A is aninclusio
st rongly connen-maximal st ro
cted congly co
mponnenent
cted (SCC)
set .( , )u v v uAn edge is an of and anin-edge out - oe ge f d .
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
A is aninclusio
st rongly connen-maximal st ro
cted congly co
mponnenent
cted (SCC)
set .( , )u v v uAn edge is an of and anin-edge out - oe ge f d .
A is a gradirected ph with nacyclic graph (DAG o directed cyc) les.
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
A is aninclusio
st rongly connen-maximal st ro
cted congly co
mponnenent
cted (SCC)
set .( , )u v v uAn edge is an of and anin-edge out - oe ge f d .
A is a gradirected ph with nacyclic graph (DAG o directed cyc) les.
vA vertex in a DAG is a if it has nosource sink
in-edgesand a if it has no out -edges.
DefinitionsGu v u v if there is a directed path from to .
1 2 1 2, G
S V
s s S s s
st rongly connA non-empty set is if foreve
ecte
dry .
A is aninclusio
st rongly connen-maximal st ro
cted congly co
mponnenent
cted (SCC)
set .( , )u v v uAn edge is an of and anin-edge out - oe ge f d .
A is a gradirected ph with nacyclic graph (DAG o directed cyc) les.
vA vertex in a DAG is a if it has nosource sink
in-edgesand a if it has no out -edges.
( )n O m no isolated vert icAssumpt i es on:
FindUnreachableDown( , , )
( , )
G w S G wS V
U I U V w I E U
- DAG , source ,a set which contains all other sources.
- unreachable from , incident to .
Input :
Output :
1
2 3
4
5
6
7
8
9
:::
UIQ 6 9
6(6,7)
7
9(9,3) (9,7)7
(7, 2)(7, 8)
8
8
FindUnreachableDown - Proof
1,...,.
Let be a topological ordering of .Assume by induct ion iff it is unreachable from .If , it is inserted to at some point .If it is inserted at line 6, it is a source
k
j
i
v v Gj i v U w
v U Qw
Proof :
1
( , ) ( )
, therefore it is unreachable from .If it is inserted at line 14, it cannot be , which is a source.By the induct ion hypothesis is unreachable from for all ,hence is unreachable
j j i
i
wv
v w v v E G
v
from .If is unreachable from , it is either a sourceor all it s predecessors are unreachable from .If it is a source, it is not it self and is inserted to at line 6.Otherwise, by the induct ion
i
wv w
ww Q hypothesis all it s predecessors,
unreachable from , are inserted to .Consequent ly all it s in-edges are deleted, and it is inserted to at line 14.
w QQ
The algorithm is correct .Lemma : The algorithm is correct .Lemma :
FindUnreachableDown –Runtime Analysis
Line 5 requires t ime.Lines 8-9 require t ime, since no vertex is inserted to more than once.Lines 10, 12 require t ime, as no edge is processed more than once.Overall, The algorithm runs in
O S
O U Q
O I
O t ime.S U I
FindUnreachableDown - Usage
( )There exists a total t ime determinist ic algorithmfor decremental single-source reachability of a .
O mDAG
Lemma:
FindUnreachableDown - Usage
( )There exists a total t ime determinist ic algorithmfor decremental single-source reachability of a .
O mDAG
Lemma:
( )
( , ) , ,
( , )
We maintain the set of vert ices reachable from the source .The init ial set is obtained using BFS in .After each delet ion of we call FindUnreachable( ) ,and delete returned
sO m
u v E G v s
U I
Proof :
( ) from the graph.
The total size of all outputs of calls t o FindUnreachable is ,so we get the required running t ime.
O m
FindUnreachableDown - Usage
( )There exists a total t ime determinist ic algorithmfor decremental single-source reachability of a .
O mDAG
Lemma:
( )
( , ) , ,
( , )
We maintain the set of vert ices reachable from the source .The init ial set is obtained using BFS in .After each delet ion of we call FindUnreachable( ) ,and delete returned
sO m
u v E G v s
U I
Proof :
( ) from the graph.
The total size of all outputs of calls t o FindUnreachable is ,so we get the required running t ime.
O m
( )There exists an total t ime determinist ic algorithmfor decremental maintenance of the t ransit ive closure of a .
O mnDAG
Corollary:
FindUnreachableDown - Usage
( )There exists a total t ime determinist ic algorithmfor decremental single-source reachability of a .
O mDAG
Lemma:
( )
( , ) , ,
( , )
We maintain the set of vert ices reachable from the source .The init ial set is obtained using BFS in .After each delet ion of we call FindUnreachable( ) ,and delete returned
sO m
u v E G v s
U I
Proof :
( ) from the graph.
The total size of all outputs of calls t o FindUnreachable is ,so we get the required running t ime.
O m
( )There exists an total t ime determinist ic algorithmfor decremental maintenance of the t ransit ive closure of a .
O mnDAG
Corollary:
Run the above algorithm for every vertex.Proo f :
FindUnreachable( , , )
( , )
, ,t
G w S G wS V
U I w U VI E U
G w S
- DAG , sink ,a set which contains all other sinks.
- is unreachable from , incident to .
FindUnreachableDown( )
Input :
Output :
FindUnreachableUp
Implementation:
( , , )
( , )
, ,t
G w S G wS V
U I w U VI E U
G w S
- DAG , sink ,a set which contains all other sinks.
- is unreachable from , incident to .
FindUnreachableDown( )
Input :
Output :
FindUnreachableUp
Implementation:
( , )
( , ) G G
G S G s tS V
U I U V u U s u tI E U
- DAG with dist inguished source and sink ,a set which contains all other sources and sinks.
- , there is no path incident to .
FindUnreaInput :
Output :
chable
, , , ,G s S G t SFindUnreachableDown( ) FindUnreachableUp( )Implementation:
FindUnreachable
FindUnreachable - Examples
out
in
out
in
Decremental Maintenance of SCCs
,
,, ( , )
Let be a directed graph, , .query( ) - check if and are in the same SCCdelete( ) - delete the edge
G V E n V m E
u v u vu v u v
Decremental Maintenance of SCCs
,
,, ( , )
Let be a directed graph, , .query( ) - check if and are in the same SCCdelete( ) - delete the edge
G V E n V m E
u v u vu v u v
We can find init ial SCCs in linear t ime is st rongly connected.G
Assumption:
More Definitions
More Definitions is a directed graph obtained from by cont ract ing
all it s SCCs, preserving mult iple edges but not C
sondense
elf lo)
s.(
opGG
More Definitions is a directed graph obtained from by cont ract ing
all it s SCCs, preserving mult iple edges but not C
sondense
elf lo)
s.(
opGG
, is the graph obtained from by split t ing into vert ices and .
is given all the in-edges, is given all the out -edges. and are the source and sink used
Spl
by Find
it ( )
Unr h
eac
in out
in out
in out
G dd d
d dd d
G d
able.
More Definitions is a directed graph obtained from by cont ract ing
all it s SCCs, preserving mult iple edges but not C
sondense
elf lo)
s.(
opGG
, is the graph obtained from by split t ing into vert ices and .
is given all the in-edges, is given all the out -edges. and are the source and sink used
Spl
by Find
it ( )
Unr h
eac
in out
in out
in out
G dd d
d dd d
G d
able.
:, ,S Cplit ondeAndConde nse(Splinse( )) t ( )G G dd
More Definitions is a directed graph obtained from by cont ract ing
all it s SCCs, preserving mult iple edges but not C
sondense
elf lo)
s.(
opGG
, is the graph obtained from by split t ing into vert ices and .
is given all the in-edges, is given all the out -edges. and are the source and sink used
Spl
by Find
it ( )
Unr h
eac
in out
in out
in out
G dd d
d dd d
G d
able.
:, ,S Cplit ondeAndConde nse(Splinse( )) t ( )G G dd
1
1 2
2, , , is the graph obtained from byreplacing all occurrences of and withMerg )
.e( H d
d Gd d G
d d
Example1
2 3
4
5
6
7
Example1
2 3
4
5
6
7
Split
1out
2 3
4 5
6
7
1in
Split
Example1
2 3
4
5
6
7
Split
1out
2 3
4 5
6
7
1in
Split
Condense
2 3 4
7
5
6
Example1
2 3
4
5
6
7
Split
1out
1in
Split
Condense
Example1
2 3
4
5
6
7
SplitSplit
Condense
Merge
1
5
6
7
2 3 42 3 4
7
5
6
1out
1in
,( , ) ,
Let be a graph and define SplitAndCondense( ) .Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
nts of Merge( ) form seperate SCCs of .U G
Back to FindUnreachable
,( , ) ,
Let be a graph and define SplitAndCondense( ) .Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
nts of Merge( ) form seperate SCCs of .U G
1 2,
If there exists a path , Merge( ) .Fix , then is a st rongly connected set in .Assume by cont radict ion is not maximal, then there arevert ices s.t . there is a path
dGout ind d U U
u U u Gu
v u v u v
Proof :
1 2 1
1
2
.If the path includes , there is a path , correspondingto a path , and , a cont radict ion.If the path does not include , it corresponds to a path
d d
d
G G
G G
G Gin out
G
v v
d d v d
d u d u Ud
u v
, ...
( )
, but is a DAG, a contradict ion.If there is no path , . No cycle of contains ,
thus split t ing does not break any other SCC in ,and Merge( )=Merge( ) are the SCCs
d
d
Gd
Gout in d
d
u G
d d U V G G dd G
U V G
of .G
Back to FindUnreachable
Back to FindUnreachable (2) ,
( , ) ,Let be a graph and define SplitAndCondense( ) .
Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.
d
d
U G
G d V G U
U V G d
Back to FindUnreachable (2) ,
( , ) ,Let be a graph and define SplitAndCondense( ) .
Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.
d
d
U G
G d V G U
U V G d
( )\ ( )\
( ) \ ( ) \
( ) \
If there exists a path , .From (1) , the SCC containing is a subset of Merge( ) .It is a SCC because for every there is a path
d
d d
Gout in d
d
d
V G U V Gout
d d U V G
d V G U V G U
v V G U
d v
Proof :
, corresponding to a path .If there is no path , .
The SCC containing is , otherwise there is a path through another vertex of the SCC, a cont radic
d
d
U G Gin
Gout in d
Gout in
d d v d
d d U V G
d d d d
t ion.
Back to FindUnreachable (3) ,
( , ) ,Let be a graph and define SplitAndCondense( ) .
Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
( ) \
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.(3) The SCCs of are Merge( ) .
d
d
d
U G
G d V G U
U V G d
G V G U U
Back to FindUnreachable (3) ,
( , ) ,Let be a graph and define SplitAndCondense( ) .
Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
( ) \
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.(3) The SCCs of are Merge( ) .
d
d
d
U G
G d V G U
U V G d
G V G U U
( ) \ ( ) \
( ) \
( ) \
If , from (1) and (2) the SCCs are given byMerge( ) Merge( ) Merge( ) .
If , is an empty set and from (1)the SCCs are given by Merge( ) Merge( ) .
d
d d
d d
d
U V G
V G U U V G U U
U V G V G U
U V G U U
Proof :
Back to FindUnreachable (4)
( , ) ( ) ' '
( , ) ', ,
Let be a st rongly connected graph and defined as above.Delete from and obtaining and .Let be the result computed by FindUnreachable( ) .(1) The SCC of
d
d d d
d
G Gu v E G G G G G
U I G u v
Corollary:
( ) \
\
containing shrinks to Merge( ) .(2) New SCCs, given by Merge( ) , emerge.
dG d V G U d
U d
,( , ) ,
Let be a graph and define SplitAndCondense( ) .Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
( ) \
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.(3) The SCCs of are Merge( ) .
d
d
d
U G
G d V G U
U V G d
G V G U U
Back to FindUnreachable (4)
( , ) ( ) ' '
( , ) ', ,
Let be a st rongly connected graph and defined as above.Delete from and obtaining and .Let be the result computed by FindUnreachable( ) .(1) The SCC of
d
d d d
d
G Gu v E G G G G G
U I G u v
Corollary:
( ) \
\
containing shrinks to Merge( ) .(2) New SCCs, given by Merge( ) , emerge.
dG d V G U d
U d
,( , ) ,
Let be a graph and define SplitAndCondense( ) .Let be the result returned by FindUnreachable( ) ,where contains all sources and sinks in except for and .(1) All eleme
d
d
d in out
G G G dU I G SS G d d
Le : mma
( ) \
( )
( ) \
nts of Merge( ) form seperate SCCs of .(2) The SCC of which contains is given by Merge( ) if , and otherwise.(3) The SCCs of are Merge( ) .
d
d
d
U G
G d V G U
U V G d
G V G U U
Direct ly from the lemma.Proof :
Back to FindUnreachable (5)
' ( , )
' ( ', ') | ' | | ' |
Let , , and be defined as in the previous corollary.Assuming we have already computed , We can obtain an implicitrepresentat ion of Condense( ) in t ime.
d
d
C C C C
G G G U IG
G V E O V E
Lemma:
Back to FindUnreachable (5)
' ( , )
' ( ', ') | ' | | ' |
Let , , and be defined as in the previous corollary.Assuming we have already computed , We can obtain an implicitrepresentat ion of Condense( ) in t ime.
d
d
C C C C
G G G U IG
G V E O V E
Lemma:
'From the corollary, we can compute the vertex set of
Condense( ) using FindUnreachable. It s edges can be obtainedfrom by replacing every edge endpoint which does not belongto with , the vd
GI
U v
Proof :
ertex of Condense( ) containing .G d
Back to FindUnreachable (5)
' ( , )
' ( ', ') | ' | | ' |
Let , , and be defined as in the previous corollary.Assuming we have already computed , We can obtain an implicitrepresentat ion of Condense( ) in t ime.
d
d
C C C C
G G G U IG
G V E O V E
Lemma:
'From the corollary, we can compute the vertex set of
Condense( ) using FindUnreachable. It s edges can be obtainedfrom by replacing every edge endpoint which does not belongto with , the vd
GI
U v
Proof :
ertex of Condense( ) containing .G d
dG G When deleting edges from , we can track strong connectivity of !
Back to FindUnreachable (5)
' ( , )
' ( ', ') | ' | | ' |
Let , , and be defined as in the previous corollary.Assuming we have already computed , We can obtain an implicitrepresentat ion of Condense( ) in t ime.
d
d
C C C C
G G G U IG
G V E O V E
Lemma:
'From the corollary, we can compute the vertex set of
Condense( ) using FindUnreachable. It s edges can be obtainedfrom by replacing every edge endpoint which does not belongto with , the vd
GI
U v
Proof :
ertex of Condense( ) containing .G d
dG G When deleting edges from , we can track strong connectivity of !
What about other Q: edges?
Back to FindUnreachable (5)
' ( , )
' ( ', ') | ' | | ' |
Let , , and be defined as in the previous corollary.Assuming we have already computed , We can obtain an implicitrepresentat ion of Condense( ) in t ime.
d
d
C C C C
G G G U IG
G V E O V E
Lemma:
'From the corollary, we can compute the vertex set of
Condense( ) using FindUnreachable. It s edges can be obtainedfrom by replacing every edge endpoint which does not belongto with , the vd
GI
U v
Proof :
ertex of Condense( ) containing .G d
dG G When deleting edges from , we can track strong connectivity of !
What about other Q: edges?, Maintain SCCs of Split ( ) - A: G d Trees!
Even More Definitions
Even More Definitions
,
,,
Let be a st rongly connected graph. An of is:If , a single node containing .Otherwise, a root containing SplitAndCondense( ) ,and a child for each SCC SplitAndCo
SCC
nde
-t r
nse( )which i
ee G G
G v v
G dv G d
s the SCC-t ree of , except for only one child
for both and .in out
vd d
Even More Definitions
,
,,
Let be a st rongly connected graph. An of is:If , a single node containing .Otherwise, a root containing SplitAndCondense( ) ,and a child for each SCC SplitAndCo
SCC
nde
-t r
nse( )which i
ee G G
G v v
G dv G d
s the SCC-t ree of , except for only one child
for both and .in out
vd d
A is a vertex of a SCC-tnode ree.
Even More Definitions
,
,,
Let be a st rongly connected graph. An of is:If , a single node containing .Otherwise, a root containing SplitAndCondense( ) ,and a child for each SCC SplitAndCo
SCC
nde
-t r
nse( )which i
ee G G
G v v
G dv G d
s the SCC-t ree of , except for only one child
for both and .in out
vd d
A is a vertex of a SCC-tnode ree.An is a non-linne eaf r node node.
Even More Definitions
,
,,
Let be a st rongly connected graph. An of is:If , a single node containing .Otherwise, a root containing SplitAndCondense( ) ,and a child for each SCC SplitAndCo
SCC
nde
-t r
nse( )which i
ee G G
G v v
G dv G d
s the SCC-t ree of , except for only one child
for both and .in out
vd d
A is a vertex of a SCC-tnode ree.An is a non-linne eaf r node node.
( )For any node :
is it s parent node.N
p N
Even More Definitions
,
,,
Let be a st rongly connected graph. An of is:If , a single node containing .Otherwise, a root containing SplitAndCondense( ) ,and a child for each SCC SplitAndCo
SCC
nde
-t r
nse( )which i
ee G G
G v v
G dv G d
s the SCC-t ree of , except for only one child
for both and .in out
vd d
A is a vertex of a SCC-tnode ree.An is a non-linne eaf r node node.
( )For any node :
is it s parent node.N
p N
( ) is the graph in the node.D N
Example1
2 3
4
5
1in 2 3 4 5 1out
2in 2out34 5 1
2 34in 5 4out
4 5
Constructing SCC Trees
( )( )
An SCC-t ree can be const ructed in t ime,where is the depth of the t ree. It requires space.
O mO n m
Lemma:
Constructing SCC Trees
( )( )
An SCC-t ree can be const ructed in t ime,where is the depth of the t ree. It requires space.
O mO n m
Lemma:
( )( )
The t ree can be const ructed in t ime using a linear t imealgorithm for finding SCCs, as each level of the t ree takes t ime.
O mO m
Proof :
( )The t ree has leaves and each inner node has at least two children,therefore the total number of nodes is .There is a biject ion between vert ices in graphs of inner nodesto their children in the
nO nD
( ) t ree, hence the total number of vert ices
in all graphs is . Also, each edge is stored in only one node.Consequent ly we get the required space.
D O n We do not store the SCCs explicitly!
Deleting an Edge 1
2 3
4
5
1in 2 3 4 5 1out
2in 2out3 1
2 34 5
4
5
1in2 3 4 1out
2in 2out3 1
2 34
4
5
5
2in 2out3 1
2 34
4 5
, : [ ] [ ]query( )u v SCC u SCC v
1in 2 3 4 5 1out
2in 2out34 5 1
2 34in 5 4out
4 5
Runtime Analysis( )
(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
Runtime Analysis( )
(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
( )( )
( ) ( )
By the lemma const ruct ing the SCC-t ree takes t imeand uses space.Every edge is lifted up the t ree t imes, a total of lift -ups.
FindUnreachable takes linear t ime with
O mO n m
O O m
Line 1:
Proof :
respect to it s input and output .It s output consists of edges to be lifted up or deleted,and it s input consists of vert ices lifted-up,which gives the required running t ime.
Each subt ree is liftLine 4 : ( )( )
( )( )
ed up t imes. Each vertex and edge are lifted up t imes.Each vertex incident to is lifted up t imes.Each subt ree is lifted up t imes.
OO
e OO
Line 6 :Line 8 : Line 10 :
( )(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
Runtime Analysis (2)
( )(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
Runtime Analysis (2)
( )(1)
( )
There exists an total t ime determinist ic algorithmfor decremental maintenance of SCCs which answers queries in t imeand uses space.
O mnO
O n m
Corollary:
( )(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
Runtime Analysis (2)
( )(1)
( )
There exists an total t ime determinist ic algorithmfor decremental maintenance of SCCs which answers queries in t imeand uses space.
O mnO
O n m
Corollary:
( )Direct ly From the theorem, we have proved .O n Proof :
( )(1) ( )
If the depth of an SCC-t ree is , the algorithm processesany sequence of edge delet ions in total t ime and answerseach query in t ime, using space.
O mO O n m
Theor em:
Runtime Analysis (2)
( )(1)
( )
There exists an total t ime determinist ic algorithmfor decremental maintenance of SCCs which answers queries in t imeand uses space.
O mnO
O n m
Corollary:
( )Direct ly From the theorem, we have proven .O n Proof :
What about the transitive closure?
Back to the Transitive Closure
( )
(1) ( )
There exists an total t ime determinist ic algorithmfor decremental maintenance of the t ransit ive closure which answersqueries in t ime and uses space.
O mn
O O n m
Theorem:
Back to the Transitive Closure
( )
(1) ( )
There exists an total t ime determinist ic algorithmfor decremental maintenance of the t ransit ive closure which answersqueries in t ime and uses space.
O mn
O O n m
Theorem:
We first build SCC-t rees for each SCC of the graph,then the SCCs are cont racted to create a DAG.When delet ing an edge from the DAG we use the algorithmfrom the first corollary.When delet ing an
Proof :
edge from inside a SCC we use the algorithm from thelast corollary, if the SCC decomposes we use FindUnreachableDownwith the set of vert ices of the decomposed SCC as the second parameter.When checking [ ] [ ] for a path from to we check if or if there is a path from the SCC of t o the SCC of .
u v SCC u SCC vu v
Planar Graphs( ) 8
0 1A planar graph , , has a subset of vert ices whose
removal decomposes it into components of size at most easepe
ch, .The subset can be found in linear t imrator e.
G V G n nn
Theorem*:
* Lipton & Tarjan, 1979
Planar Graphs( ) 8
0 1A planar graph , , has a subset of vert ices whose
removal decomposes it into components of size at most easepe
ch, .The subset can be found in linear t imrator e.
G V G n nn
Theorem*:
1.5
( , )
( )
Let be a directed planar graph and .There exists an algorithm for decremental maintenance of it s SCCswhich runs in total t ime.
G V E V n
O n
Theorem:
* Lipton & Tarjan, 1979
Planar Graphs( ) 8
0 1A planar graph , , has a subset of vert ices whose
removal decomposes it into components of size at most easepe
ch, .The subset can be found in linear t imrator e.
G V G n nn
Theorem*:
1.5
( , )
( )
Let be a directed planar graph and .There exists an algorithm for decremental maintenance of it s SCCswhich runs in total t ime.
G V E V n
O n
Theorem:
2
( )(1) ( ) (1)
( ) 8 ( ) 8 8 ( )
We use the previous algorithm for maintaining SCCs,only choosing vert ices to split from the seperator.The depth of the SCC-t ree is then bounded:nn O n O
n n n n n n
P of ro :
1.5
8... (1)1
( ) ( )Therefore, the algorithm runs in overall t ime.
n O O n
O m O n
* Lipton & Tarjan, 1979 3 6 ( ) In planar graphs .m n O n Note:
The End