1 / 22

Graphs

Graphs. Basic properties. Applications of Graph Theory. Car navigation systems Databases Build a bot to retrieve info from Internet Representing computer networks and streams of information. Intuitive Notion of Graph.

triage
Download Presentation

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 Basic properties

  2. Applications of Graph Theory • Car navigation systems • Databases • Build a bot to retrieve info from Internet • Representing computer networks and streams of information

  3. Intuitive Notion of Graph • A graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices, and the links that connect some pairs of vertices are called edges.

  4. Intuitive Notion of Graph • A graph is a bunch of vertices (or nodes) represented by circles which are connected by edges, represented by line segments • In other words, graphs can be considered as relations on their vertices set

  5. Definition of Graph • A graph (an undirected or simple graph) G = (V,E ) is a nonempty finite set V (a set of vertices or nodes) together with a set E of edges, where each edge is a subset of V with cardinality 2 (an unordered pair). • A simple graph is bidirectional (undirected) and has no loops (no “self-communication”).

  6. Example • V={1,2,3,4} • E={(1,2),(1,3),(2,3),(2,4),(3,4)} {1,2} 1 2 {2,3} {1,3} {2,4} {3,4} 3 4

  7. Example {1,2} 1 2 • This graph may represent a computer network • Vertices are labeled to associate with particular computers • Each edge can be viewed as the set of its two endpoints {2,3} {1,3} {2,4} {3,4} 3 4

  8. Edges • For a set V with n elements, how many possible edges there? • This is the number of pairs in V - the number of 2-element subsets of V:

  9. The number of graphs • How many possible graphs are there for the same set of vertices V ? • The number of subsets in the set of possible edges. There are n · (n -1) / 2 possible edges, therefore the number of graphs on V is 2n(n -1)/2

  10. Adjacent Vertices • Vertices are adjacent if they are the endpoints of the same edge. This edge joins the adjacent vertices. Q: Which vertices are adjacent to 1? How about adjacent to 2, 3, and 4? e1 1 2 e3 e2 e4 3 4

  11. Adjacent Vertices e1 1 is adjacent to 2 and 3 2 is adjacent to 1, 3, and 4 3 is adjacent to 1 and 2 4 is adjacent to 2 5 is not adjacent to any vertex 1 2 5 e3 e2 e4 3 4

  12. Incident Vertices and Edges • A vertex is incident with an edge (and the edge is incident with the vertex) if it is the endpoint of the edge. • Which edges are incident to 1? How about incident to 2, 3, 4, and 5? e1 1 2 5 e3 e2 e4 3 4

  13. Incident Vertices and Edges e1 1 is incident with e1, e2 e1, e2are incident with 1 e1, e3, e4 are incident with 2 2 is incident with e1, e3, e4 3 is incident with e2, e3 4 is incident with e4 5 is not incident with any edge 1 2 5 e3 e2 e4 3 4

  14. Degree of a Vertex • The number of edges incident with a vertex is called the degree of this vertex: deg(A) is the degree of A. • deg(1)=2; deg(2)=3; deg(3)=2; deg(4)=1; deg(5)=0 • Theorem. In a graph, the sum of degrees of the vertices equals twice the number of edges e1 1 2 5 e3 e2 e4 3 4

  15. Complete Graph A simple graph is complete if every pair of distinct vertices share an edge. The notation Kndenotes the complete graph on n vertices. K1 K2 K3 K4 K5

  16. Adjacency Matrix • For a digraph G = (V,E ) define a binary matrix AG by: • Rows, Columns –one for each vertex in V • Value at i th row and j th column is • 1if i th vertex connects toj th vertex (i j ) • 0 otherwise

  17. Adjacency Matrix - Example e1 1 2 e3 e2 e4 3 4

  18. Adjacency Matrix • Theorem. The sum of the entries in row i of the adjacency matrix of a graph is the degree of the ith vertex. e1 1 2 e3 e2 e4 3 4

  19. Graph Isomorphism • A graph G1 is isomorphic to a graph G2, when there is a one-to-one correspondence f between the vertices of G1 and G2such that vertices A and B are adjacent in G1 if and only if the vertices f(A) and f(B) are adjacent in G2. • The function f is called an isomorphism of G1 with G2.

  20. Graph Isomorphism

  21. Graph Isomorphism Invariant • A property is said to be a graph isomorphism invariant if, whenever G1 and G2are isomorphic graphs and G1 has this property, then so does G2. The properties are: • has n vertices • has e edges • has a vertex of degree k

  22. Homework • Read Section 4.1 • Problems (Exercises 4.1) 1, 3, 5, 7

More Related