Graph theory basics

Math · Discrete Math

Question 1 of 10

0

    How many connected components does this graph have?

    Diagram for the question: How many connected components does this graph have?

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Graph theory basics explained

    Graph theory studies networks made of points, called vertices, joined by lines, called edges. It gives a simple model for roads, friendships, computer networks and many other systems, and it can answer questions such as whether a route can travel along every edge exactly once.

    The degree of a vertex is the number of edges that meet it. Each edge has two ends, so the degrees always add up to twice the number of edges. This means the number of vertices with odd degree is always even. An Eulerian trail, a walk that uses every edge exactly once, exists when the graph is connected and has either zero or two vertices of odd degree.

    Worked example

    Consider five vertices A, B, C, D and E, with edges AB, AC, BC, BD, CD and DE.

    1. The degrees are: A has 2, B has 3, C has 3, D has 3 and E has 1.
    2. The degrees sum to 2+3+3+3+1=122 + 3 + 3 + 3 + 1 = 12, which is twice the 6 edges.
    3. Four vertices (B, C, D and E) have odd degree, so there is no Eulerian trail.

    A common mistake is adding the degrees while counting each edge only once. Each edge contributes 1 to the degree of each of its two ends, so it adds 2 to the total.

    What you will practise

    44 diagrams. Type the label for each part and get instant feedback.

    Example questions

    • How many vertices does the graph in this diagram have?
    • How many edges does the graph in this diagram have?
    • What is the degree of vertex A in this graph?
    • How many arrows (directed edges) does this directed graph have?
    • Which vertex is the root of this tree?
    • In this tree, which vertex is the parent of vertex I?
    • What is the degree of vertex V in this graph?
    • Which vertex in this graph is isolated?

    …and 36 more.