Connected graphs with 4 vertices up to isomorphism

graph theory

How many distinct connected graphs (up to isomorphism) are there on 4 vertices which do not contain a $K_3$ subgraph?

I think the answer is 3? Because there are 2 non-isomorphic trees on 4 unlabeled vertices plus one shaped like a quadrilateral. Any help would be appreciated!

Best Answer

Yes you're correct. First, if the graph contains a cycle, it must be a 4-cycle - otherwise it would absolutely contain a triangle. Then, since it is connected, any other graph must be a tree; which as you pointed out can only be one of two possibilities.

Related Question