Graph Theory37 sections · 1633 units
Open in Course

Star Graph - Method 1

Using Degrees

A star graph has one center vertex connected to all other vertices. The center has degree n1n-1, and all other vertices have degree 11.

You could build an adjacency list and count degrees for each vertex. Check if one vertex has degree n1n-1 and all others have degree 11. This works but requires storing the graph.

There is a smarter approach using edge counting. I'll show you the trick in the next unit.