Graphs and Matrices
[13/77%]A walk of length in a digraph is a succession of arcs joining two vertices. A trail is a walk in which all the arcs (but not necessarily all the vertices) are distinct. A path is a walk in which all the arcs and all the vertices are distinct. Show that the number of walks of length from vertex to vertex in a digraph with vertices is given by the -th element of the matrix , where is the adjacency matrix of the digraph.
Consider a digraph. The out-degree of a vertex is the number of arcs incident from and the in-degree of a vertex is the number of arcs incident to . Loops count as one of each.
Determine the in-degree and the out-degree of each vertex in the digraph given by the adjacency matrix
and hence determine if it is an Eulerian graph. Display the digraph and determine an Eulerian trail.
A digraph is strongly connected if there is a path between every pair of vertices. Show that if is the adjacency matrix of a digraph with vertices and is the matrix
then is strongly connected iff each non-diagonal element of is greater than 0.
Write down the adjacency matrix for the digraph shown. Calculate the matrices , and . Consequently find the number of walks of length 1, 2, 3 and 4 from to . Is there a walk of length 1, 2, 3, or 4 from to ? Find the matrix for the digraph and hence conclude whether it is strongly connected. This means finding out whether all off diagonal elements are nonzero.
The digraph for Problem 21.1.4.
A graph is a set of nodes (points, vertices) connected by a set of links (edges, lines). We assume that there are nodes. The adjacency () matrix takes the form with 1 in row , column if is connected to , and 0 otherwise. Thus is a symmetric matrix. Associated with is the degree distribution, a diagonal matrix with row-sums of along the diagonal, and 0's elsewhere. We assume that for all . We define the Laplacian as . Let
Give an interpretation of , , .
Find and .
Show that admits the eigenvalue (lowest eigenvalue) with eigenvector .
A graph is a set of nodes (points, vertices) connected by a set of links (edges, lines). We assume that there are nodes. The adjacency () matrix takes the form with 1 in row , column if is connected to , and 0 otherwise. Thus is a symmetric matrix. Associated with is the degree distribution , a diagonal matrix with row-sums of along the diagonal, and 0's elsewhere. describes how many connections each node has. We define the Laplacian as . Let , i.e. are the entries of adjacency matrix. Find the minimum of the weighted sum
with the constraint , where . Use the Lagrange multiplier method. The sum is over all pairs of squared distances between nodes which are connected, and so the solution should result in nodes with large numbers of inter-connections being clustered together.
Find the eigenvalues of the three adjacent matrices
provided by three simple graphs. Find the ``energy'' of each graph defined by
Consider the two directed graphs with the adjacency matrices
Find the characteristic polynomials and the eigenvalues of and .
Do the directed graphs admit a Hamilton cycle?
Can one remove some of the 1's in so that one has a permutation matrix?
Consider the directed graph
The directed graph G of Problem 21.1.9.
Find the adjacency matrix .
Calculate . How many 2-vertex cycles (loops) does have?
Calculate . How many 3-vertex cycles (triangles) does have?
Let be a graph with vertices and edges . The graph is transitive if implies that . The transitive closure of , is the smallest transitive graph which has as a subgraph. Let be the adjacency matrix for and be the adjacency matrix for . If and then . Write a C++ program which finds for any given adjacency matrix . Find the adjacency matrix for the transitive closure of the graph given by the adjacency matrix
Compare the two adjacency matrices
Do they admit an Euler path?
Consider the adjacency matrix
Is there a Hamilton cycle?
Let be a graph with vertices and edges . The adjacency matrix is given by where . In the following products of graphs and with adjacency matrices. The rows and columns are indexed by , where we use the ordering if or, and .
The cartesian product of two graphs and is the graph with vertices
and edges
It follows that
where is the usual addition with the convention that . Thus
The lexicographic product of two graphs and is the graph with vertices
and edges
Thus . It follows that
Hence
Here is the with every entry equal to 1.
The tensor product of two graphs and is the graph with vertices
and edges
It follows that
Thus where is the Kronecker product of matrices.
The normal product of two graphs and is the graph with vertices
and edges
Thus
Show that the Euler path is not preserved (in general) under these operations.
Show that the Hamilton path is not preserved (in general) under these operations.