Trees.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Simple Graph Warmup. Cycles in Simple Graphs A cycle in a simple graph is a sequence of vertices v 0, …, v n for some n>0, where v 0, ….v n-1 are distinct,
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
Graph II MST, Shortest Path. Graph Terminology Node (vertex) Edge (arc) Directed graph, undirected graph Degree, in-degree, out-degree Subgraph Simple.
Sub Graph Listing محمد مهدی طالبی دانشگاه صنعتی امیرکبیر.
Chapter 2 Trees and Distance 2.1 Basic properties
Graph. Undirected Graph Directed Graph Simple Graph.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
Section 3.1 Properties of Trees Sarah Graham. Tree Talk: Vocabulary oTree: a tree is a special type of graph that contains designated vertex called a.
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
Graphs and Trees This handout: Trees Minimum Spanning Tree Problem.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Graph Theory Ch. 2. Trees and Distance 1 Chapter 2 Trees and Distance 2.1 Basic properties 2.2 Spanning tree and enumeration 2.3 Optimization and trees.
MCA 520: Graph Theory Instructor Neelima Gupta
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
5.4 Shortest-path problem  Let G=(V,E,w) be a weighted connected simple graph, w is a function from edges set E to position real numbers set. We denoted.
Lecture 13 Graphs. Introduction to Graphs Examples of Graphs – Airline Route Map What is the fastest way to get from Pittsburgh to St Louis? What is the.
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
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.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Boundary vertices in graphs Discrete Mathematics 263 (2003) Gary Chartrand, David Erwin Garry L. Johns, Ping Zhang.
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
Introduction to Graph Theory
Partitioning the Labeled Spanning Trees of an Arbitrary Graph into Isomorphism Classes Austin Mohr.
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.
Introduction to Graph Theory
Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Hamiltonian Cycles Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
Trees Thm 2.1. (Cayley 1889) There are nn-2 different labeled trees
Graphs Lecture 2. Graphs (1) An undirected graph is a triple (V, E, Y), where V and E are finite sets and Y:E g{X V :| X |=2}. A directed graph or digraph.
Copyright (c) by Daphne Liu and Melanie Xie Radio Numbers for Square Paths & Cycles Daphne Liu & Melanie Xie California State University, Los Angeles Department.
Graph Concepts and Algorithms Using LEDA By Caroline Moore and Carmen Frerichs (252a-at and 252a-ao) each graph in the presentation was created using gw_basic_graph_algorithms.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Trees Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT
1) Find and label the degree of each vertex in the graph.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
MCA 520: Graph Theory Instructor Neelima Gupta
Spanning Trees Alyce Brady CS 510: Computer Algorithms.
Trees.
Subgraphs Lecture 4.
Introduction to the Design and Analysis of Algorithms
Prüfer code algorithm Algorithm (Prüfer code)
Proof technique (pigeonhole principle)
Minimum Spanning Tree Chapter 13.6.
Discrete Mathematicsq
Graph theory Definitions Trees, cycles, directed graphs.
12. Graphs and Trees 2 Summary
Spanning Trees Discrete Mathematics.
Minimum-Cost Spanning Tree
EMIS 8373: Integer Programming
Connected Components Minimum Spanning Tree
Graphs, Trees and Algorithms 1
Discrete Mathematics and its Applications Lecture 1 – Graph Theory
Md. Abul Kashem, Chowdhury Sharif Hasan, and Anupam Bhattacharjee
Miniconference on the Mathematics of Computation
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
Chapter 2 Trees and Distance 2.1 Basic properties
Hamiltonian Cycles.
Proof Techniques.
Graphs G = (V, E) V are the vertices; E are the edges.
Miniconference on the Mathematics of Computation
Simple Graphs: Connectedness, Trees
Discrete Mathematics for Computer Science
Graph Theory: Cuts and Connectivity
Graph Theory: Euler Graphs and Digraphs
Concepts of Computation
Minimum-Cost Spanning Tree
Presentation transcript:

Trees

Trees and Spanning Trees A graph having no cycles is acyclic. A forest is an acyclic graph. A leaf is a vertex of degree 1. A spanning sub-graph of G is a sub-graph with vertex set V(G). A spanning tree is a spanning sub-graph that is a tree.

Distances If G has a u,v-path, then the distance from u to v, written dG(u,v) or simply d(u,v), is the least length of a u,v-path. If G has no such path, then d(u,v) = 

Tree: Characterization An n-vertex graph G (with n  1) is a tree iff: G is connected and has no cycles G is connected and has n1 edges G has n1 edges and no cycles For u,v  V(G), G has exactly one u,v-path

Some results … Every tree with at least two vertices has at least two leaves. Deleting a leaf from a tree with n vertices produces a tree with n-1 vertices. If T is a tree with k edges and G is a simple graph with (G)  k, then T is a sub-graph of G.

Some results … If T and T are two spanning trees of a connected graph G and e  E(T)  E(T), then there is an edge e  E(T)  E(T) such that T  e + e is a spanning tree of G.

Diameter and Radius The eccentricity of a vertex u, written (u), is the maximum of its distances to other vertices. In a graph G, the diameter, diamG, and the radius, radG, are the maximum and minimum of the vertex eccentricities respectively. The center of G is the subgraph induced by the vertices of minimum eccentricity.

Counting Trees There are nn2 trees with vertex set [n].

Prüfer Code / Sequence Algorithm: Production of f(T) = {a1, …, an-2} Input: A tree T with vertex set S  . Iteration: At the ith step, delete the least remaining leaf, and let ai be the neighbor of this leaf.