Professional Documents
Culture Documents
Unit6
Unit6
AssignmentProblem
Structure
6.1.
Introduction
6.2.
Mathematicalformulationoftheproblem
6.3.
Hungarianmethodalgorithm
6.4.
Routingproblem
6.4.1.UnbalancedA.P
6.4.2 InfeasibleAssignments
6.4.3 MaximizationinA.P
6.5.
Travelingsalesmenproblem
6.6.
Summary
TerminalQuestions
AnswerstoSAQsandTQs
6.1Introduction
Theassignmentproblemisaspecialcaseofthetransportationproblem,wheretheobjectiveisto
minimizethecostortimeofcompletinganumberofjobsbyanumberofpersonsandMaximize
efficiently Revenue, sales etc In other words, when the problem involves the allocation of n
differentfacilitiestondifferenttasks,itisoftentermedasanassignmentproblem.Thismodelis
mostly used for planning. The assignment model is also useful in solving problems such as,
assignmentofmachinestojobs,assignmentofsalesmantosalesterritories,travelingsalesman
problemetc.Itmaybenotedthatwithnfacilitiesandnjobs,therearen!possibleassignments.
One way of finding an optimal assignment is to write all the n! possible arrangement ,evaluate
theirtotalcostandselecttheassignmentwithminimumcost.Butbecauseofmanycomputational
procedures this method is not possible. In this unit we study an efficient method for solving
assignmentproblems.
Therearenjobsforafactoryandfactoryhasnmachinestoprocessthejobs.Ajobi(=1,,n),
when processed by machine j(=1,,n) is assumed to incur a cost Cij. The assignment is to be
madeinsucha waythateachjobcanassociate withoneand onlyone machineDeterminean
assignmentofjobstomachinessoastominimizetheoverallcost.
SikkimManipalUniversity
98
OperationsResearch
Unit6
LearningObjectives
Afterstudyingthisunit,youshouldbeabletounderstandthefollowing
1. AttheendofthisunitthestudentsformulateaassignmentproblemMathematically.
2. Solvesaroutingproblem.
3. Analysisatravelingsalesmanproblem.
4. Knowthesignificanceoftheassignmentproblem.
5. ApplytheHungarianmethodtosolvetheproblem.
6. Solvethepracticalproblemslikeroutingproblemandtravelingsalesmanproblem.
6.2 MathematicalFormulationOfTheProblem
Letxijbeavariabledefinedby
0 if the ith job is not assigned to the jth machine
xij =
th
th
1if the i job is assigned to the j machine.
Then,sinceonlyonejobistobeassignedtoeachmachinewehave
n
xij=1and
xij=1
j=1
i=1
Alsothetotalassignmentcostisgivenby
n
z=
xij cij
j=1 i=1
Thustheassignmentproblemtakesthefollowingmathematicalform
Determine xij 0(i,j=1,,n)
Soastominimize
n
z=
i=1
j=1
xijcij
Subjecttotheconstraints
xij =1j=1,2,,n
i=1
SikkimManipalUniversity
99
OperationsResearch
Unit6
n
and
xij =1i=1,2,,n
j=1
withxij=0or1
Note: Inanassignmentproblemifweadd(orsubtract)arealnumberto(from)everyelementof
aroworcolumnofthecostmatrix,thenanassignmentwhichisoptimumforthemodifiedmatrix
isalsooptimumfortheoriginalone.
SelfAssessmentQuestions1
StateTrueorFalse
1. InA.Ptheconstraintsareofequalitytype.
2. Theno.offacilitiesshouldbeequaltono.ofresources.
3. Thedecisionvariablescantakeanyvalue.
6.3 HungarianMethod:Algorithm
Step1:PrepareRowruledMatrixbyselectingtheminimumvaluesforeachrowandsubtractit
fromotherelementsoftherow
Step 2: Prepare column reduced Matrix by subtracting minimumvalue of thecolumnfrom the
othervaluesofthatcolumn
Step3: Firstrowwiseassignazerobyifthereisonlyonezerointherowandcross(X)
otherzerosinthatcolumn.
Step4: Nowassigncolumnwiseifthereisonlyonezerointhatcolumnandcrossotherzerosin
thatrow.
RepeatStep3and4tillallzerosareeitherassignedorcrossed.Ifthenumberofassignments
made is equal to number of rows present, then it is the optimal solution otherwise proceed as
follows.
Step 5: Mark (P) the row which isnot assigned. Lookforcrossed zeroin thatrow. Mark the
column containing the crossed zero. Look for assigned zero in that column. Mark the row
containingassignedzero.Repeatthisprocesstillallmakingsareover.
Step6: Drawstraightlinethroughunmarkedrowsandmarkedcolumn.Thenumberofstraight
linedrawnwillbeequaltonumberofassignmentsmade.
Step7:Examinetheuncoveredelements.Selecttheminimum.
SikkimManipalUniversity
100
OperationsResearch
Unit6
a. Subtractitfromuncoveredelements.
b. Additatthepointofintersectionoflines.
c. Leavetherestasitis.
PrepareaNewTable.
Step8:RepeatSteps3to7tillnumberofallocations=Numberofrows.
Example1:Findtheoptimumassignmentsoastominimizethecost.
Persons
Jobs
12345
84261
09554
38926
43103
95
895
Example:
Considertheproblemofassigningfivejobstofivepersons.Theassignmentcostsaregivenas
follows.
Persons
Job
1
3 4 5
2 6 1
5 5 4
C
D
3
4
8
3
9 2 6
1 0 3
8 9 5
Determinetheoptimumassignmentschedule.
Solution:
Persons
A
B
C
SikkimManipalUniversity
Jobs
12345
73150
09554
16704
101
OperationsResearch
Unit6
D
E
4310
3
40340
Solution:ApplyingHungarianMethod
RowreducedMatrix
Persons
Jobs
12345
73150
09554
43103
40340
6704
Column reduced Matrix: Will be same as each columns minimum value is zero. We start
assigningthejobs
Jobs
Persons
A
B
12345
7305
9454
PC
1664
PD
3x3
424x
Sincethenumberofassignments=5.Itistheoptimumsolution.
Optimumsolution
Ato51
Bto10
Cto42
Dto31
Eto25
9Totalcost
SelfAssessmentQuestions2
SikkimManipalUniversity
102
OperationsResearch
Unit6
StateYes/No
1. InHungarianmethodfirstwepreparerowreducedmatrix
2. Thenumberofassignmentsshouldbeequaltonumberofrowsforoptimumsolution.
3. Therecanbemorethanoneallocationinarow.
6.4 RoutingProblem
Network scheduling is a technique for planning and scheduling of large projects. It has
successfully been applied in transportation and communication problems .A typical network
problem consists of finding route from one node(origin) to another (destination) between which
alternativepathsareavailableatvariousstagesofthejourney.Theproblemistoselecttheroute
thatyieldsminimumcost.Anumberofdifferentconstraintsmaybeplacedonacceptableroutes
e.g.:notreturningtothenodealreadypassedthroughorpassingthrougheverynodeonceand
onlyonce.Problemsofsuchtypearecalledasroutingproblems.
Althoughawidevarietyofproblemsotherthanroutingmaybedevelopedinconnectionwiththe
constructionandutilizationofnetworks.Hereweconsiderthespecialtypeofroutingproblemthat
occursfrequentlyinO.R.thetravellingsalesmanproblem.
6.4.1. UnbalancedA.P
Ifthenumberofrows numberofcolumnthenitisanunbalancedA.P.Weintroduceeithera
dummyrowordummycolumnandproceedasusual.
Example2:
Operations
Machines
M1
M2
M3
M4
01
10151211
02
910912
03
15161617
Solution: IntroducingadummyrowandapplyingHungarianmethod,wehave
Operations
Machines
M1
01
SikkimManipalUniversity
M2
M3
M4
10151211
103
OperationsResearch
Unit6
02
910912
03
15161616
04
0000
RowreducedMatrixandassigning
Operations
Machines
M1
01
M2
M3
M4
521
02
x13
0
03
x111
04
xxx
0
Iteration1
Operations
Machines
M1
01
M2
M3
M4
41x
02
113
0
03
xxx
0
04
1xx
HungarianMethodleadstoMultiplesolution.Selecting(03,M2)arbitrarily
Theoptimumsolutionis
01 toM1
10
02 toM3
03 toM2
16
04 toM4
0
35TotalWastages
SikkimManipalUniversity
104
OperationsResearch
Unit6
6.4.2. InfeasibleAssignments
CertainjobscannotbeassignedtocertainMachinesoroperators.Weinsertahighvalue a at
thesecellsandApplyHungarianMethod.
Example3:
SolvethefollowingA.P
Territory
P1
P2
P3
P4
T1
20
T2
15201718
T3
1618
T4
3227
20
201824
Solution:IntroducingaatdashesplacesandapplyingHungarianMethod.Wehave
P1
P2
P3
P4
T1
20
T2
15201718
T3
1618
T4
201824
P1
P2
P3
T1
127
T2
0523
T3
02
3227
20
RowreducedMatrix
T4
P4
a
206
ColumnreducedMatrix
P1
T1
P2
P3
P4
124
T2
x32
T3
T4
x3
0
0
1
\Optimumassignmentis
SikkimManipalUniversity
105
OperationsResearch
T1 toP1
20
T2 toP4
18
T3 toP2
18
T4 toP3
18
Unit6
74TotalCost
6.4.3. MaximizationInA.P
Hungarian Method cannot be applied to maximization problems. Therefore we reduce it to
maximization problem by subtracting every value form thehighestvalue of the Matrixand then
proceedasusual.
Example4: SolvethefollowingA.PEfficiencyMatrix
Classes
Professors
P1
P2
P3
P4
C1
70758065
C2
80706575
C3
75768580
C4
60657090
Solution:SinceitisaMaximizationproblemwesubtracteveryvaluefromthemaximumvalueof
90.Wehave.
Professors
P1
P2
P3
P4
C1
20151025
C2
10202515
C3
1520510
C4
30
25200
P1
P2
RowreducedMatrix
SikkimManipalUniversity
P3
P4
C1
105015
C2
010155
C3
101505
106
OperationsResearch
Unit6
C4
3025200
ColumnReducedMatrix
P1
C1
C2
P2
P3
P 4
10124
0
5155
C3
10105
0
C4
302020
\ OptimumSolution
C1 P2
75
C2 P1
80
C3 P3
85
C4 P4
90
330MaxEfficiency
SelfAssessmentQuestions3
Fillintheblanks
1. InunbalancedT.Pnumberofrows__________tonumberofcolumn.
2. Hungarianmethodcannotbeapplieddirectlyto_________problem.
3. IfsomejobscannotbeassignedtosomeM/csthenitiscalled_________assignment
problem.
6.5 TravelingSalesmanProblem
Supposethesalesmanhastovisitncities.Hewishestostartfromaparticularcity,visiteachcity
once,andthenreturntohisstartingpoint.Theobjectiveistoselectthesequencein whichthe
citiesarevisitedinsuchawaythathistotaltravelingtimeisminimized..Clearlystartingfroma
givencity,thesalesmanwillhavetotalof(n1)!differentsequences.Further,sincethesalesman
hastovisit all the n cities theoptimal solution remains independent of selection of the starting
point.
Theproblemcanberepresentedasanetworkwherethenodesandarcsrepresentthecitiesand
thedistance between them respectively. Assume that in afive city problem, a round trip of the
SikkimManipalUniversity
107
OperationsResearch
Unit6
salesmanisgivenbythefollowingarcs.
(3,1),(1,2),(2,4),(4,5),(5,3)
These arcs taken in order are the first, second, third, fourth and fifth directed arcs for the trip.
Generallythekthdirectedarcrepresentsthekth legofthetrip.i.e.onlegk
Thesalesmantravelsfromcityitocityj
(i,j=1,2,,n i j)
To formulate the problem whose solution will yield the minimum traveling time ,let the
variablesxijk bedefinedas
1,if kth directed are isfrom city i tocity j
xijk =
0, otherwise
Wherei,jandkareintegersthatvarybetween1andn.
Followingaretheconstraintsoftheproblem.
(a) Onlyonedirectedarcmaybeassignedtoaspecifick,
Thus
xijk =1
k=1,2,3n
i j
(b) Onlyoneothercitymaybereachedfromaspecificcityi,thus
(c)
xijk=1,i=1,2,n
Onlyoneothercitycaninitiateadirectarctoaspecifiedcityj,thus
xijk=1,j=1,2,..,n
xijk =
xjr (k+1)foralljandk.
i j
r j
Theseconstraintsensurethattheroundtripwillconsistofconnectedarcs.Theobjectivefunction
istominimize
z=
dij
xijk
i j
j k
SikkimManipalUniversity
108
OperationsResearch
Unit6
Wheredij isthedistancefromcityitocityj.
SelfAssessmentQuestions4
Fillintheblanks
1. Intravelingsalesmenproblemtheobjectiveistovisiteachcities__________________.
2. Salesmanhas________differentsequencesifnisthenumberofcitiestobevisited.
6.6 Summary
Inthisunit,wefocusedonaspecialtypeoftransportationproblem.wheretheobjectivewasto
allocate n different facilities to n different tasks .Although an assignment problem can be
formulatedasalinearprogrammingproblem,itissolvedbyspecialmethodknowasHungarian
method.Ifthenumberofpersonsisthesameasthenumberofjobs,theassignmentproblemis
saidtobebalanced.Lastlyabriefintroductionwasgivenaboutthetravelingsalesmanproblem.
TerminalQuestions
1. Fourjobsaretobedoneonfourdifferentmachines.Thecostin(rupees)ofproducingith on
thejth machineisgivenbelow:
Machines
Jobs
M1
M2
M3
M4
J1 15
11
13
15
J2 17
12
12
13
J3 14
15
10
14
J4 16
13
11
17
Assignthejobstodifferentmachinessoastominimizethetotalcost.
2. Amarketingmanagerhas5salesmenand5salesdistricts.consideringthecapabilitiesofthe
salesmanand thenatureofdistricts,themarketingmanagerestimatesthatsalespermonth
(inhundredrupees)foreachsalesmanineachdistrictwouldbeasfollows.
SikkimManipalUniversity
109
OperationsResearch
Unit6
SalesDistricts
Salesman
32
38
40
28
40
40
24
28
21
36
41
27
33
30
37
22
38
41
36
36
29
33
40
35
39
Findtheassignmentofsalesmantodistrictsthatwillresultinmaximumsales.
3. Inaplantlayouttherearefivevacantplaces.TheplantordersfourMachinestobeinstalled
intheseplaces.Thecostofinstallingisasfollowsfindtheoptimumassignment.
M/G
M1
M2
M3
M4
A
9
12
14
B
11
9
11
8
C
15
14
12
D
10
10
11
7
E
11
9
7
8
4. Findtheassignmentthatmaximizesthetotalsale.
Zone
Salesmen
M1
42
35
28
21
M2
30
25
20
15
M3
30
25
20
15
M4
24
20
16
12
AnswersForSelfAssessmentQuestions
SelfAssessmentQuestions1
1.True 2.True
3.False
SikkimManipalUniversity
110
OperationsResearch
Unit6
SelfAssessmentQuestions2
1.True
2.True
3.False
SelfAssessmentQuestions3
1.
2. Maximisationproblem
3.Infeasible
SelfAssessmentQuestions4
1.Onlyonce
2. (n1)!
AnswertoTerminalQuestions
(1) Theoptimumassignmentpolicyis
Job1tomachine2,Job2tomachine4
Job3tomachine1,Job4tomachine3.
andtheminimumassignmentCost=Rs.(11+13+14+11)=Rs.49.
(2) Optimalassignmentpolicyissalesman1todistrictB,2toA,3toE,4toCand5toD.
Hence
the
maximum
sales
Rs.
(38+40+37+41+35) 100
Rs.19,100.
(3) M1 A2M2 BM3 EM4 D
Total38
SikkimManipalUniversity
111