Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.

Slides:



Advertisements
Similar presentations
Chapter 9 Graphs.
Advertisements

Graph II MST, Shortest Path. Graph Terminology Node (vertex) Edge (arc) Directed graph, undirected graph Degree, in-degree, out-degree Subgraph Simple.
1 Representing Graphs. 2 Adjacency Matrix Suppose we have a graph G with n nodes. The adjacency matrix is the n x n matrix A=[a ij ] with: a ij = 1 if.
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.
Introduction to Graphs
1 Graph Introduction Definitions. 2 Definitions I zDirected Graph (or Di-Graph) is an ordered pair G=(V,E) such that yV is a finite, non-empty set (of.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects two different vertices. Edges are.
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,
Selected Topics in Data Networking Graph Representation.
Chapter 4 Graphs.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
ALG0183 Algorithms & Data Structures Lecture 18 The basics of graphs. 8/25/20091 ALG0183 Algorithms & Data Structures by Dr Andy Brooks.
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,
GRAPH THEORY.  A graph is a collection of vertices and edges.  An edge is a connection between two vertices (or nodes).  One can draw a graph by marking.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Foundations of Discrete Mathematics
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
Graphs. What is a graph? A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other The set of.
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.
9.1 Introduction to Graphs
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
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.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Graphs Upon completion you will be able to:
Chapter Graphs and Graph Models
Chapter 9: Graphs.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
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 05 Introduction to Graph And Search Algorithms.
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:
CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
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.
Spanning Trees Alyce Brady CS 510: Computer Algorithms.
1 Data Structures and Algorithms Graphs. 2 Graphs Basic Definitions Paths and Cycles Connectivity Other Properties Representation Examples of Graph Algorithms:
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.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Graphs: Definitions and Basic Properties
Basic Concepts Graphs For more notes and topics visit:
Graph Graphs and graph theory can be used to model:
Grade 11 AP Mathematics Graph Theory
Graph theory Definitions Trees, cycles, directed graphs.
Graphs and Graph Models
CS120 Graphs.
Spanning Trees Discrete Mathematics.
Connected Components Minimum Spanning Tree
Graphs Chapter 13.
Maximum Flows of Minimum Cost
Graphs Chapter 11 Objectives Upon completion you will be able to:
Trees L Al-zaid Math1101.
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.
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Introduction to Graph Theory
Presentation transcript:

Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms

Vertices and Edges The circles are vertices. The lines in between the vertices are called edges. Vertices do not have to be connected to one another in order to be part of a graph. Edges do not have to connect two or more vertices. In fact, they may be redirected to one vertex thereby creating a loop.

Multiple Edges Multiple edges occur when there is more that one edge between two nodes. This illustration shows two edges between two of the graph’s nodes.

Loops A loop is when a vertex has an edge going to itself. The node on the far upper left has a loop coming from itself.

Undirected Graph An undirected graph is one in which the edges have no one specific direction in which they are reaching. (no arrows pointing to a specific direction on the edges).

Directed Graph (Digraph) A directed graph, on the other hand, does have specific directions of travel shown on each edge. (these directions are depicted by arrows).

Simple Graph A simple graph is one in which there are no loops and there are no multiple edges.

Graph versus... This is a graph. The way it differs from a multigraph is that...

Multigraph A multigraph may have loops and/or multiple edges.

Special Classes of Graphs Complete Graphs Bipartite Graphs

Complete Graphs A complete graph is one in which there are n nodes and O(n^2) edges. All possible edges between nodes are represented in this graph.

Bipartite Graph A bipartite graph is a graph that can be split in half and does not have edges between vertices in the same class.

Path in an Undirected Graph Take this graph for example. A path in this Graph is simply a subgraph that has no cycles, is connected and each vertex is connected to one or two other nodes.

Path in an Undirected Path A path would therefore look like this.

Path in an Undirected Graph This is not a path because the middle node on the left has more than one or two edges coming from it. A path need not cover all points.

Path in a Directed Graph Take this graph for an example… A path in a digraph has one vertex with an in-degree of 0 and one vertex without an out- degree of 0 and the others have in-degree 1 and out-degree 1.

Path in a Directed Graph Therefore, this is a path in the directed graph. Notice that it has 1 vertex with in- degree 0, 1 vertex with out-degree 0, and the others have in-degree 1 and out-degree 1. A path need not cover all points.

Hamiltonian Path in an Undirected Graph This is a Hamiltonian path in an undirected graph. It is a path that covers (or spans) all the vertices.

Hamiltonian Path in a Digraph This is a Hamiltonian path in a Digraph. Notice that all nodes are covered and that the selected edges of the graph follow the original direction and still cover all nodes.

Cycle in an Undirected Graph A cycle in an undirected graph is a subgraph that is connected and each node has a degree of 2.

Cycle in a Directed Graph A cycle in a digraph occurs in the same way as one occurs for an undirected graph. It will be the same thing for a directed graph.

Hamiltonian Cycle in an Undirected Graph A hamiltonian cycle is one cycle that covers all vertices of the original graph.

Hamiltonian Cycle for a Digraph A hamiltonian cycle for a directed graph has the same definition for as for an undirected graph.

Spanning Forest of a graph which is not connected A spanning forest is a subgraph where every node is covered and

Cyclic Graph A graph is said to be cyclical id there are any cycles in the graph.

Acyclical Graph This is the same graph as before but by changing the direction of one edge we have turned this graph into an acyclical one which has no cycles in it.

Tree A tree is a graph that has at most two edges coming from a node. Each node is therefore connected to at most 2 nodes. The direction in a tree moves downward.

Forest A forest is made up of more than one tree. This example shows us two different trees.