Operation Research lecture 14
Operation Research lecture 14
INDUS UNIVERSITY
• 2.Optimal Solution:
The Stepping Stone Method, Modified
Distribution (MODI) Method.
The Hungarian method provides an efficient solution to assignment problems. But first,
let's understand what an assignment problem is.
Step 1: Subtract the smallest element in each row from all the elements of that row.
Ensure that each row has at least one zero.
Step 2: From the matrix obtained in Step 1, subtract the smallest element in each column
from all the elements of that column. Ensure that each column has at least one zero.
Step 3: Assign zeros
Go through each row and find a row with exactly one unmarked zero. Circle this zero and
assign it a task. Cross out all other zeros in the column of this circled zero as they can't be
used for future assignments. Repeat this for all rows.
Repeat the process with columns. Find a column with exactly one unmarked zero, circle it
and cross out any other zero in its row. Repeat this for all columns.
Step 5: Draw the minimum number of straight lines needed to cover all the zeros as
follows:
(a) Mark the rows without an assignment.
(b) Mark the columns containing zeros in the marked rows.
(c) Mark the rows containing assignments in the marked columns.
(d) Repeat steps (b) and (c) until no further marking is required.
(e) Draw lines through all unmarked rows and columns. If the number of lines equals the
order of the matrix, the solution is optimal; otherwise, it is not.
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a
weighted graph, which may represent, for example, road networks.
For example, if the nodes of the graph represent cities, and the costs of edges represent
the average distances between pairs of cities connected by a direct road, then Dijkstra's
algorithm can be used to find the shortest route between one city and all other cities.
Dijkstra's algorithm is commonly used on graphs where the edge weights are positive
integers or real numbers. It can be generalized to any graph where the edge weights are
partially ordered, provided the subsequent labels (a subsequent label is produced when
traversing an edge) are monotonically non-decreasing.
The algorithm uses a greedy approach in the sense that we find the next best solution
hoping that the end result is the best solution for the whole problem.
Example
The task is to determine the shortest paths between all pairs of nodes on transportation
network which are placed in the graph below. A length of a branch is shown with a
number at a line.
Before starting one needs a starting matrix D0. Furthermore this tells one how long the
distances to other nodes are.