Quiz Space

Advanced Algorithms · End Term · 3 Sept 2023 · May 2023 term · Set QPE1-S1

Question 34: Recall the Traveling Salesman Problem: Definition Travel…

Question 34

+4 marksOne correct option

Recall the Traveling Salesman Problem:

Definition

Traveling Salesman Problem

Input: A set of distinct cities {c1,c2,…,cn}\{c_1, c_2, \ldots, c_n\} and for each pair ci≠cjc_i \neq c_j the distance between cic_i and cjc_j, denoted by d(ci,cj)d(c_i, c_j), and a budget kk.

Question: Determine if there is a permutation π\pi of {1,2,…,n}\{1, 2, \ldots, n\}, such that the following sum:

∑i=1n−1d(cπ(i),cπ(i+1))+d(cπ(n),cπ(1))\sum_{i=1}^{n-1} d\left(c_{\pi(i)}, c_{\pi(i+1)}\right) + d\left(c_{\pi(n)}, c_{\pi(1)}\right)

is at most kk.

The dynamic programming algorithm for TSP computes for every pair (S,ci)(S, c_i), where SS is a nonempty subset of {c2,c3,…,cn}\{c_2, c_3, \ldots, c_n\} and ci∈Sc_i \in S, the value OPT[S,ci]OPT[S, c_i] which is the minimum length of a tour which starts in c1c_1, visits all cities from SS and ends in cic_i. We compute the values OPT[S,ci]OPT[S, c_i] in order of increasing cardinality of SS. The computation of OPT[S,ci]OPT[S, c_i] in the case SS contains only one city is trivial, because in this case, OPT[S,ci]=d(c1,ci)OPT[S, c_i] = d(c_1, c_i). For the case ∣S∣>1|S| > 1, observe that if in some optimal tour in SS terminating in cic_i, the city cjc_j immediately precedes cic_i, then

OPT[S,ci]=OPT[S∖{ci},cj]+d(cj,ci).OPT[S, c_i] = OPT[S \setminus \{c_i\}, c_j] + d(c_j, c_i).

This leads us to expressing the value of OPT[S,ci]OPT[S, c_i] in terms of subsets of SS as follows.

OPT[S,ci]=min⁡{OPT[S∖{ci},cj]+⋆:cj∈S∖{ci}}.OPT[S, c_i] = \min\{OPT[S \setminus \{c_i\}, c_j] + \star : c_j \in S \setminus \{c_i\}\}.

Note that the minimum is taken over cj∈S∖{ci}c_j \in S \setminus \{c_i\}. What is the missing term?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 34 of 34 in the IIT Madras BS Advanced Algorithms (Advanced Algorithms) End Term paper sat on 3 Sept 2023, in the May 2023 term (IIT M DEGREE ET1 EXAM QPE1 S2 03 Sep). It carries 4 marks.

More questions from this paper

  1. Q1Recall the Dance Class problem: Problem Definition Dance Classes Input: A collection of n intervals given by their left…
  2. Q2Figure question
  3. Q3True or false?
  4. Q4Figure question
  5. Q5Raj and Lata both designed an algorithm for the same minimization problem. Raj proved that his algorithm Alg1 is a 5-ap…
  6. Q6Recall the max-flow problem: for a directed graph G(V, E) with non-negative capacities c_e for every e \in E and two sp…
  7. Q7Figure question
  8. Q8Recall the Dance Class problem: Problem Definition Dance Classes Input: A collection of n intervals given by their left…
  9. Q9Recall the Stable Matching problem: Problem Definition Stable Matching Input: Two sets given by M = {m_1, \ldots, m_n} …
  10. Q10Is the collection of outgoing 1/2-factors over the set A a matroid?
  11. Q11Is the collection of incoming 1/2-factors over the set A a matroid?
  12. Q12Is the collection of 1-factors over the set A a matroid?
  13. Q13Can the collection of 1-factors be defined as the intersection of two matroids?
  14. Q14Based on the above data, answer the given subquestions.
  15. Q15The memory of Bob's computer contains two interesting things: an array of integers and a virus. Each midnight the virus…
  16. Q16The memory of Bob's computer contains two interesting things: an array of integers and a virus. Each midnight the virus…
  17. Q17The memory of Bob's computer contains two interesting things: an array of integers and a virus. Each midnight the virus…
  18. Q18The memory of Bob's computer contains two interesting things: an array of integers and a virus. Each midnight the virus…
  19. Q19The memory of Bob's computer contains two interesting things: an array of integers and a virus. Each midnight the virus…
  20. Q20Consider the network given below with source s and sink t, with the numbers on the edges denoting maximum capacity acro…
  21. Q21Figure question
  22. Q22Consider the network given below with source s and sink t, with the numbers on the edges denoting maximum capacity acro…
  23. Q23Consider the following orientation problem. We are given an undirected graph G = (V, E) and integer values p(v) for eve…
  24. Q24Consider the partially carefully properly 5-colored graph below. What color should we give the vertex in the center to …
  25. Q25Is this problem NP-complete? Hint. You may assume that determining if a graph G has a proper 5- coloring is NP-complete.
  26. Q26In the Uncapacitated Facility Location (UCFL) problem, we are given (\mathcal{F} \uplus \mathcal{D}, d) as well auxilia…
  27. Q27Consider the followed randomized algorithm, which prints out some number of smiley faces (:)) and some number of asteri…
  28. Q28Consider the followed randomized algorithm, which prints out some number of smiley faces (:)) and some number of asteri…
  29. Q29Consider the followed randomized algorithm, which prints out some number of smiley faces (:)) and some number of asteri…
  30. Q30Consider the followed randomized algorithm, which prints out some number of smiley faces (:)) and some number of asteri…
  31. Q31Based on the above data, answer the given subquestions.
  32. Q32Based on the above data, answer the given subquestions.
  33. Q33Based on the above data, answer the given subquestions.