Directed graphs Reachability A graph where direction is indicated for every edge is called a directed graph or digraph. Reachability is about reaching.

Slides:



Advertisements
Similar presentations
The Assignment Problem
Advertisements

Estimating, scheduling and budgeting
Graphs and Finding your way in the wilderness
Transportation Problem (TP) and Assignment Problem (AP)
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Operations Management Session 27: Project Management.
1 Lecture by Junaid Arshad Department of Engineering Management Abridged and adapted by A. M. Al-Araki, sept WBS: Lowest level OBS: Lowest level.
D1: Critical Events And Critical Paths. D1: Critical Events And Paths A critical path is the list of activities on an activity network that, if they are.
Tutorial 2 Project Management Activity Charts (PERT Charts)
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
ActivityDurationPredecessor Activity A3- B5- C4A D7B E10B F3E G8C, D In this example, we will carry out a calculation by using an AOA-network and the information.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Activity networks – Example 1 TaskDuration (hours)Immediate predecessors A3- B4- C6- D5A E1B F6B G7C, D, E The table below shows the tasks involved in.
Critical Paths.
ME 380 Project Planning. Critical Path Method (CPM) Elements: Activities & Events Feature: Precedence relations ActivityDurationPrecedence A4- B5- C3A.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
15C Backward scanning and crashing
Euler Circuits and Paths
Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements.
Combinations and Probability
The Hungarian algorithm for non-square arrays
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
TRIP ASSIGNMENT.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Graph Theory Topics to be covered:
Project Management Project Planning Estimating Scheduling.
Critical Path Analysis
ENGM91 ACTIVITY PLANNING Unit 2
Networks.
Graphs Their Applications. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships and solve problems.
A brief summary of Critical Path (or network) Analysis Critical Path Analysis is a way of planning complex projects. It allows one to find those parts.
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
Chinese postman problem
Network Flow How to solve maximal flow and minimal cut problems.
Lesson Objective Understand what critical path analysis is Be able to prioritise events and create a precedence table Begin to use the precedence table.
IB Business and Management 5.8 Project Management (Critical Path Analysis)
Network Analysis Terminology
Computing the chromatic number for block intersection graphs of Latin squares Ed Sykes CS 721 project McMaster University, December 2004 Slide 1.
11/02/09 Chapter 7-Project Planning 1 Elements of Project Planning  Divide project into tasks, tasks into subtasks, subtasks into...  Estimate duration.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Vocabulary and Representations of Graphs. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships.
Data Structures CSCI 132, Spring 2014 Lecture 38 Graphs
University of Sunderland CIFM02 Unit 2 COMM02 Activity Planning Unit 2.
Project Management in Practice
1 Algorithms CSCI 235, Fall 2015 Lecture 32 Graphs I.
Dr. Hany Abd Elshakour 2/18/ :27 PM 1. Dr. Hany Abd Elshakour 2/18/ :27 PM 2 Time Planning and Control Activity on Arrow (Arrow Diagramming.
15B Critical path analysis. In a critical path analysis, edges represent activities. Nodes (vertices) represent the end of one activity and the start.
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
QUANTITATIVE METHODS FOR MANAGERS ASSIGNMENT MODEL.
MATRICES. DEFINITION A rectangular array of numeric or algebraic quantities subject to mathematical operations. Something resembling such an array, as.
DECISION 1. How do you do a Bubble Sort? Bubble Sort:  You compare adjacent items in a list;  If they are in order, leave them.  If they are not in.
Critical Path Analysis - Worksheet
Critical Path Analysis. Starter – The Big Breakfast! On Saturday, I want to cook myself a big breakfast.I want to have some toast, scrambled eggs and.
Critical Path Analysis (CPA)
Excursions in Modern Mathematics Sixth Edition
UNIT II Scheduling Procedures & Techniques FLOAT
The Hungarian algorithm for non-square arrays
Activity networks – Example 1
Critical Path Analysis (CPA)
UNIT II Scheduling Procedures & Techniques CRITICAL PATH ANALYSIS
Matrices.
Planar Graphs & Euler’s Formula
Analysing the AoA network
Graph Theory Unit 2.
3.1 Earliest Start Times.
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
The Hungarian algorithm for non-square arrays
Lecture 21 Network Flow, Part 1
Network Flows – Minimum capacities
Algorithms CSCI 235, Spring 2019 Lecture 32 Graphs I
Presentation transcript:

Directed graphs Reachability A graph where direction is indicated for every edge is called a directed graph or digraph. Reachability is about reaching for example from one city ti the other. One point in a network is said to be reachable from another different point in a directed graph if a path exists between the two points. For example, in the directed graph shown: B is reachable from A in one step( one edge) along the path AB. C is reachable from A in one step along the path AC. C is also reachable from A in two steps (two edges) along the path A-B-C. D is not reachable from A ( no edges).

We record the reachability properties of a directed graph by constructing a series of matrices as shown below. The first matrix R 1 (reachability 1) records the number of one-step paths between each of the vertices. The R 1 matrix is also an adjacency matix as it represents whether there is a direct connection between two vertices. The second matrix R 2 records the number of two-step paths between each of the vertices. The third matrix R 3 records the number of three-step paths between each of the vertices.

We combine this information into the total reachability matrix R, which will show all possible paths in the directed graph. Using the R matrix, we can then calculate the total reachability of each of the vertices by adding each of the columns and recording the sums in a table.

Dominance Dominance is about winning in competitions. A group of five tennis players, A, B, C, D and E, play each other in a round robin competition to see who is the best player. The results are as follows: A defeated C and D B defeated A, C and E C defeated D D defeated B E defeated A, C and D We can then use the graph to form a series of dominance matrices. The first dominance matrix D 1 records the number of one-step dominances between the players. D 1 is also an adjacency matrix.

The second dominance matrix D 2 records the number of two-step dominances between the players. D which takes into account both one-step and two-step dominances. The total dominance of each vertex is counted by adding each row.

Network flows A flow is the quantity of material that can move along a given channel; for example, traffic flow along a highway or water flow through a pipe. Determining the maximum flow The method of determining the maximum flow for a network is to use the minimum capacity of cuts. A cut is a line through the graph so that the sourse ( the point that the flow starts) is seperated from the sink ( the point that the flow finishes).The capacity of a cut is the sum of the weights of the edges that are crossed by the cut. However if the cut is blocked by another initial cut then its capacity is not counted. The capacity of the cut in the diagram below is = 7

Example: Determine the minimum cut and therefore the maximum flow of the diagram below: Solution: a Draw all the possible cuts on the diagram i.e. C 1, C 2, C 3, C 4 b Determine the capacity of each cut: C 1 = = 7 C 2 = = 11( the flow of the edge AB is not counted as it is blocked by CB). C 3 = = 8 C 4 = = 8 c Determine the minimum cut by comparing the capacities. Minimum cut = 7

Example:Determine the capacities of each of the cuts in the graph shown, and also the value of the minimum cut and hence the maximum flow. Solution The capacity of C1 = = 35. The capacity of C2 = = 56. The capacity of C3 = = 49. The capacity of C4 = = 30. The capacity of C5 = = 25. ∴ the maximum flow = 25.

Example:Determine the maximum flow for the directed graph. Solution The capacity of C1 = = 19. The capacity of C2 = = 14. The capacity of C3 = = 12. The capacity of C4 = = 9. The capacity of C5 = = 7. ∴ the maximum flow = 7.

Critical path When we are preparing a meal, for example chips, steak and salad we usually want all the parts of the meal to be ready at the same time. Some of the parts can be done at the same time, other cannot be started untill other activities are completed. Some parts take longer time to prepare and other less. The following table shows the time that it takes each part of the meal. ActivityDurationPredecessors A. Preperation of steak (salt,pepper) 10 minutes - B. Grilling the steak15 minutesA C. Preperation of the greens (wash) 10 minutes - D. Cut the salad, salt, oil, vinegar 10 minutesC E. Peel and cut potatoes, heat the oil 30 minutes - F. Fry the potatoes30 minutesE G. eat the meal. Eat the meal with people you are enjoying. 40 minutesB, D, F

From the previews table we can get a network diagram for the project. The activities are represented as edges. The activities A, E, C will start first as there are no predecessors. If we need to find the total time taken to prepare the meal we need to find the critical path. The critical path is the longest path through the network.The longest path for the network above is E,F,G and the time taken is 1 hour and 40 minutes. The EST is the earliest starting time that an activity can start. The LST is the latest starting time that an activity can start. The critical path is the path through the network along the activities that have the same EST and LST. To find EST of each activity we need to add the duration of all the previews activities to the EST of the original activity. To find the LST of an activity we need to subtract the duration of the activities that are after from the critical path. Slack or float time is the time that can be wasted for the activities that do not belong on the critical path.We can get the slack time by subtracting the EST from the LST of the activities that are not on the critical path. The dummy activity is added to the network if a double edge is formed or if there is a nesecity to add it in order to approprietly connect

Crashing the project: It is possible to speed up a project by reducing the duration of any activity. Reducing the project is reducing the duration of the critical path and possibly change the critical path. Example: a Draw the network of the following table. Find the critical path, the minimum finishing time of the project and the EST and LST of each activity. Activity Duration( days) Predecessors A8- B6- C1A D2B E3C F1C, D G2E, F H1G

Answer: The network is shown below. A dummy activity C,0 had to be added to the network as C is the predecessor for E and C and D is the predecessor for F The critical path is the longest path of the network and goes through the edges A-C-E-G-H When we add the duration of these activities,we get the minimum finishing time taken to complete the whole project. Minimum finishing time = 15 days The slack time of activity B = Latest starting time- Earliest starting time = 3-0 = 3

b.If the duration of A is reduced to 5 days and the duration of E to 2 days what is the minimum finishing time. What is the new critical path? Draw the new network. Answer: Critical path = B-D-F-G-H minimum time = 12 days.

Draw the networks, find the critical paths, minimum times and EST, LST of all activities. ActivityDurationPredecessors A3- B4- C6- D7A E8B F5B G12C H2C J11D, E K10F L3G,M M9H N 6J, K, L

ActivityDescriptionPredecessorsDuration (days) Abuild foudation-5 Bbuild frameA8 Cbuild roofB12 Ddo electrical wiringB5 Eput in windowsB4 Finstall insulationE1 Ginstall plumbingF1 Hput on sidingG6 Ipaint houseC,H3 Jadd fittingsD, I3

Fill in the gaps by finding the missing EST, LST and the float times if the minimum time to complete the construction is 31 days ActivityEST(earliest starting time)LST( latest starting time)Float time A00 B55 C13 D E F17 G18 H19 I25 J28

Allocation problems Bipartite graphs: are directed graphs where the vertices are seperated into 2 sets, to represent a relationship between two sets and to allocate one set of the graph to the other. Example: There are 4 people to be allocated to complete 4 tasks. Each person needs to be allocated to complete a task. Aaron can do task 2 and task 4 Barbara can do task task 4 Clive can do task 1 and task 4 and Diane can do task 1, task 2 and task 3 The following bipartite graph represents the relationship Solution:Barbara can only do task 4, so task 4 has to be given to Barbara. That means that Aaron has to do task 2 and Clive task 1.Diane is left with task 3

The following bipartite graph represents the results of the allocation HUNGARIAN ALGORITHM We use Hungarian algorithm for assignment problems that involve weightings and they have to be completed with the minimum amount ( cost, time).

Example: Operators A,B,C and D are each to be allocated one of four tasks 1, 2, 3, 4. Their estimates of the time in hours, that each of these tasks will take them are summarised in the matrix/table below. How should the tasks be assigned so that the total time to complete all tasks is a minimum? A3657 B4665 C3676 D5566 Solution Step 1: Subtract the minimum from each row A0324 B0221 C0343 D0011

Step 2: Subtract the minimum from each column A0313 B0210 C0332 D0000 Step 3: Cover the 0’s with the minimum lines. If it is 4×4 matrix we need 4 lines. If the lines are less than 4 then we need to continue to step 4. Only three lines are needed to cover the the 0’s so we need to proceed to step A0324 B0221 C0343 D0011

Step 4: Add the minimum uncovered number to all the numbers that are covered. If the number is covered twice the you add it twice. The minimum uncovered number is A1313 B2321 C1332 D2111 Step 5: Subtract the minimum number of all entries. Cover the 0’s with the minimum number of lines A0202 B1210 C0221 D1000

Step 6: Do the allocations. The 0’s determine the possible allocations.For example operator can do tasks 1 and 3. Sketch the bipartite graph of the matrix with allocations. AAA Step 7: We find the allocations in the original matrix using the resulting bipartite graph. Add them to find the minimum time needed tocomplete all the tasks A3657 B4665 C3676 D5566 Total minimum time: = 18

Example:Four supermarkets (A, B, C and D) are supplied from four distribution outlets (W, X, Y and Z). The cost in dollars of supplying one vanload of goods is given in the table below.Find the minimum cost of supplying the supermarkets. Solution Step 1: Subtract the minimum from each row. Step 2: Subtract the minimum from each column.

Step 3: Cover the 0’s with the minimum lines. If it is 4×4 matrix we need 4 lines. If the lines are less than 4 then we need to continue to step 4. Step 4: Add the minimum uncovered number to all the numbers that are covered. If the number is covered twice the you add it twice. The minimum uncovered number is 10. Step 5: Subtract the minimum number of all entries. Cover the 0’s with the minimum number of lines.

Step 6: Do the allocations. The 0’s determine the possible allocations. Sketch the bipartite graph of the matrix with allocations. There are two possible choices. Their costs are: