equality function computation (how to make simple things complicated) nitin vaidya university of...

74
Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana- Champaign Joint work with Guanfeng Liang Research supported in part by National Science Foundation and Army Research Office

Upload: charlene-shaw

Post on 29-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Equality Function Computation

(How to make simple things complicated)

Nitin VaidyaUniversity of Illinois at Urbana-Champaign

Joint work with Guanfeng Liang

Research supported in part by National Science Foundation and Army Research Office

Page 2: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Background

2

Page 3: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Equality Function

3

A B

K-valued input K-valued input

Determine whether the two inputs are identical

Page 4: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

g Communication cost of an algorithm:

# bits of communication requiredin the worst case (over all possible inputs)

4

Page 5: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

g Communication cost of an algorithm:

# bits of communication requiredin the worst case (over all possible inputs)

g Communication complexity of a problem:

Minimum communication costover all algorithms to solve the problem

[Andrew Yao, STOC 1979]

Page 6: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Equality Function

6

A B

K-valued input K-valued input

Page 7: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Upper Bound

7

A Blog K

Proof by construction

Page 8: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Lower Bound

8

A Blog K

Proof by fooling set argument

Page 9: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Generalization to n parties

9

Page 10: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

10

The MEQ(n,K) Problem

g n nodes each given xi from {1,…,K},to check if all xi are equal

g Each node i computes EQi

“Everyone detects” (MEQ-ED)

otherwise1

if0),,( 1

1n

n

xxxxEQ

Page 11: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

11

The MEQ(n,K) Problem

g n nodes each given xi from {1,…,K},to check if all xi are equal

g Each node i computes EQi

“Anyone detects” (MEQ-AD)

otherwise1

if0),,( 1

1n

n

xxxxEQ

1),,(1, 1 ni xxEQEQi

Page 12: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

n-Node Equality Problem

12

A B

C

Network

Page 13: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Number-in-Hand Model

13

A B

C

BroadcastChannel

K-valuedinput

Node i initially knows Xi

Page 14: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

n-Party Equality : Complexity

g Broadcast channel + Number-in-hand model

log K bits

14

Page 15: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Number-on-Forehead Model

15

A B

C

BroadcastChannel

Node i initially knows everything except Xi

Page 16: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

n-Party Equality : Complexity

g Broadcast channel + Number-on-forehead model

2 bits when n > 2

16

Page 17: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Point-to-Point Networks

17

A B

C

Private channels & number-in-hand

n = 3

Page 18: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Upper Bound

Emulate broadcast channel using p2p links

(n-1) * complexity with broadcast channel

18

Page 19: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Upper Bound = 2 log K

19

A B

C

log K bits

log K bits

K-valuedinput

Page 20: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Lower Bound = log K

20

A B

C

K-valued input

cut log K

by 2-nodelower bound

identical valueat B and C

Page 21: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

1.5 log K Complexity 2 log K

21

A B

CNeither bound tight

in general

Page 22: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

1.5 log K Not Tight

22

A B

CK = 2

Requires at least 2 bits

Page 23: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

2 log K Not Tight

A B

C

Proof by constructionfor K = 6

2 log K = log 36

Page 24: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

K = 6

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

x y

z

Page 25: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

3 4

3

Page 26: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

3 4

3

2

Page 27: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

3 4

3

2

2

Page 28: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

3 4

3

2

2 1

Page 29: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

A B

C

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

3 4

3

2

2 1

AB(4) = 2AC(2) = 3BC(3) = 1

Page 30: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Communication Cost

3 log 3 = log 27 < log 36 = 2 log K

Can be generalized to large K and n to yield communication cost approximately

0.92 (n-1) log K

30

Page 31: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Communication Cost

3 log 3 = log 27 < log 36 = 2 log K

Can be generalized to large K and n to yield communication cost approximately

0.92 (n-1) log K

Cost of informing outcome to each other negligible for large K

31

Page 32: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

Page 33: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Reduce Search Space

“Static” Protocols

g Node transmitting in round R & its output function in round Rpre-determined

i Output … function of initial input, and history

33

Page 34: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

34

Static Protocol: Directed Graph Representation

A

B

C

1, f1

2, f2

3, f3

5, f56, f6

4, f4

Round number R , function f used in round R

x

z

y

Page 35: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

35

Static Protocol: Directed Graph Representation

A

B

C

1, f1

2, f2

3, f3

5, f56, f6

4, f4

Round number R , function f used in round R

x

z

y

Page 36: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

36

Equivalent Protocol: Directed Acyclic Graph

A

B

C

1, f1

2, f2

3, f3

5, f56, f6

4, f4

Round number R , function f used in round R

x

z

y

Page 37: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Equivalent Protocol

g Acyclic graphg Output depends only on initial input

37

A

B

C

FAB

FAC

FBC

Page 38: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Mapping to a Bipartite Graph

g Each such protocol can be mapped to a bipartite graph representation

38

A

B

C

FAB

FAC

FBC

Page 39: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

5,6

1,2

3,4

AB

Example

39

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

Page 40: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

5,6

1,2

3,4

AB

Example

40

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

4,5

6,1

2,3

AC

Page 41: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

41

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

5,6

1,2

3,4

4,5

6,1

2,3

1

2

3

4

5

6

AB AC

Page 42: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Example

42

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

5,6

1,2

3,4

4,5

6,1

2,3

1

2

3

4

5

6

AB ACBCBC321

Page 43: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

BC assigns colors to edges

43

1 2 3 4 5 6

AB 1 1 2 2 3 3

AC 1 2 2 3 3 1

BC 1 2 3 1 2 3

5,6

1,2

3,4

4,5

6,1

2,3

1

2

3

4

5

6

AB ACBCBC321

Page 44: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

44

5,6

1,2

3,4

4,5

6,1

2,3

1

2

3

4

5

6

AB ACBCBC321

U V W3 3 3

U : # nodes on leftV : # colorsW : # nodes on right

Page 45: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Equality Bipartite Graph

A colored bipartite graph corresponds to a fixed protocol for 3-node equality withcost log UVW

if and only if

(a) distance-2 colored (strong edge coloring)

(b) Number of edges = K(c) U x V ≥ K (d) U x W ≥ K (e) V x W ≥ K 45

Page 46: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Fixed Protocol Design

g Find a suitable bipartite graph

g Our protocol

6-cycle

46

Page 47: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Lower Bounds

g The mapping can be used to prove lower bounds for small K

For K = 6

g Least cost over all fixed protocols islog 27

47

Page 48: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Detour … an open conjecture

A bipartite graph with

g D1 = maximum degree on leftg D2 = maximum degree on right

can be distance-2 colored with D1 * D2 colors

48

Page 49: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Why is equality interesting ?

49

Page 50: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Lower Bound on Consensus

g Mapping between Byzantine broadcast

and multiple instances of equality

50

Page 51: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

g g1 – g3 are good peers

g F1 – F3 are virtual bad sources acting with different inputs

g gi,j are virtual good peer of node j to node i

Page 52: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Byzantine Broadcast:n nodes, f faults

g Broadcast algorithm solves Equality (MEQ-AD)problem for each subset of (n-f) nodes

g n-choose-(n-f) such subsetsg Each link belongs to (n-2)-choose-(n-f-2) such

subsets

Complexity of broadcast lower bounded by

EQ * n-choose-(n-f) / (n-2)-choose-(n-f-2)

52

Page 53: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Open Problems

53

Page 54: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Open Problems

g Characterizations of communication complexity for point-to-point networksi Alternatives to Yao model seem more appropriate

g Equality for larger networks

g Lower bounds oni Equalityi Byzantine consensusi Byzantine broadcast …

54

Page 55: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Thanks !

55

Page 56: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Thanks !

56

Page 57: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

57

Page 58: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

58

Page 59: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

59

Page 60: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

60

Page 61: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

61

Page 62: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

62

The MEQ(n,M) Problem

g n nodes each given xi from {1,…,M}, to check if all xi are equal

g Each node i computes EQi

“Anyone detects” (MEQ-AD)

otherwise1

if0),,( 1

1n

n

xxxxEQ

1),,(1, 1 ni xxEQEQi

Page 63: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

63

Graph Representation an Algorithm

g1

g2

g3

g 1, f1

g 2, f2

g 3, f3

g 5, f5

g Transform to a partially ordered DAG

g 6, f6

g 4, f4

Page 64: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

64

Graph Representation an Algorithm

gFi,j depends on xi only

g1

g2

g3

g F1,2

g F1,3

g F2,3

Page 65: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

65

Definition of Complexity

g Complexity of an algorithm

g Complexity of MEQ(n,M)

ji

jiFPC ,2log)(

)(min),( solves

PCMnCMEQ(n,M)P

MEQ

Page 66: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

66

Upper Bound by Construction

g Send x1,…, xn-1 to node n

g Set EQ1 = … = EQn-1 = 0

g Compute EQn = EQ(x1,…, xn)

g MnMnCMEQ 2log)1(),(

Page 67: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

67

g Fooling Set argument- Every node must send + receive ≥ log2M

Cut-Set Lower Bound

Mn

MnCMEQ 2log2

),( g

Page 68: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

68

Neither bound is tight

MEQ(3,6)

6log23log3)6,3(6log2 222 MEQCn

g1

g2

g3

g F1,2

g F1,3

g F2,3

Page 69: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

Proof by Strong Edge Coloring

MEQ(3,M) algorithm= bipartite graph with M edges + distance-2 edge coloring scheme

69

1

2

3

F1,2

F1,3

F2,3

5,6

1,2

3,4

4,5

6,1

2,3

F1,2 F1,3F2,3

1

2

3

4

5

6

Page 70: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

70

Summary

g Introduce the MEQ problem

g Existing techniques give loose bounds

g New technique to reduce space

g Connection among distributed source coding, distributed algorithm, and graph coloring

Page 71: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng

71

Future Work

g MEQ(3,M) is openi Optimize over Fi,j = find an optimal bipartite graph +

strong coloring

g Even given |Fi,j| is open

g Looking for new techniques

Page 72: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng
Page 73: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng
Page 74: Equality Function Computation (How to make simple things complicated) Nitin Vaidya University of Illinois at Urbana-Champaign Joint work with Guanfeng