SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Traveling Salesman Problem
• Problem Statement
– If there are n cities and cost of traveling from any
city to any other city is given.
– Then we have to obtain the cheapest round-trip
such that each city is visited exactly ones returning
to starting city, completes the tour.
– Typically travelling salesman problem is represent
by weighted graph.
Cont.
• Row Minimization
– To understand solving of travelling salesman
problem using branch and bound approach we
will reduce the cost of cost matrix M, by using
following formula.
– Red_Row(M) = [ Mij – min{ Mij | 1<=j<=n} ]
where Mij < ∞
Cont.
• Column Minimization
– Now we will reduce the matrix by choosing
minimum for each column.
– The formula of column reduction of matrix is
– Red_col(M)=Mij – min { Mij | 1<=j<=n}
where Mij < ∞
Cont.
• Full Reduction
– Let M bee the cost matrix for TSP for n vertices
then M is called reduced if each row and each
column consist of entire entity ∞ entries or else
contain at least one zero.
– The full reduction can be achieved by applying
both row_reduction and column_reduction.
Cont.
• Dynamic Reduction
– Using dynamic reduction we can make the choice of
edge i->j with optimal cost.
– Step in dynamic reduction technique
1. Draw a space tree with optimal cost at root node.
2. Obtain the cost of matrix for path i->j by making I row and
j column entries as ∞. Also set M[i][j]=∞
3. Cost corresponding node x with path I, j is optimal cost +
reduced cost+ M[i][j]
4. Set node with minimum cost as E-node and generate its
children. Repeat step 1 to 4 for completing tour with
optimal cost.
Example
• Solve the TSP for the following cost matrix
∞ 11 10 9 6
8 ∞ 7 3 4
8 4 ∞ 4 8
11 10 5 ∞ 5
6 9 2 5 ∞
Solution
Step 1 :
• We will find the minimum value from each row and
subtract the value from corresponding row
Minvalue
reduce matrix
∞ 11 10 9 6
8 ∞ 7 3 4
8 4 ∞ 4 8
11 10 5 ∞ 5
6 9 2 5 ∞
∞ 5 4 3 0
5 ∞ 4 0 1
4 0 ∞ 0 4
6 5 0 ∞ 0
1 4 0 0 ∞
-> 6
-> 3
->4
->5
->5
---------
23
Cont.
• Now we will obtain minimum value from each column. If they
column contain 0 the ignore that column and a fully reduced
matrix can be obtain.
subtracting 1 from 1st column
∞ 5 4 3 0
5 ∞ 4 0 1
4 0 ∞ 0 4
6 5 0 ∞ 0
1 4 0 0 ∞
∞ 5 4 3 0
4 ∞ 4 0 1
3 0 ∞ 0 4
5 5 0 ∞ 0
0 4 0 0 ∞
Cont.
• Total reduced cost
= total reduced row cost + total reduced column cost
= 23 + 1
= 24
• Now we will set 24 as the optimal cost
24->this is the lower bound
Cont.
• Step 2 :: Now we will consider the paths [1,2], [1,3], [1,4] and [1,5] of state
space tree as given above consider path [1,2] make 1st row and 2nd column to
∞ set M[2][1]=∞
• Now we will find min value from each corresponding column.
• c
∞ ∞ ∞ ∞ ∞
∞ ∞ 4 0 1
3 ∞ ∞ 0 4
5 ∞ 0 ∞ 0
0 ∞ 0 0 ∞
∞ ∞ ∞ ∞ ∞
∞ ∞ 4 0 1
3 ∞ ∞ 0 4
5 ∞ 0 ∞ 0
0 ∞ 0 0 ∞
Cont.
• Hence total receded cost for node 2 is = Optimal
cost+old value of M[1][2]
= 24 + 5
= 25
• Consider path (1,3). Make 1st row, 3rd column to be
∞ set M[3][1] = ∞
Cont.
There is no minimum value from any row and column
Hence total cost of node 3 is
= optimum cost + M[1][3]
= 24+ 4
= 28
∞ ∞ ∞ ∞ ∞
4 ∞ ∞ 0 1
3 0 ∞ 0 4
5 5 ∞ ∞ 0
0 4 ∞ 0 ∞
Cont.
• consider path [1,4] make 1st row and 4th column to ∞ set
M[4][1]=∞
subtracting 1 from 2nd Row
total cost of node 4 is = optimum cost + M[1][4] + minimum row cost
= 24+ 3+1
= 28
∞ ∞ ∞ ∞ ∞
4 ∞ 4 ∞ 1
3 0 ∞ ∞ 4
∞ 5 0 ∞ 0
0 4 0 ∞ ∞
∞ ∞ ∞ ∞ ∞
4 ∞ 3 ∞ 0
3 0 ∞ ∞ 4
∞ 5 0 ∞ 0
0 4 0 ∞ ∞
Cont.
• consider path [1,5] make 1st row and 5th column to ∞ set
M[5][1]=∞
subtracting 3 from 1st Row
total cost of node 5 is = reduced column cost + old value M[1][5]
= 24+ 3+0
= 27
∞ ∞ ∞ ∞ ∞
4 ∞ 4 0 ∞
3 0 ∞ 0 ∞
5 5 0 ∞ ∞
∞ 4 0 0 ∞
∞ ∞ ∞ ∞ ∞
1 ∞ 4 0 ∞
0 0 ∞ 0 ∞
2 5 0 ∞ ∞
∞ 4 0 0 ∞
Cont.
• The partial state space tree will be
• The node 5 shows minimum cost. Hence node 5 will be an E
node. That means we select node 5 for expansion.
27
29 28 28 27
Cont.
• Step 3 :: Now we will consider the paths [1,5,2], [1,5,3] and [1,5,4] of state
space tree as given above consider path [1,5,2] make 1st row , 5th row and
second column as ∞ set M[5][1] and M[2][1] =∞
subtracting 3 from 1st Column.
Hence total cost of node 6 is =optimal cost node 5+column reduced cost+ M[5][2]
= 27+ 3+4
= 34
∞ ∞ ∞ ∞ ∞
∞ ∞ 4 0 1
3 ∞ ∞ 0 4
5 ∞ 0 ∞ 0
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞
∞ ∞ 4 0 1
0 ∞ ∞ 0 4
2 ∞ 0 ∞ 0
∞ ∞ ∞ ∞ ∞
Cont.

Weitere ähnliche Inhalte

Ähnlich wie travelingsalesmanproblem-170122053648.pdf

Chapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptxChapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptxPriyankaLunavat
 
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...Firas Husseini
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmlavanya marichamy
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functionsjoellivz
 
Hungarian Assignment Problem
Hungarian Assignment ProblemHungarian Assignment Problem
Hungarian Assignment ProblemVivekSaurabh7
 
06. Gaussian Elimination.pptx
06. Gaussian Elimination.pptx06. Gaussian Elimination.pptx
06. Gaussian Elimination.pptxkibriaswe
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessKhan Tanjeel Ahmed
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999fashiontrendzz20
 
Matrices and row operations 12123 and applications of matrices
Matrices and row operations 12123 and applications of matricesMatrices and row operations 12123 and applications of matrices
Matrices and row operations 12123 and applications of matricesmayaGER
 
Data structure notes
Data structure notesData structure notes
Data structure notesanujab5
 
QABD Transportation problems-UNIT-3.pptx
QABD Transportation problems-UNIT-3.pptxQABD Transportation problems-UNIT-3.pptx
QABD Transportation problems-UNIT-3.pptxhonakjannu789
 

Ähnlich wie travelingsalesmanproblem-170122053648.pdf (20)

Chapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptxChapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptx
 
Ch07 linearspacealignment
Ch07 linearspacealignmentCh07 linearspacealignment
Ch07 linearspacealignment
 
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...
Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-ph...
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
 
Lec20
Lec20Lec20
Lec20
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Hungarian Assignment Problem
Hungarian Assignment ProblemHungarian Assignment Problem
Hungarian Assignment Problem
 
06. Gaussian Elimination.pptx
06. Gaussian Elimination.pptx06. Gaussian Elimination.pptx
06. Gaussian Elimination.pptx
 
Magic square made easy
Magic square made easyMagic square made easy
Magic square made easy
 
12 LINEAR EQUATIONS.ppt
12 LINEAR EQUATIONS.ppt12 LINEAR EQUATIONS.ppt
12 LINEAR EQUATIONS.ppt
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for Business
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999
 
cs 3351 dpco
cs 3351 dpcocs 3351 dpco
cs 3351 dpco
 
Simplex algorithm
Simplex algorithmSimplex algorithm
Simplex algorithm
 
Matrices and row operations 12123 and applications of matrices
Matrices and row operations 12123 and applications of matricesMatrices and row operations 12123 and applications of matrices
Matrices and row operations 12123 and applications of matrices
 
Data structure notes
Data structure notesData structure notes
Data structure notes
 
QABD Transportation problems-UNIT-3.pptx
QABD Transportation problems-UNIT-3.pptxQABD Transportation problems-UNIT-3.pptx
QABD Transportation problems-UNIT-3.pptx
 

Mehr von mounikanarra3

functionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdffunctionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdfmounikanarra3
 
Space complexity-DAA.pptx
Space complexity-DAA.pptxSpace complexity-DAA.pptx
Space complexity-DAA.pptxmounikanarra3
 
(PAD_5)Dynamic_Programming.ppt
(PAD_5)Dynamic_Programming.ppt(PAD_5)Dynamic_Programming.ppt
(PAD_5)Dynamic_Programming.pptmounikanarra3
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfmounikanarra3
 
exp227-jan-170127160848 (3) (1).pdf
exp227-jan-170127160848 (3) (1).pdfexp227-jan-170127160848 (3) (1).pdf
exp227-jan-170127160848 (3) (1).pdfmounikanarra3
 
stephenhawkingppt-160402093003.pdf
stephenhawkingppt-160402093003.pdfstephenhawkingppt-160402093003.pdf
stephenhawkingppt-160402093003.pdfmounikanarra3
 

Mehr von mounikanarra3 (15)

unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
 
Unit - 4.pptx
Unit - 4.pptxUnit - 4.pptx
Unit - 4.pptx
 
UNIT-1 (4).pdf
UNIT-1 (4).pdfUNIT-1 (4).pdf
UNIT-1 (4).pdf
 
functionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdffunctionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdf
 
Space complexity-DAA.pptx
Space complexity-DAA.pptxSpace complexity-DAA.pptx
Space complexity-DAA.pptx
 
EEM MID2.PPT.pptx
EEM MID2.PPT.pptxEEM MID2.PPT.pptx
EEM MID2.PPT.pptx
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
 
(PAD_5)Dynamic_Programming.ppt
(PAD_5)Dynamic_Programming.ppt(PAD_5)Dynamic_Programming.ppt
(PAD_5)Dynamic_Programming.ppt
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
 
UML.PPT.pptx
UML.PPT.pptxUML.PPT.pptx
UML.PPT.pptx
 
exp227-jan-170127160848 (3) (1).pdf
exp227-jan-170127160848 (3) (1).pdfexp227-jan-170127160848 (3) (1).pdf
exp227-jan-170127160848 (3) (1).pdf
 
stephenhawkingppt-160402093003.pdf
stephenhawkingppt-160402093003.pdfstephenhawkingppt-160402093003.pdf
stephenhawkingppt-160402093003.pdf
 
CP-STRING (1).ppt
CP-STRING (1).pptCP-STRING (1).ppt
CP-STRING (1).ppt
 
Array.pdf
Array.pdfArray.pdf
Array.pdf
 
routing.pptx
routing.pptxrouting.pptx
routing.pptx
 

Kürzlich hochgeladen

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksMagic Marks
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stageAbc194748
 

Kürzlich hochgeladen (20)

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 

travelingsalesmanproblem-170122053648.pdf

  • 1. Traveling Salesman Problem • Problem Statement – If there are n cities and cost of traveling from any city to any other city is given. – Then we have to obtain the cheapest round-trip such that each city is visited exactly ones returning to starting city, completes the tour. – Typically travelling salesman problem is represent by weighted graph.
  • 2. Cont. • Row Minimization – To understand solving of travelling salesman problem using branch and bound approach we will reduce the cost of cost matrix M, by using following formula. – Red_Row(M) = [ Mij – min{ Mij | 1<=j<=n} ] where Mij < ∞
  • 3. Cont. • Column Minimization – Now we will reduce the matrix by choosing minimum for each column. – The formula of column reduction of matrix is – Red_col(M)=Mij – min { Mij | 1<=j<=n} where Mij < ∞
  • 4. Cont. • Full Reduction – Let M bee the cost matrix for TSP for n vertices then M is called reduced if each row and each column consist of entire entity ∞ entries or else contain at least one zero. – The full reduction can be achieved by applying both row_reduction and column_reduction.
  • 5. Cont. • Dynamic Reduction – Using dynamic reduction we can make the choice of edge i->j with optimal cost. – Step in dynamic reduction technique 1. Draw a space tree with optimal cost at root node. 2. Obtain the cost of matrix for path i->j by making I row and j column entries as ∞. Also set M[i][j]=∞ 3. Cost corresponding node x with path I, j is optimal cost + reduced cost+ M[i][j] 4. Set node with minimum cost as E-node and generate its children. Repeat step 1 to 4 for completing tour with optimal cost.
  • 6. Example • Solve the TSP for the following cost matrix ∞ 11 10 9 6 8 ∞ 7 3 4 8 4 ∞ 4 8 11 10 5 ∞ 5 6 9 2 5 ∞
  • 7. Solution Step 1 : • We will find the minimum value from each row and subtract the value from corresponding row Minvalue reduce matrix ∞ 11 10 9 6 8 ∞ 7 3 4 8 4 ∞ 4 8 11 10 5 ∞ 5 6 9 2 5 ∞ ∞ 5 4 3 0 5 ∞ 4 0 1 4 0 ∞ 0 4 6 5 0 ∞ 0 1 4 0 0 ∞ -> 6 -> 3 ->4 ->5 ->5 --------- 23
  • 8. Cont. • Now we will obtain minimum value from each column. If they column contain 0 the ignore that column and a fully reduced matrix can be obtain. subtracting 1 from 1st column ∞ 5 4 3 0 5 ∞ 4 0 1 4 0 ∞ 0 4 6 5 0 ∞ 0 1 4 0 0 ∞ ∞ 5 4 3 0 4 ∞ 4 0 1 3 0 ∞ 0 4 5 5 0 ∞ 0 0 4 0 0 ∞
  • 9. Cont. • Total reduced cost = total reduced row cost + total reduced column cost = 23 + 1 = 24 • Now we will set 24 as the optimal cost 24->this is the lower bound
  • 10. Cont. • Step 2 :: Now we will consider the paths [1,2], [1,3], [1,4] and [1,5] of state space tree as given above consider path [1,2] make 1st row and 2nd column to ∞ set M[2][1]=∞ • Now we will find min value from each corresponding column. • c ∞ ∞ ∞ ∞ ∞ ∞ ∞ 4 0 1 3 ∞ ∞ 0 4 5 ∞ 0 ∞ 0 0 ∞ 0 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ 4 0 1 3 ∞ ∞ 0 4 5 ∞ 0 ∞ 0 0 ∞ 0 0 ∞
  • 11. Cont. • Hence total receded cost for node 2 is = Optimal cost+old value of M[1][2] = 24 + 5 = 25 • Consider path (1,3). Make 1st row, 3rd column to be ∞ set M[3][1] = ∞
  • 12. Cont. There is no minimum value from any row and column Hence total cost of node 3 is = optimum cost + M[1][3] = 24+ 4 = 28 ∞ ∞ ∞ ∞ ∞ 4 ∞ ∞ 0 1 3 0 ∞ 0 4 5 5 ∞ ∞ 0 0 4 ∞ 0 ∞
  • 13. Cont. • consider path [1,4] make 1st row and 4th column to ∞ set M[4][1]=∞ subtracting 1 from 2nd Row total cost of node 4 is = optimum cost + M[1][4] + minimum row cost = 24+ 3+1 = 28 ∞ ∞ ∞ ∞ ∞ 4 ∞ 4 ∞ 1 3 0 ∞ ∞ 4 ∞ 5 0 ∞ 0 0 4 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ 4 ∞ 3 ∞ 0 3 0 ∞ ∞ 4 ∞ 5 0 ∞ 0 0 4 0 ∞ ∞
  • 14. Cont. • consider path [1,5] make 1st row and 5th column to ∞ set M[5][1]=∞ subtracting 3 from 1st Row total cost of node 5 is = reduced column cost + old value M[1][5] = 24+ 3+0 = 27 ∞ ∞ ∞ ∞ ∞ 4 ∞ 4 0 ∞ 3 0 ∞ 0 ∞ 5 5 0 ∞ ∞ ∞ 4 0 0 ∞ ∞ ∞ ∞ ∞ ∞ 1 ∞ 4 0 ∞ 0 0 ∞ 0 ∞ 2 5 0 ∞ ∞ ∞ 4 0 0 ∞
  • 15. Cont. • The partial state space tree will be • The node 5 shows minimum cost. Hence node 5 will be an E node. That means we select node 5 for expansion. 27 29 28 28 27
  • 16. Cont. • Step 3 :: Now we will consider the paths [1,5,2], [1,5,3] and [1,5,4] of state space tree as given above consider path [1,5,2] make 1st row , 5th row and second column as ∞ set M[5][1] and M[2][1] =∞ subtracting 3 from 1st Column. Hence total cost of node 6 is =optimal cost node 5+column reduced cost+ M[5][2] = 27+ 3+4 = 34 ∞ ∞ ∞ ∞ ∞ ∞ ∞ 4 0 1 3 ∞ ∞ 0 4 5 ∞ 0 ∞ 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞ 4 0 1 0 ∞ ∞ 0 4 2 ∞ 0 ∞ 0 ∞ ∞ ∞ ∞ ∞
  • 17. Cont.