
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
This is an answer. Please summarize it

Transcribed Image Text:A) Travelling salesman problem:
The travelling salesman problem (TSP) is a computational issue in which the goal is to find the quickest
distance between a set of points and places. The points in the problem statement represent cities that a
salesperson could visit. The objective of the distributor is to keep all travel costs and distance travelled to a
minimum.
TSP is always more concerned with finding the cheapest alternative than with finding the most efficient path.
The large number of variables in TSP makes finding the quickest distance challenging, which makes estimated,
quick, and cheap solutions all the more appealing.
Application of TSP:
In computer science, TSP is often used to determine the most effective path for data to travel between
nodes.
• Identifying network or hardware optimization methods is one of the applications.
Algorithm to solve TSP:
The algorithm Minimum Spanning Tree is used to solve the TSP.
There are approximate algorithms for solving TBS the problem. Only if the problem instance satisfies Triangle-
Inequality do the approximate algorithms work. According to Triangle-Inequality for any given triangle, the
sum of two sides of a triangle is always greater than the third side.
We can build an approximation algorithm for TSP problem that returns a route that is never more than twice
the cost of an acceptable tour when the cost function satisfies the triangle inequality. The concept is to use a
Minimum Spanning Tree (MST). The MST-based algorithm is shown below.
Algorithm:
1) Assume 1 is the beginning and ending point for the salesman.
2) Using Prim's Algorithm, construct MST from 1 as the root.
3) Add 1 to the list of vertices visited in the constructed MST's preorder walk.

Transcribed Image Text:Let's take a look at the following scenario. The provided graph is the first diagram. The second diagram depicts
MST with 1 as the root. MST has a preorder traversal of 1-2-4-3. The performance of this algorithm is 1-2-4-3-1,
which is obtained by adding 1 at the end.
The cost of the above algorithm's performance is never more than twice the cost of the best possible output.
Let's look at how the above algorithm ensures this. To better understand this, let's describe the word
"absolute walk." A complete walk lists all vertices when they are visited for the first time in preorder, as well as
when they are returned after a subtree is visited for the first time in preorder. The above tree's complete walk
will be 1-2-1-4-1-3-1.
The following are some important facts to prove the approximations.
The best possible Traveling Salesman tour will never be less pricey than MST. (According to the
definition, MST is a minimum cost tree that links all edges.)
• A complete walk would cost at least twice more than MST (Every edge of MST is visited at-most twice)
• The above algorithm produces a result that is less expensive than a complete walk. We print preorder
walk as output in the algorithm above. Two or more edges of a complete walk are replaced with a single
edge in preorder walk. 2-1 and 1-4, for example, are replaced by 1 edge 2-4. This is always valid if the
graph follows triangle inequality.
from the above instruction, that we can conclude that the cost of output produced by the approximate
algorithm is never more than twice the cost of best possible solution. The output of this algorithm is 1-2-4-3-1.
B) Time complexity of the algorithm:
Time complexity of minimum spanning tree is o(v).
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- A foreign key is the candidate key that is selected to identify tuples. True or False.arrow_forwardHi, This is what I have, but I am stuck with what to write and not sure if my function is even correct, to begin with. Can someone show me a walk-through solution? MUST USE postgreSQL CREATE TABLE instructor_course_nums (ID VARCHAR(25), name VARCHAR(25), tot_courses VARCHAR(25)); CREATE OR REPLACE PROCEDURE calculate_instr_course(ID VARCHAR(25), name VARCHAR(25), tot_courses VARCHAR(25))LANGUAGE plpgsqlAS$$BEGIN END;$$;arrow_forwardThird normal form says: a. No nonkey columns depend on another nonkey column. b. Every column that's not part of the primary key is fully dependent on the primary key. c. Eliminate repeated fields. d. None of the above.arrow_forward
- The order of operands is significant in EXCEPT (MINUS) queries but is irrelevant in UNION queries?arrow_forwardBelow are some rows of the PROVIDERS table for a factory: PCODE 10192 98411 0489035 NAME Hans, Inc. Tools and More Motors Inc. PHONE 231 - 3092 231-1029 993 - 1821 All providers from the factory zone of the city start with 231. You want to get the providers that are in the factory zone of the city. Which of the following is more appropriate? O a. O b. SELECT * FROM PROVIDERS WHERE PHONE LIKE '% 231' O C. O d. SELECT * FROM PROVIDERS WHERE PHONE LIKE $231%' SELECT * FROM PROVIDERS WHERE PHONE LIKE 231 SELECT * FROM PROVIDERS WHERE PHONE LIKE '%231%'arrow_forward1.6 Using SQL Server (Not Oracle)arrow_forward
- First normal form says: a. No nonkey columns depend on another nonkey column b. Every column that's not part of the primary key is fully dependent on the primary key. c. Eliminate repeated fields. d. None of the abovearrow_forward4. Update the name of the student to "John Doe" where its id is 10. Enter your answer 5. Modify the "student" table by adding "address" column/field as string and allows null.arrow_forwardI need help with creating the SQL statement for the instructions below. Create the following 2 tables with columns and constraints Table Lab4program_xxxx has 3 columns: code is varchar(5) and the primar key, name is varchar(20), tel varchar(20). Table Lab4course_xxxx has 3 columns: cid is int, and the primary key, name is varchar(20), credits is int, mycode is a foreign key reference to your Lab4program table. Table Lab4program_xxxx has 3 columns: code is varchar(5) and the primar key, name is varchar(20), tel varchar(20). Table Lab4course_xxxx has 3 columns: cid is int, and the primary key, name is varchar(20), credits is int, mycode is a foreign key reference to your Lab4program table.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education