Contracting a cycle is an operation in a graph where we consider a cycle and replace all its vertices with a single new vertex. For every vertex outside the cycle that was adjacent to any vertex within the cycle, we add an edge between that external vertex and the new vertex we just created.
The cycle we intend to contract should ideally not have any internal edges (chords) and, after contraction, the graph should remain simple. For example, a triangle in a kite-free graph or a graph's girth if it has more than four vertices, satisfy these properties and are therefore suitable candidates for contraction.
We have a simple graph where its cycles do not share any edges and it has \(2n+1\) vertices. What is the maximum number of edges in this graph?
Answer \(3n\) is the answer.
For an example with this number of edges, you can place one vertex in the center of the graph and, for every two other vertices, construct a triangle that includes this central vertex.
Here, we prove by induction that in any graph whose cycles do not share edges, \(2m \le 3n-1\) holds true. Consider the smallest counterexample to this theorem. This graph cannot be acyclic because in that case, the number of its edges would be less than its vertices, meaning the statement would hold for it. It is clear that the cycles in this graph cannot have chords (i.e., there are no edges within them) because that would create two cycles sharing an edge. Also, a single vertex cannot be adjacent to two vertices of the same cycle. Therefore, we contract one of the cycles in this graph. The graph remains simple, and it can be shown that its cycles still do not share edges. (Prove this statement to gain intuition about contraction.) And since we considered the smallest counterexample, the statement holds in the new graph. If we contracted a cycle of length \(k\), then \(k\) edges and \(k-1\) vertices are removed from the graph. So we have:
And we already knew that:
From these two statements, we deduce that:
This implies that the cycle we removed had fewer than 3 vertices, which is impossible in simple graphs. From this, we reach a contradiction. With a little care, it can be seen that equality occurs only when \(k\) is exactly 3, which means all cycles in the graph are triangles (as was the case in our example).