How many lines does a graph with 6 vertices have which has the degrees {2,3,3,4,4,4}?

I tried to use the formula $$|E|$$ = $$\frac{nk}{2}$$, where $$n$$ is the amount of vertices and $$k$$ is equal to the degree. However, I believe this only works when you have a k-regular graph, as simply adding the degrees, multiplying by $$n$$ and dividing by 2 gave me the wrong answer. Trying to draw the graph also did not work.

Thank you!

I don't know if you have heard about the following formula: $$\sum_{v \in V(G)}deg(v) = 2|E(G)|$$where $$G$$ is the graph, $$deg(v)$$ the degree of a vertex and $$V(G), E(G)$$ are the set of vertex and edges, respectively. Therefore, $$2 +3+3+4+4+4 = 20 = 2|E(G)| \rightarrow |E(G)| = 10$$. I would be grateful if you marked this as correct (tick) if it was useful.
• Notice, by the way, that the formula you have put is the same as mine's, but in the speceific case where each vertex has the same degree, and in consequence if each vertex has degree $k$ and if there are $n$ vertex, one obtains $E(G) = \frac{nk}{2}$ Commented Nov 5, 2023 at 13:01