-2

Let A be the NxN adjacency matrix of an undirected unweighted network, without self-loops. Let 1 be a column vector of N elements, all equal to 1. In other words 1 = (1, 1, ..., 1)T , where the superscript T indicates the transpose operation. Use the matrix formalism (multiplicative constants, multiplication row by column, matrix operations like transpose and trace, etc, but avoid the sum symbol Σ) to write expressions for:

a)The vector k whose elements are the degrees ki of all nodes i = 1, 2,..., N.

b)The total number of edges, L, in the network.

d)The number of triangles T present in the network, where a triangle means three nodes, each connected by links to the other two (Hint: you can use the trace of a matrix).

Fulla
  • 73
  • 4

1 Answers1

1

a) multiply the adjacency matrix with the 1 (vector you mentioned) b) use (1, 1, …, 1) * (vector from a)T, which gives you the sum of all elements in the adjacency matrix, that is the number of all edges. c) There exists a theorem. Let A be an adjacency matrix, then A^k[i][j] gives you the number of paths, of length k from node i to node j. If you then calculate A^3 and look at the diagonal elements (i), those give you the number of paths from node i to itself of length 3, which are so called triangles. If you then account for all permutations, the answer is sum(trace(A^3)) / 6.

kuco 23
  • 702
  • 3
  • 13
  • What theorem used in (c) why divide by 6. and also for (b) wouldnt we have to divide by 2 because the number of edges – Fulla Sep 19 '19 at 02:10
  • https://math.stackexchange.com/questions/2434064/proof-raising-adjacency-matrix-to-n-th-power-gives-n-length-walks-between – kuco 23 Sep 19 '19 at 02:13
  • 1
    You divide by 6, because you are looking for a number of triangles, when a number of walks from some node u to u is every permutation of those three nodes, which is 3! = 6 – kuco 23 Sep 19 '19 at 02:15
  • 1
    yeah you are right about b), was thinking of a directed graph. – kuco 23 Sep 19 '19 at 02:17