(CSC 102) Lecture 28 Discrete Structures. Graphs.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
Discrete Mathematics and Its Applications
Introduction This chapter explores graphs and their applications in computer science This chapter explores graphs and their applications in computer science.
1 Section 8.2 Graph Terminology. 2 Terms related to undirected graphs Adjacent: 2 vertices u & v in an undirected graph G are adjacent (neighbors) in.
Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department.
Applied Discrete Mathematics Week 12: Trees
Problem: Induced Planar Graphs Tim Hayes Mentor: Dr. Fiorini.
Chapter 4 Graphs.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
1 Graphs Chapters 9.1 and 9.2 University of Maryland Chapters 9.1 and 9.2 Based on slides by Y. Peng University of Maryland.
Copyright © Cengage Learning. All rights reserved. CHAPTER 10 GRAPHS AND TREES.
(CSC 102) Lecture 29 Discrete Structures. Graphs.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
1 Topics Intro. to Graphs (11.1) A B C D EF G. 2 Definition (p.650) A graph G = V(G) + E(G) A set of vertices (or nodes), V(G) = {v 1, v 2, …, v n } A.
aka “Undirected Graphs”
Chapter 6 Graph Theory R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001.
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Basic Notions on Graphs. The House-and-Utilities Problem.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Unit 5 Graphs & Trees 1 IT Discipline ITD1111 Discrete Mathematics & Statistics STDTLP Unit 5 Discrete Mathematics and Statistics Graphs and Trees.
Vocabulary and Representations of Graphs. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
An Introduction to Graph Theory
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Graphs Basic properties.
1 Graphs Terminology By: Sandeep Tuli Astt. Prof. CSE.
Chapter 9: Graphs.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.1 Graphs, Paths, and Circuits.
(CSC 102) Lecture 30 Discrete Structures. Graphs.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Week 10 - Wednesday.  What did we talk about last time?  Counting practice  Pigeonhole principle.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
MAT 2720 Discrete Mathematics Section 8.1 Introduction
1 Graphs Chapters 10.1 and 10.2 University of Maryland Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
CSC 252 Pallavi Moorthy Homework 5. 1.) Vertices, edges From cd../../handout/demo/graph_alg/gw_shortest_path.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Applied Discrete Mathematics Week 13: Graphs
Graphs: Definitions and Basic Properties
Applied Discrete Mathematics Week 13: Graphs
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
Chapter 5 Fundamental Concept
Graph theory Definitions Trees, cycles, directed graphs.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Graphs Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Graphs, Trees and Algorithms 1
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
CS100: Discrete structures
10.1 Graphs and Graph Models
Graph Theory What is a graph?.
Discrete Mathematics Lecture 12: Graph Theory
Let us switch to a new topic:
Copyright © Cengage Learning. All rights reserved.
Graphs G = (V, E) V are the vertices; E are the edges.
Section 14.1 Graphs, Paths, and Circuits
CHAPTER 15 Graph Theory.
Graphs, Paths, and Circuits
Introduction to Graph Theory
Graphs: An Introduction
Presentation transcript:

(CSC 102) Lecture 28 Discrete Structures

Graphs

Previous Lecture  Counting Elements of Disjoint Sets  Counting the Number of Integers  Relation between Permutations and Combinations  Probability  Axioms of Probability  Expected Value

Today’s Lecture  Graphs  Directed Graphs  Simple Graphs  Complete Graphs  Complete Bipartite Graphs  Subgraphs  The Concept of Degree

Graphs Imagine an organization that wants to set up teams of three to work on some projects. In order to maximize the number of people on each team who had previous experience working together successfully, the director asked the members to provide names of their past partners. This information is displayed below both in a table and in a diagram.

Cont…

Drawings such as those shown previously are illustrations of a structure known as a graph. The dots are called vertices (plural of vertex) and the line segments joining vertices are called edges. As you can see from the drawing, it is possible for two edges to cross at a point that is not a vertex. Cont…

In general, a graph consists of a set of vertices and a set of edges connecting various pairs of vertices. The edges may be straight or curved and should either connect one vertex to another or a vertex to itself, as shown below. Cont…

In this drawing, the vertices have been labeled with v’s and the edges with e’s. When an edge connects a vertex to itself (as e 5 does), it is called a loop. When two edges connect the same pair of vertices (as e 2 and e 3 do), they are said to be parallel. It is quite possible for a vertex to be unconnected by an edge to any other vertex in the graph (as v 5 is), and in that case the vertex is said to be isolated. Cont…

Definition: Graphs A graph G consists of two finite sets: a nonempty set V(G) of vertices and a set E(G) of edges, where each edge is associated with a set consisting of either one or two vertices called its endpoints. The correspondence from edges to endpoints is called the edge-endpoint function. An edge with just one endpoint is called a loop, and two or more distinct edges with the same set of endpoints are said to be parallel. An edge is said to connect its endpoints; two vertices that are connected by an edge are called adjacent; and a vertex that is an endpoint of a loop is said to be adjacent to itself. An edge is said to be incident on each of its endpoints, and two edges incident on the same endpoint are called adjacent. A vertex on which no edges are incident is called isolated.

Graphs: Examples Example: Consider the following graph: a.Write the vertex set and the edge set, and give a table showing the edge-endpoint function. b. Find all edges that are incident on v 1, all vertices that are adjacent to v 1, all edges that are adjacent to e 1, all loops, all parallel edges, all vertices that are adjacent to themselves, and all isolated vertices.

Graphs: Examples (Contd….) a. vertex set = {v 1, v 2, v 3, v 4, v 5, v 6 } edge set = {e 1, e 2, e 3, e 4, e 5, e 6, e 7 } Edge-endpoint function b. e 1, e 2, and e 3 are incident on v 1, v 2 and v 3 are adjacent to v 1. e 2, e 3, and e 4 are adjacent to e 1. e 6 and e 7 are loops. e 2 and e 3 are parallel. v 5 and v 6 are adjacent to themselves. v 4 is an isolated vertex.

Drawing More Than One Picture for a Graph Consider the graph specified as follows: vertex set = {v 1, v 2, v 3, v 4 } edge set = {e 1, e 2, e 3, e 4 } Edge-endpoint function

Labeling Drawings to Show They Represent the Same Graph Consider the two drawings shown in Figure. Label vertices and edges in such a way that both drawings represent the same graph.

Both drawings are representations of the graph with vertex set {v 1, v 2, v 3, v 4, v 5 }, edge set {e 1, e 2, e 3, e 4, e 5 }, and edge-endpoint function as follows: Labeling Drawings to Show They Represent the Same Graph

Directed Graphs

Directed Graphs: Examples of Graphs Using a Graph to Represent Knowledge What paper finish does the New York Times use?

Using a Graph to Represent Knowledge The following is a variation of a famous puzzle often used as an example in the study of artificial intelligence. It concerns an island on which all the people are of one of two types, either vegetarians or cannibals. Initially, two vegetarians and two cannibals are on the left bank of a river. With them is a boat that can hold a maximum of two people. The aim of the puzzle is to find a way to transport all the vegetarians and cannibals to the right bank of the river. What makes this difficult is that at no time can the number of cannibals on either bank outnumber the number of vegetarians. Otherwise, disaster befalls the vegetarians! Using a Graph to Solve a Problem: Vegetarians and Cannibals

Simple Graphs Example Draw all simple graphs with the four vertices {u, v, w, x} and two edges, one of which is {u, v}. Each possible edge of a simple graph corresponds to a subset of two vertices. Given four vertices, there are 4 C 2 = 6 such subsets in all: {u, v}, {u,w}, {u, x}, {v,w}, {v, x}, and {w, x}. Now one edge of the graph is specified to be {u, v}, so any of the remaining five from this list can be chosen to be the second edge. The possibilities are shown on the next page.

Simple Graphs

Complete Graphs Example Complete Graphs on n Vertices: K 1, K 2, K 3, K 4, K 5 The complete graphs K 1, K 2, K 3, K 4, and K 5 can be drawn as follows:

Complete Graphs Example Complete Graphs on n Vertices: K 1, K 2, K 3, K 4, K 5 The complete graphs K 1, K 2, K 3, K 4, and K 5 can be drawn as follows:

Complete Bipartite Graphs

Complete Bipartite Graphs: K 3,2 and K 3,3

SubGraphs Example

SubGraphs

The Concept of Degree

Degree of a Vertex and Total Degree of a Graph Find the degree of each vertex of the graph G shown below. Then find the total degree of G. The Concept of Degree

Lecture Summary  Graphs  Directed Graphs  Simple Graphs  Complete Graphs  Complete Bipartite Graphs  Subgraphs  The Concept of Degree