A Graph-Theoretic Approach To Network Coding