The general definition of a graph states that a graph is a data structure consisting of a set of vertices (V) and edges (E). While the vertex may be anything (anything means any data structure), edge is defined by the two vertices it connects-v and w. Edges have a direction, meaning that the data flows from vertex v to vertex w, and weight, which indicates how difficult the flow is.
The easiest and probably the most common example of a graph structure is a perceptron-an artificial neural network paradigm:
Traditionally, perceptrons are drawn from left to right, so we have three layers:
- The input layer (sensors)
- The hidden layer (where most of the processing takes place)
- The output layer (forms the output of a perceptron)
Although nodes of artificial neural network are called neurons, we will refer to them as vertices as we are discussing graphs, not ANNs.
In the preceding...