Creative Assignment MS23029 MTH101

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Analysis on Networks and Adjacency Matrices using

Combinatorics

Manu A Sankaran

24 October 2023

I would like to thank and acknowledge Koushik Vijayakumar (MS23127, IISER Mohali), Aaradhya

Sharma (MS23047, IISER Mohali), Himanshu Hani(MS23137, IISER Mohali), as well as all the

volunteers, to whom I promised the anonymity of their identities, for participating in my data

sampling, proofreading, and assisting in the writing and formatting of this paper.

I would also like to thank Dr. Amit Kulshrestha for providing me the opportunity to work on this

project, as this was the most immersive project I have ever taken part in.

1
1 Abstract

This project seeks to provide a short, general overview of the significance of Adjacency matrices

of certain graphs and networks, as well as their nth powers. The concepts of Inductive proofs and

Combinatorial proofs will also be brought in through this paper.

2 Graphs and Adjacency Matrices: What are they?

A graph is merely a collection of points (nodes) that are connected by lines (edges). The adjacency

matrix for a given graph, in its most general sense, highlights the number of ways one can move

from one point to another in exactly 1 step (passing exactly 1 edge). If aij represents the ij th entry

of A, then it also represents the number of 1-length paths from the ith point to the j th point.

Given below is a network of points, each demarcated by a number from 1 to 5. The adjacency matrix

is given below the network.

Figure 1: Example Network

 
0 1 0 0 1
 
 
 1 0 1 1 0 
 
 
Aexample =
 0 0 0 1 1 

 
 0 1 1 0 1 
 
 
1 0 1 1 0

2
3 What are some of the properties of an Adjacency matrix?

An adjacency matrix, A, has three properties, namely symmetry, values of diagonal entries, and

binary nature of entries, all of which have direct correlations to properties of the corresponding

network.

3.1 Direction

Networks are of two types: Directed and Undirected. In a directed network, paths can be selective

in direction. This means there can be a path from i to j, but not the other way around. An

undirected graph does not have such restrictions, and a path existing from i to j implies that there

is a path from j to i, which is actually the exact same path as the one from i to j. An example of

an unidrected network is the network given above. Given below is a directed network, along with its

Adjacency Matrix. Notice that not every path has direction, and only some have arrows, indicating

the allowed direction.

Figure 2: Directed Network

 
0 0 0 0 1
 
 
 0 0 0 0 1 
 
 
Adirected =
 1 0 0 0 0 

 
 0 1 0 0 0 
 
 
1 1 0 1 0

3
The adjacency matrix of a network is a symmetric matrix if and only if the corresponding network is

effectively undirected. i.e. the network must be undirected or must be directed in such a way that the

number of paths from i to j is equivalent to the number of paths from j to i, for all choices of j and i.

3.2 Self-Looping

Networks also have another property regarding loops or self-looping. Some networks inherently do

not allow any of the points to connect to themselves in exactly one step (this is referred to as a

loop). If the network has no loops, then the entries along the main diagonal of the adjacency matrix

will all be 0. If there are loops, then the main diagonal entries will not always be 0. Given below is

a matrix with looping, along with its adjacency matrix. The first example network is one without

looping.

Figure 3: Network with loops on points 1 and 5

 
1 0 0 1 1
 
 
 0 0 1 1 0 
 
 
Alooped =
 0 1 0 1 0 

 
 1 1 1 0 1 
 
 
1 0 0 1 1

4
3.3 Multi-Path

Networks also have a property wherein two points can be connected via multiple distinct paths.

By definition of our adjacency matrix, this leads to entries which are not equal to only 0 and 1 in

A. Given below is a network with multi-path, and its adjacency matrix. An example of a matrix

without multi-path is the first example network.

Figure 4: Network with 2 paths between points 1 and 3

 
0 1 2 1 1
 
 
 1 0 0 1 0 
 
 
Amulti−path =
 2 0 0 0 1 

 
 1 1 0 0 0 
 
 
1 0 1 0 0

These properties have not yet been explored in the course, but as we will see in the final section,

these properties of the adjacency matrix have no correlation whatsoever to the significance of An ,

and that these properties are mutually exclusive.

4 Two important kinds of proofs

In this section, we will see the two kinds of proofs that are integral to my analysis on Adjacency

matrices, along with an example for each. Do note that these proof methods are quite widely used

5
and you should not be surprised to see them outside this paper.

4.1 Combinatorial Proofs

A Combinatorial proof is a special kind of proof, wherein two expressions that must be proven equal

are demonstrated to be equal by showing that both count a specific event or experiment.

For example, a standard Combinatorial proof is to conclude that 2 · 3 = 2 + 2 + 2. The statement

might seem absurdly simple to most readers, but its Combinatorial proof is not very intuitive. The

proof goes as follows:

Create a ”word” consisting of two characters, such that the first character is one of 1, 2 or 3 and

the second character is one of a or b. Now, we must try to count the number of such words we can

form.

On one hand, the multiplication principle tells us that as we have 2 choices for the 2nd character

and 3 choices for the 1st character, we have a net total of 2 · 3 possible words.

On the other hand, we can also fix the 1st character to be 1, and then pick from a or b for the 2nd .

Similarly, we can fix the 1st character to be 2 or 3, too, and thus, we have 3 cases with 2 words in

each. As the cases are mutually exclusive, we can add the cases to get the total number of words,

giving a net total of 2 + 2 + 2 possible words.

As one event cannot be counted in more ways through one method and fewer through another, we

can conclude that we have Combinatorially proved that 2 · 3 = 2 + 2 + 2.

4.2 Inductive Proofs

An inductive proof is a method of proving a statement, P(n) that holds on natural numbers. Once

the statement is proven for n = 1, it must be proven for n = k + 1, assuming it holds for n = k. If

this is done, the statement holds across all natural numbers. For example, the proof of the sum of

the first n natural numbers is given as per the following statements:

6
Letting Sn be the sum of the first n natural numbers, we need to prove that Sn = n(n + 1)/2. The

statement clearly holds for n = 1, and can easily be verified. Assume there is a natural number k such

that Sk = k(k + 1)/2. Note that Sk+1 = Sk + (k + 1). This means that Sk+1 = k(k + 1)/2 + (k + 1) =

(k + 1)(k + 2)/2. As the statement holds for n = 1 and holds for n = k + 1 whenever it holds for

n = k, it must hold for all natural numbers.

5 What does the nth power of an Adjacency Matrix show?

The nth power of an Adjacency matrix, A, represented by An , represents the number of ways to

travel from one point on the network to another point in exactly n steps. Here, a step is defined as

travelling from one point to another point connected to the aforementioned point.

6 Proof of the significance of An

The above section is not very intuitive and is hard to understand. To demonstrate what I actually

meant, given below is an inductive proof, which nests a combinatorial proof.

Remember that for an inductive proof we require 3 criteria to be satisfied:

i) A statement P (n) holding on natural numbers

ii) The above statement must hold for n = 1 (or the relevant base case)

iii) A valid assumption that it might hold for n = k

Here, our statement is as follows:

P(n): If An represents the nth power of the adjacency matrix, A of a network, then the ij th

element of An (to be denoted by anij ) will represent the number of ways to travel from the ith point

to the j th point.

The proof is as follows:

Notice that P(1) holds by definition.

7
Assume there exists a natural number k such that P(k) holds. i.e. akij represents the number of

k-length pathways from i to j. Notice that the number of (k + 1)-length pathways from i to j

through a third point, say p, is equivalent to finding the number of (k)-length pathways from i to p,

followed by 1-length pathways from p to j.

The multiplicative principle tells us that this is equivalent to the product akip · apj . To find the total

number of paths from i to j, we must sum the previous product over all possible choices of p, which

would range from the 1st point to the tth point, where t is the number of such points. This reduces
Pt
to p=1 akip · apj .

Although, it seems obvious what it evaluates to, I will leave the value at this summation notation

for now, as I approach the problem from the other end, as is done in a combinatorial proof.

Following the assumption, let us evaluate ak+1


ij through matrix multiplication of Ak and A. The

above element is equal to RiT · Cj where RiT represents the transpose of the ith row vector of Ak and

Cj represents the j th column vector of A.


Pt
By definition, this evaluates to r=1 akir · arj . Now, the similarity between the expression obtained

here and that obtained previously is obvious, and you might have even noticed that they evaluate

to the same quantity. Thus, ak+1


ij does indeed represent the number of (k + 1)-length pathways from

i to j.

We have now that the statement P(n) holds for n = k + 1 whenever it holds for n = k. As P(1)

holds, so does P(2), and hence so do P(3), P(4), .... We can thus conclude that P(n) holds for all

natural numbers n and it has been proven inductively.

In doing so, we have also simultaneously combinatorially proven the equality of the two processes of

obtaining the number of n-length pathways.

7 How can I apply this now?

The reader can observe a dataset obtained through interviewing my friends. I asked them to fill

out a form wherein they would state the two subjects they would be picking for their pre-majors in

8
their 2nd year. Every pre-major in common to two people will correspond to a path between them.

Notice that this graph actually has nonzero entries along the diagonal, as well as entries that are

not equal to 0 or 1 only.  


2 1 1 2 1 1 1
 
 

 1 2 0 1 0 0 0 

 

 1 0 2 1 1 2 1 

 
A=
 
 2 1 1 2 1 1 1 

 

 1 0 1 1 2 1 2 

 
1 0 2 1 1 2 1
 
 
 
1 0 1 1 2 1 2

The corresponding network for this matrix is given below. The reader is requested to look at it

before proceeding with the text following this.

Figure 5: Network for the above Adjacency Matrix

9
Hopefully, you have seen the network and have managed to make sense of what it actually intends to

convey. In essence, each coloured path shows the corresponding common subject. My aim now will

be to demonstrate that the significance does indeed hold for low powers of A, as most computing

programs give up with higher powers.

Quite sadly, I was unable to produce a directed network, which would have also been fun to

analyse, but the reader is encouraged to make their own small directed network and then apply the

properties as mentioned above. The given network has both looping and multiple paths.

Let us take a look at the number of paths from 1 to 7 that take exactly 2 steps. If you are patient

enough to sit and count this, you will see that there are, in fact a total of 10 paths (1-1-7, 1-1-7,

1-5-7, 1-5-7, 1-6-7, 1-3-7, 1-4-7, 1-4-7, 1-7-7,1-7-7). Notice that some representations may seem to

repeat, but in fact represent distinct paths due to the fact that there are multiple paths from certain

points to certain others. Let us also take a look at a few more such examples.

Let us also count the number of ways to go from 2 to 3 in exactly 3 steps. Again, I will rely on your

patience to sit and count these paths, but if all goes well, you should have seen a total of 24 such

paths.

Let us now take a look at A2 and A3 to check whether these match up with what we said earlier.

 
13 6 10 13 10 10 10
 
 

 6 6 2 6 2 2 2 

 

 10 2 12 10 10 12 10 

 
2
A =
 
 13 6 10 13 10 10 10 

 

 10 2 10 10 12 10 12 

 
10 2 12 10 10 12 10
 
 
 
10 2 10 10 12 10 12

10
 
98 38 86 98 86 86 86
 
 

 38 24 24 38 24 24 24 

 

 86 24 88 86 84 88 84 

 
A3 = 
 
 98 38 86 98 86 86 86 

 

 86 24 84 86 88 84 88 

 
86 24 88 86 84 88 84
 
 
 
86 24 84 86 88 84 88

We see, indeed that a217 = 10 and a323 = 24.

Hence, it works out quite well, and can actually be seen for higher powers of A, too. If you

are concerned about the calculation of these higher powers of A, you can visit the following link,

which will contain some code that lets you look at higher powers. The reader is requested to make

a copy of the notebook before running all cells. https://colab.research.google.com/drive/

1MrkGHBwocK7wCHsVDTTtWdus_dUjt14Y?usp=sharing

8 Conclusions

This paper has defined networks, adjacency matrices, explored their properties and shown some

applications of these properties through an example. It has also gone over the concepts of inductive

and combinatorial proofs, and has used them to demonstrate properties of adjacency matrices,

beyond what has been done in the course. I hope this has broadened the reader’s knowledge in this

field. Feedback is always appreciated.

11

You might also like