In graph theory, the degree (or valency) of a vertex is the number of edges incident to the vertex. The degree of a vertex is denoted .
For an undirected graph, the degree of a vertex is the number of edges incident to the vertex. This means that each loop is counted twice. This is because each edge has two endpoints and each endpoint adds to the degree.
The graph shown to the right has the following degrees:
| Vertex | Degree |
|---|---|
| 1 | 2 |
| 2 | 3 |
| 3 | 2 |
| 4 | 3 |
| 5 | 3 |
| 6 | 1 |
In a directed graph, an edge has two distinct ends: a head (the end with an arrow) and a tail. Each end is counted separately. The sum of head endpoints count toward the indegree and the sum of tail endpoints count toward the outdegree.
The indegree is denoted and the outdegree as
The image to the right has the following degrees:
| Vertex | Indegree | Outdegree |
|---|---|---|
| 1 | 0 | 2 |
| 2 | 2 | 0 |
| 3 | 2 | 2 |
| 4 | 1 | 1 |
If a vertex has a unity degree then it is a leaf. This is fairly common in trees in graph theory and trees in data structures.
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Degree (graph theory)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world