SlideShare a Scribd company logo
Color Coding and Chromatic Coding
Venkatesh Raman
The Institute of Mathematical Sciences

3 March 2014

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

1 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.

Algorithm

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.
x ∈ Σ∗

Algorithm

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.
x ∈ Σ∗

Algorithm

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.
x ∈ Σ∗

Algorithm
x ∈ Π?
(Output correct answer with good probability)

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithms
Let Π ⊆ Σ∗ be a problem.
x ∈ Σ∗

Algorithm
x ∈ Π?
(Output correct answer with good probability)
Here we are interested in randomized algorithms for parameterized
problems taking running time f (k)|x|O(1) with constant success
probability.
Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

2 / 17
Randomized Algorithm for UFVS

Definition (Feedback Vertex Set)
Let G = (V , E ) be an undirected graph. S ⊆ V is called feedback vertex
set if G  S is a forest.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

3 / 17
Randomized Algorithm for UFVS

Definition (Feedback Vertex Set)
Let G = (V , E ) be an undirected graph. S ⊆ V is called feedback vertex
set if G  S is a forest.
Undirected Feedback Vertex Set (UFVS)
Input:
Parameter:
Question:

An undirected graph G = (V , E ) and a positive integer k
k
Does there exists a feedback vertex set of size at most k

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

3 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.
Short circuit degree 2 vertices.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.
Short circuit degree 2 vertices.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.
Short circuit degree 2 vertices.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.
Short circuit degree 2 vertices.
Add vertex x to FVS, if x has self loop.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS

Do the following preprocessing rules
Delete degree ≤ 1 vertices.
Short circuit degree 2 vertices.
Add vertex x to FVS, if x has self loop.
Now we can assume every vertex in G has degree ≥ 3.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

4 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2
Proof:

F
H=G - F
;
Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2
Proof:

Let

V≤1 = set of degree ≤ 1 vertices in H,
V2 = set of degree 2 vertices in H, and

F

V≥3 = set of degree ≥ 3 vertices in H.

H=G - F
;
Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2
Proof:

Let

V≤1 = set of degree ≤ 1 vertices in H,
V2 = set of degree 2 vertices in H, and

F

V≥3 = set of degree ≥ 3 vertices in H.
Number of edges between H and F ,
E (H, F ) ≥ 2V≤1 + V2

H=G - F
;
Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2
Proof:

Let

V≤1 = set of degree ≤ 1 vertices in H,
V2 = set of degree 2 vertices in H, and

F

V≥3 = set of degree ≥ 3 vertices in H.
Number of edges between H and F ,
E (H, F ) ≥ 2V≤1 + V2
> V≤1 + V2 + V≥3 ( V≤1 > V≥3 )

H=G - F
;
Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS
Claim : If G is graph with minimum degree ≥ 3, then number of edges
incident to any FVS F is ≥ E (G ) .
2
Proof:

Let

V≤1 = set of degree ≤ 1 vertices in H,
V2 = set of degree 2 vertices in H, and

F

V≥3 = set of degree ≥ 3 vertices in H.
Number of edges between H and F ,
E (H, F ) ≥ 2V≤1 + V2
> V≤1 + V2 + V≥3 ( V≤1 > V≥3 )
= V (H)> E (H).

H=G - F
;

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

5 / 17
Randomized Algorithm for UFVS

Algorithm
Initially we set S ← ∅. Now run the following steps k times.
1: Apply preprocessing rules and create an equivalent instance (G , k )
2: Pick an edge e, u.a.r (i.e with probability

1
E (G ) )

3: Choose an end point of e, u.a.r (i.e with probability 1 ) into S and
2
delete it from the graph.
Now if S is a FVS, output S, otherwise output No.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

6 / 17
Analysis

If the input instance is No instance Pr[Algorithm output No] = 1.
Let the input instance is Yes instance and F is a FVS od size ≤ k.
Pr[Choosing an edge incident to F in step 2] ≥
Pr[Chosen vertex is in F in step 3] ≥
Pr[S=F] ≥

1
2
1 1
·
2 2
1
4k

Now we repeat the algorithm 4k times.
1
Pr[Algorithm fails in all repetitions] ≤ 1 − 4k
1
Pr[Algorithm succeed at least once] ≥ 1 − e ≥

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

4k
1
2

1
≤ e.

3 March 2014

7 / 17
Color Coding

This technique is introduced by Alon et al. (1995)
This technique is used to solve constant treewidth k-sized subgraph
isomorphism problem.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

8 / 17
Color Coding

This technique is introduced by Alon et al. (1995)
This technique is used to solve constant treewidth k-sized subgraph
isomorphism problem.
We illustrate this technique by applying to k-path

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

8 / 17
k-path

k-path
Input:
Parameter:
Question:

An undirected graph G and a positive integer k
k
Does there exists a path on k vertices in G

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

9 / 17
Colorful path

v1
v5
v7

v2

v6

v3

v4

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

10 / 17
Colorful path

v1
v5
v7

v2

v6

v3

v4
colorful path on 5 vertices in the graph G ?

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

10 / 17
Algorithm for k-path

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

11 / 17
Algorithm for k-path

Color each vertex of the input graph G , u.a.r using from the set of k
colors, [k]
Check whether there exists a colorful k-path in the colored graph and
output Yes/No accordingly

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

11 / 17
Algorithm for k-path

Color each vertex of the input graph G , u.a.r using from the set of k
colors, [k]
Check whether there exists a colorful k-path in the colored graph and
output Yes/No accordingly
Running Time : Time to check colorful k-path × nO(1)

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

11 / 17
Algorithm for k-path

Color each vertex of the input graph G , u.a.r using from the set of k
colors, [k]
Check whether there exists a colorful k-path in the colored graph and
output Yes/No accordingly
Running Time : Time to check colorful k-path × nO(1)
Probability of success
If (G , k) is a No instance, the probability of success is 1.
If (G , k) is an Yes instance, the probability of success is at least

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

k!
.
kk

11 / 17
DP for Checking colorful k-path

We introduce 2k · |V (G )| Boolean variables:

x(v , C ) = TRUE for some v ∈ V (G ) and C ⊆ [k]
There is path ends at v where each color in C appears
exactly once and no other color appears.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

12 / 17
DP for Checking colorful k-path

Clearly, x(v , {color (v )}) = TRUE. Recurrence for vertex v with color r :
x(u, C  {r })

x(v , C ) =
uv ∈E (G )

If we know every x(v , C ) with |C | = i, then we can determine every
x(v , C ) with |C | = i + 1. All the values can be determined in time
O(2k · |E (G )|).
There is a colorful path ends at t ⇐⇒ x(t, [k]) = TRUE for some t.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

13 / 17
Analysis for k-path
The algorithm for k-path has
Running time 2k nO(1)

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

14 / 17
Analysis for k-path
The algorithm for k-path has
Running time 2k nO(1)
Success probability
k!
at least k k if (G , k) is an Yes instance
1 if (G , k) is an No instance

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

14 / 17
Analysis for k-path
The algorithm for k-path has
Running time 2k nO(1)
Success probability
k!
at least k k if (G , k) is an Yes instance
1 if (G , k) is an No instance
k

Now run the algorithm k (≤ e k ) times and output Yes if at least once we
k!
get an Yes answer, otherwise output No.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

14 / 17
Analysis for k-path
The algorithm for k-path has
Running time 2k nO(1)
Success probability
k!
at least k k if (G , k) is an Yes instance
1 if (G , k) is an No instance
k

Now run the algorithm k (≤ e k ) times and output Yes if at least once we
k!
get an Yes answer, otherwise output No.
Probability of failure ≤ 1 −

Venkatesh Raman (IMSc)

k
k! k /k!
kk

≤ e −1

Randomized Techniques in FPT

3 March 2014

14 / 17
Analysis for k-path
The algorithm for k-path has
Running time 2k nO(1)
Success probability
k!
at least k k if (G , k) is an Yes instance
1 if (G , k) is an No instance
k

Now run the algorithm k (≤ e k ) times and output Yes if at least once we
k!
get an Yes answer, otherwise output No.
Probability of failure ≤ 1 −

k
k! k /k!
kk

≤ e −1

k-path can be solved in randomized (2e)k nO(1) time, with constant success probability.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

14 / 17
Derandomization

Suppose we have a list of colorings col1 , col2 , . . . , colm such that for
any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then
instead of random coloring we can use these list of colorings to get a
deterministic algorithm.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

15 / 17
Derandomization

Suppose we have a list of colorings col1 , col2 , . . . , colm such that for
any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then
instead of random coloring we can use these list of colorings to get a
deterministic algorithm.
Such a list of colorings is called an (n, k)-family of perfect hash
functions

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

15 / 17
Derandomization

Suppose we have a list of colorings col1 , col2 , . . . , colm such that for
any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then
instead of random coloring we can use these list of colorings to get a
deterministic algorithm.
Such a list of colorings is called an (n, k)-family of perfect hash
functions
There exists an (n, k)-family of perfect hash functions of size
e k k O(log k) log2 n and can be constructed in time linear in the output
size

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

15 / 17
Derandomization

Suppose we have a list of colorings col1 , col2 , . . . , colm such that for
any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then
instead of random coloring we can use these list of colorings to get a
deterministic algorithm.
Such a list of colorings is called an (n, k)-family of perfect hash
functions
There exists an (n, k)-family of perfect hash functions of size
e k k O(log k) log2 n and can be constructed in time linear in the output
size
k-path can be solved deterministically in (2e)k k O(log k) nO(1) time.

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

15 / 17
Chromatic Coding

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

16 / 17
Thank You

Venkatesh Raman (IMSc)

Randomized Techniques in FPT

3 March 2014

17 / 17

More Related Content

PDF
PDF
Characterizing the Distortion of Some Simple Euclidean Embeddings
PDF
Fine Grained Complexity
PDF
Fine Grained Complexity of Rainbow Coloring and its Variants
PPTX
NP Complete Problems -- Internship
PDF
Isolation Lemma for Directed Reachability and NL vs. L
DOCX
Cs6660 compiler design november december 2016 Answer key
PDF
NP Complete Problems in Graph Theory
Characterizing the Distortion of Some Simple Euclidean Embeddings
Fine Grained Complexity
Fine Grained Complexity of Rainbow Coloring and its Variants
NP Complete Problems -- Internship
Isolation Lemma for Directed Reachability and NL vs. L
Cs6660 compiler design november december 2016 Answer key
NP Complete Problems in Graph Theory

What's hot (20)

DOCX
Cs6660 compiler design may june 2017 answer key
PPTX
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
PDF
Cs2303 theory of computation all anna University question papers
PDF
smtlecture.3
PDF
Guarding Terrains though the Lens of Parameterized Complexity
PPTX
1.7. eqivalence of nfa and dfa
PDF
Split Contraction: The Untold Story
PDF
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
PDF
Graph Modification: Beyond the known Boundaries
PDF
Cs2303 theory of computation may june 2016
PDF
smtlecture.10
DOCX
CS2303 Theory of computation April may 2015
PPTX
Tsp is NP-Complete
PDF
Algorithms Lecture 7: Graph Algorithms
PDF
On the Parameterized Complexity of Simultaneous Deletion Problems
PPTX
Computability - Tractable, Intractable and Non-computable Function
DOCX
C.s.s class work
PPTX
Simplification of cfg ppt
PPTX
NP completeness
PDF
25 String Matching
Cs6660 compiler design may june 2017 answer key
Beyond Shannon, Sipser and Razborov; Solve Clique Problem like an Electronic ...
Cs2303 theory of computation all anna University question papers
smtlecture.3
Guarding Terrains though the Lens of Parameterized Complexity
1.7. eqivalence of nfa and dfa
Split Contraction: The Untold Story
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Graph Modification: Beyond the known Boundaries
Cs2303 theory of computation may june 2016
smtlecture.10
CS2303 Theory of computation April may 2015
Tsp is NP-Complete
Algorithms Lecture 7: Graph Algorithms
On the Parameterized Complexity of Simultaneous Deletion Problems
Computability - Tractable, Intractable and Non-computable Function
C.s.s class work
Simplification of cfg ppt
NP completeness
25 String Matching
Ad

Viewers also liked (20)

PDF
Important Cuts and (p,q)-clustering
PDF
Matroid Basics
PDF
Kernelization Basics
PDF
Treewidth and Applications
PDF
Bidimensionality
PDF
The Exponential Time Hypothesis
PDF
Cut and Count
PDF
Kernel Lower Bounds
PDF
Fixed-Parameter Intractability
PDF
Important Cuts
PDF
Representative Sets
PDF
Paths and Polynomials
PDF
Iterative Compression
PDF
Dynamic Programming Over Graphs of Bounded Treewidth
PDF
Efficient Simplification: The (im)possibilities
PDF
Steiner Tree Parameterized by Treewidth
PDF
EKR for Matchings
PDF
Separators with Non-Hereditary Properties
PDF
From FVS to F-Deletion
PDF
Kernels for Planar F-Deletion (Restricted Variants)
Important Cuts and (p,q)-clustering
Matroid Basics
Kernelization Basics
Treewidth and Applications
Bidimensionality
The Exponential Time Hypothesis
Cut and Count
Kernel Lower Bounds
Fixed-Parameter Intractability
Important Cuts
Representative Sets
Paths and Polynomials
Iterative Compression
Dynamic Programming Over Graphs of Bounded Treewidth
Efficient Simplification: The (im)possibilities
Steiner Tree Parameterized by Treewidth
EKR for Matchings
Separators with Non-Hereditary Properties
From FVS to F-Deletion
Kernels for Planar F-Deletion (Restricted Variants)
Ad

Similar to Color Coding (20)

PDF
Value Function Geometry and Gradient TD
PPT
Lecture_10_Parallel_Algorithms_Part_II.ppt
PDF
v39i11.pdf
PPTX
Optimisation random graph presentation
PDF
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
PPT
2-Linear Transformations and least squares.ppt
PDF
Deep learning and neural networks (using simple mathematics)
PPTX
Winter 10 Undecidability.pptx
PDF
Path Contraction Faster than 2^n
PPTX
NACA Regula Falsi Method
PPTX
01 - DAA - PPT.pptx
PPTX
Reed solomon Encoder and Decoder
PPTX
Parsing techniques, notations, methods of parsing in compiler design
PDF
PPTX
Discrete Math IP4 - Automata Theory
PDF
Generalization of Ramsey Number
PPT
Lecture#9
PPT
5.1 greedy
PDF
Node Unique Label Cover
PPTX
Ip 5 discrete mathematics
Value Function Geometry and Gradient TD
Lecture_10_Parallel_Algorithms_Part_II.ppt
v39i11.pdf
Optimisation random graph presentation
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
2-Linear Transformations and least squares.ppt
Deep learning and neural networks (using simple mathematics)
Winter 10 Undecidability.pptx
Path Contraction Faster than 2^n
NACA Regula Falsi Method
01 - DAA - PPT.pptx
Reed solomon Encoder and Decoder
Parsing techniques, notations, methods of parsing in compiler design
Discrete Math IP4 - Automata Theory
Generalization of Ramsey Number
Lecture#9
5.1 greedy
Node Unique Label Cover
Ip 5 discrete mathematics

Recently uploaded (20)

PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
master seminar digital applications in india
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Classroom Observation Tools for Teachers
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Updated Idioms and Phrasal Verbs in English subject
Chinmaya Tiranga quiz Grand Finale.pdf
Anesthesia in Laparoscopic Surgery in India
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Yogi Goddess Pres Conference Studio Updates
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
master seminar digital applications in india
A systematic review of self-coping strategies used by university students to ...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Classroom Observation Tools for Teachers
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
History, Philosophy and sociology of education (1).pptx
Practical Manual AGRO-233 Principles and Practices of Natural Farming
UNIT III MENTAL HEALTH NURSING ASSESSMENT

Color Coding

  • 1. Color Coding and Chromatic Coding Venkatesh Raman The Institute of Mathematical Sciences 3 March 2014 Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 1 / 17
  • 2. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 3. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. Algorithm Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 4. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. x ∈ Σ∗ Algorithm Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 5. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. x ∈ Σ∗ Algorithm Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 6. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. x ∈ Σ∗ Algorithm x ∈ Π? (Output correct answer with good probability) Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 7. Randomized Algorithms Let Π ⊆ Σ∗ be a problem. x ∈ Σ∗ Algorithm x ∈ Π? (Output correct answer with good probability) Here we are interested in randomized algorithms for parameterized problems taking running time f (k)|x|O(1) with constant success probability. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 2 / 17
  • 8. Randomized Algorithm for UFVS Definition (Feedback Vertex Set) Let G = (V , E ) be an undirected graph. S ⊆ V is called feedback vertex set if G S is a forest. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 3 / 17
  • 9. Randomized Algorithm for UFVS Definition (Feedback Vertex Set) Let G = (V , E ) be an undirected graph. S ⊆ V is called feedback vertex set if G S is a forest. Undirected Feedback Vertex Set (UFVS) Input: Parameter: Question: An undirected graph G = (V , E ) and a positive integer k k Does there exists a feedback vertex set of size at most k Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 3 / 17
  • 10. Randomized Algorithm for UFVS Do the following preprocessing rules Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 11. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 12. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Short circuit degree 2 vertices. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 13. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Short circuit degree 2 vertices. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 14. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Short circuit degree 2 vertices. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 15. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Short circuit degree 2 vertices. Add vertex x to FVS, if x has self loop. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 16. Randomized Algorithm for UFVS Do the following preprocessing rules Delete degree ≤ 1 vertices. Short circuit degree 2 vertices. Add vertex x to FVS, if x has self loop. Now we can assume every vertex in G has degree ≥ 3. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 4 / 17
  • 17. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 18. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Proof: F H=G - F ; Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 19. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Proof: Let V≤1 = set of degree ≤ 1 vertices in H, V2 = set of degree 2 vertices in H, and F V≥3 = set of degree ≥ 3 vertices in H. H=G - F ; Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 20. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Proof: Let V≤1 = set of degree ≤ 1 vertices in H, V2 = set of degree 2 vertices in H, and F V≥3 = set of degree ≥ 3 vertices in H. Number of edges between H and F , E (H, F ) ≥ 2V≤1 + V2 H=G - F ; Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 21. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Proof: Let V≤1 = set of degree ≤ 1 vertices in H, V2 = set of degree 2 vertices in H, and F V≥3 = set of degree ≥ 3 vertices in H. Number of edges between H and F , E (H, F ) ≥ 2V≤1 + V2 > V≤1 + V2 + V≥3 ( V≤1 > V≥3 ) H=G - F ; Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 22. Randomized Algorithm for UFVS Claim : If G is graph with minimum degree ≥ 3, then number of edges incident to any FVS F is ≥ E (G ) . 2 Proof: Let V≤1 = set of degree ≤ 1 vertices in H, V2 = set of degree 2 vertices in H, and F V≥3 = set of degree ≥ 3 vertices in H. Number of edges between H and F , E (H, F ) ≥ 2V≤1 + V2 > V≤1 + V2 + V≥3 ( V≤1 > V≥3 ) = V (H)> E (H). H=G - F ; Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 5 / 17
  • 23. Randomized Algorithm for UFVS Algorithm Initially we set S ← ∅. Now run the following steps k times. 1: Apply preprocessing rules and create an equivalent instance (G , k ) 2: Pick an edge e, u.a.r (i.e with probability 1 E (G ) ) 3: Choose an end point of e, u.a.r (i.e with probability 1 ) into S and 2 delete it from the graph. Now if S is a FVS, output S, otherwise output No. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 6 / 17
  • 24. Analysis If the input instance is No instance Pr[Algorithm output No] = 1. Let the input instance is Yes instance and F is a FVS od size ≤ k. Pr[Choosing an edge incident to F in step 2] ≥ Pr[Chosen vertex is in F in step 3] ≥ Pr[S=F] ≥ 1 2 1 1 · 2 2 1 4k Now we repeat the algorithm 4k times. 1 Pr[Algorithm fails in all repetitions] ≤ 1 − 4k 1 Pr[Algorithm succeed at least once] ≥ 1 − e ≥ Venkatesh Raman (IMSc) Randomized Techniques in FPT 4k 1 2 1 ≤ e. 3 March 2014 7 / 17
  • 25. Color Coding This technique is introduced by Alon et al. (1995) This technique is used to solve constant treewidth k-sized subgraph isomorphism problem. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 8 / 17
  • 26. Color Coding This technique is introduced by Alon et al. (1995) This technique is used to solve constant treewidth k-sized subgraph isomorphism problem. We illustrate this technique by applying to k-path Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 8 / 17
  • 27. k-path k-path Input: Parameter: Question: An undirected graph G and a positive integer k k Does there exists a path on k vertices in G Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 9 / 17
  • 28. Colorful path v1 v5 v7 v2 v6 v3 v4 Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 10 / 17
  • 29. Colorful path v1 v5 v7 v2 v6 v3 v4 colorful path on 5 vertices in the graph G ? Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 10 / 17
  • 30. Algorithm for k-path Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 11 / 17
  • 31. Algorithm for k-path Color each vertex of the input graph G , u.a.r using from the set of k colors, [k] Check whether there exists a colorful k-path in the colored graph and output Yes/No accordingly Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 11 / 17
  • 32. Algorithm for k-path Color each vertex of the input graph G , u.a.r using from the set of k colors, [k] Check whether there exists a colorful k-path in the colored graph and output Yes/No accordingly Running Time : Time to check colorful k-path × nO(1) Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 11 / 17
  • 33. Algorithm for k-path Color each vertex of the input graph G , u.a.r using from the set of k colors, [k] Check whether there exists a colorful k-path in the colored graph and output Yes/No accordingly Running Time : Time to check colorful k-path × nO(1) Probability of success If (G , k) is a No instance, the probability of success is 1. If (G , k) is an Yes instance, the probability of success is at least Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 k! . kk 11 / 17
  • 34. DP for Checking colorful k-path We introduce 2k · |V (G )| Boolean variables: x(v , C ) = TRUE for some v ∈ V (G ) and C ⊆ [k] There is path ends at v where each color in C appears exactly once and no other color appears. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 12 / 17
  • 35. DP for Checking colorful k-path Clearly, x(v , {color (v )}) = TRUE. Recurrence for vertex v with color r : x(u, C {r }) x(v , C ) = uv ∈E (G ) If we know every x(v , C ) with |C | = i, then we can determine every x(v , C ) with |C | = i + 1. All the values can be determined in time O(2k · |E (G )|). There is a colorful path ends at t ⇐⇒ x(t, [k]) = TRUE for some t. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 13 / 17
  • 36. Analysis for k-path The algorithm for k-path has Running time 2k nO(1) Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 14 / 17
  • 37. Analysis for k-path The algorithm for k-path has Running time 2k nO(1) Success probability k! at least k k if (G , k) is an Yes instance 1 if (G , k) is an No instance Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 14 / 17
  • 38. Analysis for k-path The algorithm for k-path has Running time 2k nO(1) Success probability k! at least k k if (G , k) is an Yes instance 1 if (G , k) is an No instance k Now run the algorithm k (≤ e k ) times and output Yes if at least once we k! get an Yes answer, otherwise output No. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 14 / 17
  • 39. Analysis for k-path The algorithm for k-path has Running time 2k nO(1) Success probability k! at least k k if (G , k) is an Yes instance 1 if (G , k) is an No instance k Now run the algorithm k (≤ e k ) times and output Yes if at least once we k! get an Yes answer, otherwise output No. Probability of failure ≤ 1 − Venkatesh Raman (IMSc) k k! k /k! kk ≤ e −1 Randomized Techniques in FPT 3 March 2014 14 / 17
  • 40. Analysis for k-path The algorithm for k-path has Running time 2k nO(1) Success probability k! at least k k if (G , k) is an Yes instance 1 if (G , k) is an No instance k Now run the algorithm k (≤ e k ) times and output Yes if at least once we k! get an Yes answer, otherwise output No. Probability of failure ≤ 1 − k k! k /k! kk ≤ e −1 k-path can be solved in randomized (2e)k nO(1) time, with constant success probability. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 14 / 17
  • 41. Derandomization Suppose we have a list of colorings col1 , col2 , . . . , colm such that for any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then instead of random coloring we can use these list of colorings to get a deterministic algorithm. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 15 / 17
  • 42. Derandomization Suppose we have a list of colorings col1 , col2 , . . . , colm such that for any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then instead of random coloring we can use these list of colorings to get a deterministic algorithm. Such a list of colorings is called an (n, k)-family of perfect hash functions Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 15 / 17
  • 43. Derandomization Suppose we have a list of colorings col1 , col2 , . . . , colm such that for any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then instead of random coloring we can use these list of colorings to get a deterministic algorithm. Such a list of colorings is called an (n, k)-family of perfect hash functions There exists an (n, k)-family of perfect hash functions of size e k k O(log k) log2 n and can be constructed in time linear in the output size Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 15 / 17
  • 44. Derandomization Suppose we have a list of colorings col1 , col2 , . . . , colm such that for any S ⊆ V with |S| = k there exists i, coli is one-to-one on S, then instead of random coloring we can use these list of colorings to get a deterministic algorithm. Such a list of colorings is called an (n, k)-family of perfect hash functions There exists an (n, k)-family of perfect hash functions of size e k k O(log k) log2 n and can be constructed in time linear in the output size k-path can be solved deterministically in (2e)k k O(log k) nO(1) time. Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 15 / 17
  • 45. Chromatic Coding Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 16 / 17
  • 46. Thank You Venkatesh Raman (IMSc) Randomized Techniques in FPT 3 March 2014 17 / 17