1 / 20

Topics

This article provides an introduction to graphs, including definitions and examples. It also covers directed graphs and sociograms, with exercises and explanations. Additionally, it discusses the concept of degree and the Handshake Theorem.

rthurman
Download Presentation

Topics

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. A B C D E F G Topics • Intro. to Graphs (11.1)

  2. Definition (p.650) • A graph G = V(G) + E(G) • A set of vertices (or nodes), V(G) = {v1, v2, …, vn} • A set of edges (or arcs) E(G) = {<vi, vj> | viV(G) and vj V(G) } • Exercise: Draw the graph G, where V(G) = {a, b, c, d, e, f}, and E(G) = {e1:<a,c>, e2:<a,b>, e3:<c,d>, e4:<c,c>, e5:<d,a>, e6:<d,c>, e7:<e,f>} • List all the vertices adjacent to vertex c. • List all the edges adjacent to edge e3. • What are the edges incident on vertex d? • Is there any loop in G? • Is there any isolated vertex? • Are there any parallel edges?

  3. Interpretation of Graphs • What could the following graph represent?  A graph with 6 vertices and 7 edges. Source: http://en.wikipedia.org/wiki/Graph_%28mathematics%29

  4. Directed Graphs (p.653) • A directed graph (or digraph) G = V(G) + E(G) • A set of vertices, V(G) = {v1, v2, …, vn} • A set of directed edges (or arrows), E(G) = {<vi, vj> | viV(G) and vj V(G) } Each <vi, vj> is an ordered pair. vi: the head vj: the tail vi is the direct predecessor of vj vj is the direct successor of vi • Exercise: Draw the digraph G, where V(G) = {a, b, c, d, e, f} and E(G) = {e1:<a,c>, e2:<a,b>, e3:<c,d>, e4:<c,c>, e5:<d,a>, e6:<d,c>, e7:<e,f>}

  5. A B C D E F G Sociograms • A sociogram is a graphic representation of relationships among individuals. See http://en.wikipedia.org/wiki/Sociogram. A vertex in a sociogram represents an individual. A directed edge represents ‘friendship’ or ‘flow of information’. • Exercise: Show V(G) and E(G) in the following digraph. • Is there any star in the sociogram? • Any isolates? • Does there exist any clique? • Is there a way for G to pass information to F? • Could G pass information to A? • Could A pass information to G?

  6. More Examples of Graphs • pp.654-655: • Knowledge representation • Problem solving

  7. Is a diagram a graph? • Not necessarily • But sometimes (e.g., Hasse diagrams, pp.636-639) • A diagram is a 2D symbolic representation of information according to some visualization technique. • Three main types of diagrams: • Graph-based diagrams (tree diagram, network diagram, flowchart, …) • Chart-like diagrams (histogram, pie chart, function graph, …) • Other types of diagrams (exploded view) See http://en.wikipedia.org/wiki/Diagram for a comprehensive list of specific diagram types.

  8. Network Diagrams A sample network diagram: http://en.wikipedia.org/wiki/Network_diagram

  9. A network diagram for the Distributed Computer Security Lab: See http://www.dcsl-uhcl.net/public/DCSL%20diagram.html

  10. A Sensor Network Topology • Source: http://www.purelink.ca/images/sensor_network_big.gif

  11. A sample UML (Unified Modeling Language) diagramhttp://sce.uhcl.edu/yang/teaching/csci5333Fall04/uml%20company%20DB.gif

  12. Questions?

  13. A A A X A B C C A C B A A B B C B A C C B B X B A Y Y Simple Graphs • p.656: A simple graph is an undirected graph with no loops or parallel edges. • A complete graph on n vertices, Kn, is a simple graph with n vertices v1, v2, …, vn whose set of edges contains exactly one edge for each pair of distinct vertices. • Q: Which of the following are simple graphs? Which are complete graphs? (c) (d) (e) (b) (a) (g) (h) (f) (i)

  14. Complete Graphs • Q: How many edges are there in a complete graph on n vertices, Kn? • Number of edges in Kn = 1+2+…+(n-1) =

  15. A B C X Y Bipartite Graphs • A bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint setsU and V such that every edge connects a vertex in U to one in V. (Source: http://en.wikipedia.org/wiki/Bipartite_graph)

  16. A B C X Y Complete Bipartite Graphs • A complete bipartite graph, Km,n • Definition: p.657 • Q: How many edges are there in a complete bipartite graph Km,n? • Number of edges in Km,n = K3,2

  17. A B C D E F G Subgraphs • p.657: A graph H is a subgraph of a graph G iff • Every vertex in H is also in G. • Every edge in H is also in G. • Every edge in H has the same endpoints as in G. • Example 11.1.10 • Remember the cliques in the example sociogram? A clique is a complete subgraph. • Subgraphs of a graph which are cliques may be referred to as cliques in that graph. • The largest clique in a graph G is of theoretical importance and denoted ω(G).

  18. The Concept of Degree • The degree of a vertex v deg(v) = the number of edges that are incident on v Note: A loop on v is counted twice. • The total degree of a graph G with n vertices = = 2(the number of edges in G)  the Handshake Theorem (p.659) • Example 11.1.11: p.658

  19. The Handshake Theorem • Therefore, the total degree of a graph is even. • Also, the number of vertices with odd degree is even (p.661) • Useful when determining whether a graph with certain properties exists or not. • Example 11.1.12 • Example 11.1.14

  20. Questions?

More Related