paths and trails in edge colored graphs
DESCRIPTION
Latin-American on Theoretical Informatics Symposium LATIN 2008. Paths and Trails in Edge Colored Graphs. Abouelaoualim, K. Das, L. Faria, Y. Manoussakis, C. Martinhon, R. Saad. Buzios-RJ - Brazil. Topics. 1. Motivation and basic definitions - PowerPoint PPT PresentationTRANSCRIPT
Paths and Trails in Edge Paths and Trails in Edge Colored Graphs Colored Graphs
Latin-American on Theoretical Informatics Symposium LATIN 2008
Abouelaoualim, K. Das, L. Faria, Y. Manoussakis, C. Martinhon, R. Saad
Buzios-RJ - Brazil
Topics
1. Motivation and basic definitions2. Properly edge-colored s-t path/trail
and extensions 3. NP-completeness 4. Approximation Algorithms for
associated maximization problems5. Some instances solved in
polynomial time6. Conclusions and open problems
2k
1k
1. Computational Biology
when the colors are used to denote a sequence of chromosomes;
2. Cryptography
when a color specify a type of transmission;
3. Social Sciences
where a color represents a relation between 2 individuals;
etc
Some Applications using edge colored graphs
Basic Definitions Prop. edge-colored path between « s » and
« t »
t
source destination
2 3
s
4
(without node repetitions!!)
1
Basic Definitions
Prop. edge-colored trail between « s » and « t »
t
source destination
2 3
s
4
(without edge repetitions!!)
1
Basic Definitions Properly edge-colored cycle passing by
« x »
5
start
2 3
x
4
(without node repetitions!!)
1
Basic Definitions Prop. edge-colored closed trail passing by
« x »
5
start
2 3
x
4
(without edge repetitions!!)
1
Basic Definitions
Almost prop. edge-colored cycle passing by « x »
(without node repetitions!!)
5
start
2 3
x
4
1
Basic Definitions Almost properly edge-colored closed trail
passing by « x »
(without edge repetitions!!)
5
start
2 3
x
4
1
How to find a properly edge-colored s-t path?
source destination
2 3
s
4
1
2-edge-colored graph G
t
source destination
2 3
s
4
1
2-edge-colored graph G
Graph G’
blue red
3’’
s
2’’
3’
4’’4’
1’
t
1’’
2’
t
We find a perfect matching (if possible) !!
How to find a properly edge-colored s-t path?
source destination
2 3
s
4
1
2-edge-colored graph G
Graph G’
blue red
3’’
s
2’’
3’
4’’4’
1’
t
1’’
2’
t
How to find a properly edge-colored s-t path?
t
a pec s-t path in G G’ contains a perfect matchingTherem: Jensen&Gutin[1998]
tstart
u
s
q
v
pdest.
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qb
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s t
(a) 3-edge colored graph (b) non-colored graph
Properly s-t path in edge-colored graphs (Szeider’s Algorithm – [2003])
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qc
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s t
(a) 3-edge colored graph (b) non-colored graph
Properly s-t path in edge-colored graphs (Szeider’s Algorithm – [2003])
tstart
u
s
q
v
pdest.
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qc
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s t
(a) 3-edge colored graph (b) non-colored graph
Properly s-t path in edge-colored graphs (Szeider’s Algorithm – [2003])
tstart
u
s
q
v
pdest.
tstart
u
s
q
v
pdest.
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qb
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s t
(a) 3-edge colored graph (b) non-colored graph
Properly s-t path in edge-colored graphs (Szeider’s Algorithm – [2003])
Our results:
Lemma: Consider a c-edge-colored graph G, and an arbitrary pec trail T between « s » and « t ». Further, suppose that at least one node in T is visited 3 times or more. Then, there exists another pec trail T’ where no nodes are visited more than 2 times
s x ty
Cycles or closed trails passing by x Almost cycles or closed trails passing by y
a b
How to find a prop. edge-colored s-t trail?
Equivalence between paths and trails
s t1
32
Graph G
pec trail P
yx
X’
X’’
y’
y’’
yx
X’
X’’
y’
y’’
Equivalence between paths and trails
s t1
32
s’1’’
1’
t’
2’’
2’
1’
1’
Graph GGraph H
pec trail P pec path P’
Theorem: We have a pec s-t trail in G we have a pec s’-t’ path in H
Shortest properly edge-colored s-t Path
destination
2-edge-colored graph G
Graph G’
blue reds
2’’
3’
4’’4’
1’ 1’’
2’
source
2 3
s
4
1 t
1
1
1
1
1
1
1
1
1
1
0
0
0
0
t
3’’
Find a minimum perferct matching (if it exists)!
Shortest properly edge-colored s-t trail
Algorithm: Shortest prop. edge-colored s-t Trail
1. Construct H=(V’,E’) associated to G2. Find a short. pec path P (if possible) between « s’ » and « t’ » in H3. Return trail T in G, and size(T)=size(P)/3
Input: A 2-edge colored graph G=(V,E), and 2 nodes s,t in VOutput: A shortest prop. edge-colored trail T between « s » and « t ».
Construction of H yx
X’
X’’
y’
y’’
yx
X’
X’’
y’
y’’Hxy
Existence of prop. edge-colored closed trails
Theorem: Let G a c-edge colored graph, such that every vertex of G is incident with at least two edges of different colors. Then either G has a bridge, or G has a prop. edge-colored closed trail.
1
32
Algorithm: Delete all bridges and all nodes adjacent to edges of the same color
54
76
1
3
5
7
pec closed trail 1,2,3,1,5,7,6,4,1
Longest prop. edge-colored path in graphs with no pec cycles
destination
2-edge-colored graph G
source
2 3
s
4
1 t
destination
2-edge-colored graph G
source
2 3
s
4
1 t
Graph G’
blue reds
2’’
3’
4’’4’
1’ 1’’
2’1
1
1
1
1
1
1
1
1
0
0
0
0
t
3’’
Find a maximum perfect matching (if it exists)!
Longest prop. edge-colored path in graphs with no pec cycles
Longest pec trail in graphs with no pec closed trails
s x ty
Cycles or closed trails passing by x(not possible !!)
Almost cycles or closed trails passing by y
We can visit node « y » several times !!
FACT: Node « y » can be visited at most times!
2
1nd
s x ty
Cycles or closed trails passing by x(not possible !!)
Almost cycles or closed trails passing by y
We can visit node « y » several times !!
FACT: Node « y » can be visited at most times!
2
1nd
Longest pec trail in graphs with no pec closed trails
Longest pec trail in graphs with no pec closed trails
yx
X1
X2
Xd
Y1
Y2
Yd
yx
X1
X2
Xd
Y1
Y2
Yd
2
1nd
Construction of H
Theorem: We have a pec s-t trail in G we have a pec s’-t’ path in H
s
k-Properly Vertex Disjoint Path problem
Input: Given a 2-edge colored graph G, a const. k and nodes s,t V.
Question: Does G contains k pec vertex disjoint paths between « s » and « t »?
t k-PVDP
Without node repetitions !!
s
k-Properly Edge Disjoint Trails problem
Question: Does G contains k pec edge disjoint trails between « s » and « t »?
t k-PEDT
Without edge repetitions !!
Input: Given a 2-edge colored graph G, a const. k and nodes s,t V.
s
k-Properly Edge Disjoint Trails problem
Question: Does G contains k pec edge disjoint trails between « s » and « t »?
t k-PEDT
Without edge repetitions !!
Input: Given a 2-edge-colored graph G, a const. k and nodes s,t V.
s
k-Properly Edge Disjoint Trails problem
Question: Does G contains k pec edge disjoint trails between « s » and « t »?
t k-PEDT
Without edge repetitions !!
Input: Given a 2-edge-colored graph G, a const. k and nodes s,t V.
s
k-Properly Edge Disjoint Trails problem
Question: Does G contains k pec edge disjoint trails between « s » and « t »?
t k-PEDT
Without edge repetitions !!
Input: Given a 2-edge colored graph G, a const. k and nodes s,t V.
s
k-Properly Edge Disjoint Trails problem
Input: Given a 2-edge colored graph G, a const. k and nodes s,t V.
Question: Does G contains k pec edge disjoint trails between « s » and « t »?
t k-PEDT
Without edge repetitions !!
NP-Completeness
u v
Fortune, Hopcroft, Wylie [1980]
Directed cycle problem - DC
Input: A digraph D=(V,A) and a pair of nodes u,v V
Output: Does exist a vertex disjoint circuit passing by « u » and « v » ?
Output: Does exist an arc disjoint Circuit passing by « u » and « v » ?
Theorem: DC problem is NP-Complete
u vDirected Closed-Trail problem - DCT
NP-Completeness
Theorem: Both 2-PVDP and 2-PEDT problems are NP Complete on arbitrary 2-edge-colored graphs.
Reduction: DC problem 2-PVDP
Reduction: DCT problem 2-PEDT
Lemma: DCT problem is NP-Complete.
Proof : (sketch)
1.
2.
3.
0. Both 2-PVDP and 2-PEDT are in NP
Both 2-PVDP and 2-PEDT in c-edge colored graphs
)( 2nc
)( 2nO
)( 2nO
Theorem: Both 2-PVDP and 2-PEDT problems are NP-Complete even for graphs with colors
s
t2-edge-coloredgraph G
Complete graph Kn
with colorsx
GKH n
)( 2n
Additional color
The k-PVDP is NP-Complete in graphs with no pec cycles
l
k
l
CB
1
SAT k-AVDP
2-edge-colored graph G=(V,E)(with no pec cycles) and 2 nodes s,t є V
True assignments for B k-Vertex Disjoint s-t Paths in G
The k-PVDP is NP-Complete in graphs with no pec cycles
)()()( 321321321 xxxxxxxxxB Example:
Variable x1
t2
s2
s1
t3
s3
t11 2 3t2s2
t3
s1 t1
s3
Variable x2
4
6
5
t3
s1 t1
s2
s3
t2
Variable x3
11
7
8
910
t2
s2
s1
t3
s3
t1
1
2 3
6
4
5
7
89
10
11
The k-PVDP is NP-Complete in graphs with no pec cycles
)()()( 321321321 xxxxxxxxxB Example:
Variable x1
t2
s2
s1
t3
s3
t11 2 3t2s2
t3
s1 t1
s3
Variable x2
4
6
5
t3
s1 t1
s2
s3
t2
Variable x3
11
7
8
910
t2
s2
s1
t3
s3
t1
1
2 3
6
4
5
7
89
10
11
s
t
The k-PVDP is NP-Complete in graphs with no pec cycles
)()()( 321321321 xxxxxxxxxB Example:
Variable x1
t2
s2
s1
t3
s3
t11 2 3t2s2
t3
s1 t1
s3
Variable x2
4
6
5
t3
s1 t1
s2
s3
t2
Variable x3
11
7
8
910
t2
s2
s1
t3
s3
t1
1
2 3
6
4
5
7
89
10
11
s
tfalsex
falsex
truex
3
2
1
The k-PVDP is NP-Complete in graphs with no pec cycles
)()()( 321321321 xxxxxxxxxB Example:
Variable x1
t2
s2
s1
t3
s3
t11 2 3t2s2
t3
s1 t1
s3
Variable x2
4
6
5
t3
s1 t1
s2
s3
t2
Variable x3
11
7
8
910
t2
s2
s1
t3
s3
t1
1
2 3
6
4
5
7
89
10
11
s
tfalsex
falsex
truex
3
2
1
t2
s2
s1 t1
t2
s2
s1 t1
NP-Completeness in graphs with no pec cycles
Grid G(x)
t
s s
t
k-PEDT is also NP-complete !!
Both 2-PVDP and 2-PEDT in c-edge with no properly edge-colored cycles (closed trails)
Theorem: The 2-PVDP (2-PEDT) problem is NP-Complete for graphs with no pec cycles (closed trail) and c=Ω(n) colors
s
t2-edge-coloredgraph Gb
GKH n
Additional colora
c
d
e
Kn with n-1 colors
Both 2-PVDP and 2-PEDT in c-edge with no properly edge-colored cycles (closed trails)
Theorem: The 2-PVDP (2-PEDT) problem is NP-Complete for graphs with no pec cycles (closed trail) and c=Ω(n) colors
s
t2-edge-coloredgraph Gb
GKH n
Additional colora
c
d
e
Kn with n-1 colors
Both 2-PVDP and 2-PEDT in c-edge with no properly edge-colored cycles (closed trails)
Theorem: The 2-PVDP (2-PEDT) problem is NP-Complete for graphs with no pec cycles (closed trail) and c=Ω(n) colors
s
t2-edge-coloredgraph Gb
GKH n
Additional colora
c
d
e
Kn with n-1 colors
Both 2-PVDP and 2-PEDT in c-edge with no properly edge-colored cycles (closed trails)
Theorem: The 2-PVDP (2-PEDT) problem is NP-Complete for graphs with no pec cycles (closed trail) and c=Ω(n) colors
s
t2-edge-coloredgraph Gb
GKH n
Additional colora
c
d
e
Kn with n-1 colors
Both 2-PVDP and 2-PEDT in c-edge with no properly edge-colored cycles (closed trails)
Theorem: The 2-PVDP (2-PEDT) problem is NP-Complete for graphs with no pec cycles (closed trail) and c=Ω(n) colors
s
t2-edge-coloredgraph Gb
GKH n
Additional colora
c
d
e
Kn with n-1 colors
Approximation Algorithm for the MPEDT
Greedy-ED Procedure
1. S Ø
2. Repeat
Find an pec shortest trail T between « s » and « t »;
S S E(T);
E E - E(T);
Until (no pec s-t trails are found)
Theorem: The Greedy-ED has performance ratio equal tofor the MPEDT problem
mO /1
Approximation Algorithm for the MPVDP
Greedy-VD Procedure
1. S Ø
2. Repeat
Find a pec shortest path P between « s » and « t »;
S S E(P);
V V - V(P);
Until (no pec s-t paths are found)
Theorem: The Greedy-VD has performance ratio equal to for theMPVDP problem
nO /1
0T
1T
2/kT
s t
0T
3T
2T
1T
2T
3T
2/kT
Greedy solution ZH = 1
Approximation ratio for MPEDT
1)( 0 kTE 2/,...,1,2)( kiforkTE i mk
0T
1T
2/kT
s t
0T
3T
2T
1T
2T
3T
2/kT
Greedy solution ZH = 1
Approximation ratio for MPEDT
Optimum solution Opt = k/2
1)( 0 kTE 2/,...,1,2)( kiforkTE i mk
0T
1T
2/kT
s t
0T
3T
2T
1T
2T
3T
2/kT
Approximation ratio for MPEDT
1)( 0 kTE 2/,...,1,2)( kiforkTE i mk
Approximation ratio =
m
OkkOpt
ZH 12
2/
1
tstart
u
s
q
v
pdest.
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qb
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s1
(a) 3-edge colored graph (b) non-colored graph
s2
t1
t2
Some Polynomial Cases: we have no (almost) pec cycles passing by « s » or « t ».
tstart
u
s
q
v
pdest.
color 1
color 2
color 3pa
v’ v’’ u’ u’’
va vb
v1 v2
q’ q’’
qa qb
q2 q3
p’ p’’
pb pc
p1 p2 p3
ua ub uc
u1 u2 u3
s1
(a) 3-edge colored graph (b) non-colored graph
s2
t1
t2
Some Polynomial Cases: we have no (almost) pec cycles passing by « s » or « t ».
Open Problems and Future Diretions
Input: Given a c-edge-colored complete graph , and vertices s,t of
Open question: Maximize the number of edge-disjoint pec s-t paths in is in P?
Future work: What about the performance ratio of both MPVDP and MPEDT problems in graphs with no pec cycles (closed trails)?
cnK
cnKcnK
Input: Given a 2-edge-colored graph with no pec cycles, vertices s,t V(G) and a fixed k 2.Question: Does G contains k pec vertex disjoint paths between « s » and « t »?
Thanks for your attention!!