Investigating properties of complements of paths

261 Views Asked by At

Take the first $n$ natural numbers. Construct a vertex-labeled graph with a vertex for each number. Now, connect any two vertices $a,b$ with an edge iff $a \pm 1 \neq b$.

As Perry Iverson pointed out, these graphs are complements of paths on $n$ vertices.

I computed some graphs.

4 vertices, 3 edges; 5 vertices, 6 edges; 6 vertices, 10 edges

I am interested in how the number of edges grows.

Any help is appreciated as always.

1

There are 1 best solutions below

0
On BEST ANSWER

A vertex labeled $i$, where $i$ is different from $1$ and $n$ is adjacent to all other vertices except $i-1$ and $i+1$, so it has degree $n-3$. The vertices labeled $1$ and $n$ are adjacent to all but one other vertex, so they have degree $n-2$. This means the total number of edges is:

$$\frac{1}{2}((n-2)(n-3) + 2(n-2)) = \frac{(n-1)(n-2)}{2}$$

Another way to think of this is that your graph is the complement of a path on $n$ vertices. So the total number of edges must be:

$$\binom{n}{2} - (n-1) = \frac{n(n-1)}{2} - (n-1) = \frac{(n-1)(n-2)}{2}$$