SlideShare a Scribd company logo
1 of 22
DATA STRUCTURE -TRAVELING SALES
PERSON AND MESH ALGORITHM
Presented by
M.Lavanya
M.sc (CS & IT)
Nadar Saraswathi College of arts & science
Theni.
INTRODUCTION
• Dynamic programming algorithm for traveling sales person
problem was arrived.
• The worst case complexity of this algorithms will not be any
better than the use of good bounding functions will able this
branch and bound algorithms to solve some problems.
TRAVELING SALES PERSON
• Let G = ( V, E) be a directed graph with edge costs Cij. Cij is
defined such that Cy > 0 for all i and j and Cy = co if< i,j > ~
E.
• Let I VI = n and assume n > 1. A tour of G is a directed cycle
that includes every vertex in V.
• The cost of a tour is the sum of the cost of the edges on the
tour. The traveling salesperson problem is to find a tour of
minimum cost.
• Every tour consists of an edge < 1, k > for some k E V - { 1}
and a path from vertex k to vertex 1.
• The path from vertex k to vertex 1 goes through each vertex in
V - { 1, k} exactly once.
• It is easy to see that if the tour is optimal then the path from k
to 1 must be a shortest k to 1 path going through all vertices in
V - { 1, k }. Hence, the principle of optimality holds.
STATE SPACE TREE FOR THE TRAVELING
SALESPERSON PROBLEM WITH n=4 AND i0=i4=1
c(A)={length of tour defined by the path from the root to A , if A is leaf
cost of a minimum-cost leaf in the sub tree A , if A is not a leaf.
• For example: the path defined at node 6 is i0 , i1 , i2 =1 , 2 , 4. It
consists of the edges <1,2> and <2,4>.
• The reduced cost matrix corresponding to G a row or column set to
be reduced iff it contains at least one zero and all remaining entries
are non negative. A matrix is reduced iff every row and column is
reduced.
AN EXAMPLE FOR COST AND REDUCED COST
MATRIX
REDUCED COST MATRIX
• Reduced cost matrix with every node in the traveling sales person state
space tree . let A be the reduced cost matrix for node R. let S be a child of R
such the tree edges(R,S).the reduced cost matrix for S may be obtained as
follows:
 change all entries in row I and column j of A to ∞.
 Set A (j , 1) to ∞.
 To reduce rows and columns in the resulting matrix except for rows and
columns containing only ∞.
STATE SPACE TREE GENERATED BY
PROCEDURE LCBB
The portion of the states spaces tree that gets generated starting
with the root node as the E-node , nodes 2 , 3 , 4 and 5 are generated.
REDUCED COST MATRICES CORRESPONDING
TO NODES
• Reduced matrixes corresponding to the nodes. The matrix of :
 Setting all entries in row 1 and column 3 to ∞.
 Setting the at position (3,1) to ∞.
 Reducing column 1 by subtracting by11.
• A possible organization for the state space is a binary tree in
which a left branch represents the inclusion of a particular edge
yield the right branch represents the exclusion of that edge.
AN EXAMPLE
GRAPH AND STATE SPACE TREE
• Fig (a) the dynamic binary tree formulation , considered cost
matrix.
• Fig (b) a total of 25 needs to be subtracted from the rows and
columns of this matrix to obtain the reduced matrix. If edge <i,j>
is the left subtree of the root represents all tours including edges
<i,j> and the right subtree represents all tours that not include
edge <i,j>.
• Fig (c) represents the first two level of two possible states space
tree for three vertex graph. Rather then use state space tree , now
a considered a dynamic space tree. This also binary tree.
STATE SPACE TREE
• The root node an edge <i,j> maximize of the right subtree. An
edge <i,j> cost is reduced matrix is positive.
• For edge <1,4> , <2,5> , <3,1> , <3,4> , <4,5> , <5,2> , ∆ = 1 ,
2 , 11 , 0 , 3 , 3 and 11 respectively.
• The edges <3,1> or <5,3> can be used. The selects the edge
<3,1> can be computed the state space tree.
REDUCED COST MATRICES
MESH ALGORITHM
Computational Model:
• A mesh is a x b grid there is a processor at each grid
pointer. The edges is to communication links and
bidirectional .
• Each processor can labeled with tuple (i,j) where 1 ≤ i ≤ a
and 1 ≤ j ≤ b.
• Every processor of the mesh is a RAM with local
memory.
• The basic operations such as addition , subtraction ,
multiplication , comparison , local memory access and so on ,
in 1 unit time.
• This computation is to be synchronous ; that is , there is a
global clock and in every time unit each processor completes it
tasks.
MESH – CONNECTED COMPUTER
A considered only square meshes , that is , meshes for which a=b.
A √p X √p mesh
LINEAR ARRAY
• A linear array consist of be processor (named 1,2,…….,p)
• The processor 1 is connected to processor 2 and processor p is
connected to processor p-1
• processors 1 and p are known as the boundary processors.
Processor i-1(i+1) is called left neighbor(right neighbor) of i.
• In a mesh, all processor first(second) coordinates are the same
form a row (column) of the mesh . For eg row i is made up of
the processors(i,1) , (i,2) ,….,(i, √p).
• Each row or column is a √p- processor linear array . a mesh
algorithm consists of steps that are local to individual rows or
columns.
Data structure - traveling sales person and mesh algorithm

More Related Content

What's hot

Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graphRounak Biswas
 
K Map Simplification
K Map SimplificationK Map Simplification
K Map SimplificationRamesh C
 
Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)RohitK71
 
Applied Calculus: An introduction about Real Numbers and Real Line
Applied Calculus: An introduction about Real Numbers and Real LineApplied Calculus: An introduction about Real Numbers and Real Line
Applied Calculus: An introduction about Real Numbers and Real Linebaetulilm
 
Bezier Curve and Spline Curve
Bezier Curve and Spline CurveBezier Curve and Spline Curve
Bezier Curve and Spline CurveAsifShahariar1
 
Bezeir curve na B spline Curve
Bezeir curve na B spline CurveBezeir curve na B spline Curve
Bezeir curve na B spline CurvePooja Dixit
 
Coons bicubic surface
Coons bicubic surfaceCoons bicubic surface
Coons bicubic surfaceramac123
 
Synthetic curve
Synthetic curveSynthetic curve
Synthetic curveDhruv Shah
 
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERK-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERkunal kishore
 
December 19
December 19December 19
December 19khyps13
 
Karnaugh map (k map)
Karnaugh map (k map)Karnaugh map (k map)
Karnaugh map (k map)Adeen Ali
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data StructureGaurang Dobariya
 
Introduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesIntroduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesAnyline
 
Final Project Powerpoint
Final Project PowerpointFinal Project Powerpoint
Final Project PowerpointCareyF518
 
Synthetics surfaces unit ii
Synthetics surfaces unit iiSynthetics surfaces unit ii
Synthetics surfaces unit iijntuhcej
 
Introduction to Regression line
Introduction to Regression lineIntroduction to Regression line
Introduction to Regression lineAmarnath R
 
Wireframe models
Wireframe modelsWireframe models
Wireframe modelsMohd Arif
 

What's hot (20)

Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graph
 
Karnaugh map peresentation
Karnaugh map  peresentationKarnaugh map  peresentation
Karnaugh map peresentation
 
K Map Simplification
K Map SimplificationK Map Simplification
K Map Simplification
 
Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)Computer graphics curves and surfaces (1)
Computer graphics curves and surfaces (1)
 
Applied Calculus: An introduction about Real Numbers and Real Line
Applied Calculus: An introduction about Real Numbers and Real LineApplied Calculus: An introduction about Real Numbers and Real Line
Applied Calculus: An introduction about Real Numbers and Real Line
 
Quadratics
QuadraticsQuadratics
Quadratics
 
Bezier Curve and Spline Curve
Bezier Curve and Spline CurveBezier Curve and Spline Curve
Bezier Curve and Spline Curve
 
Bezeir curve na B spline Curve
Bezeir curve na B spline CurveBezeir curve na B spline Curve
Bezeir curve na B spline Curve
 
Coons bicubic surface
Coons bicubic surfaceCoons bicubic surface
Coons bicubic surface
 
Synthetic curve
Synthetic curveSynthetic curve
Synthetic curve
 
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMERK-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
 
December 19
December 19December 19
December 19
 
Karnaugh map (k map)
Karnaugh map (k map)Karnaugh map (k map)
Karnaugh map (k map)
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data Structure
 
Introduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent imagesIntroduction to graphs and their ability to represent images
Introduction to graphs and their ability to represent images
 
Final Project Powerpoint
Final Project PowerpointFinal Project Powerpoint
Final Project Powerpoint
 
Synthetics surfaces unit ii
Synthetics surfaces unit iiSynthetics surfaces unit ii
Synthetics surfaces unit ii
 
Karnaugh Map (K-map)
Karnaugh Map (K-map)Karnaugh Map (K-map)
Karnaugh Map (K-map)
 
Introduction to Regression line
Introduction to Regression lineIntroduction to Regression line
Introduction to Regression line
 
Wireframe models
Wireframe modelsWireframe models
Wireframe models
 

Similar to Data structure - traveling sales person and mesh algorithm (20)

unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programming
 
Dijkstra
DijkstraDijkstra
Dijkstra
 
d
dd
d
 
traveling salesperson.pptx
traveling salesperson.pptxtraveling salesperson.pptx
traveling salesperson.pptx
 
Chap12 slides
Chap12 slidesChap12 slides
Chap12 slides
 
1535 graph algorithms
1535 graph algorithms1535 graph algorithms
1535 graph algorithms
 
Chap10 slides
Chap10 slidesChap10 slides
Chap10 slides
 
Graph representation
Graph representationGraph representation
Graph representation
 
Graph 1
Graph 1Graph 1
Graph 1
 
Parallel algorithm in linear algebra
Parallel algorithm in linear algebraParallel algorithm in linear algebra
Parallel algorithm in linear algebra
 
Combinatorial Optimization
Combinatorial OptimizationCombinatorial Optimization
Combinatorial Optimization
 
Chapter 5.pptx
Chapter 5.pptxChapter 5.pptx
Chapter 5.pptx
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
Transformations
TransformationsTransformations
Transformations
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Algorithms Design Exam Help
Algorithms Design Exam HelpAlgorithms Design Exam Help
Algorithms Design Exam Help
 

More from lavanya marichamy

Network design consideration
Network design considerationNetwork design consideration
Network design considerationlavanya marichamy
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specificationlavanya marichamy
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimizationlavanya marichamy
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Designlavanya marichamy
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transferlavanya marichamy
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transactionlavanya marichamy
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in clavanya marichamy
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formatslavanya marichamy
 

More from lavanya marichamy (17)

Digital video
Digital videoDigital video
Digital video
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
 
IEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LANIEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LAN
 
Broadband isdn and atm
Broadband  isdn and atmBroadband  isdn and atm
Broadband isdn and atm
 

Recently uploaded

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 

Recently uploaded (20)

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Data structure - traveling sales person and mesh algorithm

  • 1. DATA STRUCTURE -TRAVELING SALES PERSON AND MESH ALGORITHM Presented by M.Lavanya M.sc (CS & IT) Nadar Saraswathi College of arts & science Theni.
  • 2. INTRODUCTION • Dynamic programming algorithm for traveling sales person problem was arrived. • The worst case complexity of this algorithms will not be any better than the use of good bounding functions will able this branch and bound algorithms to solve some problems.
  • 3. TRAVELING SALES PERSON • Let G = ( V, E) be a directed graph with edge costs Cij. Cij is defined such that Cy > 0 for all i and j and Cy = co if< i,j > ~ E. • Let I VI = n and assume n > 1. A tour of G is a directed cycle that includes every vertex in V. • The cost of a tour is the sum of the cost of the edges on the tour. The traveling salesperson problem is to find a tour of minimum cost.
  • 4. • Every tour consists of an edge < 1, k > for some k E V - { 1} and a path from vertex k to vertex 1. • The path from vertex k to vertex 1 goes through each vertex in V - { 1, k} exactly once. • It is easy to see that if the tour is optimal then the path from k to 1 must be a shortest k to 1 path going through all vertices in V - { 1, k }. Hence, the principle of optimality holds.
  • 5. STATE SPACE TREE FOR THE TRAVELING SALESPERSON PROBLEM WITH n=4 AND i0=i4=1
  • 6. c(A)={length of tour defined by the path from the root to A , if A is leaf cost of a minimum-cost leaf in the sub tree A , if A is not a leaf. • For example: the path defined at node 6 is i0 , i1 , i2 =1 , 2 , 4. It consists of the edges <1,2> and <2,4>. • The reduced cost matrix corresponding to G a row or column set to be reduced iff it contains at least one zero and all remaining entries are non negative. A matrix is reduced iff every row and column is reduced.
  • 7. AN EXAMPLE FOR COST AND REDUCED COST MATRIX
  • 8. REDUCED COST MATRIX • Reduced cost matrix with every node in the traveling sales person state space tree . let A be the reduced cost matrix for node R. let S be a child of R such the tree edges(R,S).the reduced cost matrix for S may be obtained as follows:  change all entries in row I and column j of A to ∞.  Set A (j , 1) to ∞.  To reduce rows and columns in the resulting matrix except for rows and columns containing only ∞.
  • 9. STATE SPACE TREE GENERATED BY PROCEDURE LCBB The portion of the states spaces tree that gets generated starting with the root node as the E-node , nodes 2 , 3 , 4 and 5 are generated.
  • 10. REDUCED COST MATRICES CORRESPONDING TO NODES
  • 11. • Reduced matrixes corresponding to the nodes. The matrix of :  Setting all entries in row 1 and column 3 to ∞.  Setting the at position (3,1) to ∞.  Reducing column 1 by subtracting by11. • A possible organization for the state space is a binary tree in which a left branch represents the inclusion of a particular edge yield the right branch represents the exclusion of that edge.
  • 13. GRAPH AND STATE SPACE TREE • Fig (a) the dynamic binary tree formulation , considered cost matrix. • Fig (b) a total of 25 needs to be subtracted from the rows and columns of this matrix to obtain the reduced matrix. If edge <i,j> is the left subtree of the root represents all tours including edges <i,j> and the right subtree represents all tours that not include edge <i,j>. • Fig (c) represents the first two level of two possible states space tree for three vertex graph. Rather then use state space tree , now a considered a dynamic space tree. This also binary tree.
  • 15. • The root node an edge <i,j> maximize of the right subtree. An edge <i,j> cost is reduced matrix is positive. • For edge <1,4> , <2,5> , <3,1> , <3,4> , <4,5> , <5,2> , ∆ = 1 , 2 , 11 , 0 , 3 , 3 and 11 respectively. • The edges <3,1> or <5,3> can be used. The selects the edge <3,1> can be computed the state space tree.
  • 17. MESH ALGORITHM Computational Model: • A mesh is a x b grid there is a processor at each grid pointer. The edges is to communication links and bidirectional . • Each processor can labeled with tuple (i,j) where 1 ≤ i ≤ a and 1 ≤ j ≤ b. • Every processor of the mesh is a RAM with local memory.
  • 18. • The basic operations such as addition , subtraction , multiplication , comparison , local memory access and so on , in 1 unit time. • This computation is to be synchronous ; that is , there is a global clock and in every time unit each processor completes it tasks.
  • 19. MESH – CONNECTED COMPUTER A considered only square meshes , that is , meshes for which a=b. A √p X √p mesh
  • 20. LINEAR ARRAY • A linear array consist of be processor (named 1,2,…….,p) • The processor 1 is connected to processor 2 and processor p is connected to processor p-1 • processors 1 and p are known as the boundary processors. Processor i-1(i+1) is called left neighbor(right neighbor) of i.
  • 21. • In a mesh, all processor first(second) coordinates are the same form a row (column) of the mesh . For eg row i is made up of the processors(i,1) , (i,2) ,….,(i, √p). • Each row or column is a √p- processor linear array . a mesh algorithm consists of steps that are local to individual rows or columns.