[Math] Is a directed graph uniquely determined by the in/out degree of each node

graph theory

I never really thought of this problem. If we have two directed graphs $A$ and $B$ with the same set of nodes $V$, and we know that the in/out degree of each node is the same in the $A$ and $B$, is it possible for $A$ and $B$ to have a different set of edges? In other words, does the in/out degree of each node guarantee the uniqueness of a graph?

I have tried to find a counter-example of two graphs which demonstrate this property (each node has same in/out degree in $A$ and $B$, but the edge set of the two graphs is different), but have come up empty handed thus far. Perhaps next would be finding a proof, or a counter-example.

As a further edit, the graphs I have in mind are connected.

Best Answer

These two graphs are a counterexample to your conjecture; in each graph, all four vertices have indegree 1 and outdegree 1: basic example

To make the example connected, just embed these two graphs into some larger graph. For example:

non-isomorphic graphs

Here the I have added two red vertices and some additional edges. Each result has corresponding vertices with the same indegree and outdegree.

It should be clear that by adding different numbers of red vertices or edges to or from them, the basic example can be extended to produce many different examples.