1. In a network having multiple source nodes that each generate a random variable and that are to transmit information to a receiver node that will allow the receiver node to compute a function of the random variables, a method for compressing and transmitting data at a first node of the network, comprising: generating a characteristic graph for a random variable associated with the first node of the network with respect to random variables associated with other nodes of the network, a joint probability distribution between random variables of the network, and the function of the random variables that is to be computed at the receiver node, wherein the vertices of the characteristic graph are the possible values of the random variable associated with the first node; determining a minimum entropy coloring of the characteristic graph for the random variable associated with the first node, wherein determining a minimum entropy coloring of the characteristic graph includes: identifying maximal independent sets of the characteristic graph for the random variable associated with the first node; and assigning a different color to the vertices of each identified maximal independent set; encoding the minimum entropy coloring of the characteristic graph to generate an encoded minimum entropy coloring of the characteristic graph; and transmitting the encoded minimum entropy coloring of the characteristic graph for the random variable associated with the first node to another node in the network.