1 / 38

Graphs

Graphs. Simple graph G=(V,E) V = V(G) ={1,2,3,4} – vertices E = E(G) = {a,b,c,d,e} – edges Edge a has end-vertices 1 and 2. Vertices 1 and 2 are adjacent: 1 ~ 2. a. 1. 2. c. b. d. e. 3. 4. Simple Graph.

tangia
Télécharger la présentation

Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graphs • Simple graph G=(V,E) • V = V(G) ={1,2,3,4} – vertices • E = E(G) = {a,b,c,d,e} – edges • Edge a has end-vertices 1 and 2. Vertices 1 and 2 are adjacent: 1 ~ 2. a 1 2 c b d e 3 4

  2. Simple Graph • Definition: Graph X is composed of the set of vertices V(X) endowed with irreflexive symmetric relation ~ (adjacency). An unoredered pair of adjacent vertices uv = vu forms an edge. The set of edges is denoted by E(X). Sometimes we write X = (V,E) or X(V,E).

  3. Families of Graphs

  4. Cycle Cn on n vertices. V – vertices of a regular n-gon E – edges • |V|=n • |E|=n 1 2 3 4 C4

  5. Small Cycles • Some cycles as drawn by VEGA. • It makes sense to define cylces C1 (a loop) and C2 (parallel edges), that are NOT simple. C3 C4 C1 C5 C6 C2

  6. 1 2 3 4 Path Pn on n vertices. V – vertices of polygonal line. E – segments. The endpoints of the polygonal line are called the endpoint of the path. For instance, 1 and 4 are the endpoints of the path on the left. • |V|=n • |E|=n-1 P4 1 2 3 4

  7. Complete graph on n vertices Kn. V – vertices of a regular n-gon E – edges and diagonals. • |V|=n • |E|=n(n-1)/2 1 2 3 4 K4

  8. Complete Bipartite Graph on n+m vertices Kn,m. V = U1 U2 , U1Å U2 = ; |U1| = m, |U2 | = n. E = U1 U2 • |V|=n + m • |E|=n m 1 2 3 4 K2,2

  9. Metric Space • Space V, with mapping d (distance): • d:V  V R with the following properties: • d(u,v) ¸ 0, d(u,v) = 0, iff u = v. • d(u,v) = d(v,u) • d(u,v) · d(u,w) + d(w,v) • is called a metric space with distance d.

  10. Example: Hamming Distance {0,1}n is a metric space if distance between u and v is the number of components in which the two vectors differ. • E.g. d([0,0,0,1,0,1],[1,1,0,1,1,1]) = 3. • d is called the Hamming distance.

  11. Hypercube Qn. • Hypercube of dimension d is the graph Qn, with: • V(Qn) = {0,1}n. • u ~ v, if d(u,v) = 1. • |V(Qn)| = 2n • |E(Qn )|= n 2n-1 Q2 Q3 Q1 Q5 Q4

  12. 1 2 3 Vertex Valence • G = (V,E) • V(G) ={1,2,3,4} • E(G) = {a,b,c,d,e} • Number of edges incident with vertex v is called the valence or degree of v: deg(v). • deg(1) = deg(4) = 3, deg(2) = deg(3) = 2. • Vertex of valence 1 is called a leaf, vertrex of valence 0 is isolated. • d(G) – minimal valence. • D(G) – maximal valence. a c b d e 4

  13. Regular Graphs Graph G is regular (of valence k), if d(G) = D(G) = k. Zgled: • Regular graphs: Kn, Cn, Kn,n • Nonregular graphs: Pn, n > 2, Kn,m, n ¹ m. 1-valent and 2-valent graphs have simple structure. Trivalent graphs have special name: cubic graphs. (See example on the left)

  14. Girth • Girth g(G) of graph G is the number of vertices of the shortest cycle in G. If G has no cycles, its girth is infinite.

  15. Cages • Graph G is a g-cage, if the following holds: • Trivalent • Has girth g • Has the least number of vertices among the graphs satisfying 1 and 2.

  16. Exercises 01 • N1. Deterimine the 3-cage. • N2. Determine the 4-cage. • N3. Determine the 5-cage. • N4. Determine the 6-cage.

  17. The Petersen Graph and its Generalizations G(n,k) • Petersen graph G(5,2) is an example of a generalized Petersen graph G(n,k). • V(G(n,k)) consists of • ui, vi, i = 1,2, ..., n. Edges: • ui ~ ui+1 • ui ~ vi • vi ~ vi+k (Warning! Addition mod n)

  18. Examples of Generalized Petersen graphs • G(10,2) Dodecahedron • G(10,3) Desargues graph. • G(8,3) Möbius-Kantor graph. • G(6,2) Dürer graph.

  19. Incidence Matrix M(G). • To G=(V,E) we associate a rectangle matrix M=M(G) with |V| rows and |E| columns: { 1 ... v is the endpoint of e Mv,e = 0 ... otherwise

  20. Incidence Matrix - Example • G=(V,E) • VG ={1,2,3,4} • EG = {a,b,c,d,e} MG = a 1 2 c b d e 3 4

  21. Handshaking Lemma • In each graph G=(V,E) : • 2 |E(G)| = Sv 2 V(G) deg(v), • The proof uses the so-called bookkeepers rule in the incidence matrix of graph G.

  22. Graph Invariant • It is well-known that we associate numbers to mathematical objects in various ways. For instance: Determinant is assicated to a matrix, degree is associated to a polynomial, dimension is associated to a space, length is associated to a vector, etc. • There are several numbers that can be associated with a graph. Such a number is usually called graph invariant. One may argue that the main topic of graph theory is the study of graph invariants. • In addition to numbers other objects may be graph invariants.

  23. Isomorphisms and Graph Invariants Isomorphisms(G) = H is a bijective mapping: • s: V(G) ! V(H). that preserves adjacency: • u ~ v if and only if s(u)~s(v). Graph invariant is a property, (usually a number), that is preserved under an isomorphism.

  24. Isomorphism - Exercises B A • N1. Determine an isomorphism between graphs A and B. • N2. Determine an isomorphism between graphs C and D. D C

  25. Adjacency Matrix A(G). • To each graph G=(V,E) with V={1,2,3,...,n} we can associate the adjacency matrix A=A(G) as follows: { 1 ... i ~ j Ai,j = 0 ... sicer

  26. Adjacency Matrix - Example • G=(V,E) • VG ={1,2,3,4} • EG = {a,b,c,d,e} AG = a 1 2 c b d e 3 4

  27. Adjacency Matrix is Not an Invariant • Adajcency matrix is not an invariant. It depends on the numbering of vertices. • Incidence matrix is not an invariant

  28. Some Graph Invariants • |V(G)| = number of vertices • |E(G)| = number of edges • d(G) = minimal valence. • D(G) = maximal valence

  29. Invariants - Example • |V(G)| = 4 • |E(G)| = 5 • d(G) = 2 • D(G) = 3 a 1 2 c b d e 3 4

  30. Trees • A tree is a connected graph with no cycles • There are several characterizations of tree, such as: • A tree is a connected graph with n vertices and n-1 edges. • A tree is a connected graph that is no longer connected after removal of any edge.

  31. Disjoint Union of Sets • Let A and B be sets. By A t B we denote the disjoiont union of A and B. If A Å B = ;, then A t B is simply the union of the two sets. Otherwise we defne formally A t B = A £ {0} [ B £ {1}.

  32. Disjoint Union of Graphs • Let G’ and G” be graphs. By G’ t G” we denote the disjoiont union of graphs G’ and G”. This means • V(G’ t G”) := V(G’) t V(G”) and • E(G’ t G”) := E(G’) t E(G”).

  33. The Empty Graph • Empty graphf = (f,f) has no vertices and no edges.

  34. Connectivity in Graphs - Theory • Graph G is connected, if and only if it cannot be written as a disjoint union of two non-empty graphs.

  35. Connectivity of Graphs - Practice • Graph is connected, if we grab and shake the “model” made of balls and strings, and nothing falls down the earth. (No knotting of strings is permitted!)

  36. Equivalence Relation @. • Let G be a graph. On V(G) define @ as follows: For any u,v 2 V(G) let u @ v, if and only if there exists a subgraph, isomorphic to a path that has the endponts u and v. • Proposition. @ is an equivlanece relation on V(G). • Proof. Obviously reflexive and symmetric. Proof of transitivity – Homework.

  37. Path Connectivity of Graphs • G is connected by paths, if the equivalence relation @ has a single equivalence class.

  38. Homework • H1: Prove that the relation @ is transitive. • H2: Prove that for finite graphs the notions of connectedness and path connectedness coincide.

More Related