Graphs

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 graph, we see a typical multilayer perceptron layout for an artificial neural network capable of solving the XOR problem.

An XOR problem in artificial neural networks is the problem of making an ANN implementation receiving two inputs in the range {0, 1} to produce a result, as if two inputs were XOR'ed. A single layer perceptron (where the hidden layer is also the output layer) is not able to find solutions for this problem, therefore an additional layer is added.

The vertices S0 and S1 do not perform any computations and serve as sources of data for vertices N0 and N1. As it has been stated, edges have weights, and in this example, the data from S0 and S1 is multiplied with the weights of the edges [s0, n0], [s0, n1], [s1, n0], and [s1, n1]. The same applies to data being transferred via [bias, n0], [bias, n1], [n0, o], and [n1, o].

However, graphs may be of any shape and edges may lead data in any direction (even to the same vertex), depending on the problem they intend to solve.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset