- What is a graph in graph theory?
- A graph is a set of vertices joined by edges. A vertex is a point, and an edge is a line that joins two vertices. In a map of towns, each town is a vertex and each road is an edge. Only the links matter, so the length or position of a drawn edge does not.
- How do I find the number of edges in a graph from its vertex degrees?
- The degree of a vertex is the number of edges that meet at it. Each edge adds 1 to the degree of each of its two vertices, so the sum of the degrees is twice the number of edges. For degrees 3, 2, 2, 1 and 2, the sum is 10, so there are 10 ÷ 2 = 5 edges. Do not give the sum as the answer.
- What is the difference between adjacent vertices and connected vertices?
- Two vertices are adjacent if an edge joins them. A graph is connected if there is a path along edges between every pair of vertices, so vertices can be connected without being adjacent. Two separate triangles have an edge at every vertex but are not connected. A connected graph has a path between every pair of vertices.
- How many edges does a complete graph have?
- In a complete graph Kn, every vertex is joined to every other vertex by exactly one edge, so each degree is n - 1. The number of edges is (n(n-1))/2. For a complete graph on 7 vertices, each degree is 6, the degrees sum to 42, and there are 42 ÷ 2 = 21 edges.
- What is a tree in graph theory, and how many edges does it have?
- A tree is a connected graph with no cycles. A tree with n vertices has n - 1 edges. A subgraph with all five vertices of a graph that is a tree needs 5 - 1 = 4 edges and no cycle, for example AB, AC, CD and CE. A connected graph with more edges than that must contain a cycle.
- What is the difference between in degree and out degree in a directed graph?
- The in degree of a vertex is the number of edges directed into it, and the out degree is the number directed out of it. Every edge leaves one vertex and enters another, so the sum of the in degrees and the sum of the out degrees are both equal to the number of edges. Mixing these up is a common error.