Table of Contents

## What is a discrete graph and what are its properties

A discrete graph is a graph that only shows one value at every vertex (i.e. every point on the graph). In other words, when you zoom all the way out to a discrete graph, it looks like a table with one column at every vertex and one row.

In this graph all vertices have either a value of 0 or 1, and the value of every edge is one of four (0,1,2,3). As the number of vertices gets large enough to make it hard to visualize each vertex’s value as a simple binary, the graph is said to be “discrete” (see [5] for a general definition).

Many discrete graphs are quite useful and interesting in their own right. Some examples are Veblen’s graphs of simple plane curves [6], Buchberger’s discrete graph of all infinite binary sequences with no forbidden subsequences [1], and the self-dual binary Golay code [10]. One application that has come up recently is to map the values of a quantum channel in device-independent quantum computing.

## How to find the degree of a vertex in a discrete graph

The degree of a vertex in a discrete graph is the value of the edge incident to it. In other words, the degree of a vertex is the sum of the degrees of all its edges incident to it. More simply put: the degree of a vertex is the sum of the degrees of its incident edges.

An example of the above definition is shown in figure 1. In this example, vertex C is denoted as having a degree of 4 since there are four edges incident to it, each of which has a degree of 2.

The following formula gives the degree of a vertex in a discrete graph:

where “n” is the number of vertices in the discrete graph and “v” is the index value for a given vertex.

The source code below gives the degree of vertices in a discrete graph:

This article has been imported from the StackExchange. Please visit that site for more info.

## How to find the degree sequence of a discrete graph

The degree sequence of a discrete graph is the list of all degrees of its vertices in order. In other words, the degree sequence of a graph is the sequence all vertices in the graph order by their degrees.

In the trivial case of a graph whose vertices never have degrees, the degree sequence is automatically given by the number of vertices. The degree sequence for a random graph is described here.

In this article, we will describe how to find the degree sequence of a discrete graph from its degrees parts.

First, we write the degrees as

Then, we can see that formula_1, where formula_2 is a permutation of the degrees. We consider the case when formula_2 is even. The degree sequence can be found using the following procedure:

The degree sequence is then given by formula_5.

This algorithm was invented independently by Gilbert and Tarjan in 1977–1978.

## How to find the degree of a vertex in a directed graph

The degree of a vertex in a directed graph is the same as in a regular graph: it is the sum of degrees of its incident edges. In other words, for every edge incident to a vertex, add up the degrees of both endpoints or nodes connected by that edge. The exception is that self-loops are counted twice. For example, for the directed graph below, the vertex a has degree 3 because it is connected to two other vertices (b and c) by two edges each, but b and c are said to have degree 2.

In a directed graph, the in-degree and out-degree of a vertex can be also defined. In-degree is the number of edges coming into a vertex, or the number of predecessors of a vertex, while an out-degree is the number of edges leaving or pointing away from it, or the number of successors. For example, in the directed graph above, vertex b has in-degree 2 while its out-degree is 0 since it has no outgoing edges. In contrast, vertex c has in-degree 1 and out-degree 2.

In a directed graph, it can be easily verified that the sum of in-degrees of all vertices equals to the sum of out-degrees. To prove that, let

## How to find the indegree and outdegree of a vertex in a directed graph

The indegree of a vertex in a directed graph is the sum of the outdegrees of all vertices to which it is connected. The outdegree of a vertex in a directed graph is the sum of the indegrees of all vertices from which it is connected. In other words, to find an indegree, sum all outdegrees of vertices connected to it. To find an outdegree, sum all indegrees of vertices from which it is connected.

Here is an example: There are five vertices in the directed graph shown below. Find their indegrees and outdegrees.

1. an outdegree of 5 and an indegree of 3,3,3

2. three outdegrees and two indegrees

3. an outdegree of 3 and an indegree of 1,1,1

4. an outdegree of 1 and an indegree of 1,2,2

5. an outdegree of 2 and an indegree of 1,1,3

6. two outdegrees and one indegree

7. an outdegree of 1 and an indegree of 2,2,2

8. three outdegrees and one indegree