南京大学:《计算理论之美》课程教学资源(课件讲稿)Color Coding

Color Coding Bingkai Lin Nanjing University
Color Coding Bingkai Lin Nanjing University

k-Path Problem: Input:A graph G and positive integer k Question:Is there a simple path on k vertices in G? k=4 [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
k-Path Problem: Input: A graph G and positive integer k Question: Is there a simple path on 𝑘 vertices in 𝐺? k=4 [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

k-Path Problem: For every subset XV(G)of size k, Input:A graph G and positive integer k check if X is a k-path in G. Question:Is there a simple path on k vertices in G? k=4 [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
k-Path Problem: Input: A graph G and positive integer k Question: Is there a simple path on 𝑘 vertices in 𝐺? k=4 For every subset X⊆V(G) of size k, check if X is a k-path in G. [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

Efficient=Polynomial Time For every subset XEV(G)of size k, Your algorithm hasrunning time IV(G)+1 check if X is a k-path in G. Can you find an efficient algorithm? [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
Your algorithm has running time 𝑉 𝐺 𝑘+1 . Can you find an efficient algorithm? For every subset X⊆V(G) of size k, check if X is a k-path in G. Efficient=Polynomial Time [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

Efficient=Polynomial Time For every subset XEV(G)of size k, Your algorithm has running time IV(G)+1 check if X is a k-path in G. Can you find an efficient algorithm? "I can't find an efficient algorithm,I guess I'm just too dumb." [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
Your algorithm has running time 𝑉 𝐺 𝑘+1 . Can you find an efficient algorithm? Efficient=Polynomial Time For every subset X⊆V(G) of size k, check if X is a k-path in G. [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

Efficient=Polynomial Time When k=V(G)I,k-PATH Problem is Hamiltonian Path Problem,which is NP-hard. Your algorithm has running time IV(G)+1 Can you find an efficient algorithm? "I can't find an efficient algorithm.but neither can all these famous people." [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
Your algorithm has running time 𝑉 𝐺 𝑘+1 . Can you find an efficient algorithm? When k=|V(G)|, k-PATH Problem is Hamiltonian Path Problem, which is NP-hard. Efficient=Polynomial Time [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

When k is small, 2kpoly(G)-Time is efficient Yes.Use Color-Coding! Your algorithm has running time IV(G)+1 Can you find an efficient algorithm? [1]Michael R.Garey and David S.Johnson,Computers and intractability:A Guide to the Theory of NP- Completeness
Your algorithm has running time 𝑉 𝐺 𝑘+1 . Can you find an efficient algorithm? Yes. Use Color-Coding! When k is small, 𝟐 𝒌poly(G)-Time is efficient [1] Michael R. Garey and David S. Johnson, Computers and intractability: A Guide to the Theory of NPCompleteness

k-Path Problem Input:A graph G and positive integer k Question:Is there a simple path on k vertices in G? Idea: For every vertex vEV(G)and XV(G),let T[X,v]=1 if X is a path ending at v k=4 ·T[Xv=0 otherwise G has a k-path iff there exist vE V(G)and XsV(G)such T[{a},a]=1 that T[X,v]=1 and X]=k. T[{a,d.d]=1 T[{c,d,d]=1 Compute T[v,X灯: T[{e,d,d=0 ·T[w.=1 .T[X,v]=1 if there exists u s.t.uvE E(G)and T[X\{v).v]=1 T[{a,d,c,c]=1 Running time:IV(G)|O(k) T[a,d.c.f).f]=1
k-Path Problem Input: A graph G and positive integer k Question: Is there a simple path on 𝑘 vertices in 𝐺? Idea: For every vertex v ∈ 𝑉(𝐺) and X ⊆ 𝑉(𝐺), let • T[X,v]=1 if X is a path ending at v • T[X,v]=0 otherwise Compute T[v,X]: • T[{v},v]=1 • T[X,v]=1 if there exists u s.t. uv∈ 𝐸 𝐺 and T[X∖ {𝑣},v]=1 Running time: 𝑉 𝐺 𝑂(𝑘) G has a k-path iff there exist v ∈ 𝑉(𝐺) and X ⊆ 𝑉(𝐺) such that T[X,v]=1 and |X|=k. f a b d c e k=4 T[{a},a]=1 T[{a,d},d]=1 T[{c,d},d]=1 T[{e,d},d]=0 T[{a,d,c},c]=1 T[{a,d,c,f},f]=1

Co orful k-Path Problem Input:A graph G,a positive integer k and a coloring c:VG)→[ Question:Is there a simple path on k vertices in G with different color under c? Idea: For every vertex vEV(G)and C [k],let T[C,v]=1 if there exists a path X ending at v whose k=4 colors are C T[C,v]=0 otherwise G has a k-path iff there exist v E V(G)such that T[[k],v]=1. T[■,b]=1 T[■,■,c]=1 Compute T[C,v]: T[■,m},c]=0 If IC|=1,then T[C,v]=1 iff C={c(v)} T[■,题,■},c]=1 ·flC>1,then T■,■,,■,f刀]=1 T[C,v]=1 if there exists u s.t.uvE E(G),T[C\{c(v)],u]=1 and c(v)EC; T[C,v]=0 otherwise Running time:2k.G]
Colorful k-Path Problem Input: A graph G, a positive integer k and a coloring c: V(G)→ [k] Question: Is there a simple path on 𝑘 vertices in 𝐺 with different color under c? Idea: For every vertex v ∈ 𝑉(𝐺) and C ⊆ [𝒌], let • T[C,v]=1 if there exists a path X ending at v whose colors are C • T[C,v]=0 otherwise Compute T[C,v]: • If |C|=1, then T[C,v]=1 iff C={c(v)} • If |C|>1, then • T[C,v]=1 if there exists u s.t. uv∈ 𝐸 𝐺 ,T[C∖ {𝑐(𝑣)},u]=1 and c(v)∈C; • T[C,v]=0 otherwise. Running time: 𝟐 𝒌 ⋅ |𝑮| G has a k-path iff there exist v ∈ 𝑉(𝐺) such that T[[k],v]=1. 𝑇[{■}, 𝑏] = 1 𝑇[{■,■}, 𝑐] = 1 𝑇[{■,■}, 𝑐] = 0 𝑇[{■,■,■}, 𝑐] = 1 𝑇[{■,■,■, ■}, 𝑓] = 1 f a b d c e k=4

Conclusion: Co orful k-Path Problem is easier than k-Path Problem Question: Can we translate any k-Path Problem to an equivalent Co orful k-Path Problem? → k=4 k=4
Conclusion: Colorful k-Path Problem is easier than k-Path Problem Question: Can we translate any k-Path Problem to an equivalent Colorful k-Path Problem? f a b d c e k=4 f a b d c e k=4
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Cluster expansion lemma.pdf
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Operating system 2.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Operating system 1.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Fundamentals of Network 2.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Fundamentals of Network 1.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Basics of Multimedia 2.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Mail Merge.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Basics of Multimedia 1.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Fundamentals of Computers Introduction(负责人:臧笛).ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Microsoft Excel.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Database.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Basics of Computer System.ppt
- 同济大学:《大学计算机基础》课程教学资源(教案讲义)Data Representation.ppt
- 同济大学:《大学计算机基础》课程教学资源(试卷习题)试卷样本及答案.doc
- The Not So Short Introduction to LaTeX2ε(Or LATEX 2ε in 139 minutes).pdf
- 上饶师范学院:《数据库系统原理》课程教学资源(PPT课件)数据库系统概论 An Introducation to Database System(完整版).ppt
- 上饶师范学院:《数据库系统原理》课程教学资源(电子教案)数据库系统原理电子教案(共九章).doc
- 上饶师范学院:《数据库系统原理》课程教学资源(资料讲义)数据库系统原理实验讲义(上机实验讲义).doc
- 上饶师范学院:《数据库系统原理》课程教学资源(试卷习题)数据库系统原理习题集及答案.doc
- 上饶师范学院:《数据库系统原理》课程教学资源(资料讲义)数据库系统原理总复习(负责人:颜清).doc
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Distributed Consensus Reaching Agreement in Faulty Environment.pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Principles of Quantum Computation.pptx
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Some efficient algorithms for the k-vertex cover problem.pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Lovász Local Lemma(LLL).pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Perfect Sampling for(Atomic)Lovász Local Lemma.pptx
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)An introduction to quantum error-correction.pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Lovász local lemma(Shearer).pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Social Choice Theory.pdf
- 《数据库设计与应用》课程教学资源(PPT课件讲稿)T-SQL语言.pdf
- 《Python程序开发》教学资源(讲义)第二章 数据类型与结构.pdf
- 《C语言程序设计》课程教学资源(教案讲义)第8章 函数.pdf
- 《单片机应用技术》课程教学资源(教案)单片机应用技术教案.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part II Problem Solving 5 Constraint Satisfaction Problems.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part III Knowledge and Reasoning 7 Logical Agents.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part IV Planning 11 Planning.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part VI Learning 20 Statistical Learning Methods.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter01-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter01.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter02-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter02.pdf