3. Degree of Vertex

Introduction

The degree of a vertex is the number of edges that are connected with it (or number of neighbours). This measure gives a sense of the 'connectivity' of a vertex within the graph.

In a directed graph, we differentiate between the in-degree (number of incoming edges) and the out-degree (number of outgoing edges).

A Complete Graph is a special kind of graph where every vertex is directly connected to every other vertex, resulting in the maximum possible number of edges for a given number of vertices.

An undirected Complete Graph with order n, it's graph size equals n * (n - 1) / 2.

A directed Complete Graph with order n, it's graph size equals n * (n - 1).

Exercise

You can toggle between directed and undirected graph by the switch

Hover on vertex to see its in-degree and out-degree when it is a directed graph

  1. 1.

    Try to edit the undirected graph so that there are only 4 vertices, and the degree of each vertex is 3, 2, 2, 1

  2. 2.

    Try to create an undirected complete graph with 4 vertices

  3. 3.

    Try to make a directed graph that has 5 vertices, and there is a vertex has in-degree 4 and out-degree 2 (so that it has degree 6)

  • Complete: false

In-Degree: 0

Out-Degree: 0

Degree: 0

211000