You are using a polynomial time 2-approximation algorithm to find a tour t for the traveling salesman problem. Which of the following statements is true.
The tour t is never optimal.
The cost of tour t is at most twice the cost of the optimal tour.e the
The cost of tour t is always 2 times the cost of the optimal tour.
The ratio of the cost of the optimal tour divided by the cost of tour t is 2.
All of the above
Second option is the correct answer.
For a polynomial time 2-approximation algorithm to find a tour 't' for the traveling salesman problem let us assume:
The cost of the tour 't' = C1
The cost of the optimal tour = C2
In that case Cost(C1) <= 2 Cost(C2)
First, third and fourth options are incorrect. For this reason fifth option is also incorrect.
Hope this helps.
You are using a polynomial time 2-approximation algorithm to find a tour t for the traveling...
3. (3 pts) Two well-known NP-complete problems are 3-SAT and TSP, the traveling salesman problem. The 2-SAT problem is a SAT variant in which each clause contains at most two literals. 2-SAT is known to have a polynomial-time algorithm. Is each of the following statements true or false? Justify your answer. a. 3-SAT sp TSP. b. If P NP, then 3-SAT Sp 2-SAT. C. If P NP, then no NP-complete problem can be solved in polynomial time.
Suppose you have a minimization problem and an algorithm A, that has an approximation ratio of 4. When run on some input I, A produced a solution with cost 20. What can you say about the optimal answer (let's call it OPT)? Mark “true" or "false" for inequalities below and briefly explain your answer(s). • OP T5 • OP T < 5 • OP T >80 • OP T < 80
#3. Suppose you have a minimization problem and an algorithm A, that has an approximation ratio of 4. When run on some input I, A produced a solution with cost 20. What can you say about the optimal answer (let's call it OPT)? Mark "true" or "false" for inequalities below and briefly explain your answer(s). • OPT 25 • OPT<5 • OPT> 80 • OP T S 80
10. Consider the Traveling Salesperson problem (a) Write the brute-force algorithm for this proble that considers (b) Implement the algorithm and use it to solve instances of size 6, 7, (c) Compare the performance of this algorithm to that of Algorithm all possible tours 8, 9, 10, 15, and 20 6.3 using the instances developed in (b) Algorithm 6.3 The Best-First Search with Branch-and-Bound Pruning Algorithm for the Traveling Salesperson problem Problem: Determine an optimal tour in a weighted, directed...
This is all I have
2. Consider the following approximation algorithm for the bin packing problem. Algorithm Last Fit(1,S) Input: Set I of items and set S of item sizes; item I; E I has size S; Output: A packing of I into unit size bins B {} for each item I; e I do { if I; fits in one of the bins of B then Put I; in the last bin where it fits else { Add a...
1. Consider the Viterbi algorithm. Which of the following statements is/are true. if any? (i) It is an algorithmused for optimal thresholding (ii) It is an algorithm to find shortest paths in on a network (ii)It is an algorithm to detect lines in images (a) (i) (b) (ii) (c) (ii) (d) All of the above (e) None of the above 4. If we apply a binary opening to the same object twice using the same structuring element, the effect. if...
Problem E: For each of the following parts, state True or False. If true, give a short proof. If false, givera counterexample: (1). Using Kruskal's algorithm, edges are (always) inserted into the MST in the same order as using Prim's (2). If an edge e is part of a TSP tour found by the quick TSP method then it must also be part of the (3). If an edge e is part of a Shortest Path Tree rooted at A...
5. Find the approximation of y(3) by using Euler's method with a time step h = 1, where y solves the initial value problem, %3D /(t) = cos(nt)y(t) - t, y(0)= 2. A. -3 B. -4 C. -1 D. 2 E. 4
Consider the function f(x) := v/x= x1/2. 6. (a) Give the Taylor polynomial P(x) of degree 5 about a1 of this function (b) Give the nested representation of the polynomial Qs()Ps((t)) where t -1 ((t)+1). (c) Using the nested multiplication method (also called Horner's algorithm), compute the approximation Ps (1.2) to V (give at least 12 significant digits of P(1.2)) (d) Without using the exact value of 12, compute by hand an upper bound on the absolute error V1.2 A(1.21...
It is due in 2 hours.. Thanks !
Suppose that an algorithm runs on a tree containing n nodes. What is the time complexity of the algorithm if the time spent per node in the tree is proportional to the number of grandchildren of the node? (Assume that the algorithm spends O(1) time for every node that does not have a grandchild.) In modern software development, a useful utility called make is usually employed to manage the compilation order of...