22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Discrete Mathematics 6. GRAPHS Lecture 10 Dr.-Ing. Erwin Sitompul
Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
Lecture 21 Paths and Circuits CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
Applied Discrete Mathematics Week 12: Trees
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
Introduction to Graphs
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
EECS 203: It’s the end of the class and I feel fine. Graphs.
CS 2210(22C:19) Discrete Math Graphs
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,
Graph Theory Topics to be covered:
Graphs Rosen, Chapter 8. Isomorphism (Rosen 560 to 563) Are two graphs G1 and G2 of equal form? That is, could I rename the vertices of G1 such that the.
2003 ICTM Contest Division A Orals Topic: Graph Theory
1 CS104 : Discrete Structures Chapter V Graph Theory.
CS 200 Algorithms and Data Structures
Mathematics of Networks (Cont)
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Data Structures & Algorithms Graphs
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Basic Notions on Graphs. The House-and-Utilities Problem.
Graphs 1 Definition 2 Terminology 3 Properties 4 Internal representation Adjacency list Adjacency matrix 5 Exploration algorithms 6 Other algorithms.
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.
1 Graphs Theory UNIT IV. 2Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
An Introduction to Graph Theory
Discrete Mathematical Structures: Theory and Applications
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Graph Theory and Applications
Graphs and 2-Way Bounding Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 /File:7_bridgesID.png.
Introduction to Graph Theory
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Graph Theory Unit: 4.
Chapter 9: Graphs.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Graph Theory Graph Theory - History Leonhard Euler's paper on “Seven Bridges of Königsberg”, published in 1736.
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
(CSC 102) Lecture 30 Discrete Structures. Graphs.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
An Introduction to Graph Theory
Homework 8 Graph G is given by the figure below.
EECS 203 Lecture 19 Graphs.
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
EECS 203 Lecture 20 More Graphs.
Discrete Maths 9. Graphs Objective
Graph.
Graphs Chapter 13.
Discrete Math II Howon Kim
Connectivity Section 10.4.
Decision Maths Graphs.
Introduction to Graph Theory
Presentation transcript:

22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh

Seven Bridges of K ⍥ nigsberg Is it possible to walk along a route that cross each bridge exactly once?

Seven Bridges of K ⍥ nigsberg

A Graph

What is a Graph A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge connects a pair of nodes that are called its endpoints. Graphs are widely used to model various systems in the real world

Back to the Bridges of K ⍥ nigsberg

Euler’s solution

Euler path

Simple graph

Types of graph

Definitions Simple graphs vs. multi-graphs Undirected vs. directed graphs (digraphs) Multiple edges between some pair of nodes At most one edge between a pair of nodes Each edge between a pair (u, v) of nodes is directed, and represents an ordered pair

More examples of graphs Web graphs Each node denotes an actor or an actress, and each edge between P and Q denotes that P, Q worked together in some movie. It is an undirected graph Each node denotes a web page, and each edge from page P to Q Q denotes a link on page P pointing to page Q. It is a directed graph Each node denotes a web page, and each edge from page P to Q Q denotes a link on page P pointing to page Q. It is a directed graph Hollywood graph

Application: Exam scheduling Why?

Problems in a computer network

Application: graph orientation

Vertex degree

Degree sequence

Handshaking theorem

A theorem THEOREM. An undirected graph has even number of vertices of odd degree. Can you prove this? It should follow from the handshaking theorem.

Review of basic definitions

Types of graphs A cycle of a graph is a subset of its edge set that forms a path such that the first node of the path corresponds to the last.

Types of graphs Complete graph: All vertices are adjacent Wheel graph The n-cube graph n=3

Types of graphs Bipartite graph A simple graph is called bipartite if its vertex set V can be partitioned into two disjoint subsets V1 and V2, such that every edge in the graph connects a vertex in V1 to a vertex in V2. Can always be colored using two colors.

Subgraphs

Computer representation of graphs (taken from Wolfram Mathworld) ADJACENCY MATRIX

Computer representation of graphs ADJACENCY LIST VertexAdjacent to , 4 1, 2 Can be represented as a linked list

Graph isomorphism Taken from MIT 6.042J/18.062J

Graph isomorphism Taken from MIT 6.042J/18.062J

Graph isomorphism Taken from MIT 6.042J/18.062J

Connectivity  An undirected graph is connected if there is a path between every pair of distinct vertices of the graph.  A connected component is the maximal connected subgraph of the given graph.

Connectivity issues  Erdös number in academic collaboration graph Erdös number = n means the person collaborated with someone whose Erdös number is (n-1)  Kevin Bacon number in Hollywood graph Actor Kevin Bacon once remarked that he worked with everybody in Hollywood, or someone who worked with them. Kevin Bacon number is an adaptation of Erdös number in Hollywood movie industry.

Cut vertex, cut set, cut edge A cut vertex (or articulation point ) is a vertex, by removing which one can partition the graph. If multiple vertices need to be remove to partition the graph, then the minimal set of such edges a cut set. Examples taken from Wikipedia

Connectivity in directed graphs A directed graph is strongly connected if there is a path from any vertex a to any other vertex b of the graph. A directed graph is weakly connected if there is a path between any two vertices of the underlying undirected graph. Strongly or weakly connected ?

More definitions Vertex cover is a famous problem in graph theory

Vertex Cover Minimal or minimum vertex cover is a famous problem in graph theory A vertex-cover of an undirected graph G=(V,E) is a subset V’ of V such that if edge (u, v) is an edge of G, then u is in V, or v is in V, or both. The set V′ is said to "cover" the edges of G

Dominating Set Computing a minimal or minimum dominating set is a famous problem in graph theory A dominating set for a graph G = (V, E) is a subset D of V such thatgraphsubset every vertex not in D is adjacent to at least one member of D. (from Wikipedia)

Independent Set Computing the maximal independent set is a well-known problem in graph theory Given a graph G = (V, E) an independent set is a subset of verticesgraphsubset no two of which are adjacent to one another. (from Wikipedia)

Euler path vs. Hamiltonian path Hamiltonian path = A path that passes through every vertex exactly once. A closed path is a Hamiltonian circuit or cycle. Euler path = A path that includes every edge exactly once. A closed path is a Euler circuit or cycle. We have reviewed Euler path in the 7-bridges of Konigsberg Problem.

Hamiltonian path Does the above graph have a Hamiltonian cycle? No! Hamiltonian circuit/cycle colored red

Shortest path Weighted graph. Compute the shortest path from a to z

Shortest path: Dijkstra’s algorithm Read the algorithm from page 712 of your text book

Shortest path: Dijkstra’s algorithm

L (source) = 0, and for all other node u, L(u) := infinity, S:= null while z is not in S u := a vertex not in S with L(u) minimal; S := S ∪ {u}; for all vertices v not in S if L(u) + w(u, v) < L(v) then L(v) := L(u) + w(u, v) {known as relaxation: this adds a vertex with minimal label to S and updates the labels of vertices not in S} return L(z) Computes the shortest path from a source node to each target node

Traveling Salesman Problem (TSP) A traveling salesman wants to visit each of n cities exactly once, and then return to the starting point. In which order should he visit the cities to travel the minimum total distance? TSP = Computing the minimum cost Hamiltonian circuit. TSP is an extremely hard problem to solve (NP-complete) An optimal TSP tour through Germany’s largest cities (Source: Wikipedia)

Planar Graph A planar graph is one that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges do not intersect except only at their endpoints. K4K4 K5K5 K 3,3 Butterfly Non-planar planar Non-planar

Planar Graph How to verify that a graph is a planar graph? It should not depend upon how you draw the graph. Any graph that contains a K 5 or K 3,3 as its sub-graph is not planar

Graph Coloring Let G be a graph, and C be a set of colors. Graph coloring finds an assignment of colors to the different nodes of G, so that no two adjacent nodes have the same color. The problem becomes challenging when the |C| is small. Chromatic number. The smallest number of colors needs to color a graph is called its chromatic number.

Graph Coloring The chromatic number of a tree is 2.

Graph Coloring What are the chromatic numbers of these two graphs?

Theorem. Any planar graph can be colored using at most four colors. Four color theorem It all started with map coloring – bordering states or counties must be colored with different colors. In 1852, an ex-student of De Morgan, Francis Guthrie, noticed that the counties in England could be colored using four colors so that no adjacent counties were assigned the same color. On this evidence, he conjectured the four-color theorem. It took nearly 124 years to find a proof. It was presented by Andrew Appel and Wolfgang Haken.