Quantum query algorithms for triangle finding and associativity...

Post on 12-Jul-2020

5 views 0 download

Transcript of Quantum query algorithms for triangle finding and associativity...

Quantum query algorithms for triangle finding and associativity

testing

Troy Lee, Frédéric Magniez, Miklos Santha

Query complexity

Want to compute a function , but can only access the input through queries xi =?

f(x)

Cost is number of queries made.

Query complexity is a proxy for time complexity, and much easier to understand. In particular, we can often show tight lower bounds.

Quantum query complexity

Now can make queries in superposition.

For partial functions, like period finding, exponential separations are known between randomized and quantum query complexity [Simon ’97, Shor ’97].

For total functions, even deterministic and quantum query complexity are polynomially related [BBCMW’01].

Notable algorithms: Grover search in queriespn

Element distinctness queries [Ambainis ’03]n2/3

Triangle DetectionMaking queries of the form: is there an edge between vertex i and vertex j? Determine if a graph has a triangle.

Triangle DetectionMaking queries of the form: is there an edge between vertex i and vertex j? Determine if a graph has a triangle.

Grover ’96: n3/2

Triangle DetectionMaking queries of the form: is there an edge between vertex i and vertex j? Determine if a graph has a triangle.

Grover ’96: n3/2

Magniez, Santha, Szegedy ’05: n1.3

Triangle DetectionMaking queries of the form: is there an edge between vertex i and vertex j? Determine if a graph has a triangle.

Grover ’96: n3/2

Magniez, Santha, Szegedy ’05: n1.3

Belovs ’11: n35/27 ⇡ n1.296

Triangle DetectionMaking queries of the form: is there an edge between vertex i and vertex j? Determine if a graph has a triangle.

Grover ’96: n3/2

Magniez, Santha, Szegedy ’05: n1.3

Belovs ’11: n35/27 ⇡ n1.296

This paper: n9/7 ⇡ n1.286

Associativity TestingGiven oracle access to the multiplication table of an operation : query receive a, b c = a � b�

Associativity Testing

Determine if for all triples a � (b � c) = (a � b) � c

Given oracle access to the multiplication table of an operation : query receive a, b c = a � b�

Associativity Testing

Determine if for all triples a � (b � c) = (a � b) � c

Grover ’96: n3/2

Given oracle access to the multiplication table of an operation : query receive a, b c = a � b�

Associativity Testing

Determine if for all triples a � (b � c) = (a � b) � c

Grover ’96: n3/2

This paper: n10/7 ⇡ n1.43

Given oracle access to the multiplication table of an operation : query receive a, b c = a � b�

A semidefinite programIn a beautiful turn of events, Reichardt ’10 showed the general adversary lower bound [Hoyer, L., Spalek’07] characterizes bounded-error quantum query complexity.

A semidefinite programIn a beautiful turn of events, Reichardt ’10 showed the general adversary lower bound [Hoyer, L., Spalek’07] characterizes bounded-error quantum query complexity.

ADV

±(f) = min

u

x,i

max

x2D

X

i2[n]

kux,i

k2

subject to:

X

i:xi 6=yi

hux,i

|uy,i

i = 1 for all f(x) 6= f(y)

Let f : D ! {0, 1} with D ✓ [q]n

A semidefinite programIn a beautiful turn of events, Reichardt ’10 showed the general adversary lower bound [Hoyer, L., Spalek’07] characterizes bounded-error quantum query complexity.

ADV

±(f) = min

u

x,i

max

x2D

X

i2[n]

kux,i

k2

subject to:

X

i:xi 6=yi

hux,i

|uy,i

i = 1 for all f(x) 6= f(y)

Let f : D ! {0, 1} with D ✓ [q]n

This gives a new way to design algorithms!

Learning GraphsThis plan proves to be quite difficult.

Learning GraphsThis plan proves to be quite difficult.

Enter learning graphs [Belovs ’11].

Learning GraphsThis plan proves to be quite difficult.

A learning graph imposes additional structure on the SDP solution. This structure ensures constraints are satisfied automatically.

Lets one focus on achieving a good objective value.

Enter learning graphs [Belovs ’11].

Learning GraphsThis plan proves to be quite difficult.

A learning graph imposes additional structure on the SDP solution. This structure ensures constraints are satisfied automatically.

Lets one focus on achieving a good objective value.

Already enormously successful: element distinctness, triangle finding [B’11], subgraph finding [Zhu’11, LMS’11], k-element distinctness [B’12].

Enter learning graphs [Belovs ’11].

Learning Graphsu

x,i

=X

S✓[n]wS,i>0

pw

S,i

|Si|xS

i if f(x) = 0

uy,i =X

S✓[n]wS,i>0

py(S, i)pwS,i

|Si|xSi if f(y) = 1

Learning Graphs

Rules: defines a flow. Sinks have one-certificate for y.py

u

x,i

=X

S✓[n]wS,i>0

pw

S,i

|Si|xS

i if f(x) = 0

uy,i =X

S✓[n]wS,i>0

py(S, i)pwS,i

|Si|xSi if f(y) = 1

Learning Graphs

;X

i2[n]

py(;, i) = 1

Rules: defines a flow. Sinks have one-certificate for y.py

u

x,i

=X

S✓[n]wS,i>0

pw

S,i

|Si|xS

i if f(x) = 0

uy,i =X

S✓[n]wS,i>0

py(S, i)pwS,i

|Si|xSi if f(y) = 1

Learning Graphs

;X

i2[n]

py(;, i) = 1 SX

i2[n]

py(S \ {i}, i) =X

j2[n]

py(S [ {j}, j)

Rules: defines a flow. Sinks have one-certificate for y.py

u

x,i

=X

S✓[n]wS,i>0

pw

S,i

|Si|xS

i if f(x) = 0

uy,i =X

S✓[n]wS,i>0

py(S, i)pwS,i

|Si|xSi if f(y) = 1

High-Level LanguageWe develop a high-level language for designing learning graphs for subgraph detection.

All weights will either be zero or one--just need to decide which sets S of edge slots to include.

S will be union of (unbalanced) regular bipartite graphs whose structure mirrors that of the subgraph.

Can optimize over set sizes and degrees.

High-Level Language

We provide code to find the optimum! github.com/troyjlee

We develop a high-level language for designing learning graphs for subgraph detection.

All weights will either be zero or one--just need to decide which sets S of edge slots to include.

S will be union of (unbalanced) regular bipartite graphs whose structure mirrors that of the subgraph.

Can optimize over set sizes and degrees.

degree r1 � 1degree r2 � 1

A1 : r1 � 1 verticesA2 : r2 � 1 vertices

degree r2 � 1 degree r1 � 1

1 new vertex

with degree r2 � 1 with degree r1 � 1

A1 with 1 new vertex ! r1 vertices

A2 : r2 � 1 vertices

r1 � 1 vertices

degree r2 � 1

r2 � 1 vertices

1 new vertex

with degree r1

degree r1

r1 vertices

A1 : r1 verticesA2 with 1 new vertex ! r2 vertices

with degree r2 � 1r2 � 1 vertices

A3 : 1 new vertex

� vertices

degree �

A1 : r1 verticesA2 : r2 vertices

all connected to A2

all connected to A1

A3 : 1 vertex

1 new edge

A2 : r2 vertices

� vertices

all connected to A1

A1 : r1 verticesall connected to A2

� vertices

A3 : 1 vertex

1 new edge

A2 : r2 verticesall connected to A1

A1 : r1 verticesall connected to A2

Non-Adaptive LGsWe use the most basic “nonadaptive” model of learning graphs.

This model does not depend on the underlying alphabet, just the structure of one-certificates.

For example, threshold 2 and element (non)distinctness have the same one-certificate structure.

Non-Adaptive LGsWe use the most basic “nonadaptive” model of learning graphs.

This model does not depend on the underlying alphabet, just the structure of one-certificates.

For example, threshold 2 and element (non)distinctness have the same one-certificate structure.

0010001000

7850435129

Triangle Optimality

For example, we can solve the “triangle sum” problem, where edges are labeled by elements of a group and the question is if there are such that(i, j), (j, k), (i, k)

ei,j + ej,k + ei,k = 0

In a very recent result, Belovs and Rosmanis ’12 show a lower bound for the triangle sum problem of

Going to a non-boolean alphabet, our algorithms can find subgraphs with specified edge colors in a colored graph.

n9/7

plog n

Associativity TestingIt is also easy to extend the algorithm to graphs that are colored and directed.

If the operation is non-associative, we can find the following subgraph.

a b cb � c a � bb � ca � b (a � b) � ca � (b � c)

Certificate () a � (b � c) 6= (a � b) � c

a1 a2 a3 a4 a5a2 � a1 a2 � a3 a3 � a4 a5 � a4

= a1= a5

a1 a2 a3 a4 a5

a1

a3

a4a2 = a5

1 2 3 4 5

Certificate () (a2 � a3 = a5, a3 � a4 = a1 and a2 � a1 6= a5 � a4)

This is the basis of our algorithm for associativity.

Future Directions

Can we go beyond non-adaptive learning graphs to improve triangle finding?

Beame and Machmouchi ’12 show a quantum query lower bound of for a polynomial size depth-3 formula.

Do all polynomial size DNF’s on n variables have quantum query complexity

⌦(n/ log(n))

O(n1�✏)?