Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
2012: J Paul GibsonT&MSP: Mathematical FoundationsMAT7003/L2-GraphsAndTrees.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson,
Graph-02.
Chapter 10: Trees. Definition A tree is a connected undirected acyclic (with no cycle) simple graph A collection of trees is called forest.
CMPS 2433 Discrete Structures Chapter 5 - Trees R. HALVERSON – MIDWESTERN STATE UNIVERSITY.
1 Chapter 10 Trees. Tree Definition 1. A tree is a connected undirected graph with no simple circuits. Theorem 1. An undirected graph is a tree if and.
1 Section 9.1 Introduction to Trees. 2 Tree terminology Tree: a connected, undirected graph that contains no simple circuits –must be a simple graph:
Discrete Mathematics Transparency No. 8-1 Chapter 8 Trees.
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
A tree is a simple graph satisfying: if v and w are vertices and there is a path from v to w, it is a unique simple path. a b c a b c.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE The trees.
GRAPH Learning Outcomes Students should be able to:
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:
Foundations of Discrete Mathematics
Week 12 - Friday.  What did we talk about last time?  Asymptotic notation.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Euler paths and tours.
Tree A connected graph that contains no simple circuits is called a tree. Because a tree cannot have a simple circuit, a tree cannot contain multiple.
CSCI 115 Chapter 7 Trees. CSCI 115 §7.1 Trees §7.1 – Trees TREE –Let T be a relation on a set A. T is a tree if there exists a vertex v 0 in A s.t. there.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Graphs What are Graphs? General meaning in everyday math: A plot or chart of numerical data using a coordinate system. Technical meaning in discrete.
Discrete Structures Trees (Ch. 11)
Chap 8 Trees Def 1: A tree is a connected,undirected, graph with no simple circuits. Ex1. Theorem1: An undirected graph is a tree if and only if there.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Graph Theory and Applications
Discrete Mathematics Chapter 5 Trees.
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Trees Dr. Yasir Ali. A graph is called a tree if, and only if, it is circuit-free and connected. A graph is called a forest if, and only if, it is circuit-free.
Discrete Structures CISC 2315 FALL 2010 Graphs & Trees.
CHAPTER 11 TREES INTRODUCTION TO TREES ► A tree is a connected undirected graph with no simple circuit. ► An undirected graph is a tree if and only.
Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 9 Trees.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Paths and circuits.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Week 11 - Friday.  What did we talk about last time?  Paths and circuits  Matrix representation of graphs.
Discrete Mathematics Chapter 10 Trees.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Code: BCA302 Data Structures with C Prof. (Dr.) Monalisa Banerjee By.
Applied Discrete Mathematics Week 15: Trees
Graphs: Definitions and Basic Properties
Graph Graphs and graph theory can be used to model:
Chapter 5 : Trees.
Discrete Mathematicsq
Graph theory Definitions Trees, cycles, directed graphs.
Agenda Lecture Content: Introduction to Graph Path and Cycle
12. Graphs and Trees 2 Summary
Introduction to Trees Section 11.1.
Advanced Algorithms Analysis and Design
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Can you draw this picture without lifting up your pen/pencil?
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
And the Final Subject is…
Graphs G = (V, E) V are the vertices; E are the edges.
Applied Discrete Mathematics Week 13: Graphs
Presentation transcript:

Discrete Mathematics Lecture 9 Alexander Bukharovich New York University

Graphs Graph consists of two sets: set V of vertices and set E of edges. Terminology: endpoints of the edge, loop edges, parallel edges, adjacent vertices, isolated vertex, subgraph, bridge edge Directed graph (digraph) has each edge as an ordered pair of vertices

Special Graphs Simple graph is a graph without loop or parallel edges A complete graph of n vertices K n is a simple graph which has an edge between each pair of vertices A complete bipartite graph of (n, m) vertices K n,m is a simple graph consisting of vertices, v 1, v 2, …, v m and w 1, w 2, …, w n with the following properties: –There is an edge from each vertex v i to each vertex w j –There is no edge from any vertex v i to any vertex v j –There is no edge from any vertex w i to any vertex w j

The Concept of Degree The degree of a vertex deg(v) is a number of edges that have vertex v as an endpoint. Loop edge gives vertex a degree of 2 In any graph the sum of degrees of all vertices equals twice the number of edges The total degree of a graph is even In any graph there are even number of vertices of odd degree

Exercises Two jugs have capacities of of 3 and 5 gallons. Can you use these jugs to measure out exactly one gallon? Bipartite graphs Complement of a graph What is the relationship between the number of edges between a graph and its complement Can there be a simple graph that has vertices each of different degree? In a group of two or more people, must there be at least two people who are acquainted with the same number of people?

Paths and Circuits A walk in a graph is an alternating sequence of adjacent vertices and edges A path is a walk that does not contain a repeated edge Simple path is a path that does not contain a repeated vertex A closed walk is a walk that starts and ends at the same vertex A circuit is a closed walk that does not contain a repeated edge A simple circuit is a circuit which does not have a repeated vertex except for the first and last

Connectedness Two vertices of a graph are connected when there is a walk between two of them. The graph is called connected when any pair of its vertices is connected If graph is connected, then any two vertices can be connected by a simple path If two vertices are part of a circuit and one edge is removed from the circuit then there still exists a path between these two vertices Graph H is called a connected component of graph G when H is a subgraph of G, H is connected and H is not a subgraph of any bigger connected graph Any graph is a union of connected components

Euler Circuit Euler circuit is a circuit that contains every vertex and every edge of a graph. Every edge is traversed exactly once. If a graph has Euler circuit then every vertex has even degree. If some vertex of a graph has odd degree then the graph does not have an Euler circuit If every vertex of a graph has even degree and the graph is connected then the graph has an Euler circuit A Euler path is a path between two vertices that contains all vertices and traverces all edge exactly ones There is an Euler path between two vertices v and w iff vertices v and w have odd degrees and all other vertices have even degrees

Hamiltonian Circuit Hamiltonian circuit is a simple circuit that contains all vertices of the graph (and each exactly once) Traveling salesperson problem

Exercises For what values of m and n, does the complete bipartite graph of (m, n) vertices have an Euler circuit, a Hamiltonian circuit? What is the maximum number of edges a simple disconnected graph with n vertices can have? Show that a graph is bipartite iff it does not have a circuit with an odd number of edges

Matrix Representation of a Graph Adjacency matrix Undirected graphs and symmetric matrices Number of walks of a particular length between two vertices

Isomorphism of Graphs Two graphs G = (V, E) and G’ = (V’, E’) are called isomorphic when there exist two bijective functions g : V  V’ and h : E  E’ so that if v is an endpoint of e iff g(v) is an endpoint of h(e) Property P is called an isomorphic invariant when given any two isomorphic graphs G and G’, G has property P, then G’ has property P as well The following properties are isomorphic invariants: –Number of vertices, number of edges –Number of vertices of a particular degree –Connectedness –Possession of a circuit of a particular length –Possession of Euler circuit, Hamiltonian circuit22222

Trees Connected graph without circuits is called a tree Graph is called a forest when it does not have circuits A vertex of degree 1 is called a terminal vertex or a leaf, the other vertices are called internal nodes Decision tree Syntactic derivation tree Any tree with more than one vertex has at least one vertex of degree 1 Any tree with n vertices has n – 1 edges If a connected graph with n vertices has n – 1 edges, then it is a tree

Rooted Trees Rooted tree is a tree in which one vertex is distinguished and called a root Level of a vertex is the number of edges between the vertex and the root The height of a rooted tree is the maximum level of any vertex Children, siblings and parent vertices in a rooted tree Ancestor, descendant relationship between vertices

Binary Trees Binary tree is a rooted tree where each internal vertex has at most two children: left and right. Left and right subtrees Full binary tree Representation of algebraic expressions If T is a full binary tree with k internal vertices then T has a total of 2k + 1 vertices and k + 1 of them are leaves Any binary tree with t leaves and height h satisfies the following inequality: t  2 h

Spanning Trees A subgraph T of a graph G is called a spanning tree when T is a tree and contains all vertices of G Every connected graph has a spanning tree Any two spanning trees have the same number of edges A weighted graph is a graph in which each edge has an associated real number weight A minimal spanning tree (MST) is a spanning tree with the least total weight of its edges

Finding Minimal Spanning Tree Kruskal’s algorithm Prim’s algorithm

Exercises If all edges in a graph have different weights, does this graph have a unique MST?