220 likes | 713 Views
Graph. graph is a pair of two sets where set of elements called vertices ( singl . vertex) set of pairs of vertices (elements of ) called edges Example: where Notation: we write for a graph with vertex set and edge set is the vertex set of , and is the edge set of.
E N D
Graph • graph is a pair of two sets where • set of elements called vertices(singl. vertex) • set of pairs of vertices (elements of ) called edges • Example: where • Notation: • we write for a graph with vertex set and edge set • is the vertex set of , and is the edge set of drawing of 1 2 3 4
Types of graphs • Undirected graph set of unordered pairs • Pseudograph(allows loops) loop = edge between vertex and itself • Directed graph set of ordered pairs • Multigraph is a multiset SYMMETRIC & IRREFLEXIVE (IRREFLEXIVE) RELATION 4 2 1 2 3 4 3 1 4 1 2 3 4 1 2 3 ? SYMMETRIC
More graph terminology • simple graph (undirected, no loops, no parallel edges) for edge we say: • and are adjacent • and are neighbours • and are endpoints of • we write for simplicity • = set of neighbours of in G • = degree of vis the number of its neighbours, ie How many simple graph on vertices are there? 1 is adjacent to 2 and 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 4 2 1 3 is isomorphic to if there exists a bijective mapping such that if and only if
Isomorphism 3 3 3 2 4 3 2 3 1 4 6 5 2 1 3 5 6 4 6 5 1 3 3 3 (3,3,3,3,3,3) (3,3,3,3,3,3) (3,3,3,3,3,3) if is an isomorphism (3,3,3,3,2,2,2,2) (3,3,3,3,2,2,2,2)
Isomorphism How many pairwise non-isomorphic graphs on vertices are there? the complement of is the graph where 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 self-complementary graph 4 3 1 2 1 4 3 5 2 5 ,
Isomorphism • Are there self complementary graphs on 5 vertices ? • ... 6 vertices ? No, because in a self-complementary graph and but is odd • ... 7 vertices ? • ... 8 vertices ? Yes, 2 3 3 2 4 2 4 1 5 1 5 1 2 No, since 5 6 8 7 Yes, there are 10 4 3
Handshake lemma Lemma. Let be a graph with edges. Proof. Every edge connects 2 vertices and contributes to exactly 1 to and exactly 1 to . In other words, in every edge is counted twice. How many edges has a graph with degree sequence: • (3,3,3,3,3,3) ? • (3,3,3,3,3) ? • (0,1,2,3) ? Corollary.In any graph, the number of vertices of odd degree is even. Corollary 2.Every graph with at least 2 vertices has 2 vertices of the same degree. 2 4 6 1 3 Is it possible for a self-complementary graph with 100 vertices to have exactly one vertex of degree 50 ? 5 Answer. No isomorphism between and is a unique vertex of degree in 3 2 1 4 the degree seq. of and we conclude but definition of complement definition of isomorphism
Subgraphs, Paths and Cycles Let be a graph • a subgraphof is a graph where and • aninduced subgraph (a subgraphinduced on ) is a graph where • a walk(of length ) in is a sequence where and for all • a path in is a walk where are distinct(does not go through the same vertex twice) • a closed walk in is a walk with (starts and ends in the same vertex) • a cycle in is a closed walk where and are distinct 1,{1,2},2,{2,3},3,{3,1},1 is a cycle subgraph induced subgraph on 1 3 4 1 2 3 4 4 2 1 2 3 4 2 3 1,{1,2},2,{2,1},1,{1,3},3 is a walk (not path)
Special graphs • path on vertices • cycle on vertices • complete graph on vertices • hypercube of dimension adjacent to if ’s and ’s differ in exactly once adjacent to not adjacent to 5 2 4 1 3 3 2 4 1 5 3 2 4 1 5 111 110 101 100 011 010 001 000
Connectivity • a graph is connected if for any two vertices of there exists a path (walk) in starting in and ending in • a connected component of is a maximal connected subgraph of 1,{1,3},3,{3,4},4 path from 1 to 4 connected components no path from 1 to 4 connected not connected = disconnected 1 2 3 4 4 2 3 3 1 1 4
Connectivity • Show that the complement of a disconnected graph is connected ! • What is the maximum number of edges in a disconnected graph ? • What is the minimum number of edges in a connected graph ? 5 2 4 1 3 maximum when cannot be less, why ? keep removing edges so long as you keep the graph connected a (spanning) tree which has edges path on vertices has edges
Distance, Diameter and Radius recall walk (path) is a sequence of vertices and edges if edges are clear from context we write • length of a walk (path) is the number of edges • distance from a vertex to a vertex is the length of a shortest path in between and • if no path exists define • eccentricity of a vertex is the largest distance between and any other vertex of ; we write • diameter of is the largest distance between two vertices • radius of is the minimum eccentricity of a vertex of Find radius and diameter of graphs , , Prove that 1 2 3 4 1 2 3 4 (as witnessed by 3 called a centre) (as witnessed by 1,4 called a diametrical pair)
Independent set and Clique • clique = set of pairwise adjacent vertices • independent set = set of pairwise non-adjacent vertices • clique number = size of largest clique in • independence number = size of largest indepen-dent set in Find , ,, , 5 2 4 1 3 is a clique is an independent set 1 2 3 4
Bipartite graph • a graph is bipartite if its vertex set can be partitioned into two independent sets , ; ie., but now is not an independent set because 1 3 Which of these graphs are bipartite: ,, ? 2 2 bipartite not bipartite 1 2 3 1 4 4 = complete bipartite graph 4 3
Bipartite graph Theorem. A graph is bipartite it has no cycle of odd length. Proof. Let . We may assume that is connected. “” any cycle in a bipartite graph is of even length “” Assume G has no odd-length cycle. Fix a vertex and put it in . Then repeat as long as possible: • take any vertex in and put its neighbours in , or • take any vertex in and put its neighbours in . Afterwards because is connected. If one of or is not an independent set, then we findin an odd-length closed walk cycle, impossible.So, is bipartite (as certified by the partition ) 3 3 3 3 4 2 4 4 3 5 2 2 2 2 4 1 5 1 1 ... odd 1 6 1 5 ?