 
Summary: Balanced Hashing, Color Coding and Approximate Counting
(Extended Abstract)
Noga Alon
Shai Gutner
Abstract
Color Coding is an algorithmic technique for deciding efficiently if a given input graph con
tains a path of a given length (or another small subgraph of constant treewidth). Applications
of the method in computational biology motivate the study of similar algorithms for counting
the number of copies of a given subgraph. While it is unlikely that exact counting of this type
can be performed efficiently, as the problem is #W[1]complete even for paths, approximate
counting is possible, and leads to the investigation of an intriguing variant of families of per
fect hash functions. A family of functions from [n] to [k] is an ( , k)balanced family of hash
functions, if there exists a positive T so that for every K [n] of size K = k, the number of
functions in the family that are onetoone on K is between (1  )T and (1 + )T. The family
is perfectly kbalanced if it is (0, k)balanced.
We show that every such perfectly kbalanced family is of size at least c(k)n k/2
, and that
for every > 1
poly(k) there are explicit constructions of ( , k)balanced families of hash functions
from [n] to [k] of size e(1+o(1))k
