  We show that there is a system of 14 non-trivial finitary functions on the
random graph with the following properties: Any non-trivial function on the
random graph generates one of the functions of this system by means of
composition with automorphisms and by topological closure, and the system is
minimal in the sense that no subset of the system has the same property. The
theorem is obtained by proving a Ramsey-type theorem for colorings of tuples in
finite powers of the random graph, and by applying this to find regular
patterns in the behavior of any function on the random graph. As
model-theoretic corollaries of our methods we re-derive a theorem of Simon
Thomas classifying the first-order closed reducts of the random graph, and
prove some refinements of this theorem; also, we obtain a classification of the
minimal reducts closed under primitive positive definitions, and prove that all
reducts of the random graph are model-complete.
