Graph vertex
A vertex (or node) in graph theory is a part of a graph that edges connect to.
They can represent various different things depending on what the graph is used to represent.
Degree of a vertex
The degree of a vertex is the number of edges connected to it.
For example, if a vertex has 3 edges connected to it, its degree is 3.
Degree in directed graphs
In a directed graph, we distinguish between:
- In-degree: The number of edges coming into the vertex.
- Out-degree: The number of edges going out from the vertex.
flashcards
| Question | Answer |
|---|---|
| vertex (node) | Part of a graph that edges connect to, can represent various things depending on graph usage |
| degree of a vertex | Number of edges connected to it |
| Example: degree of a vertex | If a vertex has 3 edges connected to it, its degree is 3 |
| in-degree in directed graph | Number of edges coming into the vertex |
| out-degree in directed graph | Number of edges going out from the vertex |