Algorithms for Lattice Transforms and 2348 2349 Lattice - - PowerPoint PPT Presentation

algorithms for lattice transforms and
SMART_READER_LITE
LIVE PREVIEW

Algorithms for Lattice Transforms and 2348 2349 Lattice - - PowerPoint PPT Presentation

Algorithms for Lattice Transforms and 2348 2349 Lattice Transforms for 234 248 239 Algorithms 23 39 24 Thore Husfeldt 2 Lund University and IT University of Copenhagen 3 This Talk in 60 Seconds In Prefix sum Out y i = x


slide-1
SLIDE 1

Algorithms for Lattice Transforms and Lattice Transforms for Algorithms

Thore Husfeldt Lund University and IT University of Copenhagen

2 3 23 24 39 234 239 248 2348 2349

slide-2
SLIDE 2

This Talk in 60 Seconds

x1 x2 x4 x3 y1 y2 y3 y4

In Out “Prefix sum”

yi = ∑

j≤i

xj

slide-3
SLIDE 3

This Talk in 60 Seconds

5 32 4 1 5

32+5=

37

32+5+1=

38

32+5+1+4=

42

In Out “Prefix sum”

yi = ∑

j≤i

xj

Time: Quadratic

slide-4
SLIDE 4

This Talk in 60 Seconds

5 32 4 1 5

32+5=

37

32+5+1=

38

32+5+1+4=

42

In Out “Prefix sum”

yi = ∑

j≤i

xj

5

32+5=

37

37+1=

38

38+4=

42

Out Time: Quadratic But: can do better

slide-5
SLIDE 5

In This Talk

Nice combinatorics Nice algebra Recent developments in algorithms for NP-hard problems Our SODA result from last week Fast Algorithms for computing the zeta transform on various lattices with applications

slide-6
SLIDE 6

Collaborators

Andreas Björklund (Lund), Petteri Kaski (Helsinki), Mikko Koivisto (Helsinki), Jesper Nederlof (Bergen), Pekka Parviainen (Helsinki)

slide-7
SLIDE 7

Lattices & Partial Orders

Circuits

Zeta Transform

Yates’s Algorithm

Möbius Inversion

Graph colouring

slide-8
SLIDE 8

What? Why? How?

slide-9
SLIDE 9

Partial Orders & Lattices

slide-10
SLIDE 10

Partial Orders & Lattices

  • rdered by size
1 2 3
slide-11
SLIDE 11

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
slide-12
SLIDE 12

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
1 2 3 6 1 2 3 12 18 36 1 2 3 4 6 8 9 12 18 24 36 72
slide-13
SLIDE 13

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
1 2 3 6 1 2 3 12 18 36 1 2 3 4 6 8 9 12 18 24 36 72 1 2 3 1 2 3 6 1 2 3 12 18 36 9 6 4 8 1 3 2 12 18 36 24 72
slide-14
SLIDE 14

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
1 2 3 6 1 2 3 12 18 36 1 2 3 4 6 8 9 12 18 24 36 72 1 2 3 1 2 3 6 1 2 3 12 18 36 9 6 4 8 1 3 2 12 18 36 24 72

join of 2 and 3

slide-15
SLIDE 15

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
1 2 3 6 1 2 3 12 18 36 1 2 3 4 6 8 9 12 18 24 36 72 1 2 3 1 2 3 6 1 2 3 12 18 36 9 6 4 8 1 3 2 12 18 36 24 72

join of 2 and 3 lattice

slide-16
SLIDE 16

Partial Orders & Lattices

  • rdered by size
1 2 3 1 2 3
  • rdered by divisibility
1 2 3 6 1 2 3 12 18 36 1 2 3 4 6 8 9 12 18 24 36 72 1 2 3 1 2 3 6 1 2 3 12 18 36 9 6 4 8 1 3 2 12 18 36 24 72

join of 2 and 3 lattice zero join- irreducible

slide-17
SLIDE 17

Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

slide-18
SLIDE 18

Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 4 7

slide-19
SLIDE 19

Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 4 7 4 3 1 6 4 14 5 10

slide-20
SLIDE 20

Zeta Transform (linear algebra view) f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

f =     3 6 1 4    

slide-21
SLIDE 21

Zeta Transform (linear algebra view) f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

f =     3 6 1 4     ζ =     1 1 1 1 1 1 1 1 1    

slide-22
SLIDE 22

Zeta Transform (linear algebra view) f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

f =     3 6 1 4     ζ =     1 1 1 1 1 1 1 1 1    

Note: zeta transform has inverse, called the Möbius transform

slide-23
SLIDE 23

Zeta Transform (categoric view) f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

≤∈ FREL: L → L

induces a map Partial order on finite sets (here, a lattice)

RL → RL

slide-24
SLIDE 24

Zeta Transform (categoric view) f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

≤∈ FREL: L → L

induces a map Partial order on finite sets (here, a lattice)

RL → RL

≤ S T RS RT

slide-25
SLIDE 25

for i ∈ {1,…,N} g(i) = 0 for j ∈ {1,…,N} if j ≤ i: g(i) = g(i) + f(j)

slide-26
SLIDE 26

for i ∈ {1,…,N} g(i) = 0 for j ∈ {1,…,N} if j ≤ i: g(i) = g(i) + f(j)

4 1 32 5 0 5 37 38 42 0 5 37 38 38 38 38 38 0 5 37 37 37 37 37 37 37 37 37 0 5 5 5 5 5 5 5 5 5 5 5 5

f g

slide-27
SLIDE 27

for i ∈ {1,…,N} g(i) = 0 for j ∈ {1,…,N} if j ≤ i: g(i) = g(i) + f(j)

4 1 32 5 0 5 37 38 42 0 5 37 38 38 38 38 38 0 5 37 37 37 37 37 37 37 37 37 0 5 5 5 5 5 5 5 5 5 5 5 5

f g

slide-28
SLIDE 28

time = # steps = # gates f fζ

?

slide-29
SLIDE 29

time = # steps = # gates f fζ

?

v2 gates

slide-30
SLIDE 30

time = # steps = # gates f fζ

?

v2 gates v gates

slide-31
SLIDE 31

Which lattices allow optimal circuits for the zeta transform?

slide-32
SLIDE 32

What? Why? How?

slide-33
SLIDE 33

Yates’s Algorithm

[Frank Yates, The Design and analysis of factorial experiments, Imperial Bureau of Soil Science Tech. Comm. 35, 1937.]

“The Fast Zeta Transform”, FZT

slide-34
SLIDE 34
slide-35
SLIDE 35

The subset lattice

{} {2} {1} {1,2}

slide-36
SLIDE 36

The subset lattice

{} {2} {1} {1,2}

slide-37
SLIDE 37

Circuits for Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

slide-38
SLIDE 38

Circuits for Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

slide-39
SLIDE 39

Circuits for Zeta Transform f: L → R

f ζ(x) = ∑

y≤x

f (y)

4 3 1 6 4 14 5 10

slide-40
SLIDE 40

1 1 1 1 1 1

slide-41
SLIDE 41

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-42
SLIDE 42

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1

slide-43
SLIDE 43

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1

slide-44
SLIDE 44

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1 1 1 1 2 2 2 3

slide-45
SLIDE 45

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1 1 1 1 2 2 2 3

slide-46
SLIDE 46

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1

slide-47
SLIDE 47

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1 1 1 1 2 2 2 3 2 3 3 4 4 5 6 1

slide-48
SLIDE 48

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 2 2 3 1 2 2 2 2 3 3 1 1 1 1 2 2 2 3 2 3 3 4 4 5 6 1

slide-49
SLIDE 49

Fast Zeta Transform

A B C D

G

1 1 1 1 1 BD 1 CD g0 = f 1 1 1 1 1 1 1 1 1 1 1 g1 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 g2 1 1 1 1 2 2 2 1 2 2 3 2 2 3 3 g3 1 1 1 1 2 2 2 2 3 3 3 4 4 5 6 g = g4

slide-50
SLIDE 50
slide-51
SLIDE 51

time = # lines (“edges”) in Hasse diagram e = v log v < v2

#edges

#lattice points (vertices)

slide-52
SLIDE 52

Fast Zeta Transform for v = 24

A B AB C AC BC ABC D AD BD ABD CD ACD BCD ABCD 1 1 1 1 1 1

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

g0 g1 g2 g3 g4 1 2 2 1 2 2 3 1 2 3 4 3 4 5 6

slide-53
SLIDE 53

What? How? Why?

slide-54
SLIDE 54

Subset lattice in time O(v⋅log v) [Yates] What we know v = |L| = # vertices in Hasse diagram e = # “edges” in Hasse diagram Every lattice in time O(v2) [Brute force] Most lattices not in time o(v3/2/log v) [Count] Subset lattice in time O(e) [Yates] No lattice in time o(e) [Kennes]

slide-55
SLIDE 55

Most lattices for the zeta transform need v3/2/log v gates

slide-56
SLIDE 56

There are exp(Θ(v3/2)) lattices

  • n v points

1 (v/2)–1 “atoms” (v/2)–1 “hyperatoms”

slide-57
SLIDE 57

There are exp(Θ(v3/2)) lattices

  • n v points

1 (v/2)–1 “atoms” (v/2)–1 “hyperatoms” possible edges

2Θ(v2)

slide-58
SLIDE 58

There are exp(Θ(v3/2)) lattices

  • n v points

1 (v/2)–1 “atoms” (v/2)–1 “hyperatoms” possible edges

2Θ(v2)

Doesn’t quite work (not a lattice, isomorphisms,…), but OK with more care.

[Klotz und Lucht, Endliche Verbände, J. Reine Angew. Math., 247:58–68, 1971]

slide-59
SLIDE 59

There are exp(O(s log s)) circuits on s gates

gate input 1 input 2 1 v1 v2 2 v3 v4 3 v5 v6 4 v7 v8 5 g1 g2 6 v2 v4 7 g3 g4 8 v6 v8 9 g5 g7 10 g6 g8 11 g2 g4 12 v4 v8

  • utput

g9 g10 g11 g12 g7 g8 g4 v8

O(log s) bits

slide-60
SLIDE 60

There are exp(O(s log s)) circuits on s gates There are exp(Θ(v3/2)) lattices

  • n v points

Thus, most lattices need exp(Θ(v3/2/log v)) gates

slide-61
SLIDE 61

Monotone circuits for the zeta transform need O(e) gates

slide-62
SLIDE 62
slide-63
SLIDE 63
slide-64
SLIDE 64

f ζ(x) = ∑

y≤x

f (y)

slide-65
SLIDE 65

Need to argue: some gate handles this contribution only.

f ζ(x) = ∑

y≤x

f (y)

slide-66
SLIDE 66

Need to argue: some gate handles this contribution only.

f ζ(x) = ∑

y≤x

f (y)

[Kennes, Computational aspects of the Möbius transform of graphs, IEEE Transactions on Systems, Man and Cybernetics, 22(2):201–223, 1992.]

slide-67
SLIDE 67

Subset lattice in time O(v⋅log v) [Yates] What we know v = |L| = # vertices in Hasse diagram e = # “edges” in Hasse diagram Every lattice in time O(v2) [Brute force] Most lattices not in time o(v3/2/log v) [Count] Subset lattice in time O(e) [Yates] No lattice in time o(e) [Kennes]

slide-68
SLIDE 68

What?

No, really: Why?

How? Why?

slide-69
SLIDE 69

A B C D I1 I2 I3

Graph Colouring # colourings = # covers with independent sets

artistic freedom; should say “partitions”

slide-70
SLIDE 70

1 1 1 1 1 1 f 1 1 1 1 6 6 6 6

25 25

6

24 24 66 18

( f ζ)3µ

A B C D I1 I2 I3

Graph 3-Colouring

g

slide-71
SLIDE 71

1 1 1 1 1 1 f 1 1 1 1 6 6 6 6

25 25

6

24 24 66 18

( f ζ)3µ

A B C D I1 I2 I3

Graph 3-Colouring f(S) = 1 iff S is independent g(S) = # triplets of independent subsets covering S

g

slide-72
SLIDE 72

1 1 1 1 1 1 f 1 1 1 1 6 6 6 6

25 25

6

24 24 66 18

( f ζ)3µ

A B C D I1 I2 I3

Graph 3-Colouring f(S) = 1 iff S is independent g(S) = # triplets of independent subsets covering S

g

f ζ gζ

slide-73
SLIDE 73

1 1 1 1 1 1 f 1 1 1 1 2 2 2 2 3 3 3 4 4 5 6 f ζ 1 1 1 1 8 8 8 8

27 27 27 64 64 125 216

( f ζ)3

1 1 1 1 6 6 6 6

25 25

6

24 24 66 18

( f ζ)3µ

ζ µ x ⌅⇤ x3

slide-74
SLIDE 74

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

slide-75
SLIDE 75

[Björklund, H., Koivisto, Set partitioning via inclusion-exclusion. SIAM J. Comput., 39(2):546–563, 2009.]

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

slide-76
SLIDE 76

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

slide-77
SLIDE 77

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

Theory of NP-hardness

1960 1980 2000

slide-78
SLIDE 78

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

Theory of NP-hardness

1960 1980 2000

Let’ s give up

slide-79
SLIDE 79

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

Theory of NP-hardness

1960 1980 2000

Let’ s give up Approximation algorithms Let’ s find the wrong answer real fast!

slide-80
SLIDE 80

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

Theory of NP-hardness

1960 1980 2000

Let’ s give up Approximation algorithms Let’ s find the wrong answer real fast! Exponential time (exact) algorithms Let’ s find the right answer faster.

slide-81
SLIDE 81

Graph k-colouring in time O*(2|V|).

Trivial algorithm: time O*(k|V|).

Exciting new trend in algorithms for hard problems

Theory of NP-hardness

1960 1980 2000

Let’ s give up Approximation algorithms Let’ s find the wrong answer real fast! Exponential time (exact) algorithms Let’ s find the right answer faster.

French connection: Kratsch, Liedloff, Thomassé, Paul, Havet, Escoffier, Paschos,…

slide-82
SLIDE 82

What?

No, really: Why?

How? Why?

slide-83
SLIDE 83

How fast can we multiply?

slide-84
SLIDE 84

Multiply polynomials (1x0+1x1+3x2) ⋅ (1x0+2x1)

= 1x0+3x1+5x2+6x3

slide-85
SLIDE 85

Multiply polynomials (1x0+1x1+3x2) ⋅ (1x0+2x1)

= 1x0+3x1+5x2+6x3

elements in semigroup S (monomials) mapping f from S to some field K multiplication on S

slide-86
SLIDE 86

Multiplication in semigroups (1x0+1x1+3x2) ⋅ (1x0+2x1)

= 1x0+3x1+5x2+6x3

( f ∨ g)(c) =

a,b∈L: a∨b=c

f (a)g(b)

For lattices: join product

slide-87
SLIDE 87

semigroup S monomial lattice point field K of scalars coefficient f,g: S → K product in the semigroup algebra multiplication of polynomials join product

Algebraic view

slide-88
SLIDE 88

Fourier meets Möbius

p q

F(p) F(q) ˙

F−1

polynomial multiplication join product

f g

ζ ζ ∨ µ

slide-89
SLIDE 89
slide-90
SLIDE 90

Zeta circuits for lattices with n nonzero irreducibles

  • f size O(vn)

C’EST FRAIS!

slide-91
SLIDE 91

Zeta circuits for lattices with n nonzero irreducibles

  • f size O(vn)

[Björklund, H. Kaski, Koivisto, Nederlof, Parviainen, SODA, last week]

C’EST FRAIS!

slide-92
SLIDE 92

What? Why? How?

slide-93
SLIDE 93

9 6 4 8 1 3 2 12 18 36 24 72

5 nonzero irreducibles Divisors of 72 “6” is reducible (join of 2 and 3)

slide-94
SLIDE 94

9 6 4 8 1 3 2 12 18 36 24 72

prime powers

slide-95
SLIDE 95

9 6 4 8 1 3 2 12 18 36 24 72

prime powers ground set A

vn = e = 2|A||A|

slide-96
SLIDE 96

9 6 4 8 1 3 2 12 18 36 24 72

prime powers ground set A

vn = e = 2|A||A| Also works optimally for sublattices of the subset lattice that are downward closed intersection closed union closed

slide-97
SLIDE 97

9 6 4 8 1 3 2 12 18 36 24 72

prime powers ground set A

vn = e = 2|A||A| Also works optimally for sublattices of the subset lattice that are downward closed intersection closed union closed e = Θ(v)

slide-98
SLIDE 98

What? Why? How?

slide-99
SLIDE 99

9 6 4 8 1 3 2 12 18 36 24 72

The Spectrum Map

slide-100
SLIDE 100

9 6 4 8 1 3 2 12 18 36 24 72 {3,9} {2,3} {2,4} {2,4,8} Ø {3} {2} {2,3,4} {2,3,9} {2,3,4,9} {2,3,4,8} {2,3,4,8,9}

The Spectrum Map

slide-101
SLIDE 101

9 6 4 8 1 3 2 12 18 36 24 72 {3,9} {2,3} {2,4} {2,4,8} Ø {3} {2} {2,3,4} {2,3,9} {2,3,4,9} {2,3,4,8} {2,3,4,8,9}

The Spectrum Map

slide-102
SLIDE 102

9 6 4 8 1 3 2 12 18 36 24 72 {3,9} {2,3} {2,4} {2,4,8} Ø {3} {2} {2,3,4} {2,3,9} {2,3,4,9} {2,3,4,8} {2,3,4,8,9}

The Spectrum Map

2 3 23 24 39 234 239 248 2348 2349
slide-103
SLIDE 103

Arbitrary finite lattice can be embedded into the subset lattice 2[n]. Result is closed under intersection. n = # nonzero, join-irreducible elements.

2 3 23 24 39 234 239 248 2348 2349

The Spectrum Map

9 6 4 8 1 3 2 12 18 36 24 72

slide-104
SLIDE 104

2 3 23 24 39 234 239 248 2348 2349

What we can’t just do Yates’s algorithm takes time 2nn. Exponential in # irreducibles

slide-105
SLIDE 105

What we do: walks

S T

Every pair S, T of elements is connected by a unique walk

2 3 23 24 39 234 239 248 2348 2349

39 2 239 3 239 4 2349 8 2349 9 2349

slide-106
SLIDE 106

(Not necessarily walks in the Hasse diagram)

Ø 2 1 12 Ø 2 1 12

Ø 1 {1} 2 {1,2} Ø 1 {1} 2 {1,2}

From Ø to {1,2}

slide-107
SLIDE 107

(Not necessarily walks in the Hasse diagram)

Ø 2 1 12 Ø 2 1 12

Ø 1 {1} 2 {1,2} Ø 1 {1} 2 {1,2}

From Ø to {1,2} For i = 1,2,…,n walk from Bi–1 to Bi using

Bi = (Bi−1 ∪ {i})⊥

slide-108
SLIDE 108

(Not necessarily walks in the Hasse diagram)

Ø 2 1 12 Ø 2 1 12

Ø 1 {1} 2 {1,2} Ø 1 {1} 2 {1,2}

From Ø to {1,2} For i = 1,2,…,n walk from Bi–1 to Bi using

Bi = (Bi−1 ∪ {i})⊥

“bottom” above

slide-109
SLIDE 109

(Not necessarily walks in the Hasse diagram)

Ø 2 1 12 Ø 2 1 12

Ø 1 {1} 2 {1,2} Ø 1 {1} 2 {1,2}

From Ø to {1,2} For i = 1,2,…,n walk from Bi–1 to Bi using

Bi = (Bi−1 ∪ {i})⊥

A⊥ = min

B⊇A B∈L

B

“bottom” above

slide-110
SLIDE 110

2 3 23 24 39 234 239 248 2348 2349

Summary Embed L in subset lattice using spectrum map. Define unique family of “bottom” walks. Circuit sums over these. Time = # irreducibles ⋅ # elements = # covering pairs (Hasse edges)

slide-111
SLIDE 111

Applications of FZT

  • utside of exponential time algorithms and

Dempster–Schafer belief propagation?

Which other semigroups allow FZTs?

Faster? Lower bounds?

Killer application beyond graph colouring?