Question

In: Advanced Math

Express the degree of a vertex in terms of the adjacency matrix Describe how you can...

  1. Express the degree of a vertex in terms of the adjacency matrix
  2. Describe how you can find out whether a graph is connected, based on its adjacency matrix, using only matrix addition and multiplication.

Solutions

Expert Solution

number of non zero elements in the row of the corresponding vertex tells the degree of that vertex.

If you put all 1 on the diagonal of your adjacency matrix A, and all edge weights are positive then when you multiply A^2=A∗A you get a non-zero entry aij in A^2 if and only if there exist non-zero aik and akj in A for some k, i.e. there is a path of length 2 between i and j if k≠j and k≠i and there is a path of length 1 if k=j or k=i. So the non-zero entries in A^2 tell you all pairs of nodes that are connected by a path of length 1 or 2. Similarly the entries in A^k tell you all pairs of nodes that are connected by a path of length k or less. So if you start with A and keep squaring until you get A^k where k≥n where n is the number of nodes, then the non-zero entries in row i tell you all the nodes that are connected to node i (since two connected nodes must be connected by a path of length n or less). So if you have a row in A^k that is all non-zero, then the graph is connected. If the graph is not connected, you can similarly tell the connected components from the rows of A^k


Related Solutions

Trace through of Dijkstra’s Algorithm, using vertex v5 as the source vertex. Here is adjacency matrix...
Trace through of Dijkstra’s Algorithm, using vertex v5 as the source vertex. Here is adjacency matrix representing the graph with n = 6 vertices: 1 2 3 4 5 6 1 0 999 5 8 999 4 2 9 0 999 999 12 3 3 999 10 0 2 9 999 4 999 999 999 0 999 999 5 999 7 17 999 0 11 6 5 999 11 16 2 0             Initially we have: vnear = 5. Fill array...
AVL trees in Java For a given adjacency matrix of a rooted tree you need to...
AVL trees in Java For a given adjacency matrix of a rooted tree you need to decide whether this tree can be labeled to become an avl tree. Vertices of the tree do not have keys but numbered from 0 to n − 1 in order to write the adjacency matrix. INPUT format: The input consists of blocks. Blocks are written one after another without empty lines between them. Every block starts with a new line and consists of several...
1.Can you apply Theorem 13.6.12(A Vertex of Degree Five. If GG is a connected planar graph,...
1.Can you apply Theorem 13.6.12(A Vertex of Degree Five. If GG is a connected planar graph, then it has a vertex with degree 5 or less.) to prove that the Three Utilities Puzzle can’t be solved? 2.  Prove that if an undirected graph has a subgraph that is a K3K3 it then its chromatic number is at least 3.
Prove that any graph where every vertex has degree at most 3 can be colored with...
Prove that any graph where every vertex has degree at most 3 can be colored with 4 colors.
How can we describe the degree and characteristics of a country's financial integration?
How can we describe the degree and characteristics of a country's financial integration?
describe how the terms 'language' and 'dialect' can be used politically.
describe how the terms 'language' and 'dialect' can be used politically.
How can you describe the molecule CO2 in terms of polarity? A polar molecule made from...
How can you describe the molecule CO2 in terms of polarity? A polar molecule made from polar covalent bonds A non-polar molecule made from polar covalent bonds A non-polar molecule made from nonpolar covalent bonds A polar molecule made from nonpolar covalent bonds
Ohm’s Law in terms of the applied potential. But we can re-express the potential as the...
Ohm’s Law in terms of the applied potential. But we can re-express the potential as the integral of the electric field along some path. We can also re-express electrical resistance in terms of conductivity, length, and cross-section. Use these relationships to write Ohm’s Law in terms of the electric field and the current density.  What physical parameter does a linear fit to the slope of the resistor current graph represent? Why is a similar graphical analysis of the diode current not...
What is an equation? How are they clasified according to the degree of their terms? What...
What is an equation? How are they clasified according to the degree of their terms? What is the procedure to solve equations?
Describe, in detail, how you would obtain a gene from a tomato plant and express this...
Describe, in detail, how you would obtain a gene from a tomato plant and express this protein in bacterial cells. BamHI sites at either end surround the tomato gene of interest. You may use any vector of your own design in the process.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT