140
Lecture 5: Hardness for Sequence Problems under SETH and OVC 1 Thanks to Piotr Indyk and Arturs Backurs for some slides

Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Lecture 5: Hardness for Sequence Problems under

SETH and OVC

1

Thanks to Piotr Indykand Arturs Backurs for some slides

Page 2: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Plan

Page 3: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Plan

• Define sequence problems:– (Discrete) Frechet Distance– Edit Distance and LCS– Dynamic Time Warping (DTW)

Page 4: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Plan

• Define sequence problems:– (Discrete) Frechet Distance– Edit Distance and LCS– Dynamic Time Warping (DTW)

• Birds eye view on the upper bounds– Dynamic programming, quadratic time

Page 5: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Plan

• Define sequence problems:– (Discrete) Frechet Distance– Edit Distance and LCS– Dynamic Time Warping (DTW)

• Birds eye view on the upper bounds– Dynamic programming, quadratic time

• Show conditional quadratic lower bounds– Assuming SETH / OV, example: LCS

Page 6: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 7: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 8: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 9: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 10: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 11: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 12: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 13: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 14: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)• go right on both to (pi+1, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 15: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)• go right on both to (pi+1, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Page 16: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Walks on sequences

Given two sequences {pi} and {qj}, a walk on them starts at p1 and q1. In each step it is in some position (pi,qj) and can next:

• go right only on p to (pi+1, qj)• go right only on q to (pi, qj+1)• go right on both to (pi+1, qj+1)

p1 p2 p3 p4 p5

q1 q2 q3 q4 q5

Sequence walk problems optimize, over all such walks, some measure depending on the distances between pi and qjover all steps (pi,qj) of the walk.

Page 17: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

Page 18: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

Page 19: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

Page 20: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

•Definition: – Let F = set of monotone functions [0,1]→[0,1]– For two curves P,Q: [0,1] →R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

Page 21: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

•Definition: – Let F = set of monotone functions [0,1]→[0,1]– For two curves P,Q: [0,1] →R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||•Discrete version:

– F = { f: [0,1] →{1…n} , nondecreasing}, – P,Q: {1…n} → R2 : Curves are sequences of points in the plane

Page 22: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

(Discrete) Frechet Distance [Alt-Godau’95]

• ``Dog walking distance’’– Smallest length leash that enables dog-walking along two routes

•Definition: – Let F = set of monotone functions [0,1]→[0,1]– For two curves P,Q: [0,1] →R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||•Discrete version:

– F = { f: [0,1] →{1…n} , nondecreasing}, – P,Q: {1…n} → R2 : Curves are sequences of points in the plane

Find a walk along P and Q that minimizes the maxdistance over all steps.

Page 23: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

Page 24: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

• Discrete version:– Let F = { f: [0,1] →{1…n}, nondecreasing }, mapping time to position, – For two sequences of points, P,Q: {1…n}→R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

Page 25: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

• Discrete version:– Let F = { f: [0,1] →{1…n}, nondecreasing }, mapping time to position, – For two sequences of points, P,Q: {1…n}→R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

• Dynamic programming:– A[i, j] = distance between curves P(1)…P(i) and Q(1) …Q(j)– A[i, j]=max[||P(i)-Q(j)||, min (A[i-1, j-1], A[i, j-1], A[i-1, j])]

Page 26: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

• Discrete version:– Let F = { f: [0,1] →{1…n}, nondecreasing }, mapping time to position, – For two sequences of points, P,Q: {1…n}→R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

• Dynamic programming:– A[i, j] = distance between curves P(1)…P(i) and Q(1) …Q(j)– A[i, j]=max[||P(i)-Q(j)||, min (A[i-1, j-1], A[i, j-1], A[i-1, j])]

• Time: O(n2)

Page 27: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

• Discrete version:– Let F = { f: [0,1] →{1…n}, nondecreasing }, mapping time to position, – For two sequences of points, P,Q: {1…n}→R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

• Dynamic programming:– A[i, j] = distance between curves P(1)…P(i) and Q(1) …Q(j)– A[i, j]=max[||P(i)-Q(j)||, min (A[i-1, j-1], A[i, j-1], A[i-1, j])]

• Time: O(n2)

• Can be improved to O(n2 log log n/log n) [Agarwal-Avraham-Kaplan-Sharir’12] (also [Buchin-Buchin-Meulemans-Mulzer’14])

Page 28: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Frechet Distance: Algorithm

• Discrete version:– Let F = { f: [0,1] →{1…n}, nondecreasing }, mapping time to position, – For two sequences of points, P,Q: {1…n}→R2 :

DFr(P,Q) = minf,g ∈ F maxt ∈ [0,1] ||P(f(t)) – Q(g(t))||

• Dynamic programming:– A[i, j] = distance between curves P(1)…P(i) and Q(1) …Q(j)– A[i, j]=max[||P(i)-Q(j)||, min (A[i-1, j-1], A[i, j-1], A[i-1, j])]

• Time: O(n2)

• Can be improved to O(n2 log log n/log n) [Agarwal-Avraham-Kaplan-Sharir’12] (also [Buchin-Buchin-Meulemans-Mulzer’14])

• Many algorithms for special cases and variants

Page 29: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Dynamic Time Warping

Page 30: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Dynamic Time Warping

• Definition:– x, y: two sequences of points of length n– A[i, j]=dist(xi, yj)+min(A[i-1,j], A[i-1,j-1], A[i,j-1])– DTW(x,y)=A[n,n]Find a walk along x and y that minimizes the sum of

distances at each step.

Page 31: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Dynamic Time Warping

• Definition:– x, y: two sequences of points of length n– A[i, j]=dist(xi, yj)+min(A[i-1,j], A[i-1,j-1], A[i,j-1])– DTW(x,y)=A[n,n]Find a walk along x and y that minimizes the sum of

distances at each step.

• Speech processing and other applications

Page 32: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Dynamic Time Warping

• Definition:– x, y: two sequences of points of length n– A[i, j]=dist(xi, yj)+min(A[i-1,j], A[i-1,j-1], A[i,j-1])– DTW(x,y)=A[n,n]Find a walk along x and y that minimizes the sum of

distances at each step.

• Speech processing and other applications

• A simple O(n2) time dynamic programming algorithm

Page 33: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Longest Common Subsequence (LCS)

• Definition:– two sequences s and t of letters, length n– find a subsequence of both s and t of max length

• Example: LCS(meaning , matching) = maing

Page 34: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Longest Common Subsequence (LCS)

• Definition:– two sequences s and t of letters, length n– find a subsequence of both s and t of max length

• Example: LCS(meaning , matching) = maing

• Simple O(n2) time algorithm:

Page 35: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Longest Common Subsequence (LCS)

• Definition:– two sequences s and t of letters, length n– find a subsequence of both s and t of max length

• Example: LCS(meaning , matching) = maing

• Simple O(n2) time algorithm:

max {A[i-1, j], A[i, j-1], 1+A[i-1, j-1]} if s[i]=t[i] }A[i,j]=

max {A[i-1, j], A[i, j-1]} otherwise.

Page 36: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Longest Common Subsequence (LCS)

• Definition:– two sequences s and t of letters, length n– find a subsequence of both s and t of max length

• Example: LCS(meaning , matching) = maing

• Simple O(n2) time algorithm:

max {A[i-1, j], A[i, j-1], 1+A[i-1, j-1]} if s[i]=t[i] }A[i,j]=

max {A[i-1, j], A[i, j-1]} otherwise.

Best algorithm: O(n2/log n) [Masek-Paterson’80]

Page 37: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n

Page 38: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y

Page 39: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

Page 40: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

meaning

Page 41: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

meaninginsert a

maeaning

Page 42: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

meaninginsert a

mataninge → t

maeaning

Page 43: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

meaninginsert a e → t

matcning

a → c

maeaning mataning

Page 44: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Edit distance(a.k.a. Levenshtein distance)

• Definition:– x,y – two sequences of symbols of length n– edit(x,y)=the minimum number of symbol insertions,

deletions or substitutions needed to transform x into y• Example: edit(meaning,matching)=4

meaninginsert a e → t

a → c

matchingn → h

maeaning mataning

matcning

Page 45: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Computing edit distance

45

Page 46: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Computing edit distance

• A simple O(n2) time dynamic programming algorithm [Wagner-Fischer’74]

46

Page 47: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Computing edit distance

• A simple O(n2) time dynamic programming algorithm [Wagner-Fischer’74]

• Can be improved to O(n2/log n) [Masek-Paterson’80]

47

Page 48: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Computing edit distance

• A simple O(n2) time dynamic programming algorithm [Wagner-Fischer’74]

• Can be improved to O(n2/log n) [Masek-Paterson’80]

• Better algorithms for special cases:[U83,LV85,M86, GG88,GP89,UW90,CL90,CH98,LMS98,U85,CL92,N99,CPSV00,MS00,CM02,BCF08,AK08,AKO10…]

48

Page 49: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Computing edit distance

• A simple O(n2) time dynamic programming algorithm [Wagner-Fischer’74]

• Can be improved to O(n2/log n) [Masek-Paterson’80]

• Better algorithms for special cases:[U83,LV85,M86, GG88,GP89,UW90,CL90,CH98,LMS98,U85,CL92,N99,CPSV00,MS00,CM02,BCF08,AK08,AKO10…]

• Approximation algorithms: O(1) –approx in O(n2-ε) time [Chakraborty-Das-Goldenberg-Koucky-Saks’18], O(f(ε)) –approx in O(n1+ε) time [Andoni-Nowatzki’20]

49

Page 50: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

Page 51: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

• Widely used metrics

Page 52: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

• Widely used metrics• Simple dynamic-programming algorithms with (essentially)

quadratic running time

Page 53: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

• Widely used metrics• Simple dynamic-programming algorithms with (essentially)

quadratic running time• We have no idea if/how we can do any better

Page 54: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

• Widely used metrics• Simple dynamic-programming algorithms with (essentially)

quadratic running time• We have no idea if/how we can do any better

• Plausible explanation: – 3SUM-hard ? People tried for years…

Page 55: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

What do these problems have in common ?

• Widely used metrics• Simple dynamic-programming algorithms with (essentially)

quadratic running time• We have no idea if/how we can do any better

• Plausible explanation: – 3SUM-hard ? People tried for years…– hard under OVH and SETH ?

Page 56: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Plan

• Define sequence problems:– (Discrete) Frechet Distance– Edit Distance and LCS– Dynamic Time Warping (DTW)

• Birds eye view on the upper bounds– Dynamic programming, quadratic time

• Show conditional quadratic lower bounds– Assuming SETH / OVH– Basic approach– Hardness for LCS

Page 57: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reminder: Orthogonal Vectors Hypothesis (OVH)

Page 58: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reminder: Orthogonal Vectors Hypothesis (OVH)

• Orthogonal Vectors Problem (OV). Given a set of vectors S ⊆ {0, 1}d, d = ω(log n), |S|=n, are there a, b ∈ S s. t. Σi=1

d aibi = 0 ?

– Can be solved trivially in O(n2d) time– Best known algorithm runs in n2-1/O(log c(n)) time,

where d=c(n)·log n [Abboud-Williams-Yu’15]

Page 59: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reminder: Orthogonal Vectors Hypothesis (OVH)

• Orthogonal Vectors Problem (OV). Given a set of vectors S ⊆ {0, 1}d, d = ω(log n), |S|=n, are there a, b ∈ S s. t. Σi=1

d aibi = 0 ?

– Can be solved trivially in O(n2d) time– Best known algorithm runs in n2-1/O(log c(n)) time,

where d=c(n)·log n [Abboud-Williams-Yu’15]

• OV Hypothesis (implied by SETH):

Page 60: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reminder: Orthogonal Vectors Hypothesis (OVH)

• Orthogonal Vectors Problem (OV). Given a set of vectors S ⊆ {0, 1}d, d = ω(log n), |S|=n, are there a, b ∈ S s. t. Σi=1

d aibi = 0 ?

– Can be solved trivially in O(n2d) time– Best known algorithm runs in n2-1/O(log c(n)) time,

where d=c(n)·log n [Abboud-Williams-Yu’15]

• OV Hypothesis (implied by SETH): OV can’t be solved in n2-ε·dO(1) time for any ε > 0.

Page 61: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Quadratic hardness under OVC

61

Theorem*: No n2-Ω(1) time algorithm for EDIT, DTW, Frechet distances or LCS unless OVC fails [Bringmann’14; Backurs-Indyk’15; Abboud-Backurs-VW’15; Bringmann-Kunnemann’15]

*See also [Abboud-V. Williams-Weimann’14]

Page 62: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Quadratic hardness under OVC

• Approach: reduce OV to distance computation:

62

Theorem*: No n2-Ω(1) time algorithm for EDIT, DTW, Frechet distances or LCS unless OVC fails [Bringmann’14; Backurs-Indyk’15; Abboud-Backurs-VW’15; Bringmann-Kunnemann’15]

*See also [Abboud-V. Williams-Weimann’14]

Page 63: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Quadratic hardness under OVC

• Approach: reduce OV to distance computation:– S⊆{0,1}d → sequence x, |x|≤ n·dO(1)

– S⊆{0,1}d → sequence y, |y|≤ n·dO(1)

63

Theorem*: No n2-Ω(1) time algorithm for EDIT, DTW, Frechet distances or LCS unless OVC fails [Bringmann’14; Backurs-Indyk’15; Abboud-Backurs-VW’15; Bringmann-Kunnemann’15]

*See also [Abboud-V. Williams-Weimann’14]

Page 64: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Quadratic hardness under OVC

• Approach: reduce OV to distance computation:– S⊆{0,1}d → sequence x, |x|≤ n·dO(1)

– S⊆{0,1}d → sequence y, |y|≤ n·dO(1)

– distance(x,y)=small if exists a, b ∈ S with Σiaibi =0– distance(x,y)=large, otherwise– The construction time is n·dO(1)

– Gadgets for coordinates and vectors

64

Theorem*: No n2-Ω(1) time algorithm for EDIT, DTW, Frechet distances or LCS unless OVC fails [Bringmann’14; Backurs-Indyk’15; Abboud-Backurs-VW’15; Bringmann-Kunnemann’15]

*See also [Abboud-V. Williams-Weimann’14]

Page 65: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Quadratic hardness under OVC

• Approach: reduce OV to distance computation:– S⊆{0,1}d → sequence x, |x|≤ n·dO(1)

– S⊆{0,1}d → sequence y, |y|≤ n·dO(1)

– distance(x,y)=small if exists a, b ∈ S with Σiaibi =0– distance(x,y)=large, otherwise– The construction time is n·dO(1)

– Gadgets for coordinates and vectors

65

Theorem*: No n2-Ω(1) time algorithm for EDIT, DTW, Frechet distances or LCS unless OVC fails [Bringmann’14; Backurs-Indyk’15; Abboud-Backurs-VW’15; Bringmann-Kunnemann’15]

*See also [Abboud-V. Williams-Weimann’14]

Next: hardness for LCS

Page 66: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Hardness for LCS

I will present the ideas behind the proof from [Abboud-Backurs-VW’15]. Full construction. NO full proof.

[Bringmann-Kunnemann’15] obtained an independent proof.

Page 67: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Page 68: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Page 69: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Page 70: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 71: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Page 72: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Page 73: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 74: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 75: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Attempt 1:x = f(s1) f(s2) … f(si) … f(sn)

y = (g(s0))n-1 g(s1) g(s2) … g(sj) … g(sn) (g(s0))n-1

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 76: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Attempt 1:x = f(s1) f(s2) … f(si) … f(sn)

y = (g(s0))n-1 g(s1) g(s2) … g(sj) … g(sn) (g(s0))n-1

Idea: Imagine gadgets are letters.If no OV, LCS length is n β; If si∙sj=0 can align f(si) and g(sj) and all

other f(sk) with g(s0) to get LCS length ≥ (n-1) β + (β+1) > n β.

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 77: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Attempt 1:x = f(s1) f(s2) … f(si) … f(sn)

y = (g(s0))n-1 g(s1) g(s2) … g(sj) … g(sn) (g(s0))n-1

Idea: Imagine gadgets are letters.If no OV, LCS length is n β; If si∙sj=0 can align f(si) and g(sj) and all

other f(sk) with g(s0) to get LCS length ≥ (n-1) β + (β+1) > n β.

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 78: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Attempt 1:x = f(s1) f(s2) … f(si) … f(sn)

y = (g(s0))n-1 g(s1) g(s2) … g(sj) … g(sn) (g(s0))n-1

Idea: Imagine gadgets are letters.If no OV, LCS length is n β; If si∙sj=0 can align f(si) and g(sj) and all

other f(sk) with g(s0) to get LCS length ≥ (n-1) β + (β+1) > n β.

Problem: Opt LCS might not align entire gadgets!

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 79: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

• Let S = {s1,s2,…, sn} be the vectors from OV instance• Suppose we have si → gadget sequences f(si) and g(si)

LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.• s0 – vector of all 1s (no vector orthog. to s0)

Attempt 1:x = f(s1) f(s2) … f(si) … f(sn)

y = (g(s0))n-1 g(s1) g(s2) … g(sj) … g(sn) (g(s0))n-1

Idea: Imagine gadgets are letters.If no OV, LCS length is n β; If si∙sj=0 can align f(si) and g(sj) and all

other f(sk) with g(s0) to get LCS length ≥ (n-1) β + (β+1) > n β.

Problem: Opt LCS might not align entire gadgets!

Encoding the outer Boolean OR for OV to LCS�

𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑐𝑐 ∨ ¬𝑠𝑠𝑗𝑗[𝑐𝑐])

Want to create sequences x and y so that LCS(x,y) is Large

if there is an OV pair and LCS(x,y) is Small otherwise.

Page 80: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 81: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 82: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched.

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 83: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched.

Idea: Pick q big so all Qs and Rs of x must be matched in an LCS.

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 84: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched.

Idea: Pick q big so all Qs and Rs of x must be matched in an LCS.Now no g(sk) is aligned with two different f(si) and f(sj).

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 85: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched.

Idea: Pick q big so all Qs and Rs of x must be matched in an LCS.Now no g(sk) is aligned with two different f(si) and f(sj).

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 86: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched.

Idea: Pick q big so all Qs and Rs of x must be matched in an LCS.Now no g(sk) is aligned with two different f(si) and f(sj).

Problem: LCS might align f(si) with several g(sk).

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 87: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Idea for hardness for LCS

Attempt 2: Q = 0q, R=1q

x = Q f(s1)R Q f(s2)R … Q f(sn) R

y = (Qg(s0) R)n-1 Qg(s1)R Q g(s2) R… Q g(sn) R (Qg(s0) R)n-1

Lemma: If a 0 (or 1) is matched, its entire 0q (or 1q) block is matched. Idea: Pick q big so all Qs and Rs of x must be matched in an LCS.Now no g(sk) is aligned with two different f(si) and f(sj).

Problem: LCS might align f(si) with several g(sk). The g(sk) are partitioned into blocks aligned with at most a single f(si).

Let S = {s1,s2,…, sn} be the vectorsEach si → gadget sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, LCS(f(si),g(sj)) = β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

0 and 1 don’t appear in the f and g gadgets

Page 88: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Q=0q,R=1q,P=2r

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 89: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Idea:

Q=0q,R=1q,P=2r

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 90: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Idea: P = 2r, r big but r<<q, so that in an LCS all Qs and Rs of x are still aligned,

and also as many Ps as possible from y are aligned.

Q=0q,R=1q,P=2r

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 91: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Idea: P = 2r, r big but r<<q, so that in an LCS all Qs and Rs of x are still aligned,

and also as many Ps as possible from y are aligned. ≥ n-1 Ps of y not matched in an LCS due to the matched Qs and Rs of x.

Q=0q,R=1q,P=2r

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 92: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Idea: P = 2r, r big but r<<q, so that in an LCS all Qs and Rs of x are still aligned,

and also as many Ps as possible from y are aligned. ≥ n-1 Ps of y not matched in an LCS due to the matched Qs and Rs of x.Thus, exactly n-1 Ps will be unmatched, and every f(si) will be fully

aligned with some g(sj) (possibly j=0).

Q=0q,R=1q,P=2r

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 93: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Idea: P = 2r, r big but r<<q, so that in an LCS all Qs and Rs of x are still aligned,

and also as many Ps as possible from y are aligned. ≥ n-1 Ps of y not matched in an LCS due to the matched Qs and Rs of x.Thus, exactly n-1 Ps will be unmatched, and every f(si) will be fully

aligned with some g(sj) (possibly j=0).

Q=0q,R=1q,P=2r

The gadgets f(si) and g(sj) act as letters!

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 94: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS hardness idea

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

LCS length:

Let S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Q=0q,R=1q,P=2r

Page 95: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS hardness idea

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

LCS length: 2n|P| + n(|Q|+|R|)+ Σn

i=1 LCS(f(si),g(sj)), g(sj) aligned with f(si)

Let S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Q=0q,R=1q,P=2r

#Ps in y is 3n-1, and n-1 are not matched, so 2n aligned.

Page 96: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS hardness idea

Attempt 3:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

LCS length: 2n|P| + n(|Q|+|R|)+ Σn

i=1 LCS(f(si),g(sj)), g(sj) aligned with f(si)

= 2nr + 2qn + n β if no orthog. pair≥ [2nr + 2qn + n β] + 1 if 9 an orthog. pair.

Let S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Q=0q,R=1q,P=2r

#Ps in y is 3n-1, and n-1 are not matched, so 2n aligned.

Page 97: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reduction:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 98: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Reduction:x = P|y|Q f(s1)R Q f(s2)R Q … RQ f(sn) R P|y|

y = P (Qg(s0) RP)n-1 Q g(s1) R P Q g(s2) R P … Q g(sn) R P (Q g(s0) RP)n-1

Tricky proof in paper shows the following suffice:|Q|, |R|,|P|, |f(si)|,|g(si)| ≤ poly(d), so that|x|,|y| ≤ n poly(d).

LCS hardness ideaLet S = {s1,s2,…, sn} be the vectorsEach si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si∙sj ≠ 0, ≥ β + 1 otherwise.s0 – vector of all 1s (no vector orthog. to s0)

Page 99: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 100: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Done!

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 101: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Done!c(0) = 46 e(0) = 64c(1) = 4 e(1) = 6

LCS(c(1),e(1)) = 0, and LCS(c(x),e(y)) = 1

for (x,y) ≠ (1,1).

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 102: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Done!c(0) = 46 e(0) = 64c(1) = 4 e(1) = 6

LCS(c(1),e(1)) = 0, and LCS(c(x),e(y)) = 1

for (x,y) ≠ (1,1).

All that remains!

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 103: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

Page 104: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

Page 105: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 106: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 107: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 108: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.If no 3 is matched in an LCS, then all 5s must be: if a 5u block is not matched,

then the subsequence length would be ≤ du + 2d < r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 109: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.If no 3 is matched in an LCS, then all 5s must be: if a 5u block is not matched,

then the subsequence length would be ≤ du + 2d < r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 110: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.If no 3 is matched in an LCS, then all 5s must be: if a 5u block is not matched,

then the subsequence length would be ≤ du + 2d < r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 111: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.If no 3 is matched in an LCS, then all 5s must be: if a 5u block is not matched,

then the subsequence length would be ≤ du + 2d < r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 112: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

Recall we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d+1.

If two 5s are matched together, their entire 5u blocks are matched.If any 3 is matched, no other symbols are, so the LCS length is r.If no 3 is matched in an LCS, then all 5s must be: if a 5u block is not matched,

then the subsequence length would be ≤ du + 2d < r.

Want: Each si → sequences f(si) and g(si)LCS(f(si),g(sj)) = β if si·sj ≠ 0, = β + 1 otherwise

�𝑖𝑖,𝑗𝑗∈[𝑛𝑛]

⋀𝑐𝑐∈[𝑑𝑑](¬ 𝑣𝑣𝑖𝑖 𝑐𝑐 ∨ ¬𝑣𝑣𝑗𝑗[𝑐𝑐])

3,5 brand new symbols

u is large, r even larger

Page 113: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 114: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 115: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 116: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched. Thus, for all t, c(si[t]) and e(sj[t]) are matched.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 117: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched. Thus, for all t, c(si[t]) and e(sj[t]) are matched.If si·sj ≠ 0, the alignment of c(si[t]) with e(sj[t]) for all t gives < d,

so we get ≤(d+1)u+d-1 = r. (but then the 3s would be matched, so =r)

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 118: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched. Thus, for all t, c(si[t]) and e(sj[t]) are matched.If si·sj ≠ 0, the alignment of c(si[t]) with e(sj[t]) for all t gives < d,

so we get ≤(d+1)u+d-1 = r. (but then the 3s would be matched, so =r)

If si·sj = 0, we get (d+1)u+d = r+1.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

Page 119: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Vector gadgets

f(si) = 3r 5u c(si[1]) 5u … 5u c(si[d]) 5u

g(sj) = 5u e(sj[1]) 5u … 5u e(sj[d]) 5u 3r

where r = u(d+1)+d-1, u > d.

Assume no 3 is matched. Then all 5s are matched. Thus, for all t, c(si[t]) and e(sj[t]) are matched.If si·sj ≠ 0, the alignment of c(si[t]) with e(sj[t]) for all t gives < d,

so we get ≤(d+1)u+d-1 = r. (but then the 3s would be matched, so =r)

If si·sj = 0, we get (d+1)u+d = r+1.

Recall that we have coordinate gadgets x ∈ {0, 1} → c(x) and e(x), s.t.LCS(c(x),e(y)) = 0 if x = y =1 and 1 otherwise; also, |c(x)|,|e(x)|≤ 2.

LCS(f(s)i, g(sj)) = r if si ⋅sj≠ 0 and LCS(f(si), g(sj)) = r+1

otherwise.

Page 120: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

OV to LCS

Given vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, 𝑠𝑠𝑖𝑖 ∈ {0,1}𝑑𝑑 ∀𝑖𝑖, OV is

⋁𝑖𝑖,𝑗𝑗∈[𝑛𝑛]⋀𝑘𝑘∈[𝑑𝑑](¬ 𝑠𝑠𝑖𝑖 𝑘𝑘 ∨ ¬𝑠𝑠𝑗𝑗[𝑘𝑘]).

Done!c(0) = 46 e(0) = 64c(1) = 4 e(1) = 6

LCS(c(1),e(1)) = 0, and LCS(c(x),e(y)) = 1

for (x,y) ≠ (1,1).

Done!

Coordinate gadgets 𝑐𝑐, 𝑒𝑒 taking bits to short sequences s.t.

𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 0 if 𝑥𝑥 = 𝑦𝑦 = 1, 𝐿𝐿𝐿𝐿𝐿𝐿 𝑐𝑐 𝑥𝑥 , 𝑒𝑒 𝑦𝑦 = 1 if 𝑥𝑥 ⋅ 𝑦𝑦 = 0.

Vector gadgets 𝑓𝑓,𝑔𝑔 taking bit vectors to short sequences s.t. for some 𝑇𝑇

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 + 1 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑓𝑓 𝑠𝑠𝑖𝑖 ,𝑔𝑔 𝑠𝑠𝑗𝑗 = 𝑇𝑇 if 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0.

Outer OR gadgets 𝑥𝑥,𝑦𝑦 taking sets of bit vectors {𝑠𝑠1, … , 𝑠𝑠𝑛𝑛}, to short

sequences s.t. for some 𝑄𝑄𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 = 𝑄𝑄 if ∀𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 ≠ 0,

𝐿𝐿𝐿𝐿𝐿𝐿 𝑥𝑥,𝑦𝑦 ≥ 𝑄𝑄 + 1 if ∃𝑖𝑖, 𝑗𝑗: 𝑠𝑠𝑖𝑖 ⋅ 𝑠𝑠𝑗𝑗 = 0.

Page 121: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

Page 122: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

Page 123: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

Page 124: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

• Hardness based on even more believable assumptions:

Page 125: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

• Hardness based on even more believable assumptions:– Reduction works from Max-k-SAT, so base on:

Page 126: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

• Hardness based on even more believable assumptions:– Reduction works from Max-k-SAT, so base on:MAX-k-SAT cannot be solved in 2n(1-ε) poly(n) time for all k.

Page 127: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

• Hardness based on even more believable assumptions:– Reduction works from Max-k-SAT, so base on:MAX-k-SAT cannot be solved in 2n(1-ε) poly(n) time for all k.(although – maybe this is equivalent to SETH…)

Page 128: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Extensions

• Thm: For any integer k ≥ 2,k-LCS cannot be solved in O(nk-ε) time under SETH.

• [BK’15]: LCS hard even for binary alphabet

• Hardness based on even more believable assumptions:– Reduction works from Max-k-SAT, so base on:MAX-k-SAT cannot be solved in 2n(1-ε) poly(n) time for all k.(although – maybe this is equivalent to SETH…)– On much more believable assumptions!

Page 129: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Circuit-Strong-ETH

• SETH is ultimately about SAT of linear size CNF-formulas

Page 130: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Circuit-Strong-ETH

• SETH is ultimately about SAT of linear size CNF-formulas• There are more difficult satisfiability problems:

Page 131: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Circuit-Strong-ETH

• SETH is ultimately about SAT of linear size CNF-formulas• There are more difficult satisfiability problems:

– CIRCUIT-SAT– NC-SAT– NC1-SAT …

Page 132: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Circuit-Strong-ETH

• SETH is ultimately about SAT of linear size CNF-formulas• There are more difficult satisfiability problems:

– CIRCUIT-SAT– NC-SAT– NC1-SAT …

C-SETH: satisfiability of circuits from circuit class C on n variables and size s

requires 2n-o(n) poly(s) time.

Page 133: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

Circuit-Strong-ETH

• SETH is ultimately about SAT of linear size CNF-formulas• There are more difficult satisfiability problems:

– CIRCUIT-SAT– NC-SAT– NC1-SAT …

C-SETH: satisfiability of circuits from circuit class C on n variables and size s

requires 2n-o(n) poly(s) time.

E.g. NC-SETH should be much more believable!

Page 134: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hardAHVW’15:

reduction from SAT of “Branching Programs”

Many Consequences:

Page 135: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

Page 136: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

2. Shaving logarithms from 𝑛𝑛2 implies novel circuit lower bounds!

Page 137: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

2. Shaving logarithms from 𝑛𝑛2 implies novel circuit lower bounds!

An 𝑛𝑛2

log𝜔𝜔 1 𝑛𝑛alg. →

ENP is not in NC1.

Page 138: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

2. Shaving logarithms from 𝑛𝑛2 implies novel circuit lower bounds!

An 𝑛𝑛2

log𝜔𝜔 1 𝑛𝑛alg. →

ENP is not in NC1.

OV and APSP have such algs. W’14,AWY’15

Page 139: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

2. Shaving logarithms from 𝑛𝑛2 implies novel circuit lower bounds!

An 𝒏𝒏𝟐𝟐

log𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 𝒏𝒏time alg. → ENP

has no non-uniform Boolean formulas of size n5.

An 𝑛𝑛2

log𝜔𝜔 1 𝑛𝑛alg. →

ENP is not in NC1.

OV and APSP have such algs. W’14,AWY’15

Page 140: Lecture 5: Hardness for Sequence Problems under SETH and OVC · q4. q5. Sequence walk problems optimize, over all such walks, some measure depending on the distances between p. i

LCS, Edit Distance and Friends are very hard

1. Edit Distance / LCS / … require 𝑛𝑛2−𝑜𝑜 1 time under NC-SETH.

AHVW’15: reduction from SAT of “Branching Programs”

Many Consequences:

2. Shaving logarithms from 𝑛𝑛2 implies novel circuit lower bounds!

An 𝒏𝒏𝟐𝟐

log𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 𝒏𝒏time alg. → ENP

has no non-uniform Boolean formulas of size n5.

An 𝑛𝑛2

log𝜔𝜔 1 𝑛𝑛alg. →

ENP is not in NC1.

OV and APSP have such algs. W’14,AWY’15

Best alg: 𝑛𝑛2

log2 𝑛𝑛