Y15-11-graph

# Y15-11-graph - 1 Graphs SM Yiu(7 th edition chapter 10...

This preview shows pages 1–10. Sign up to view the full content.

1 Graphs SM Yiu (7 th edition: chapter 10 except 10.6)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 What is a Graph? A simple graph G = (V, E) consists of ¾ V , the set of vertices (nodes, points) , and ¾ E , the set of edges (lines ) Undirected graphs are graphs where edges have no direction ( unordered pairs of V). Example: V = {a, b, c, d, e} E = {{a,b}, {a, c}, {c, d}, {c, e}, {d, e}} Directed graphs are graphs where edges have directions, i.e., E consists of ordered pairs of V Example: V = {u, x, y, z} E = {(x, y), (x, z), (y, u), (z, x), (z, u)} a b c d e z x y u
3 Simple Graphs and Multigraphs Simple graphs - at most one edge between any pair of vertices. Multi - graphs - having multiple edges between the same pair of vertices . Pseudographs – multiple edges + self-loops If x, y are two vertices, and e = {x, y} is in E, then ¾ x and y are adjacent ¾ e is incident with x and y ¾ x and y are the endpoints of e Degree (v) = number of edges incident with vertex v ¾ deg (y)=2, deg (u)=2, deg (x)=3, deg (z)=5 z x y u

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Complementary graph Let G = (V, E) be a graph, the complementary graph, denoted as G’ = (V’, E’), is defined as V’ = V; (u, v) E’ iff (u, v) E. (a) Draw the complementary graph of the graph on the right. a b c d e a b c d e Ans: the red edges (b) Let G = (V, E), where |V| = 5, |E| = 8, what is the number of edges in G’? |E’| = 10 – 8 = 2.
5 Graph properties: Degrees By pigeon hole principle, there exist two vertices with the same degree. [ Why? ] For an undirected graph G = (V, E): e.g. sum of degrees = 3+2+5+2 = 12, |E| = 6 Proof: every edge is counted twice in counting degrees. Fact: Any undirected graph has an even number of odd- degree vertices (as the sum of degrees is even) For a directed graph G = (V, E): | E | (v) deg (v) deg V v V v = = + | E | 2 deg(v) V v = z x y u

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Some Special Graphs Cycle graphs C n : K 3 K 4 K 6 C 3 C 4 C 6 Complete graphs K n : edges joining every two vertices |V| = n |E| = C n,2 = n(n-1)/2 Degree = n-1 |V| = n, |E| = n Degree = 2 Diameter = maximum “distance” (length of shortest path) between two vertices Diameter = 1 Diameter = ¬ n/2 ¼
7 Bipartite Graphs A graph is bipartite if the vertices V can be V 1 V 2 partitioned into two disjoint sets V 1 , V 2 such that every edge connects a vertex in V 1 to a vertex in V 2 i.e. no edge within V 1 , no edge within V 2 A complete bipartite graph K m,n is a bipartite graph with all possible edges between a set of m vertices and a set of n vertices. It has mn edges. ¾ e.g. K 3,4 has 12 edges Number of edges in a bipartite graph |V 1 | |V 2 |

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Bipartite Graphs Are these graphs bipartite? A graph is bipartite iff the graph contains no odd cycles. [Proof?] a b c f d e a b c e f d
9 Graph Isomorphism A simple graph G = (V, E) consists of V = the set of vertices E = the set of edges Are these two graphs “the same”? Although they look different, they represent the same adjacency relationships, i.e., set of edges Example: f(a) = x, f(b) = w, f(c) = z, f(d) = y Two graphs G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) are isomorphic if there is a 1-1 correspondence f: V 1 V 2 such that ¾ (u, v) E 1 if and only if (f(u), f(v)) E 2 .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern