MathJax


Saturday, March 7, 2026

Number of connected triplets

Let \(A\) be the \(N \times N\) adjacency matrix of an undirected unweighted network, without self-loops. Let \(\mathbf{1}\) be a column vector of \(N\) elements, all equal to \(1\), i.e., 
\(\mathbf{1} = (1,1,\dots,1)^T\). Let \(Tr(A)\) denote the trace of matrix \(A\), 
i.e., the sum of the elements on its main diagonal.

Which of the following expressions gives the number of connected triplets 
in the network?

A. \(\frac{1}{2} (\textbf{1}^T A^2 \textbf{1})\)

B. \(\frac{1}{2} [\textbf{1}^T A^2 \textbf{1} - Tr(A^2)]\)

C. \(\frac{1}{2} [\textbf{1}^T A^2 \textbf{1} - Tr(A^2) - Tr(A^3)]\)

D. \(\frac{1}{2} [\textbf{1}^T A^2 \textbf{1} - Tr(A^2)] - \frac{1}{6} Tr(A^3)\) 

E. None of the above

 Original idea by: Pedro Ferreira

2 comments:

  1. Wonderful question. I'll take it. Next time, add "Original idea by:" and your name in the end.

    ReplyDelete
    Replies
    1. Thank you!

      Sorry, I forgot about that. Just updated the post to include it.

      Delete

Kosaraju's distinct orders of SCC discovery

When performing Kosaraju’s algorithm on the directed graph shown below, in how many distinct orders can the strongly connected components be...