Quiz Space

Advanced Algorithms · End Term · 24 Dec 2023 · September 2023 term · Set ADI4

Question 17: In the MIN-2-SAT problem, we are given a 2-CNF formula \…

Question 17

+3 marksOne correct option

In the MIN-2-SAT problem, we are given a 2-CNF formula ϕ\phi and an integer kk, and the objective is to decide whether there exists an assignment for ϕ\phi that satisfies at most kk clauses.

Consider the following branching algorithm for the problem.

If there is a variable xx that occurs only positively in ϕ\phi, observe that there exists an optimal assignment that sets it to 00. Similarly, if there is a variable xx that occurs only positively in ϕ\phi, there exists an optimal assignment that sets it to 11. Once we perform this preprocessing, assuming that have clauses remaining, we have the following guarantee:

Every variable has at least one positive and one negated occurrence.

Now we can branch exhaustively on the settings of variables. The overall algorithm is summarized in the following pseudocode:

text
MINSAT(phi,k):
if there is a variable x that occurs only as a positive literal:
set x to 0
if there is a variable x that occurs only as a negated literal:
set x to 1
if phi is empty:
return YES
if phi is not empty and k <= 0:
return NO
Let x be any variable that occurs in phi.
return MINSAT(phi|[x = TRUE],k-1) OR MINSAT(phi|[x = FALSE],k-1)

Which of the following statements is true?

  1. A

    In both branches of the algorithm, at least one clause is falsified.

  2. B

    In both branches of the algorithm, at least one clause is satisfied.

  3. C

    In both branches of the algorithm, at least two clauses are falsified.

  4. D

    In both branches of the algorithm, at least two clauses are satisfied.

Show answer

Correct answer

  • B

    In both branches of the algorithm, at least one clause is satisfied.

Question 17 of 24 in the IIT Madras BS Advanced Algorithms (Advanced Algorithms) End Term paper sat on 24 Dec 2023, in the September 2023 term (IIT M DEGREE FN EXAM FDB1 24 Dec 2023). It carries 3 marks.

More questions from this paper

  1. Q1In one term of an academic program, we have n days. Students have to earn at least P credits during these n days to rem…
  2. Q2In one term of an academic program, we have n days. Students have to earn at least P credits during these n days to rem…
  3. Q3In one term of an academic program, we have n days. Students have to earn at least P credits during these n days to rem…
  4. Q4In one term of an academic program, we have n days. Students have to earn at least P credits during these n days to rem…
  5. Q5Figure question
  6. Q6Choose the correct options:
  7. Q7Consider the following instance of Set Cover problem: Universe \mathcal{U} = {a, b, c} Family \mathcal{F} = {S_1 = {a, …
  8. Q8What is the answer if R = C = N and there are no cut out squares?
  9. Q9What is the answer if R = C = N and all the squares on the topmost row and rightmost column (i.e, a L-shape) are cut ou…
  10. Q10Consider the following bipartite graph: the set A is composed of elements corresponding to every row of the board, whil…
  11. Q11What is the maximum number of edges that the graph constructed in the previous question can have?
  12. Q12Consider the following instance of Set Cover problem: Universe \mathcal{U} = {a, b, c, d} Family \mathcal{F} = \left{S_…
  13. Q13Consider the following instance of Set Cover problem: Universe \mathcal{U} = {a, b, c, d} Family \mathcal{F} = \left{S_…
  14. Q14The three-bonaci numbers are defined as follows (please read the definition carefully, as it may not be the generalizat…
  15. Q15The three-bonaci numbers are defined as follows (please read the definition carefully, as it may not be the generalizat…
  16. Q16The three-bonaci numbers are defined as follows (please read the definition carefully, as it may not be the generalizat…
  17. Q18Consider the given statements and answer if they are true or false. The worst-case running time and expected running ti…
  18. Q19Consider the given statements and answer if they are true or false.
  19. Q20Every linear program has a unique optimal solution.
  20. Q21Recall that in the vertex cover problem, we are trying to find a smallest subset S of vertices in a graph G such that G…
  21. Q22Consider the algorithm in the previous question. Does the algorithm always output an optimal vertex cover?
  22. Q23Consider the algorithm in the previous question no 22. Does the algorithm always output a 2- approximate vertex cover?
  23. Q24Recall that the size of an optimal vertex cover is at most twice the size of a maximum matching of a graph G. Are there…