Polynomial-Time Problems Lecture 4: The polynomial method Part II: - - PowerPoint PPT Presentation

โ–ถ
polynomial time problems
SMART_READER_LITE
LIVE PREVIEW

Polynomial-Time Problems Lecture 4: The polynomial method Part II: - - PowerPoint PPT Presentation

Complexity Theory of Polynomial-Time Problems Lecture 4: The polynomial method Part II: All-pairs shortest paths Sebastian Krinninger Overview on APSP Algorithms Floyd-Warshall algorithm: ( 3 ) Inserts one node at a time


slide-1
SLIDE 1

Complexity Theory of Polynomial-Time Problems

Lecture 4: The polynomial method Part II: All-pairs shortest paths

Sebastian Krinninger

slide-2
SLIDE 2

Overview on APSP Algorithms

  • Floyd-Warshall algorithm: ๐‘ƒ(๐‘œ3)

Inserts one node at a time ๐‘œ iterations, each taking time ๐‘ƒ(๐‘œ2)

  • Faster algorithms for sparse graphs
  • Directed graphs:
  • Single-source shortest paths: ๐‘ƒ(๐‘› + ๐‘œ log ๐‘œ) (Dijkstra with Fibonacci heap/Hollow heap)
  • โ‡’ All-pairs shortest paths: ๐‘ƒ(๐‘›๐‘œ + ๐‘œ2 log ๐‘œ), improved to ๐‘ƒ(๐‘›๐‘œ + ๐‘œ2 log log ๐‘œ) [Pettie 02]
  • Undirected graphs:
  • Single-source shortest paths: ๐‘ƒ(๐‘›) [Thorup 97]
  • โ‡’ All-pairs shortest paths: ๐‘ƒ(๐‘›๐‘œ)
  • Pseudopolynomial algorithms
  • Today: Fastest โ€œgeneral-purposeโ€ algorithm
slide-3
SLIDE 3

History of slightly subcubic algorithms

Running Time Author(s) Year(s) ๐‘œ3 Floyd, Warshall 1962 ๐‘œ3/ log1/3 ๐‘œ Fredman 1975 ๐‘œ3/ log1/2 ๐‘œ Dobosiewicz, Takaoka 1990, 1991 ๐‘œ3/ log5/7 ๐‘œ Han 2004 ๐‘œ3/ log ๐‘œ Takaoka, Zwick, Chan 2004, 2005 ๐‘œ3/ log5/4 ๐‘œ Han 2006 ๐‘œ3/ log2 ๐‘œ Chan, Han/Takaoka 2007, 2012 ๐‘œ3/2ฮฉ log ๐‘œ 1/2 Williams 2014 Grows faster than any polylogarithmic factor

slide-4
SLIDE 4

Problem definition: desired output

  • Can create instances such that for every pair of nodes ๐‘ฃ, ๐‘ค shortest

path from ๐‘ฃ to ๐‘ค consists of ฮฉ(๐‘œ) nodes

  • โ‡’ Cannot output all shortest paths explicitly in time ๐‘(๐‘œ3)
  • Distance matrix: output size ๐‘œ2
  • Shortest path matrix ๐“๐: output size ๐‘œ2

For every pair of nodes ๐‘ฃ, ๐‘ค, SP ๐‘ฃ, ๐‘ค = next node on shortest path from ๐‘ฃ to ๐‘ค

slide-5
SLIDE 5

Machine model: Real RAM

Floyd-Warshall: ๐‘ƒ(๐‘œ3) with only additions and comparisons ฮฉ(๐‘œ3) lower bound if only additions and comparisons allowed [Kerr 70] Real RAM:

  • Additions and comparisons of reals: unit cost
  • Other operations: logarithmic cost
slide-6
SLIDE 6

Tools

slide-7
SLIDE 7

Tool 1: Razborov-Smolensky

Represent AND of ๐‘’ variables ๐‘ฆ1 โˆง โ‹ฏ โˆง ๐‘ฆ๐‘’ by low-degree polynomial

  • Parameter ๐‘Ÿ
  • For every ๐‘— = 1, โ€ฆ , ๐‘Ÿ, ๐‘˜ = 1, โ€ฆ , ๐‘’: Set ๐‘ 

๐‘—,๐‘˜ = 0 or 1 with probability 1 2

๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ =

๐‘—=1 ๐‘Ÿ

1 โŠ•

๐‘˜=1 ๐‘’

๐‘ 

๐‘—,๐‘˜ โ‹… ๐‘ฆ๐‘˜ โŠ• 1

By distributive law, ๐ต can be written as XOR of 1 + ๐‘’ ๐‘Ÿ monomials Lemma: Pr

๐‘ ๐‘—,๐‘˜ ๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ = ๐‘ฆ1 โˆง โ‹ฏ โˆง ๐‘ฆ๐‘’ โ‰ฅ 1 โˆ’ 1 2๐‘Ÿ

slide-8
SLIDE 8

๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ =

๐‘—=1 ๐‘Ÿ

1 โŠ•

๐‘˜=1 ๐‘’

๐‘ 

๐‘—,๐‘˜ โ‹… ๐‘ฆ๐‘˜ โŠ• 1

Lemma: Pr

๐‘ ๐‘—,๐‘˜ ๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ = ๐‘ฆ1 โˆง โ‹ฏ โˆง ๐‘ฆ๐‘’ โ‰ฅ 1 โˆ’ 1 2๐‘Ÿ

Proof: ๐‘ฆ1 โˆง โ‹ฏ โˆง ๐‘ฆ๐‘’ = 1: Each ๐‘ฆ๐‘˜ must be 1. Clearly, ๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ = 1 ๐‘ฆ1 โˆง โ‹ฏ โˆง ๐‘ฆ๐‘’ = 0: First, fix some ๐‘— ๐‘‡: subsets of ๐‘ฆ๐‘˜โ€™s that are 0 ๐‘‡โ€ฒ: subsets of ๐‘ฆ๐‘˜โ€™s that are 0 and additionally ๐‘ 

๐‘—,๐‘˜ = 1

Bad event: ๐‘—-th component of outer AND is 1 โ‡” |๐‘‡โ€ฒ| is even Each subset of ๐‘‡ has same probability of being picked as ๐‘‡โ€ฒ Pr |๐‘‡โ€ฒ| is odd = Pr |๐‘‡โ€ฒ| is even = 1 2 ๐ต ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘’ = 1 only if bad event happens for each component of outer AND โ‡’ Error probability โ‰ค 1

2๐‘Ÿ

Observation: For every set ๐‘‡, #odd subsets = #even subsets (by binary encoding of the 2|๐‘‡| subsets)

slide-9
SLIDE 9

Tool 2: Fast rectangular matrix multiplication

Theorem: There is an algorithm for multiplying an ๐‘œ ร— ๐‘œ0.17 matrix with an ๐‘œ0.17 ร— ๐‘œ matrix in time ๐‘ƒ(๐‘œ2 log2 ๐‘œ). ๐‘œ0.1 ๐‘œ Also works for finite fields such as ๐บ2! ร— =

slide-10
SLIDE 10

Fast evaluation of polynomial

Given: Polynomial ๐‘„(๐‘ฆ[1], โ€ฆ , ๐‘ฆ[๐‘’], ๐‘ง[1], โ€ฆ , ๐‘ง[๐‘’]) over ๐บ2

  • With ๐‘› โ‰ค ๐‘œ0.1 monomials
  • Two sets of inputs:

๐‘Œ = ๐‘ฆ1, โ€ฆ , ๐‘ฆ๐‘œ โІ 0,1 ๐‘’ ๐‘ = ๐‘ง1, โ€ฆ , ๐‘ง๐‘œ โІ 0,1 ๐‘’

(๐‘ฆ๐‘— = ๐‘ฆ๐‘—[1], โ€ฆ , ๐‘ฆ๐‘—[๐‘’] ) (๐‘ง๐‘˜ = ๐‘ง๐‘˜[1], โ€ฆ , ๐‘ง๐‘˜[๐‘’] )

Lemma: There is an algorithm for evaluating ๐‘„ on all pairs ๐‘ฆ๐‘—, ๐‘ง๐‘˜ โˆˆ ๐‘Œ ร— ๐‘ (simultaneously) in time ๐‘ƒ ๐‘œ2poly log ๐‘œ .

slide-11
SLIDE 11

Restrictions of monomials

Shape of polynomial ๐‘„:

  • ๐‘„ = ๐‘ž1 + โ‹ฏ + ๐‘ž๐‘›
  • each ๐‘ž๐‘™ is a monomial

Define

  • ๐‘ž๐‘™|๐‘ฆ: restriction of ๐‘™-th monomial to variables ๐‘ฆ[1], โ€ฆ , ๐‘ฆ[๐‘’]
  • ๐‘ž๐‘™|๐‘ง: restriction of ๐‘™-th monomial to variables ๐‘ง[1], โ€ฆ , ๐‘ง[๐‘’]
  • (empty product = 1)

โ€œInner productโ€

  • ๐‘„ = ๐‘ž1 ๐‘ฆ โ‹… ๐‘ž1 ๐‘ง + โ‹ฏ + ๐‘ž๐‘› ๐‘ฆ โ‹… ๐‘ž๐‘› ๐‘ง
slide-12
SLIDE 12

Reduction to matrix multiplication

๐‘ฆ1 โ‹ฎ ๐‘ฆ๐‘œ ร— ๐‘œ0.1 monomials ๐‘ง1 โ€ฆ ๐‘ง๐‘œ ๐‘œ0.1 monomials

Entry ๐‘—, ๐‘™ : Evaluation of ๐‘ž๐‘™|๐‘ฆ๐‘— Entry ๐‘™, ๐‘˜ : Evaluation of ๐‘ž๐‘™|๐‘ง๐‘˜

Result matrix ๐‘†[๐‘—, ๐‘˜]: Evaluation of ๐‘„ under ๐‘ฆ๐‘— = ๐‘ฆ๐‘—[1], โ€ฆ , ๐‘ฆ๐‘—[๐‘’] and ๐‘ง๐‘˜ = ๐‘ง๐‘˜[1], โ€ฆ , ๐‘ง๐‘˜[๐‘’]

slide-13
SLIDE 13

Tool 3: Union Bound and Chernoff Bound

Union Bound: Pr ๐ต โˆช ๐ถ โ‰ค Pr ๐ต + Pr ๐ถ (Variant of) Chernoff Bound: Let ๐‘Œ1, โ€ฆ , ๐‘Œ๐‘™ be independent 0/1-valued random variables such that 0 < ๐น ๐‘Œ๐‘— < 1. Then, the random variable ๐‘Œ = ๐‘—=1

๐‘™

๐‘Œ๐‘— satisfies: Pr ๐‘Œ < 1 โˆ’ ๐œ€ ๐น[๐‘Œ] โ‰ค ๐‘“โˆ’๐œ€2๐น[๐‘Œ]/2 for every 0 โ‰ค ๐œ€ โ‰ค 1

slide-14
SLIDE 14

Solving the Problem

slide-15
SLIDE 15

Min-plus matrix product

We give an algorithm for the following problem:

  • Given: ๐‘œ ร— ๐‘’ integer matrix ๐ต and ๐‘’ ร— ๐‘œ integer matrix ๐ถ
  • Output: ๐‘œ ร— ๐‘œ matrix ๐ท such that

๐ท ๐‘—, ๐‘˜ = min

๐‘™โˆˆ{1,โ€ฆ,๐‘’}(๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ )

Matrix multiplication in min-plus semiring:

  • min is addition
  • + is multiplication
  • 0 is 1-element
  • โˆž is 0-element

๐‘™โˆ— such that ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™โˆ—, ๐‘˜ = min

๐‘™โˆˆ{1,โ€ฆ,๐‘’}(๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ ) is a witness for ๐‘—, ๐‘˜

slide-16
SLIDE 16

Tripartite graph for min-plus product

โ‹ฎ โ‹ฎ โ‹ฎ ๐‘œ ๐‘œ ๐‘’

๐‘ฅ ๐‘—, ๐‘™ = ๐ต[๐‘—, ๐‘™] ๐‘ฅ ๐‘™, ๐‘˜ = ๐ถ[๐‘™, ๐‘˜] (no edge if weight is โˆž)

๐ท ๐‘—, ๐‘˜ = min

1โ‰ค๐‘™โ‰ค๐‘’(๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ )

  • 1. Min-plus product = APSP in tripartite graph
  • 2. If ๐ต = ๐ถ = ๐ป: ๐ป ร— ๐ป = matrix of 2-hop distances
slide-17
SLIDE 17

APSP and min-plus product are โ€œequivalentโ€

In general: ๐ป๐‘— = matrix distances using exactly ๐‘— hops Distance matrix ๐ธ: ๐ธ = ๐ฝ + ๐ป + ๐ป2 + โ‹ฏ + ๐ป๐‘œโˆ’1 = ๐ป + ๐ฝ ๐‘œโˆ’1

+ is entry-wise minimum Identity matrix ๐ฝ: 0 at diagonal, โˆž otherwise

Repeated squaring: Compute ๐ป + ๐ฝ 2, ๐ป + ๐ฝ 4, ๐ป + ๐ฝ 8, โ€ฆ,

โ‡’ ๐‘ƒ(log ๐‘œ) min-plus products for distances, shortest paths through witnesses

Even stronger relationship known: Theorem: APSP on ๐‘œ nodes can be solved in time ๐‘ƒ(๐‘ˆ ๐‘œ ) if and only min-plus product on ๐‘œ ร— ๐‘œ matrices can be solved in time ๐‘ƒ(๐‘ˆ ๐‘œ ).

slide-18
SLIDE 18

Step 1: : Divide into subproblems

slide-19
SLIDE 19

Overall algorithm

1. Set ๐‘’ = 2 log ๐‘œ/100 2. Divide problem into

๐‘œ ๐‘’ subproblems

3. Solve each subproblem in time ๐‘ƒ ๐‘œ2poly log ๐‘œ 4. Merge solutions in time ๐‘ƒ ๐‘œ3/๐‘’ Total time: ๐‘ƒ ๐‘œ3 ๐‘’ poly log ๐‘œ = ๐‘œ3/2ฮฉ log ๐‘œ 1/2 For every ๐‘™ = 1, โ€ฆ ,

๐‘œ ๐‘’:

  • Compute product ๐ท๐‘™ of ๐ต๐‘™ and ๐ถ๐‘™

(๐‘œ ร— ๐‘’ matrix with ๐‘’ ร— ๐‘œ matrix) Return: min ๐ท1, โ€ฆ , ๐ท๐‘œ/๐‘’ (entry-wise minimum) ๐ต ๐ถ

๐ต1 ๐ต๐‘œ/๐‘’ ๐ถ1 ๐ถ๐‘œ/๐‘’

๐‘’

slide-20
SLIDE 20

Subproblem

We solve the following subproblem:

  • Given: ๐‘œ ร— ๐‘’ matrix ๐ต and ๐‘’ ร— ๐‘œ matrix ๐ถ
  • Output: ๐‘œ ร— ๐‘œ matrix ๐‘‹ of witnesses such that

๐‘‹ ๐‘—, ๐‘˜ = arg min

๐‘™โˆˆ{1,โ€ฆ,๐‘’}

(๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ ) From witnesses in ๐‘‹ we can easily reconstruct values of min-plus product min

๐‘™โˆˆ{1,โ€ฆ,๐‘’} (๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ ) in time ๐‘ƒ ๐‘œ2

slide-21
SLIDE 21

Step 2: : Preprocess input of subproblem

slide-22
SLIDE 22

Enforce unique minimum

For every entry ๐‘—, ๐‘™ of ๐ต: ๐ตโˆ— ๐‘—, ๐‘™ โˆถ= ๐ต ๐‘—, ๐‘™ โ‹… ๐‘œ + 1 + ๐‘™ For every entry ๐‘™, ๐‘˜ of ๐ถ ๐ถโˆ— ๐‘™, ๐‘˜ โˆถ= ๐ถ ๐‘™, ๐‘˜ โ‹… ๐‘œ + 1 Fix some pair ๐‘—, ๐‘˜ and define ๐‘™โˆ— as smallest ๐‘™โ€ฒ โˆˆ {1, โ€ฆ , ๐‘’} such that ๐ต ๐‘—, ๐‘™โ€ฒ + ๐ถ ๐‘™โ€ฒ, ๐‘˜ = min

๐‘™โˆˆ{1,โ€ฆ,๐‘’} ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜

โ‡’ Work with ๐ตโˆ— and ๐ถโˆ— instead of ๐ต and ๐ถ to ensure unique minima Running time: ๐‘ƒ(log ๐‘œ) additions per entry (add to itself for ๐‘ƒ(log ๐‘œ) times) โ‡’ ๐‘ƒ ๐‘œ๐‘’ log ๐‘œ

Claim: ๐‘™โˆ— is unique minimum of ๐ตโˆ— ๐‘—, ๐‘™ + ๐ถโˆ— ๐‘™, ๐‘˜ over ๐‘™โˆ— โˆˆ {1, โ€ฆ , ๐‘’}

slide-23
SLIDE 23

Proof of Cla laim im: : ๐‘™โˆ— is unique minimum of ๐ตโˆ— ๐‘—, ๐‘™ + ๐ถโˆ— ๐‘™, ๐‘˜

  • ver ๐‘™โˆ— โˆˆ {1, โ€ฆ , ๐‘’}

Let ๐‘™ โ‰  ๐‘™โˆ—. We show that ๐ตโˆ— ๐‘—, ๐‘™ + ๐ถโˆ— ๐‘™, ๐‘˜ > ๐ตโˆ— ๐‘—, ๐‘™โˆ— + ๐ถโˆ— ๐‘™, ๐‘˜

  • r equivalently

(1) ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ โ‹… ๐‘œ + 1 + ๐‘™ > ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™โˆ—, ๐‘˜ โ‹… ๐‘œ + 1 + ๐‘™โˆ— Case 1: ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ = ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™, ๐‘˜ Then ๐‘™โˆ— < ๐‘™ because ๐‘™โˆ— is smallest index assuming min value (1) follows immediately Case 2: ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ > ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™, ๐‘˜ โ‡’ ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ โ‰ฅ ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™, ๐‘˜ + 1 (integers!) โ‡’ ๐ต ๐‘—, ๐‘™ + ๐ถ ๐‘™, ๐‘˜ โ‹… ๐‘œ + 1 + ๐‘™ โ‰ฅ ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™โˆ—, ๐‘˜ โ‹… ๐‘œ + 1 + ๐‘™ + ๐‘œ + 1 > ๐ต ๐‘—, ๐‘™โˆ— + ๐ถ ๐‘™โˆ—, ๐‘˜ โ‹… ๐‘œ + 1 + ๐‘™โˆ—

slide-24
SLIDE 24

Fredmanโ€™s trick: Get rid of weights

Construct ๐‘œ ร— ๐‘’2 matrix ๐ตโ€ฒ and ๐‘’2 ร— ๐‘œ matrix ๐ถโ€ฒ

  • ๐ตโ€ฒ ๐‘—, ๐‘™, โ„“

โ‰” ๐ตโˆ— ๐‘—, ๐‘™ โˆ’ ๐ตโˆ— ๐‘—, โ„“

  • ๐ถโ€ฒ

๐‘™, โ„“ , ๐‘˜ โ‰” ๐ถโˆ— โ„“, ๐‘˜ โˆ’ ๐ถโˆ— ๐‘™, ๐‘˜ Idea: Compare alternatives ๐‘™ and โ„“ without taking sums Observation: ๐ตโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒ ๐‘™, โ„“ , ๐‘˜ โ‡” ๐ตโˆ— ๐‘—, ๐‘™ + ๐ถโˆ— ๐‘™, ๐‘˜ โ‰ค ๐ตโˆ— ๐‘—, โ„“ + ๐ถโˆ— โ„“, ๐‘˜

slide-25
SLIDE 25

Fredmanโ€™s trick continued

For every pair ๐‘™, โ„“ sort set ๐‘‡๐‘™,โ„“ โ‰” {๐ตโ€ฒ ๐‘—, ๐‘™, โ„“ , ๐ถโ€ฒ ๐‘™, โ„“ , ๐‘— โˆฃ ๐‘— = 1, โ€ฆ , ๐‘œ} Breaking ties:

  • Precedence of ๐ตโ€ฒ-entries over ๐ถโ€ฒ-entries
  • Otherwise arbitrarily

Properties: 1. Entries of ๐ตโ€ฒโ€ฒ and ๐ถโ€ฒโ€ฒ from {1, โ€ฆ , 2๐‘œ} 2. Comparisons preserved:

๐ตโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒ ๐‘™, โ„“ , ๐‘˜ iff ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™, โ„“ , ๐‘˜

3. For every ๐‘—, ๐‘˜ there is unique ๐‘™โˆ— such that for all โ„“: ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™โˆ—, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™โˆ—, โ„“ , ๐‘˜

Define matrices ๐ตโ€ฒโ€ฒ and ๐ถโ€ฒโ€ฒ:

  • ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“

= rank(๐ตโ€ฒ ๐‘—, ๐‘™, โ„“ ; ๐‘‡๐‘™,โ„“)

  • ๐ถโ€ฒโ€ฒ

๐‘™, โ„“ , ๐‘˜ = rank(๐ถโ€ฒ ๐‘™, โ„“ , ๐‘˜ ; ๐‘‡๐‘™,โ„“) (replace each value by rank in ๐‘‡๐‘™,โ„“) โ‡’ Every entry needs 1 + log ๐‘œ bits

(no weight dependence!)

Footnote on running time: ๐ตโ€ฒ and ๐ถโ€ฒ do not need to be computed explicitly. No subtractions necessary!

๐‘ƒ ๐‘œ๐‘’2 log ๐‘œ โ‰ค ๐‘ƒ ๐‘œ2

slide-26
SLIDE 26

Step 3: : Design circuit for subproblem

slide-27
SLIDE 27

Circuit for min-plus product

Circuit with 0/1 as inputs Gates:

  • Boolean functions: AND, OR
  • XOR (i.e., sum modulo 2)

Circuit only outputs 1 bit! โ‡’ Compute result bit-per-bit For every pair ๐‘—, ๐‘˜ and every ๐‘ โˆˆ {1, โ€ฆ , log ๐‘œ}:

Design circuit ๐ท๐‘ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] computing ๐‘-th bit of unique ๐‘™โˆ— for which ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™โˆ—, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™โˆ—, โ„“ , ๐‘˜ for all โ„“ Input: Each bit of ๐‘—-th row of ๐ตโ€ฒโ€ฒ and ๐‘˜-th colum of ๐ถโ€ฒโ€ฒ

slide-28
SLIDE 28

Structure of circuit

Goal: For every ๐‘—, ๐‘˜, compute ๐‘™โˆ— s.t. โˆ€โ„“: ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™โˆ—, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™โˆ—, โ„“ , ๐‘˜ ๐ท๐‘ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] =

๐‘™โˆˆ 1,โ€ฆ,๐‘’ , ๐‘th bit of ๐‘™ is 1 โ„“=1 ๐‘’

๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™, โ„“ , ๐‘˜

Claim: ๐ท๐‘ โ‹…,โ‹… = ๐‘-th bit of ๐‘™โˆ— for which โˆ€โ„“: ๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™โˆ—, โ„“

โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™โˆ—, โ„“ , ๐‘˜ Proof:

  • Big AND returns 1 if and only if ๐‘™ = ๐‘™โˆ—

(uniqueness of minimum)

  • If ๐‘-th bit of ๐‘™โˆ— is 1: Big OR includes ๐‘™โˆ— and thus returns 1
  • If ๐‘-th bit of ๐‘™โˆ— is 0: Big OR does not include ๐‘™โˆ— and thus returns 0

1 iff comparison true (to be specified)

slide-29
SLIDE 29

Step 4: : Represent circuit by polynomial

slide-30
SLIDE 30

Outer OR

๐ท๐‘ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] =

๐‘™โˆˆ 1,โ€ฆ,๐‘’ , ๐‘th bit of ๐‘™ is 1 โ„“=1 ๐‘’

๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™, โ„“ , ๐‘˜ May be replaced by โจ due to uniqueness: AND outputs 1 for exactly one ๐‘™

slide-31
SLIDE 31

Polynomial for outer circuit

Fixing ๐‘—, ๐‘˜, and ๐‘™, we want to replace the following circuit by a polynomial: Apply Razborov-Smolensky with ๐‘ž = 3 + log ๐‘’:

  • Error probability for specific ๐‘™: โ‰ค

1 2๐‘ž = 1 8๐‘’

  • Error probability for all ๐‘™: โ‰ค ๐‘’ โ‹…

1 8๐‘’ = 1 8

(union bound)

โ„“=1 ๐‘’

๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™, โ„“ , ๐‘˜

๐‘ฆ=1 ๐‘ž

1 โŠ•

โ„“=1 ๐‘’

๐‘ 

๐‘ฆ,โ„“ โ‹… ๐‘€๐น๐‘…๐‘™,โ„“ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] โŠ• 1

=: ๐‘€๐น๐‘…๐‘™,โ„“ โ‹…,โ‹…

slide-32
SLIDE 32

Less-or-equal-circuit for two numbers ๐‘ and ๐‘

๐‘€๐น๐‘… ๐‘, ๐‘ =

๐‘—=1 ๐‘ข

(1 โŠ• ๐‘๐‘— โŠ• ๐‘๐‘—) โˆจ

๐‘—=1 ๐‘ข

1 โŠ• ๐‘๐‘— โˆง ๐‘๐‘— โˆง

๐‘˜=1 ๐‘—โˆ’1

1 โŠ• ๐‘๐‘˜ โŠ• ๐‘

๐‘˜

= 1 iff ๐‘ = ๐‘ = 1 iff

  • First ๐‘— โˆ’ 1 bits of ๐‘ and ๐‘ equal,
  • ๐‘—-th bit of ๐‘ = 0, and
  • ๐‘—-th bit of ๐‘ = 1

May be replaced by XOR: at most one of inner expressions is true

slide-33
SLIDE 33

Polynomial for LEQ circuit

Apply Razborov/Smolensky with ๐‘Ÿ = 3 + 2 log ๐‘’ + log(๐‘ข + 1): Additional trick: For every entry ๐‘ of ๐ตโ€ฒโ€ฒ and every entry ๐‘ of ๐ถโ€ฒโ€ฒ: Precompute XOR of ๐‘๐‘—โ€™s and XOR of ๐‘๐‘—โ€™s: additional time ๐‘ƒ ๐‘œ๐‘’2๐‘ข๐‘Ÿ โ‰ค ๐‘ƒ ๐‘œ2 Introduce new variables for these combinations for later evaluation New form:

๐‘€๐น๐‘… ๐‘, ๐‘ =

๐‘—=1 ๐‘ข

(1 โŠ• ๐‘๐‘— โŠ• ๐‘๐‘—) โŠ•

๐‘—=1 ๐‘ข

1 โŠ• ๐‘๐‘— โˆง ๐‘๐‘— โˆง

๐‘˜=1 ๐‘—โˆ’1

1 โŠ• ๐‘๐‘˜ โŠ• ๐‘

๐‘˜

๐‘ข+1 ๐‘Ÿ โ‰ค๐‘ข

"2 โŠ• gates" ๐‘€๐น๐‘…โ€ฒ ๐‘, ๐‘ =

๐‘ข+1 ๐‘Ÿ

("2 โŠ• gates")

at most one ๐‘๐‘—, at most one ๐‘๐‘—, at most one constant

slide-34
SLIDE 34

Polynomial for LEQ circuit contโ€™d

Expansion (distributive law): โ†’ polynomial over ๐บ2 with

  • degree โ‰ค ๐‘Ÿ
  • #monomials: ๐‘› โ‰ค ๐‘ข + 1 โ‹… 3๐‘Ÿ monomials

Error probability: For each application of Raz/Smol: Error prob. โ‰ค

1 2๐‘Ÿ

By union bound:

  • For comparing a fixed pair (๐‘, ๐‘): error probability โ‰ค

๐‘ข+1 2๐‘Ÿ

  • For all ๐‘’2 comparisons: error probability โ‰ค

๐‘’2(๐‘ข+1) 2๐‘Ÿ

โ‰ค

๐‘’2 ๐‘ข+1 23+2 log ๐‘’+log ๐‘ข+1 = 1 8

๐‘€๐น๐‘…โ€ฒ ๐‘, ๐‘ =

๐‘ข+1 ๐‘Ÿ

("2 โŠ• gates")

slide-35
SLIDE 35

Final polynomial

Apply distributive law: #monomials bounded by

๐‘ โ‰ค ๐‘’ โ‹… ๐‘’ + 1 ๐‘›

๐‘ž = ๐‘’ โ‹…

๐‘’ + 1 ๐‘›

2+log ๐‘’

Error probability: โ‰ค

1 8 + 1 8 = 1 4

๐‘„๐‘ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] =

๐‘™=1,โ€ฆ,๐‘’ ๐‘th bit of ๐‘™ is 1 ๐‘ฆ=1 ๐‘ž

1 โŠ•

โ„“=1 ๐‘’

๐‘ 

๐‘ฆ,โ„“ โ‹… (๐‘€๐น๐‘…๐‘™,โ„“ โ€ฒ

๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ[โˆ—, ๐‘˜] โŠ• 1)

XOR with ๐‘› โ‰ค ๐‘ข + 1 โ‹… 3๐‘Ÿ monomials XOR with โ‰ค (๐‘’ + 1)๐‘› monomials

slide-36
SLIDE 36

The calculation

#monomials ๐‘ โ‰ค ๐‘’ โ‹…

๐‘’ + 1 ๐‘›

๐‘ž = ๐‘’ โ‹…

๐‘’ + 1 ๐‘›

3+log ๐‘’

= ๐‘’ โ‹… ๐‘’ + 1 โ‹… ๐‘ข + 1 โ‹… 3๐‘Ÿ 3+log ๐‘’ = ๐‘’ โ‹… ๐‘’ + 1 โ‹… ๐‘ข + 1 โ‹… 33+2 log ๐‘’+log ๐‘ข+1

3+log ๐‘’

Claim: ๐‘ โ‰ค ๐‘œ0.1 Taking logarithms:

log ๐‘ โ‰ค log ๐‘’ + 3 + log ๐‘’ log ๐‘’ + 1 + log ๐‘ข + 1 + 3 + 2 log ๐‘’ + log ๐‘ข + 1 โ‹… log 3 โ‰ค log ๐‘’ + 3 + log ๐‘’ log ๐‘’ + 1 + log ๐‘’ + 1 + 3 + 2 log ๐‘’ + log ๐‘’ + 1 โ‹… 2 โ‰ค log ๐‘’ + 3 log ๐‘’ + log ๐‘’ 2 log ๐‘’ + 2 log ๐‘’ + 3 log ๐‘’ + 2 log ๐‘’ + 2 log ๐‘’ โ‹… 2 = log ๐‘’ + 4 log ๐‘’ 4 log ๐‘’ + 7 log ๐‘’ โ‹… 2 = log ๐‘’ + 76 log2 ๐‘’ โ‰ค 100 log2 ๐‘’ = 100 log ๐‘œ 100

2

โ‰ค 0.1 log ๐‘œ ๐‘’ โ‰ฅ ๐‘ข

๐‘’ = 2 log ๐‘œ/100 ๐‘ž = 3 + log ๐‘’ ๐‘Ÿ = 3 + 2 log ๐‘’ + log(๐‘ข + 1)

slide-37
SLIDE 37

Step 5: : Fast evaluation of polynomial

slide-38
SLIDE 38

Fast evaluation of polynomial

For every ๐‘ โˆˆ 1, โ€ฆ , log ๐‘œ : Generate probabilistic polynomial ๐‘„๐‘ with the following properties

  • ๐‘„

๐‘ is XOR of ๐‘ โ‰ค ๐‘œ0.1 monomials

  • Variables of ๐‘„

๐‘ can partitioned into two subsets ๐‘Œ and ๐‘

  • For every pair ๐‘—, ๐‘˜: if
  • variables of ๐‘Œ evaluated according to ๐‘—-th row of ๐ตโ€ฒโ€ฒ and
  • variables of ๐‘ evaluated according to ๐‘˜-th column of ๐ถโ€ฒโ€ฒ,
  • then ๐‘„๐‘ returns ๐‘-th bit of arg min

๐‘™โˆˆ{1,โ€ฆ,๐‘’}

(๐ตโ€ฒโ€ฒ ๐‘—, ๐‘™, โ„“ โ‰ค ๐ถโ€ฒโ€ฒ ๐‘™, โ„“ , ๐‘˜ ) with probability โ‰ฅ

3 4

โ‡’ (Fast Evaluation Lemma): Can evaluate ๐‘„๐‘ for all ๐‘œ2 pairs ๐‘—, ๐‘˜ in time ๐‘ƒ(๐‘œ2poly log ๐‘œ ) Result matrix ๐‘†๐‘ with entries ๐‘†๐‘ ๐‘—, ๐‘˜

slide-39
SLIDE 39

Step 6: : Amplify success probability

slide-40
SLIDE 40

Majority amplification

For all pairs ๐‘—, ๐‘˜ and every ๐‘ โˆˆ 1, โ€ฆ , log ๐‘œ : ๐‘†๐‘ ๐‘—, ๐‘˜ = ๐ท๐‘ ๐ตโ€ฒโ€ฒ ๐‘—,โˆ— , ๐ถโ€ฒโ€ฒ โˆ—, ๐‘˜ with probability โ‰ฅ

3 4

Repeat evaluation with ๐‘  = 18 log ๐‘œ different random polynomials Define ๐‘‹

๐‘[๐‘—, ๐‘˜] as majority output of all ๐‘  evaluations

Fix pair ๐‘—, ๐‘˜ and ๐‘ โˆˆ 1, โ€ฆ , log ๐‘œ

๐‘Œ: Random variable counting how often ๐‘†๐‘[๐‘—, ๐‘˜] and ๐ท๐‘(๐‘—, ๐‘˜ ) agree over all ๐‘  trials Pr ๐‘‹

๐‘ ๐‘—, ๐‘˜ โ‰  ๐ท๐‘(๐‘—, ๐‘˜) โ‰ค Pr ๐‘Œ < ๐‘ 

2 ๐น ๐‘Œ โ‰ฅ 3 โ‹… ๐‘  4

โ€ฆstill ๐‘ƒ(๐‘œ2poly log ๐‘œ )

slide-41
SLIDE 41

Bounding success probability

Bound error probability using tail bound:

Pr ๐‘๐‘ ๐‘—, ๐‘˜ โ‰  ๐ท(๐‘—, ๐‘˜, ๐‘) โ‰ค Pr ๐‘Œ < ๐‘  2 โ‰ค Pr ๐‘Œ < 4 6 E ๐‘Œ = Pr ๐‘Œ < 1 โˆ’ 1 3 E ๐‘Œ โ‰ค ๐‘“

โˆ’ 2 3

2

E ๐‘Œ 2 = ๐‘“ โˆ’4E ๐‘Œ 18 โ‰ค ๐‘“ โˆ’3๐‘  18 = ๐‘“โˆ’3 log ๐‘œ โ‰ค 2โˆ’4 log ๐‘œ = ๐‘œโˆ’4

Majority needs to be correct for all ๐‘œ2 pairs ๐‘—, ๐‘˜ and log ๐‘’ bit positions ๐‘ in all

๐‘œ ๐‘’ instances of the algorithm:

Union bound: Pr โˆƒ๐‘—, ๐‘˜, ๐‘: ๐‘๐‘ ๐‘—, ๐‘˜ โ‰  ๐ท๐‘ ๐‘—, ๐‘˜ in some instance โ‰ค ๐‘œ3 log ๐‘’ ๐‘’ โ‹… ๐‘œโˆ’4 โ‰ค 1 ๐‘œ

Chernoff: Pr ๐‘Œ < 1 โˆ’ ๐œ€ ๐น[๐‘Œ] โ‰ค ๐‘“โˆ’๐œ€2๐น[๐‘Œ]/2

slide-42
SLIDE 42

Questions?