CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Lecture 15. Graph Algorithms
§5 Minimum Spanning Tree 【 Definition 】 A spanning tree of a graph G is a tree which consists of V( G ) and a subset of E( G ) 〖 Example 〗 A complete.
Analysis of Algorithms CS 477/677
Chapter 9 Graphs.
Graph-02.
 期中测验时间:本周五上午 9 : 40  教师 TA 答疑时间 : 周三晚上 6 : 00—8 : 30  地点:软件楼 315 房间,  教师 TA :李弋老师  开卷考试.
TECH Computer Science Graphs and Graph Traversals  // From Tree to Graph  // Many programs can be cast as problems on graph Definitions and Representations.
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.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
Chapter 4 Graphs.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
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,
CSC 213 – Large Scale Programming. Today’s Goals  Make Britney sad through my color choices  Revisit issue of graph terminology and usage  Subgraphs,
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
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.
1 CS104 : Discrete Structures Chapter V Graph Theory.
The Tutte Polynomial Graph Polynomials winter 05/06.
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.
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.
COSC 2007 Data Structures II Chapter 14 Graphs I.
September1999 CMSC 203 / 0201 Fall 2002 Week #13 – 18/20/22 November 2002 Prof. Marie desJardins.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.
Depth-First Search Lecture 21: Graph Traversals
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Graphs Upon completion you will be able to:
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
Graphs. Contents Terminology Graphs as ADTs Applications of Graphs.
Chapter 9: Graphs.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Strongly Connected Components for Directed Graphs Kelley Louie Credits: graphs by /demo/graphwin/graphwin.
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.
Graph Concepts Elif Tosun 252a-aa (All graphics created by using demo/graphwin/gw*)
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
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.
Graph Concepts Illustrated Using The Leda Library Amanuel Lemma CS252 Algorithms.
Graph Representations And Traversals. Graphs Graph : – Set of Vertices (Nodes) – Set of Edges connecting vertices (u, v) : edge connecting Origin: u Destination:
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Graph Terms By Susan Ott. Vertices Here are 7 vertices without any edges Each Vertex is labeled a different color and number.
CSC 213 – Large Scale Programming Lecture 31: Graph Traversals.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
CSC 252 Pallavi Moorthy Homework 5. 1.) Vertices, edges From cd../../handout/demo/graph_alg/gw_shortest_path.
CSE 373, Copyright S. Tanimoto, 2001 Graphs 1 -
Spanning Trees Discrete Mathematics.
Connected Components Minimum Spanning Tree
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graphs Chapter 13.
CSE 373, Copyright S. Tanimoto, 2002 Graphs 1 -
Maximum Flows of Minimum Cost
Trees L Al-zaid Math1101.
Richard Anderson Autumn 2016 Lecture 5
10.1 Graphs and Graph Models
Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin.
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
Chapter 14 Graphs © 2006 Pearson Addison-Wesley. All rights reserved.
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Euler and Hamilton Paths
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Richard Anderson Lecture 5 Graph Theory
Richard Anderson Winter 2019 Lecture 5
GRAPHS.
Presentation transcript:

CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented in class. -LEDA was used to draw the graphs and SnagIt was used to obtain the gifs.

Vertices and Edges. Vertices are the blue circles, edges are the lines connecting the vertices. Credit: demo/graph_alg/gw_basic_graph_algorithms

Multiple Edges and Loops. Multiple edges are more than one edge between two vertices. Loops are edges starting and ending at the same vertex. Credit: demo/graph_alg/gw_basic_graph_algorithms

Undirected Graph. Edges between vertices are not directed (do not have arrows). Credit: demo/graph_alg/gw_scc

Directed Graph. Edges between vertices are directed (do have arrows). Credit: demo/graph_alg/gw_scc

Simple Graph. A simple graph has no loops and no multiple edges. Credit: demo/graph_alg/gw_scc

An example of a graph. Credit: demo/graphwin/graphwin

Another example of a graph. Credit: demo/graphwin/graphwin

An example of a multigraph. A multigraph has some vertices such that more more than one edge connects the same two vertices. Credit: demo/graphwin/graphwin

Another example of a multigraph. A multigraph has some vertices such that more than one edge connects the same two vertices. Credit: demo/graphwin/graphwin

Complete Graph. A graph which has an edge between every vertex and every other vertex. Credit: demo/graph_alg/gw_scc

Bipartite Graph. A graph which can have its vertices divided into two classes and there are no edges between vertices in the same class. Credit: demo/graph_alg/gw_scc

Path in an undirected graph. There is a path from a vertice x to a vertice y in an undirected graph if it is possible to get from x to y by traversing edges and vertices. For example, in this graph there is a path from vertex 1 to vertex 5. Credit: demo/graphwin/graphwin

Path in a directed graph. There is a path from a vertex x to a vertex y in a directed graph if it is possible to get from x to y by traversing vertices and directed edges. To go from a vertex i to a vertex j joined by a directed edge, the arrow on the edge must point from i to j. For example, in this graph there is no path from vertex 1 to vertex 5 but there is a path from vertex 2 to vertex 5. Credit: demo/graphwin/graphwin

Hamilton path in an undirected graph. A Hamilton path is a path that goes through every vertex of the graph. There is a Hamilton path in this graph from vertex 0 to vertex 4. Credit: demo/graphwin/graphwin

Hamilton path in a directed graph. A Hamilton path is a path that goes through every vertex of the graph. In a directed graph, the Hamilton path must also go through every vertex on edges pointing in the proper direction. There is a Hamilton path starting at vertex 0 and ending at vertex 4 in this graph. Credit: demo/graphwin/graphwin

Cycle in an undirected graph. A cycle occurs when it is possible to start at a vertex and return to that vertex by traversing edges, with each edge being traversed exactly once. There is a cycle in this graph starting at vertex 0, going through vertices 1, 2, 3, and 6, and then returning to 0. Credit: demo/graphwin/graphwin

Cycle in a directed graph. A cycle occurs when it is possible to start at a vertex and return to that vertex by traversing edges pointing in the proper direction, with each edge being traversed exactly once. There is a cycle in this graph starting at vertex 0, going through vertices 1, 2, 3, and 6, and then returning to 0. Credit: demo/graphwin/graphwin

Hamilton cycle in an undirected graph. A Hamilton cycle occurs when it is possible to start at a vertex and cover all of the other vertices in the graph, finally returning to the original vertex. In this graph there is a Hamilton cycle starting at vertex 0 and going through vertices 1, 2, 3, 4, 5, and 6, and then returning to vertex 0. Credit: demo/graphwin/graphwin

Hamilton cycle in a directed graph. A Hamilton cycle in a directed graph occurs when it is possible to start at a vertex and cover all of the other vertices in the graph, traversing edges pointing in the proper direction, and finally returning to the original vertex. In this digraph there is a Hamilton cycle starting at vertex 0 and going through vertices 1, 2, 3, 4, 5, and 6, and then returning to vertex 0. Credit: demo/graphwin/graphwin

Cyclic graph. A graph with cycles is cyclic. In this graph there is a cycle formed the edges connecting vertices 3, 4, 5, and 6. Credit: demo/graphwin/graphwin

Acyclic graph. A graph with no cycles is acyclic. There is no cycle in this graph. Credit: demo/graphwin/graphwin

The decomposition of a digraph into strongly connected components. Strongly connected components of a digraph are those subgraphs in which there is a directed path between any pair of vertices in each subgraph and it is not possible to add any vertices from outside the subgraph while still maintaining this property. The strongly connected components are those vertices that are the same color and have same number along with their corresponding edges. Credit: demo/graph_alg/gw_scc

An undirected tree. An undirected tree is a connected graph with no cycles that contains n-1 edges where n is the number of vertices. Credit: demo/graphwin/graphwin

Forest. A forest is a graph composed only of unconnected trees. Credit: demo/graphwin/graphwin