topic badge

4.015 Types of graphs

Lesson

Introduction

We have already discussed some terms that describe different properties of graphs and we have considered directed, undirected and weighted graphs.

This image shows a weighted undirected network with vertices A, B, C, D, E. Ask your teacher for more information.
This graph is undirected and weighted.
This image shows a weighted directed network with 3 vertices and words at each edge. Ask your teacher for more information.
This is a directed weighted graph.

In this lesson we will see some other ways to classify graphs.

Connected and complete graphs

A graph is connected when no vertices or group of vertices are isolated from the rest of the graph. When a part of the graph is isolated, it is said to be disconnected.

This image shows 2 connected graphs on top and 2 disconnected graphs on the bottom. Ask your teacher for more information.

The top two graphs are connected, the bottom two are disconnected.

If we remove a bridge from a connected graph the graph will become disconnected.

We call a graph on n vertices complete if every vertex is connected to every other vertex. There is exactly one complete graph for each value of n.

This image shows 8 examples of complete graphs with vertices, edges, and a value of n. Ask your teacher for more information.

The degree of each individual vertex is equal to one less than the number of vertices overall. In other words, if you take n vertices and connect one to all the others, you draw n-1 edges from each vertex.

Examples

Example 1

In a connected graph:

A
There is an isolated vertex.
B
There are no loops.
C
Each vertex is linked to another vertex only through one edge.
D
Every vertex is reachable via some path from every other vertex.
Worked Solution
Apply the idea

In a connected graph every vertex is reachable via some path from every other vertex.

Option D is the answer.

Idea summary

A directed graph's edges indicate a one-way relationship and are represented by arrows.

A weighted graph's edges are assigned a number that can represent some property, such as distance or cost. Weighted graphs may be directed or undirected.

In a connected graph, no vertices or group of vertices are isolated from the rest of the graph. When a part of the graph is isolated, it is said to be disconnected.

In a complete graph, every vertex is connected by an edge to every other vertex.

Simple graphs

A graph is called a simple graph if it has:

  1. no loops, and

  2. no multiple edges.

This image shows 2 graphs that are not simple, and 1 graph that is simple. Ask your teacher for more information.

The first graph is not simple because it has loops. The second graph is not simple because there are multiple edges between some vertices. The third graph is simple - no vertex is connected to itself, and no vertex is connected to any other in more than one way.

Examples

Example 2

Consider the following network:

This image shows a network with vertices A, B, C, D, E, F. There is a loop at B. Ask your teacher for more information.

What two changes could be made to make this network simple?

A
Remove the loop at B.
B
Remove an edge between E and B.
C
Remove an edge between C and A.
D
Remove the loop at F.
Worked Solution
Create a strategy

The network must have no loops or multiple edges.

Apply the idea

There is a loop at B so it must be removed.

There are two edges between C and A, so one of them needs to be removed.

So the correct answers are options A and C.

Idea summary

A simple graph is an undirected graph that contains no loops or multiple edges. A simple graph can be connected or disconnected.

Subgraph

A graph is called a subgraph (or subnetwork) when all vertices and edges are also the vertices and edges of another graph.

If we take a graph and delete some edges, or some of its vertices (and all edges connected to it), we obtain a subgraph of the original.

For example, any simple graph that has n vertices is a subgraph of the complete graph with n vertices - we can just add or delete edges to get from one to the other:

A graph with red edges to show it is a subgraph of a complete graph with 6 vertices. Ask your teacher for more information.

The graph on the left has the red edges added in to get the middle graph, and then the vertices are moved to get the right graph, which is a complete graph.

Examples

Example 3

Consider the following two graphs:

Two graphs each with 6 vertices. Graph 1 has 5 edges. Graph 2 has 3 edges. Ask your teacher for more information.

Is Graph 2 a subgraph of Graph 1?

Worked Solution
Create a strategy

Try deleting some edges or vertices of the original graph to see if we can get the second graph.

Apply the idea

The bottom edge, lower right edge and the lower right vertex have been deleted from Graph 1 to get Graph 2.

So Graph 2 is a subgraph of Graph 1.

Idea summary

A graph is a subgraph if all vertices and edges are also the vertices and edges of another graph.

Bipartite graph

A bipartite graph is a graph whose vertices can be divided into 2 groups such that each edge connects a vertex from one group to a vertex in another. Vertices in a group are never connected to other vertices in that group.

This image shows a bipartite graph with 3 vertices at the top and 4 at the bottom. Ask your teacher for more information.

You can see the two groups of vertices (top and bottom) and how each edge joins a node from the top group to the bottom group.

A bipartite graph does not have to be drawn in with the groups of vertices arranged in rows (although they usually are).

This image shows a bipartite graph with 3 green vertices and 4 purple vertices. Ask your teacher for more information.

The graph here is bipartite - the green vertices form one group and the purple vertices form another and all the edges join a green and purple vertex.

Examples

Example 4

Which of the following graphs are complete bipartite graphs?

A
This image shows a complete bipartite graph with 5 vertices and 6 edges. Ask your teacher for more information.
B
This image shows a complete graph with 3 vertices and 3 edges. Ask your teacher for more information.
C
This image shows a complete bipartite graph with 6 vertices and 5 edges. Ask your teacher for more information.
D
This image shows a bipartite graph with 5 vertices and 6 edges, and 1 isolated vertex. Ask your teacher for more information.
Worked Solution
Create a strategy

Choose a graph whose vertices can be divided into two groups and every vertex in one group has edges that connect to every vertex in the other group.

Apply the idea

Option D is incorrect because it has an isolated vertex.

Option B is incorrect because the vertices cannot be divided into 2 groups, since all the vertices are connected to each other.

The vertices of the graph in option A can be divided into 2 groups, with the 2 top vertices in one group and the 3 vertices in the other, and each vertex is connected to the vertices in the other group.

The vertices of the graph in option C can be divided into 2 groups, with the 1 middle vertex in one group and the 5 outer vertices in the other, and each vertex is connected to the vertices in the other group.

The complete bipartite graphs are options A and C.

Idea summary

A bipartite graph is a graph whose vertices can be split into two groups, where each edge connects a vertex from one group to a vertex in the other group.

Outcomes

ACMGM078

explain the meanings of the terms: graph, edge, vertex, loop, degree of a vertex, subgraph, simple graph, complete graph, bipartite graph, directed graph (digraph), arc, weighted graph, and network

What is Mathspace

About Mathspace