SlideShare a Scribd company logo
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 graph
Rounak Biswas
 
Karnaugh map peresentation
Karnaugh map  peresentationKarnaugh map  peresentation
Karnaugh map peresentation
AbdulRehmanKaleem1
 
K Map Simplification
K Map SimplificationK Map Simplification
K Map Simplification
Ramesh 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 Line
baetulilm
 
Quadratics
QuadraticsQuadratics
Quadratics
pelican24
 
Bezier Curve and Spline Curve
Bezier Curve and Spline CurveBezier Curve and Spline Curve
Bezier Curve and Spline Curve
AsifShahariar1
 
Bezeir curve na B spline Curve
Bezeir curve na B spline CurveBezeir curve na B spline Curve
Bezeir curve na B spline Curve
Pooja Dixit
 
Coons bicubic surface
Coons bicubic surfaceCoons bicubic surface
Coons bicubic surface
ramac123
 
Synthetic curve
Synthetic curveSynthetic curve
Synthetic curve
Dhruv 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 PROGRAMMER
kunal kishore
 
December 19
December 19December 19
December 19
khyps13
 
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 Structure
Gaurang 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 images
Anyline
 
Final Project Powerpoint
Final Project PowerpointFinal Project Powerpoint
Final Project Powerpoint
CareyF518
 
Synthetics surfaces unit ii
Synthetics surfaces unit iiSynthetics surfaces unit ii
Synthetics surfaces unit ii
jntuhcej
 
Karnaugh Map (K-map)
Karnaugh Map (K-map)Karnaugh Map (K-map)
Karnaugh Map (K-map)
Saimur Swarnab
 
Introduction to Regression line
Introduction to Regression lineIntroduction to Regression line
Introduction to Regression line
Amarnath R
 
Wireframe models
Wireframe modelsWireframe models
Wireframe models
Mohd 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

unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programming
hodcsencet
 
Dijkstra
DijkstraDijkstra
Dijkstra
jagdeeparora86
 
d
dd
traveling salesperson.pptx
traveling salesperson.pptxtraveling salesperson.pptx
traveling salesperson.pptx
PooraniBalamurugan3
 
Chap12 slides
Chap12 slidesChap12 slides
Chap12 slides
BaliThorat1
 
1535 graph algorithms
1535 graph algorithms1535 graph algorithms
1535 graph algorithms
Dr Fereidoun Dejahang
 
Chap10 slides
Chap10 slidesChap10 slides
Chap10 slides
BaliThorat1
 
Graph representation
Graph representationGraph representation
Graph representation
Tech_MX
 
Graph 1
Graph 1Graph 1
Parallel algorithm in linear algebra
Parallel algorithm in linear algebraParallel algorithm in linear algebra
Parallel algorithm in linear algebra
Harshana Madusanka Jayamaha
 
Combinatorial Optimization
Combinatorial OptimizationCombinatorial Optimization
Combinatorial Optimization
Institute of Technology, Nirma University
 
Chapter 5.pptx
Chapter 5.pptxChapter 5.pptx
Chapter 5.pptx
Tekle12
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
MATLABgraphPlotting.pptx
MATLABgraphPlotting.pptxMATLABgraphPlotting.pptx
MATLABgraphPlotting.pptx
PrabhakarSingh646829
 
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
Sahil Kumar
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
B.Kirron Reddi
 
Transformations
TransformationsTransformations
Transformations
Syed Zaid Irshad
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
Nv Thejaswini
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
pournima055
 
Algorithms Design Exam Help
Algorithms Design Exam HelpAlgorithms Design Exam Help
Algorithms Design Exam Help
Programming Exam Help
 

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

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

Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

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.