![]() |
VOOZH | about |
Given the number of vertices in a Cycle Graph. The task is to find the Degree and the number of Edges of the cycle graph.
Degree: Degree of any vertex is defined as the number of edge Incident on it.
Cycle Graph: In graph theory, a graph that consists of single cycle is called a cycle graph or circular graph. The cycle graph with n vertices is called Cn.
Properties of Cycle Graph:-
Examples:
Input: Number of vertices = 4 Output: Degree is 8 Edges are 4 Explanation: The total edges are 4 and the Degree of the Graph is 8 as 2 edge incident on each of the vertices i.e on a, b, c, and d.
Input: number of vertices = 5 Output: Degree is 10 Edges are 5
Below is the implementation of the above problem:
Program 1: For 4 vertices cycle graph
For numberOfVertices = 4 Degree = 8 Number of Edges = 4
Program 2: For 6 vertices cycle graph
For numberOfVertices = 6 Degree = 12 Number of Edges = 6