 circuits or cycles in the context of graphs and then we will move on to discuss operations on graphs. So first walks paths and cycles walks paths cycles or circuits in a graph now suppose we consider a graph like this then we may like to traverse on this graph for example starting from let us say this vertex let us say v1 I may like to go to v2 call it v2 let us call it v3 v4 and v5 suppose there are some multiple edges as well like this suppose I want to go from v1 to v2 through this edge say e1 then I go from here to v5 let us say this is e2 then we go from v5 to v1 let us say this is e3 then I may like to take another edge let us say e4 and reach v2 again and then possibly go to v4 through another edge let us call it e5 then what do we have we have what is known as a walk now the question is that how do we specify a walk here we see that we have started from one vertex which is called v1 and move to v2 through one edge e1 and then from it we from v2 we have taken another edge e2 and move to v5 from v5 we have taken one more edge e3 and move to v1 again and then from v1 we have taken an edge e4 and move to v2 again and then from v2 we have taken an edge e5 and move to v4 so this whole sequence of actions that we have done can be specified by a sequence of alternating vertices and edges starting from a vertex and ending at another vertex not necessarily distinct from the initial one now this is what we will call a walk the question is that whether in a walk a vertex can be repeated the answer is yes a vertex can be repeated like we see that v1 is repeated twice over here and v2 is also repeated now another question is that can an edge be repeated the answer is in our definition we do not allow edge to be repeated in a walk in the literature in some books will find that people allow repetition of edges as well in a walk and define something as a trail which does not repeat edges but in our definition we are fixing that we are not going to repeat edges because if we repeat edges suppose here when we are coming again to v1 and we are going to v2 by e4 suppose that instead of e4 we had taken e1 then suppose instead of e4 this is e1 then we could have started the whole process from here itself so what we see is that if a edge is repeated then whatever happened in between the repetition of two edges can be removed and we will get essentially the same thing this will let us remove certain cases like this like suppose I have got a graph over here and suppose I have got some vi and vj and there is some edge ek and suppose I am suppose I allow repetition of edges then I will I can have a sequence like vi ek vi ek vj ek vi and so on that is I go from here to here here to here here like this I do not want such a thing therefore in our walks we would not get edges repeated we can also do away with repetition of vertices but for the time being we are not going to do that and we will we will introduce a different terminology for the walks where vertices are also not repeated but now let us write the definition of walk in a formal way a walk in a graph is defined as a finite alternating sequence of vertices and edges beginning and ending with vertices in such a way that each edge is incident with the vertices preceding and following well we have to also specify that no edge appears more than once in a walk no edge appears more than once in a walk although vertices may repeat so that is a walk now the vertices at which a walk begins and ends there are two special vertices in a walk a vertex at which it begins and a vertex at which ends these two special vertices are called the terminal vertices of the graph the vertices with which a walk begins and ends are called the terminal vertices now we have to be careful that the terminal vertices need not be distinct so there is a classification of walks in terms of the fact whether the terminal vertices are distinct or not if we have a walk in which the terminal vertices are distinct then they are then it is called an open walk a walk in which the terminal vertices are distinct is called open walk a walk a walk in which terminal vertices are same is called a closed walk so we have got the concept of an open walk and a closed walk so for example if we look at the graph that we were dealing with again so I have got a graph like this if I start off from one vertex like this go to vertex like this then go to like this for example I go like this then this then come back like this like this then go like this and come back here starting from here I arrive here it is a it is a closed walk now if I start from here and let us say move like this and come here then it is an open walk now we come to the concept of a path and this answers our question of what happens when a walk is such that no vertex is repeated a path a walk or more specifically an open walk in which vertex is repeated is said to be a path now then what is a cycle or a circuit cycle or circuit we will use these two words synonymously a cycle is a closed walk a closed walk in which no vertex is repeated is called a cycle or a circuit now once we have known the concepts such as walk path and circuit or cycles we are ready to investigate the idea of a connected graph or a connected component of a graph the basic interest here is that given two vertices in a graph I would like to know whether I can move from one vertex to the other through some walk or a path so if in a graph I can do that for any two pair of vertices then I call that a connected graph and if I cannot do that then I call that a disconnected graph but whatever be the case given any graph I can find out so called connected components that is I can start from a vertex and see how much I can cover starting from that vertex call that a connected component and then like that find out all the connected components so let me write the definitions connected graph a graph G is connected if there is at least one path between every pair of vertices of G a disconnected graph consists of two or more connected subgraphs of which is called a connected component now this is easy to see suppose I have a graph like this now this part is definitely a connected subgraph and this is also a connected subgraph my graph consists of the complete set set of vertices and edges so these are connected components of the graph under consideration now there are some results related to the connected components connected and disconnected graphs that we will see right now now we move over to some theorems theorem a graph G is disconnected if and only if its vertex set V can be partitioned into two non-empty disjoint subsets V1 and V2 such that there exists no edge whose one end vertex is in V1 and the other end vertex is in V2 so this is somewhat very straightforward theorem which says that if you have a disconnected graph then your set of vertices are going to be partitioned into two subsets and you do not have an edge from starting off from one of those subsets and ending at the other one now we move on to the next theorem which states that if a graph has exactly two vertices of odd degree then there must be a path joining these two vertices now let us look at the statement now we are considering graphs with only one restriction that in this graph there are only two vertices of odd degree and rest of the vertices are of even degree now suppose this graph is connected then there is no problem because then of course any two vertices have a path joining them and therefore these two odd vertex odd degree vertices have path joining them so I can write if the graph is connected there is nothing to prove now suppose it is not connected then by the previous theorem I can split the set of vertices into two disjoint sets such that there is no edge connecting an element of the first one with the second one so V the set of vertices is equal to V1 union V2 where V1 intersection V2 is empty and V is the set of vertices now I can keep on doing this process and ultimately end up with connected components so ultimately what can happen is that the set of vertices V is split up into let us say some V1 union V2 union and so on up to some VK where VI intersection VJ is Phi for I not equal to J and VI is connected is a connected component now we have repeated this process over and over again and therefore we know that there is no edge between VI to VJ now the question is that where the odd degree vertices will lie so suppose small v0 and small 0 v1 are the two odd degree vertices now what we claim is that these odd degree vertices cannot lie on two different components because if that happens then that component as a sub graph will have only one odd degree vertex which is not possible by using the first theorem that we have proved which says that any graph in any graph the number of odd degree vertices have to be even suppose that V0 belongs to VI and V1 belongs to VJ for some I not equal to J then VI contains one odd degree vertex vertex which is not possible therefore V0 and V1 must be in the same component hence there exist a path connecting them which is what we wanted to prove now we move on to another theorem related to connectedness which gives me an upper bound of the number of edges that a simple graph with k connected components can have now let us move on to the theorem a simple graph n vertices k components can have at most n – k into n – k plus 1 divided by 2 edges before going into the proof let us recall what we mean by a simple graph a simple graph do not add a simple graph does not admit self loops and multiple edges or parallel edges now we realize that this theorem is not going to work for a graph in general because even if I have got a graph with only two vertices I can keep on increasing parallel edges or self loops and blow up the number of edges so here I am allowed to have only one edge between two vertices if at all and no self loops are allowed and in this context we see we say that if we have if we have k components the maximum number of edges is given by n – k into n – k plus 1 divided by 2 now we start off by assuming that we have a graph with k components and the number of vertices in the ith component is ni where i varies from 1 to k so let the number of vertices in ith component the ith component b ni and i varies from 1 to k therefore we have n 1 plus n 2 plus up to so on up to n k is equal to n we will use an inequality from algebra which is this that sigma i equal to 1 to k ni square is less than equal to n square – k – 1 twice n – k we will use this a little later now let us check this picture so I have split up my graph into k components 1 2 and k and inside this there is a connected sub graph inside this there is another connected sub graph inside this another connected sub graph and so on and the number of vertices is n 1 number of vertices n 2 and here number of vertices n k I question that what is the maximum number of edges possible when you have got n 1 many vertices the answer is n 1 into n 1 – 1 divided by 2 the question is why it is exactly the number of ways I can choose 2 vertices out of n 1 many vertices so that is n 1 choose 2 so I have got max n 1 into n 1 – 1 divided by 2 many vertices over here sorry 2 many edges over here here it is n 2 n 2 – 1 divided by 2 many edges max so here it is n k into n k – 1 by 2 many edges so I have to if I sum up all these things then I will get a sum like this which is half of summation i equal to 1 to k ni ni – 1 which is well equal to half of summation i equal to 1 to k ni square – half of summation ni i equal to 1 to k and I realize that I can use this inequality and if I plug in this inequality I am going to get half of n square – k – 1 into 2 n – k – n by 2 because this sum is equal to n and finally if we simplify we will see that we will get n – k n – k plus 1 and which is the answer thus we have got an upper bound on the number of edges of a simple graph with n vertices and k components these are more or less the results on connected graphs connected components that we study in this course and now we move on to another topic called operations on graphs now we can think of several operations on graphs when we consider graphs as objects these operations are union intersection then ring sums and then deletion fusion and so on. So I will define these operations one by one and try to provide some examples here when we have a graph G we will consider it as a ordered pair of the set of vertices and set of edges we can be even more specific and write V G and E G V G is a set of vertices of the graph G and E G is a set of edges of the graph G graph G is over here now the union of two graphs G1 and G2 is G3 where V of G3 that is set of vertices of G3 is equal to V G1 union V G2 and E of G3 is E G1 union E G2 is straight forward the intersection is also straight forward the intersection of two graphs G1 and G2 is G3 where V of G3 is V G1 intersection V G2 and E of G3 is E G1 intersection E G2 now we move on to another operation which is slightly more complicated than these ones that is the ring sum the ring sum of two graphs G1 and G2 is denoted by G1 O plus G2 where V of G1 O plus G2 is V of G1 union V of G2 so there is no change over here from union but now the change comes E belongs to E of G1 O plus G2 if only if it is either in E G1 or in E G2 but not in both now we come to decomposition a graph G is said to be a graph G is said to have been decomposed into two subgraphs G1 and G2 if G1 union G2 equal to G and G1 intersection equal to a null graph now the question is what do we mean by G1 union G2 G1 union G2 is the union of G1 and G2 that is what we denoted by G3 in the definition so V of G1 union G2 is V of G1 union V of G2 and E of G1 union G2 is equal to E of G1 union E of G2 similarly G1 intersection G2 is the intersection of G1 and G2 so V of G1 intersection G2 is V of G1 intersection V of G2 and E of G1 intersection G2 is E of G1 intersection E of G2 so when I say that G1 union G2 is G that means that the union of the set of vertices of G1 and G2 is going to give me the set of vertices of G and the union of edges is going to give me the set of edges in G and when I say that intersection is a null graph that means that there is no common edge between G1 and G2 now we come to deletion if Vi is a vertex in a graph G then G- Vi denotes a sub graph of G obtained by deleting Vi and all the edges incident on Vi if Vi is an edge then G- Vi is obtained by deleting Vi from E of G now let us look at an example that suppose we consider a graph like this and suppose this is Vi this is Vj and this is let us say Ej now if I delete Vi then the graph G- Vi will be like this like this whereas if I delete Ej the graph will be like this lastly I have another idea or another notion that is fusion a fusion means that you can fuse two vertices and make it a one vertex and then all the edges which are incident on both these two vertices will be combined as incident edges on the new vertex so fusion a pair of vertices a, b in a graph are said to be fused if two vertices are replaced by a single vertex so that every edge incident on a, b are made to be incident the new fused vertex now let us see how fusion works we consider the previous graph like this is Vi and Vj and then goes like this and suppose we want to fuse Vi and Vj so we shall make it a single vertex it will move like this and see that these two edges are now incident on this vertex and these two edges are now incident on this vertex so this is the fused vertex which can be which might be denoted by Vi Vj this brings us to the end of today's lecture thank you.