27
A Complexity Class Based on Comparator Circuits Stephen Cook Joint work with Dai Tri Man Lˆ e and Yuval Filmus and Yuli Ye Department of Computer Science University of Toronto Canada Based Partly on a paper in CSL 2011 1 / 17

F. Calogero: Isochronous dynamical systems and the arrow of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

A Complexity Class Based on ComparatorCircuits

Stephen Cook

Joint work with Dai Tri Man Le and Yuval Filmus and Yuli Ye

Department of Computer ScienceUniversity of Toronto

Canada

Based Partly on a paper in CSL 2011

1 / 17

Dai Le

2 / 17

Outline of the talk

1 Comparator circuits and the class CCI Interesting natural complete problems: stable marriage, lex-first

maximal matching, comparator circuit value problem. . .

2 Example Reductions

3 Universal Circuits and applications (new)

4 Oracle separations (new)

3 / 17

Comparator Circuits

Originally invented for sorting, e.g.,I Batcher’s O(log2 n)-depth sorting

networks (’68)I Ajtai-Komlos-Szemeredi (AKS)O(log n)-depth sorting networks (’83)

Can also be considered as booleancircuits.

Comparator gatep x • p ∧ q

q y H p ∨ q

Example

1 w0 • 0 • 0 01 w1 • 0 N 11 w2 10 w3 H 1 • 00 w4 H 1 10 w5 H 0 0

4 / 17

Comparator Circuit Value (Ccv) Problem (decision)

Given a comparator circuit with specifiedBoolean inputs, determine the outputvalue of a designated wire.

1 w0 • •1 w1 • N1 w2

0 w3 H • ?0 w4 H0 w5 H

Complexity classes

1 CCSubr =

decision problems log-space many-one-reducible to Ccv

I [Subramanian’s PhD thesis ’90], [Mayr-Subramanian ’92]

2 CC =

decision problems AC0 many-one-reducible to Ccv

I Complete problems: stable marriage, lex-first maximal matching. . .

3 CC∗ =

decision problems AC0 Turing-reducible to Ccv

I Needed when developing a Cook-Nguyen style theory for CCI The function class FCC∗ is closed under compostion

NC1 ⊆ NL ⊆ CC ⊆ CCSubr ⊆ CC∗ ⊆ P

5 / 17

Comparator Circuit Value (Ccv) Problem (decision)

Given a comparator circuit with specifiedBoolean inputs, determine the outputvalue of a designated wire.

1 w0 • •1 w1 • N1 w2

0 w3 H • ?0 w4 H0 w5 H

Complexity classes

1 CCSubr =

decision problems log-space many-one-reducible to Ccv

I [Subramanian’s PhD thesis ’90], [Mayr-Subramanian ’92]

2 CC =

decision problems AC0 many-one-reducible to Ccv

I Complete problems: stable marriage, lex-first maximal matching. . .

3 CC∗ =

decision problems AC0 Turing-reducible to Ccv

I Needed when developing a Cook-Nguyen style theory for CCI The function class FCC∗ is closed under compostion

NC1 ⊆ NL ⊆ CC ⊆ CCSubr ⊆ CC∗ ⊆ P

5 / 17

Comparator Circuit Value (Ccv) Problem (decision)

Given a comparator circuit with specifiedBoolean inputs, determine the outputvalue of a designated wire.

1 w0 • •1 w1 • N1 w2

0 w3 H • ?0 w4 H0 w5 H

Complexity classes

1 CCSubr =

decision problems log-space many-one-reducible to Ccv

I [Subramanian’s PhD thesis ’90], [Mayr-Subramanian ’92]

2 CC =

decision problems AC0 many-one-reducible to Ccv

I Complete problems: stable marriage, lex-first maximal matching. . .

3 CC∗ =

decision problems AC0 Turing-reducible to Ccv

I Needed when developing a Cook-Nguyen style theory for CCI The function class FCC∗ is closed under compostion

NC1 ⊆ NL ⊆ CC ⊆ CCSubr ⊆ CC∗ ⊆ P

5 / 17

Stable Marriage Problem (search version) (Gale-Shapley ’62)

Given n men and n women together with their preference lists

Find a stable marriage between men and women, i.e.,1 a perfect matching2 satisfies the stability condition: no two people of the opposite sex like

each other more than their current partners

Preference lists

Men:a x y

b y x

Women:x a b

y a b

a

b

x

y

stable marriage

a

b

x

y

unstable marriage

Stable Marriage Problem (decision version)

Is a given pair of (m,w) in the man-optimal (woman-optimal) stablemarriage?

6 / 17

Stable Marriage Problem (search version) (Gale-Shapley ’62)

Given n men and n women together with their preference lists

Find a stable marriage between men and women, i.e.,1 a perfect matching2 satisfies the stability condition: no two people of the opposite sex like

each other more than their current partners

Preference lists

Men:a x y

b y x

Women:x a b

y a b

a

b

x

y

stable marriage

a

b

x

y

unstable marriage

Stable Marriage Problem (decision version)

Is a given pair of (m,w) in the man-optimal (woman-optimal) stablemarriage?

6 / 17

Stable Marriage Problem (search version) (Gale-Shapley ’62)

Given n men and n women together with their preference lists

Find a stable marriage between men and women, i.e.,1 a perfect matching2 satisfies the stability condition: no two people of the opposite sex like

each other more than their current partners

Preference lists

Men:a x y

b y x

Women:x a b

y a b

a

b

x

y

stable marriage

a

b

x

y

unstable marriage

Stable Marriage Problem (decision version)

Is a given pair of (m,w) in the man-optimal (woman-optimal) stablemarriage?

6 / 17

Stable Marriage Problem (search version) (Gale-Shapley ’62)

Given n men and n women together with their preference lists

Find a stable marriage between men and women, i.e.,1 a perfect matching2 satisfies the stability condition: no two people of the opposite sex like

each other more than their current partners

Preference lists

Men:a x y

b y x

Women:x a b

y a b

a

b

x

y

stable marriage

a

b

x

y

unstable marriage

Stable Marriage Problem (decision version)

Is a given pair of (m,w) in the man-optimal (woman-optimal) stablemarriage?

6 / 17

Lex-first maximal matching problem

Lex-first maximal matching

Let G be a bipartite graph.

Successively match the bottom nodes x , y , z , . . . to the least availabletop node

a b c

x y z w

Lex-first maximal matching problem (decision)

Is a given node v (resp. edge u, v) in the lex-first maximal matching ofG ?

7 / 17

Lex-first maximal matching problem

Lex-first maximal matching

Let G be a bipartite graph.

Successively match the bottom nodes x , y , z , . . . to the least availabletop node

a b c

x y z w

Lex-first maximal matching problem (decision)

Is a given node v (resp. edge u, v) in the lex-first maximal matching ofG ?

7 / 17

Lex-first maximal matching problem

Lex-first maximal matching

Let G be a bipartite graph.

Successively match the bottom nodes x , y , z , . . . to the least availabletop node

a b c

x y z w

Lex-first maximal matching problem (decision)

Is a given node v (resp. edge u, v) in the lex-first maximal matching ofG ?

7 / 17

Lex-first maximal matching problem

Lex-first maximal matching

Let G be a bipartite graph.

Successively match the bottom nodes x , y , z , . . . to the least availabletop node

a b c

x y z w

Lex-first maximal matching problem (decision)

Is a given node v (resp. edge u, v) in the lex-first maximal matching ofG ?

7 / 17

Lex-first maximal matching problem

Lex-first maximal matching

Let G be a bipartite graph.

Successively match the bottom nodes x , y , z , . . . to the least availabletop node

a b c

x y z w

Lex-first maximal matching problem (decision)

Is a given node v (resp. edge u, v) in the lex-first maximal matching ofG ?

7 / 17

Reducing node lex-first maximal matching to Ccv

a b c d

x y z

1 x • • • • 01 y • • • • 01 z • • • • 00 a H H 10 b H H 10 c H H 10 d H 0

8 / 17

Theorem

NL ⊆ CC

Proof.

Show that stCONN ≤AC0 Ccv.

Note

Easier to show NC1 ⊆ CC.

Proof.

A Boolean function f (~x) is in NC1 iff it is computed by a uniform polysizelog-depth family of binary tree circuits with input (many copies of) xi and¬xi .

The comparator circuit uses one comparator gate for each AND or ORgate in the tree, and ignores one of the two outputs.

9 / 17

The Function Class FCC

Let f : 0, 1∗ → 0, 1∗The bit graph of f satisfies

BITf (x , i)↔ f (x)i = 1

Definef ∈ FCC↔ f is p-bounded and BITf ∈ CC

Recall BITf ∈ CC iff BITf ≤AC0 Ccv

10 / 17

Claim

We need universal cirucits to show that FCC is closed under composition.

Assume that the functions in question are p-bounded.

Roughly speaking, f ∈ FCC iff there are AC0 functions CIRf and INf suchthat the comparator circuit CIRf (x) on input IN(x) computes f (x).

Assume f and g are in FCC.

We want AC0 functions CIRf g and INf g such that CIRf g (x) on inputINf g (x) computes f (g(x)).

We know CIRf (g(x)) on input INf (g(x)) computes f (g(x)) but we needuniversal circuits to show CIRf g and INf g are AC0 functions.

In other words, we need universal circuits to convert descriptions ofdescriptions to descriptions.

11 / 17

Universal Comparator Circuits

Below is a universal comparator gadget.

1 If b = 0 then x ′ = x and y ′ = y .

2 If b = 1 then x ′ = x ∨ y and y ′ = x ∧ y .

b • • • 0

x H x ′

y H • H y ′

b H 1

To simulate one arbitrary comparator in a circuit with m wires we put inm(m − 1) gadgets in a row, for the m(m − 1) possible comparators.A universal circuit UNIV(m, n) for circuits with at most m wires and ngates requires m′ wires and n′ gates, where

m′ = 2m(m − 1)n + m n′ = 4m(m − 1)n

12 / 17

Universal Comparator Circuits

Below is a universal comparator gadget.

1 If b = 0 then x ′ = x and y ′ = y .

2 If b = 1 then x ′ = x ∨ y and y ′ = x ∧ y .

b • • • 0

x H x ′

y H • H y ′

b H 1

To simulate one arbitrary comparator in a circuit with m wires we put inm(m − 1) gadgets in a row, for the m(m − 1) possible comparators.A universal circuit UNIV(m, n) for circuits with at most m wires and ngates requires m′ wires and n′ gates, where

m′ = 2m(m − 1)n + m n′ = 4m(m − 1)n

12 / 17

Applications of Universal Circuits

FCC is closed under composition

CC is closed under AC0-Turing reductions

CC can be characterized using uniform cirucit families of comparatorcircuits, analgous to other circuit-based complexity classes such asAC0,NC1,TC1, . . ..

CC = CCSubr = CC∗

13 / 17

From now on we allow NOT gates in comparator circuits.

It is easy to see that this does not change CC.

To simulate a comparator circuit with NOT gates, use ‘Double-rail logic’and DeMorgan’s laws.

14 / 17

Oracle separationsWe use length-preserving functions f : 0, 1∗ → 0, 1∗ as oracles.

f = fnn∈N fn : 0, 1n → 0, 1n

Insert an oracle-gate computing fn into a comparator circuit by selectingany n wires as inputs and any n wires as outputs.

Theorem (ACN2007)

Any oracle circuit Cn(fn) with ∧,∨,¬, fn gates (arbitrary fanin and fanout)which computes f d

n , d ≥ 1, requires the oracle depth of Cn to be at least d.

Corollary

CC(f ) 6⊆ NC(f )

Proof.

Let gn = f d(n), where d(n) = (log n)Ω(1) and d(n) = nO(1). Theng ∈ CC(f ) but g 6∈ NC(f ). (Obviously CC(f ) ⊆ P(f ))

15 / 17

Work in ProgressUse the superior fanout of NC circuits to show that

NC(f ) 6⊆ CC(f )

Flip Path in a comparator circuit.

Lemma

For each comparator circuit C and for each bit setting of inputs x1, . . . , xmand for each i , if xi is flipped, then there is a unique ‘flip-path’ in C fromxi to some output wire such that each wire on the path is flipped.

Proof.

This is true for each comparator gate.

p x • p ∧ q

q y H p ∨ q

16 / 17

Conclusion

The (little-known) class CC is the only known subclass of P satisfying

is robust (closed under AC0-Turing reductions)

has interesting complete problems (stable marriage ...)

seems to be incomparable with NC

Open Problem

Give an oracle f showing NC(f ) 6⊆ CC(f )

17 / 17