Excursions in Modern Mathematics, 7e: 8.2 - 2Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.

Slides:



Advertisements
Similar presentations
CS1022 Computer Programming & Principles Lecture 8.1 Digraphs (1)
Advertisements

Excursions in Modern Mathematics Sixth Edition
Hamiltonian Circuits and Paths
Chapter 8: Scheduling “Science is organized knowledge. Wisdom is organized life.” -Immanuel Kant.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Graph A graph, G = (V, E), is a data structure where: V is a set of vertices (aka nodes) E is a set of edges We use graphs to represent relationships among.
Euler Circuits and Paths
Introduction to Graph Theory Lecture 19: Digraphs and Networks.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
1 Representing Relations Part 2: directed graphs.
The Mathematics of Scheduling Chapter 8. How long does it take to build a house? It depends on Size of the house Type of construction Number of workers.
Math Foundations Week 12 Graphs (2). Agenda Paths Connectivity Euler paths Hamilton paths 2.
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.
Applied Discrete Mathematics Week 12: Trees
CS/ENGRD 2110 Object-Oriented Programming and Data Structures Fall 2014 Doug James Lecture 17: Graphs.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Excursions in Modern Mathematics Sixth Edition
Intro to Graphs CSIT 402 Data Structures II. CSIT 402 Graph Introduction2 Graphs Graphs are composed of ›Nodes (vertices) Can be labeled ›Edges (arcs)
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
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,
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Introduction to Graphs. Introduction Graphs are a generalization of trees –Nodes or verticies –Edges or arcs Two kinds of graphs –Directed –Undirected.
 What is a graph? What is a graph?  Directed vs. undirected graphs Directed vs. undirected graphs  Trees vs graphs Trees vs graphs  Terminology: Degree.
It's a world-wide webby wonderland.. Graphs are often used to represent real-world information and real-world structures. Graph Theory was even invented.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
© 2004 Goodrich, Tamasia Recall: Digraphs A digraph is a graph whose edges are all directed Short for “directed graph” Applications one-way streets flights.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
COSC 2007 Data Structures II Chapter 14 Graphs I.
Vocabulary and Representations of Graphs. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships.
Graphs Edge(arc) Vertices can be even or odd or undirected (two-way) Edges can be directed (one-way) This graph is connected. Degree(order) = 3 Odd vertex.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Discrete Mathematical Structures: Theory and Applications
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Chapter 1: Urban Services Lesson Plan
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
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.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
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.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Discrete Structures CISC 2315 FALL 2010 Graphs & Trees.
Graphs Upon completion you will be able to:
Copyright © Curt Hill Graphs Definitions and Implementations.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Graph Revisited Fei Chen CSCI2100B Data Structures Tutorial 12 1.
Hamiltonian Circuits and Paths
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
Graphs Lecture 19 CS2110 – Spring 2013.
Excursions in Modern Mathematics Sixth Edition
Task Tables Draw a graph for the following task table.
Euler Circuits and Paths
Lecture 15: Graph Theory II
Graphs Chapter 11 Objectives Upon completion you will be able to:
Scheduling Theory By Sarah Walker 12/4/2018.
Excursions in Modern Mathematics Sixth Edition
Graphs.
Hamiltonian Circuits and Paths
Euler Circuits and Paths
CSE 373 Data Structures Lecture 13
GRAPHS.
Presentation transcript:

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling 8.2Directed Graphs (Digraphs) 8.3 Scheduling with Priority Lists 8.4The Decreasing-Time Algorithm 8.5Critical Paths 8.6The Critical-Path Algorithm 8.7Scheduling with Independent Tasks

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. A directed graph, or digraph for short, is a graph in which the edges have a direction associated with them, typically indicated by an arrowhead. Digraphs are particularly useful when we want to describe asymmetric relationships (X related to Y does not imply that Y must be related to X). Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. In a digraph, instead of talking about edges we talk about arcs. Every arc is defined by its starting vertex and its ending vertex, and we respect that order when we write the arc. Thus, if we write XY, we are describing the arc, as opposed to the arc YX. Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. A list of all the arcs in a digraph is called the arc-set of the digraph. This digraph has arc-set A = { XY, YX }. If XY is an arc in the digraph, we say that vertex X is incident to vertex Y, or, equivalently, that Y is incident from X). The arc YZ is said to be adjacent to the arc XY if the starting point of YZ is the ending point of XY. (Essentially, this means one can go from X to Z by way of Y). Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. In a digraph, a path from vertex X to vertex W consists of a sequence of arcs XY, YZ, ZU,…,VW such that each arc is adjacent to the one before it and no arc appears more than once in the sequence–it is essentially a trip from X to W along the arcs in the digraph. The best way to describe the path is by listing the vertices in the order of travel: X, Y, Z, and so on. Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. When the path starts and ends at the same vertex, we call it a cycle of the digraph. Cycles in digraphs can be written in more than one way–the cycle X, Y, Z, X is the same as the cycles Y, Z, X, Y and Z, X, Y, Z. Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. In a digraph, the notion of the degree of a vertex is replaced by the concepts of indegree and outdegree. The outdegree of X is the number of arcs that have X as their starting point (outgoing arcs); the indegree of X is the number of arcs that have X as their ending point (incoming arcs). Directed Graph or Digraph

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. This digraph has vertex-set V = {A, B, C, D, E} Example 8.3Digraph Basics and arc-set A = {AB, AC, BD, CA, CD, CE, EA, ED}. In this digraph, A is incident to B and C, but not to E. By the same token, A is incident from E as well as from C.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. The indegree of vertex A is 2, and so is the outdegree. The indegree Example 8.3Digraph Basics of vertex D is 3, and the outdegree is 0. In this digraph, there are several paths from A to D, such as A, C, D; A, C, E, D; A, B, D; and even A, C, A, B, D. On the other hand, A, E, D is not a path from A to D

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. (because you can’t travel from A to E). There are two cycles in this digraph: A, C, E, A (which can also be written as C, E, A, C and Example 8.3Digraph Basics E, A, C, E), and A, C, A. Notice that there is no cycle passing through D because D has outdegree 0 and thus is a “dead-end,” and there is no cycle passing through B because from B you can only go to D.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Traffic flow. In most cities some streets are one-way streets and others are two-way streets. In this situation, digraphs allow us to visualize the flow of traffic through the city’s streets. The vertices are intersections, and the arcs represent one-way streets. (To represent a two-way street, we use two arcs, one for each direction.) Applications of Digraphs

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Telephone Traffic. To track and analyze the traffic of telephone calls through their network, telephone companies use “call digraphs.” In these digraphs the vertices are telephone numbers, and an arc from X to Y indicates that a call was initiated from telephone number X to telephone number Y. Applications of Digraphs

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Tournaments. Digraphs are frequently used to describe certain types of tournaments, with the vertices representing the teams (or individual players) and the arcs representing the outcomes of the games played in the tournament (the arc XY indicates that X defeated Y). Tournament digraphs can be used in any sport in which the games cannot end in a tie (basketball, tennis, etc.). Applications of Digraphs

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Organization charts. In any large organization (a corporation, the military, a university, etc.) it is important to have a well-defined chain of command. The best way to describe the chain of command is by means of a digraph often called an organization chart. In this digraph the vertices are the individuals in the organization, and an arc from X to Y indicates that X is Y’s immediate boss (i.e.,Y takes orders directly from X). Applications of Digraphs

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Let’s return to the scheduling problem first discussed in Example 8.2. We can take the tasks and precedence relations given in the table and create a digraph like this one. Example 8.4Building That Dream Home on Mars: Part 2

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. It is helpful to try to place the vertices of the digraph so that the arcs point from left to right, and this can usually be done with a little trial- and-error. After this is done, it is customary to add two fictitious tasks called START and END, where START indicates the imaginary task of getting the project started (cutting the red ribbon, so to speak), and END indicates the imaginary task of declaring the project complete (pop the champagne). Example 8.4Building That Dream Home on Mars: Part 2

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. This modified digraph is called the project digraph.The project digraph allows us to better visualize the execution of the project as a flow, moving from left to right. Example 8.4Building That Dream Home on Mars: Part 2