1
$\begingroup$

I read this post about graph connectedness and adjacency matrix. But I do not understand how the last comment about using the binomial expansion would help. I know this approach is correct, but just do not fully grasp it.

Would you mind to elaborate a little bit more? I did the binomial expansion and got $\binom{n-1}{0}A^{0}+\binom{n-1}{1}A^{1}+.....+\binom{n-1}{n-1}A^{n-1}$ which is a linear combination of all the As. but I still don't know how this helps.

  • 0
    What is the matrix $A^k$? It is the matrix that will have entry $i,j$ non-zero (strictly positive) if, and only if, there exists a path of length exactly $k$ between nodes $i$ and $j$. Now, the graph is connected if, and only if, there is a path of length *at most* $n-1$ between every nodes $i,j$. So using the binomial expansion, $II+A)^{n-1}$ will have entry $i,j$ non-zero if, and only if, there exists a path of length $1$, or $2$, or [...], or $n-1$ between nodes $i$ and $j$.2017-02-26

2 Answers 2

2

What is the matrix $A^k$? It is the matrix that will have entry $i,j$ non-zero (strictly positive) if, and only if, there exists a path of length exactly $k$ between nodes $i$ and $j$.

Now, the graph is connected iff there is a path of length at most $n-1$ between every nodes $i,j$. So using the binomial expansion, $II+A)^{n-1}$ will have entry $i,j$ non-zero iff there exists a path of length $1$, or $2$, or [...], or $n-1$ between nodes $i$ and $j$.

Indeed, $$(I+A)^{n-1} = \sum_{k=0}^{n-1} \binom{n-1}{k} A^k$$ so for any $1\leq i,j\leq n$, $$\begin{align} \left( (I+A)^{n-1} \right)_{ij} &= \sum_{k=0}^{n-1} \binom{n-1}{k} \left(A^k\right)_{ij}\\ &= \binom{n-1}{0} \left(A^0\right)_{ij} + \binom{n-1}{1} \left(A^0\right)_{ij} + \dots + \binom{n-1}{n-1} \left(A^{n-1}\right)_{ij}\\ &= \sum_{k=0}^{n-1} \binom{n-1}{k}\cdot \text{(number of paths between $i$ and $j$ of length exactly $k$)} \end{align}$$ which is zero if, and only if, there is no path of length at most $n-1$ between $i$ and $j$, which is equivalent to not having any path at all between $i$ and $j$.

Side note: this expansion does not tell you how many such path there are, sadly. That is, there is no (as far as I know, at least) direct correspondence between the entry $\left( (I+A)^{n-1} \right)_{ij}$ (which is an integer) and the number of paths between $i,j\in[n]$ in the graph $G$ (whose adjacency matrix is $A$), because of the binomial coefficients which weigh each summand.

  • 1
    Note that the choice of the binomial expansion specifically is just computationally convenient, because you just need to check one matrix for nonzero elements and that matrix is fairly easy to calculate. There are lots of other ways to do the same test. One would be to actually count the paths, i.e. to get $A+A^2+\dots+A^{n-1}$, which can be simplified using the geometric series (at the cost of having to multiply by an inverse).2017-02-26
  • 0
    @Ian Oh, sure -- I merely wanted to address the OP's doubts (whose question stems from the link (s)he gave, [here](http://math.stackexchange.com/questions/994847/adjacency-matrix-and-connectivity-proof?rq=1)).2017-02-26
  • 1
    My comment was more for the OP's benefit than yours :)2017-02-26
  • 0
    Fair enough :) And I agree, that's a good thing to keep in mind. As you say, to check connectivity, this may be computationally faster, but to get more than this one bit of information, there *are* better ways.2017-02-26
  • 0
    @Clement C. thank you for your elaborate explanation, however, due to my lack of thorough understanding of the subject, I still don't see why this proves the formula $$(I+A)^{n-1}_{ij}$$ would have no zero entries.How did you simplify the many terms into $\sum_{k=0}^{n-1}\binom{n-1}{k} $2017-02-26
  • 0
    @Tmm Assume there is a path between $i$ and $j$. Then there exists an integer $1\leq k \leq n-1$ such that this path has length $k$; so the summand $\binom{n-1}{k} (A^k)_{ij}$ will be positive (at least $\binom{n-1}{k}\cdot 1$). Since all the other summands are non-negative (they are non-negative integers), it means that $(I+A)^{n-1})_{ij}\geq \binom{n-1}{k} (A^k)_{ij} > 0$, i.e. the coefficient $(ij)$ of $(I+A)^{n-1}$ is non-zero. To conclude: if $A$ is connected, there is a path between every $i,j$, and by the above $(I+A)^{n-1})_{ij} > 0$ for every $i,j$.2017-02-26
  • 0
    @ Clement C. I seems to understand a little bit more after your last comment, however, I am still stuck with failing to see why the summand $\binom{n-1}{k}(A^{k})_{ij}$ will be positive if there is a path of length k exists. also, what did you mean by all other summands are non-negative? why did you call matrix as integers? I don't have sufficient knowledge to know all the convention and assumption, so would you mind give a easier to understand explaination? thanks2017-02-26
  • 1
    @Tmm In the equation $$(I+A)^{n-1} = \sum_{k=0}^{n-1} \binom{n-1}{k} A^k$$ we have a sum of matrices. But then, we fix any $i,j$, and in the equation $$\left( (I+A)^{n-1} \right)_{ij} = \sum_{k=0}^{n-1} \binom{n-1}{k} \left(A^k\right)_{ij}$$ we only have numbers -- namely, the LHS is the coefficient $i,j$ of the matrix $(I+A)^{n-1}$, while each quantity $ \left(A^k\right)_{ij}$ in the RHS is the coefficient $i,j$ of the matrix $A^k$.2017-02-26
  • 0
    Each $\binom{n-1}{k}$ is a non-negative integer; and since $A$ is a matrix of non-negative integers (it's an adjacency matrix), so is $A^k$: so every entry $(A^k)_{ij}$ is non-negative as well, i.e. $(A^k)_{ij}\geq 0$.2017-02-26
  • 0
    @ Clement C This is the original question, Let G be a graph on n vertices, $A = A_{G}$ its adjacency matrix, and In the n×n identity matrix (with 1s on the diagonal and 0s elsewhere). Prove that G is connected if and only if the matrix $(I_{n} + A)^{n−1}$ has no 0s.2017-02-26
  • 0
    ?! That's what we have been doing from the beginning.2017-02-26
  • 0
    Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/54384/discussion-between-tmm-and-clement-c).2017-02-26
  • 0
    @Clement C I guess my problem is that I still don't know how your answer is connected to the question. It asked me to prove that G is connected iff the matrix $(I_{n}+A)^{n-1})$ has no 0s. this is what I couldn't understand. sorry for being so slow.2017-02-26
  • 0
    @ClementC. Can you give a comment on my solution, please? It's interesting for me to see was it right or not.2017-02-26
  • 0
    Read the comment starting with "Assume there is a path between [...]". In this comment, what is shown is that there is a path between $i$ and $j$ in $G$, iff the coefficient $(i,j)$ of the matrix $(I+A)^{n-1}$ (this coefficient is the number written $((I+A)^{n-1})_{ij}$) is strictly positive. So then: $G$ is connected $\Leftrightarrow$ there is a path in $G$ between every $i,j$ $\Leftrightarrow$ $((I+A)^{n-1})_{ij}>0$ for every $i,j$.2017-02-26
  • 0
    @Tmm Did my last comment clear your doubts?2017-02-28
-1

As far as I understand $$(I+A)^{n-1} = \sum_{k=0}^{n-1} \binom{n-1}k A^k$$ Only shows how to calculate $(I+A)^{n-1}$ and there is no some extra meaning in such expansion.

  • 0
    @ mvmath My question is how such expansion could prove that the graph is connected if the result is non-zero.2017-02-26
  • 0
    @Tmm Expansion has no really meaning, $(I+A)^{n-1}$ has meaning. And there is stronger condition: none of element from this matrix should be zero.2017-02-26
  • 0
    @ mvmath would you describe that condition? I don't see how this is meaningful in connection to the problem. thanks,2017-02-26
  • 0
    There *is* a meaning...2017-02-26
  • 0
    @ClementC. If you know, so tell us, please, it will be interesting. Because I see a meaning only in $(I+A)^{n-1}$.2017-02-26
  • 0
    See my comment (now turned into an answer).2017-02-26
  • 0
    @ClementC. Now I see the problem, we have a different understanding of $I$. I interpret it as "let's add a self-loops" to our graph. So now we have a new adjacency matrix. Let it raise to the power $n-1$. Now in $(I+A)^{n-1}$ we have number of paths of length n. So if there wasn't such path between two vertices $i,j$, but there was a path of shorter length, we can fix it by going into self-loop, but if there wasn't path at all, so we will have a zero in $(i,j)$. That's why I said, that I don't see a meaning in expansion.2017-02-26
  • 0
    @Tmm you can also check out my solution, it can give you an another point of view on the problem.2017-02-26
  • 0
    @mvmath I guess this requires a bit more intuition about what is going on (the original approach in the post linked by the OP is much more "brute-force"); quick comment: I assume you mean paths of length $n-1$, not $n$? Otherwise, your solution looks correct to me.2017-02-26