(20 pts.) 2SAT. In the 2SAT problem, you are given a set of clauses, where each...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(20 pts.) 2SAT. In the 2SAT problem, you are given a set of clauses, where each clause is the disjunction (OR) of two literals (a literal is a Boolean variable or the negation of a Boolean variable). You are looking for a way to assign a value true or false to each of the variables so that all clauses are satisfied - that is, there is at least one true literal in each clause. For example, here's an instance of 2SAT with five clauses and four variables: (x₁ V₂) ^ (₁ Vŵ3) ^ (X1 V x₂) ^ (ŵ3 V X4) ^ (ŵ1 V x4). This instance has a satisfying assignment: set x₁, x2, x3, and x4 to true, false, false, and true, respectively. Given an instance of 2SAT with n variables and m clauses, construct a directed graph G = (V,E) as follows: ● Go has 2n nodes, one for each variable and one for its negation. Go has 2m edges: for each clause (a vß) of þ (where a and 3 are literals), Go has an edge from the negation of a to ß, and one from the negation of ß to a. (a) Show that if Go has a strongly connected component containing both x and its negation ✰ for some variable x, then o has no satisfying assignment. (b) Now show the converse of (a): namely, that if none of Go's strongly connected components contain both a literal and its negation, then the instance & must be satisfiable. To prove this, show that the following algorithm results in a satisfying assignment: repeatedly pick a sink strongly connected com- ponent of Go. Assign the value true to all literals in the sink and assign false to their negations, delete all of the nodes in the sink, and repeat. (Hint: Consider case analysis on when each literal of a clause is assigned a value.) (c) Starting from a given instance of 2SAT, use everything discussed above to show that it can be solved in linear time. (20 pts.) 2SAT. In the 2SAT problem, you are given a set of clauses, where each clause is the disjunction (OR) of two literals (a literal is a Boolean variable or the negation of a Boolean variable). You are looking for a way to assign a value true or false to each of the variables so that all clauses are satisfied - that is, there is at least one true literal in each clause. For example, here's an instance of 2SAT with five clauses and four variables: (x₁ V₂) ^ (₁ Vŵ3) ^ (X1 V x₂) ^ (ŵ3 V X4) ^ (ŵ1 V x4). This instance has a satisfying assignment: set x₁, x2, x3, and x4 to true, false, false, and true, respectively. Given an instance of 2SAT with n variables and m clauses, construct a directed graph G = (V,E) as follows: ● Go has 2n nodes, one for each variable and one for its negation. Go has 2m edges: for each clause (a vß) of þ (where a and 3 are literals), Go has an edge from the negation of a to ß, and one from the negation of ß to a. (a) Show that if Go has a strongly connected component containing both x and its negation ✰ for some variable x, then o has no satisfying assignment. (b) Now show the converse of (a): namely, that if none of Go's strongly connected components contain both a literal and its negation, then the instance & must be satisfiable. To prove this, show that the following algorithm results in a satisfying assignment: repeatedly pick a sink strongly connected com- ponent of Go. Assign the value true to all literals in the sink and assign false to their negations, delete all of the nodes in the sink, and repeat. (Hint: Consider case analysis on when each literal of a clause is assigned a value.) (c) Starting from a given instance of 2SAT, use everything discussed above to show that it can be solved in linear time.
Expert Answer:
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these programming questions
-
Maria has a bad eyesight and has to wear glasses ( minus ) 2 D . She tried to swim underwater wearing the glasses but the vision is not clear. She wiil buy underwater glasses. Compute the optical...
-
You are given a set of N sticks, which are lying on top of each other in some configuration. Each stick is specified by its two endpoints; each endpoint is an ordered triple giving its x, y, and z...
-
You are given a set of points S in Euclidean space, as well as the distance of each point in S to a point x. (It does not matter if x S.) (a) If the goal is to find all points within a specified...
-
A woman flies from Phoenix to Denver (a distance of 800 mi) at a rate 40 mph faster than on the return trip. If the total time of the trip is 9 hrs, what was her rate going to Denver, and what was...
-
A fluid at 20C flows at 850 cm3/s through an 8-cm-diameter pipe. Determine the entrance length if the fluid is (a) hydrogen; (b) air; (c) gasoline; (d) water; (e) mercury; and (f) glycerin.
-
Brinker International operates Chili's, Macaroni Grill, and other restaurant chains. The following items are classified as current liabilities on Brinker International's balance sheets as of 2014 and...
-
Explain the working of an absorption type dynamometer.
-
Fredericks Farm Factory (FFF) currently maintains an average inventory valued at $3,400,000. The company estimates its capital cost at 10 percent, its storage cost at 4.5 percent, and its risk cost...
-
What is a plan on how you intend to be successful in future semesters. The plan should be a source of motivation to do well in college, both professionally and personally. Include tips that you can...
-
Pathfinder College is a small liberal arts college that wants to improve its admissions process. In particular, too many of its incoming freshmen have failed to graduate for a variety of reasons,...
-
Consider the following initial value problem, representing the response of a damped oscillator subject to the discontinuous applied force f(t): y"+ 14/ + 53y = f(t), y(0) = -6, (0) = 4, f(t) = {0 (1 3
-
3. Perform the z = x - y using 2's complement (5 Marks) x = 10000111 y = 01010000
-
Suppose we are looking at an interval of a motion that is nearly uniform. Now suppose we look at a small segment of that interval, say one-tenth of it. Would you expect that motion in this smaller...
-
In Millions May 31, 2020 May 26, 2019 Receivables: Customers $1,648.3 $1,708.5 Less allowance for doubtful accounts (33.2) (28.8) Total $1,615.1 $1,679.7 In Millions May 31, 2020 May 26, 2019...
-
Highlight and correct the punctuation mistake in each of the following sentences. Each sentence has one mistake. DO NOT just identify the error -- be sure to correct it. "Do you eat a lot of fried...
-
What can you infer as the cause-and-effect relationship here? Beef Price (per pound) $2.70 $2.60 $2.50 $2.40 $2.30 $2.20 $2.10 $2.00 $2.09 $ 1.89 $ 1.99 2,500 3,500 $ 2.39 $ 2.69 1,000 4,000 6,000...
-
Please complete this worksheet on your own after you have reviewed your confidential role-play information. You must complete this worksheet BEFORE you conduct the actual negotiation with your...
-
Global.asax is used for: a. declare application variables O b. all other answers are wrong O c. declare global variables O d. handle application events
-
Suppose that disk hardware allows us to choose the size of a disk page arbitrarily, but that the time it takes to read the disk page is a + bt, where a and b are specified constants and t is the...
-
Write an iterative version of RANDOMIZED-SELECT.
-
An n-input, m-output boolean function is a function from {TRUE, FALSE} n to {TRUE, FALSE} m . How many n-input, 1-output boolean functions are there? How many n-input, m-output boolean functions are...
-
Use the data of Problem 3.8 to find the phase differences of the Loewy function for a double bladed rotor where only the distance between the blades are counted. Make the same computations for...
-
If the gust intensity with time varies as given in Fig. 3.16, obtain the lift and the moment coefficient changes about the midchord and their plots with respect to time. Fig. 3.16 Wg 0 to t
-
Find the lift and the moment coefficients about the midchord of an airfoil which undergoes a sudden vertical translation under zero angle of attack. Use the Wagner function.
Study smarter with the SolutionInn App