Happy Easter! Christos a înviat!
Sunday, April 19, 2009
Tuesday, April 14, 2009
Theory and Practice
Via David Eppstein, I find out about the Workshop on Theory and Multicores. A memorable citation from the call:
[...] Indeed, the programs of many mainstream computer science conferences, such as ASPLOS, DAC, ISCA, PLDI and POPL are heavily populated with papers on parallel computing and in particular on many-core computing. In contrast, the recent programs of flagship theory conferences, such as FOCS, SODA and STOC, hardly have any such paper. This low level of activity should be a concern to the theory community, for it is not clear, for example, what validity the theory of algorithms will have if the main model of computation supported by the vendors is allowed to evolve away from any studied by the theory. The low level of current activity in the theory community is not compatible with past involvement of theorists in parallel computing, and to their representation in the technical discourse.Which theory community? The one that thinks our machine models are not robust enough to tell the difference between O(n lg n) and O(n5)? The one that thinks nO(1/ε^2) is polynomial and even efficient? The one that thinks Amazon should be happy with an O(lg3n) approximation for its profit? The one that thinks the coolest conclusions we ever came to are the philosophical implications of interactive proofs and zero knowledge?
Posted by Mihai at 5:06 PM 23 comments
Wednesday, April 8, 2009
Puzzle: Short-hop permutations
Count the number of permutations of size n, such that |π(i) - π(i+1)| ≤ k, for all i. That is, the hop between any two consecutive values must be short.
Posted by Mihai at 5:47 PM 4 comments
CC4: One-Way Communication and a Puzzle
As we will discuss in the next post, for some application it suffices to get lower bounds on the one-way communication complexity -- that is, the case in which a single message is sent, either from Alice to Bob, or from Bob to Alice. The party receiving the message must immediately announce to answer, based on the message and their own input.
- EA[k] = 0.01 n. Indeed, for uniformly random A and i, the algorithm works with probability 0.99. So in expectation over A, the bad set of indices has size 0.01 n.
- By the Markov bound, PrA[k ≤ 0.02 n] ≥ 1/2.
- When k ≤ 0.02 n, lg(n choose k) ≤ n/2.
- When k ≥ 0.02 n, lg(n choose k) ≤ n.
- Therefore E[lg(n choose k)] ≤ 0.75 n.
Say Alice and Bob receive two set of n elements from the universe [n2]. Show that the one-way randomized communication complexity of set disjointness is Ω(n lg n) bits.This is the best result possible, since Alice can specify her entire set with O(n lg n) bits, after which Bob knows the answer with no error.
Posted by Mihai at 1:29 AM 5 comments
Monday, April 6, 2009
Puzzle: Cycle Containing Two Nodes
The following simple puzzle was circulating among Romanian olympiad participants around 1998. It was supposed to be a quick way to tell apart algorithmists from mere programmers.
Given an undirected graph G, and two vertices u and v, find a cycle containing both u and v, or report than none exists. Running time O(m).
Posted by Mihai at 1:40 AM 16 comments
Friday, April 3, 2009
CC3: the good, the bad, the ugly
This is the 3rd post in the thread on communication complexity, following Episodes 1 and 2.
- Alice receives a bit vector, x ∈ {0,1}n
- Bob receives an index, y ∈ [n] (note standard notation: [n]={1,...,n})
- their goal is to output xy, i.e. the y-th bit of the vector x.
- little communication from Alice means A is large;
- little communication from Bob means that B is large;
- but the rectangle must be monochromatic (the answers must be fixed, since the communication is over)
- if A and B are large, you must have both yes-instances and no-instances.
- f is dense, in the sense that E[ f(x,y) ] ≥ α ≥ 1/5.
- the distributional error is at most ε.
- Alice communicates a bits, and Bob b bits.
- Alice's side is large: μ(A) ≥ 2-O(a);
- Bob's side is large: μ(B) ≥ 2-O(a+b);
- the rectangle is almost monochromatic: E [ f(x,y) | x∈A, y∈B ] ≥ 1- O(ε).
The good, the bad, the ugly. It remains to prove that in any large rectangle, the fraction of zeros must be non-negligible (it may not be almost all ones). This part is, of course, problem specific, and we shall do it here for INDEXING.
|A'| ≤ (|B| choose 0.1|B|) 2n - 0.9|B| ≤ 2n 2O(0.1 |B| lg 10) / 20.9|B| = 2n / 20.9|B|-O(0.1 |B| lg 10)This is at most 2n / 20.5|B| , at least for a sufficiently small value of 1/10 (I never care to remember the constants in the binomial inequalities). We have reached a contradiction with the lemma's guarantee that A is large.
Posted by Mihai at 1:14 AM 6 comments
Wednesday, April 1, 2009
Matching in Regular Bipartite Graphs
It is well known that d-regular bipartite graphs have a perfect matching. Applying this iteratively, it even follows that such graphs can be decomposed into the union of d perfect matchings. (The existence of a matching follows from Hall's theorem, which is probably beaten into students during any combinatorics course.)
Find an Eulerian circuit of the graph in O(m) time, which exists for any even d. Now throw out the 2nd, 4th, 6th, etc edges of the circuit. You are left with a graph that is (d/2)-regular. Recurse to find a matching.Why do you get a regular graph when you throw out all edges on even positions? Think about it: the edges of the circuit go back and forth between the two parties of the graph. For any vertex v, its d incident edges are grouped into d/2 pairs of consecutive edges. One edge of such a pair appears on an odd position in the circuit, and one on an even position.
Posted by Mihai at 10:26 PM 1 comments