Okay figured it out:
- First we check if the graph exists by checking if all the degrees of each vertex sum to an even number.
- We then follow RealiseNothing's approach.
- We take note that if the vertex with highest degree is equal to or greater than the amount of vertices's if this is true a simple graph does not exist.
- You eliminate the vertex with the higher degree and subtract 1 from each of the vertex degrees until the number of times you subtract equal to the degree of the vertex you deleted. (I don't think this needs an explanation)
- You keep doing this and if at any point the max degree is greater than or equal to the amount verticies then there is no simple graph.
- If you reach 0 then a simple graph exists
4, 4, 3, 2, 2, 1
3, 2, 1, 1, 1
Therefore a simple graph exists.
5, 5, 3, 2, 2, 1
4, 2, 1, 1
Therefore since the highest degree is equal to the total number of vertices's there is no simple graph.