Lecture 1

The basic setup for 2 party deterministic CC: f:X x Y -> Z

Count total bits of communication, computation free


*** Examples:

* Equality on n bits. Protocol using n+1 bits

* Parity of all 2n bits. Protocol using 2 bits

* Average of two multisets of {0,1,… n}. Protocol of O(log n) bits

So far no real interaction.

* Median of two multisets of {0,1,… n}. 

Protocol of O(log^2 n) bits, two ways

1. Jointly perform binary search (each report number on either side of current split)

2. Each report their own median. If a < b, then A discards lower half, Bob upper.
	else the other way around. If a = b or then this is median.
	If sizes reduce to 1 then median is the smaller one. 

	Repeat O(log n) communication O(log n) rounds.

	Claim for correctness: median of whole set is between a and b.

Can achieve O(log n) (!) This is more interesting/challenging.

Based on #2. Preprocessing. Round up so each multiset size is a power of 2, and equal size.
Can do this by adding min, max # an equal number of times, to each side, to pad.

When comparing a, b send bit by bit, starting with Most Significant bit;
	stop at first difference

When stop, we have a = c0… and b = c1… (or the other way around) c is common prefix. 

We know that the median is in range c000000 to c111111 (since both a and b are)

In addition to A discarding lower half, she can clamp those larger than c111111.
In addition to B discarding upper half, he can clamp those smaller to c000000.

Now we continue since everthing lives in c******, we can continue 
	comparing subsequent a’s and b’s without repeating bits of c

Total bits exchanged before a and b are equal: O(log n). Note book’s protocol is wrong… 

* Last example: CIS_G “Clique-vs-Independent Set in graph G”

Alice holds Clique, Bob holds I.S. they need to determine if intersection is
	nontrivial (if they intersect, they do so in exactly one vertex)

Idea: 	if A sends a vertex u in C, B can check it. 
	if B sends a vertex v in I, A can check it.

In first case, can restrict graph to nodes in nbrhood of u (since soln must be in C)
In second case, can restrict graph to nodes in non-nbrhood of v (since soln must in in I)

Try for u with nbrhood <= |V|/2. If not, try for v with non-nbrhood <= |V|/2
	(i.e. nbrhood >= |V|/2)

If neither? then every u in C has degree > V/2 and every v in I has degree < V/2. 

So no intersection. O(log n) rounds of O(log n) communication. O(log^2 n). 
Lower bound better than O(log n) open!



*** Formal definition of protocol: tree with a function for each vertex either for A or B

Communication is max depth (worst case). 

Variation: both need to report f(x, y). Only change by additive log |Z|

Variation: force alternation. Only change by factor of 2.

Example protocol tree from Book (p.5) and its function. 



*** Key viewpoint: f as a matrix or 2d array, called M_f 

RECTANGLE: combinatorial rectangle in X x Y is X’ in X, Y’ in Y, X’ x Y’.

(x, y) and (x’, y’) both in rectangle, then (x, y’) and (x’, y) are.

Claim: Every leaf in the protocol tree corresponds to a monochromatic rectangle
	[those (x,y) pairs that lead to that leaf]

Claim: protocol partitions X x Y into monochromatic rectangles. 

Example from book (p. 10)

N.B. not every partition corresponds to a protocol. Example from top of p. 17 in book