Question

In: Electrical Engineering

Call a log-space reduction a reduction that uses only O(logn) space in addition to the input...

Call a log-space reduction a reduction that uses only O(logn) space in addition to the input itself, and not counting the produced result. In other words, there are three tapes: tape 1 is read-only (the input), tape 2 is read-write (the work tape), and tape 3 is write-only (the output tape). Then we insist that tape 2 use O(logn) space (tape 3 is unrestricted, but remember it is write-only). Such a reduction is denoted ≤L. Show that 3SAT L CLIQUE.

Solutions

Expert Solution

Answer: Every boolean formula can be written as  

(...v..v....) ^ (v...v...v) ^ ... this is called conjuctive nomal form (CNF) where v is nothing but varables

each set of variables denotes clauses so clause 1 & clause 2 respectively from above

so the both clauses to be satisfied i.e they should be evaluated since it is connected by and (^)

failing which the whole formula will not be satisfied.

So, if one of the clauses is not satisfied, the whole formula won't be satisfied.

Let G be an undirected graph. A clique in G is a set A of vertices such that all possible edges between elements of A exist in G.

Any vertex forms a clique of size 1, the endpoints of any edge form a clique of size 2, and any triangle is a clique of size 3. The CLIQUE language is a set of pairs (G, k) such that G is an undirected graph that contains some clique of k size.

It should be that CLIQUE is in the class NP. NP-procedure has an arbitrary set A of vertices (with known bitvector of n length). Then the verification phase checks that A has size exactly k and that there is an edge between every pair of vertices in A.

We’ll prove CLIQUE to be NP-complete by reducing 3- SAT to it. Recall means defining a function from 3-CNF formulas to graph-integer pairs, such that satisfiable formulas are mapped to pairs (G, k) such that G has a k-clique and thus unsatisfiable formulas are mapped to pairs where G does not have a k-clique. The main element of any reduction is a correspondence between the two NP-problems. The possible cliques are also denoted by bitvectors, Even the 3-CNF formula is satisfied or not satisfied by a bitvector of length n.

We' ve to make the graph so that a satisfying instance corresponds to a k-clique and vice versa, and we get to pick k for our instances. Here’s the construction.

We have a node for each of a literal in the formula. So if there are m clauses, each with ki literals, the number of vertices the graph is the sum from 1 to m of ki .

Now we need edges. We place an edge between nodes x and y if they refer to literals that occur in different clauses and are not in conflict. We set k to be m, the number of clauses.

Nodes: Appearances of literals in clauses

Edges: Pairs of nodes that are in different clauses and not in conflict.

We prove that the 3-CNF formula is satisfiable if there is an m-clique in the graph. First assume that there is a satisfying assignment, which means that there is at least one literal in each clause that is set true. Fix a set containing exactly one true literal in each clause.

The m nodes corresponding to these literals must form a clique. No two of them are in the same clause, and no two of them can be in conflict, so all possible edges between then exist.

Conversely, suppose that we have an m-clique in the graph. The m nodes must occur in m different clauses, since edges only connect nodes in different clauses. Because the m nodes also contain no conflicts, we can construct a setting of the variables consistent with all those literals. This setting makes at least one literal in each clause true, so it satisfies the formula.

Note: We may have to arbitrarily set variables that don’t occur in the set either as true or as false

REDUCTION OF 3SAT ≤L CLIQUE:

FOR A given graph G= (V,E) and integer k, find if G contains a clique of size >=k

A formula 3-literal clauses can be reduced to a k-clique problem & follow the following steps below

  • Construct a graph G of k clusters with max of 3 nodes in each cluster.
  • Each cluster corresponds to clause in
  • Each node in cluster is labelled with a literal from clause
  • An edge is put between pairs of nodes in different clusters except for pairs of (x,) form
  • No edge is put between any pair of nodes in same cluster.
  1. construction of cluster of nodes corr to clauses in 3 CNF


Related Solutions

how do i find a peak in time complexity of O(log(n)) in a list? input: a...
how do i find a peak in time complexity of O(log(n)) in a list? input: a list of numbers or integers output: a possible local peak in the list for an example: calling function [2,3,8,9,5] would return 3 im thinking about using binary search but it would require a sorted list.
An economy uses only labor as input to produce two goods, A and B. If its...
An economy uses only labor as input to produce two goods, A and B. If its production possibilities frontier (PPF) of two goods is a negative-sloped straight line, what is the implication in opportunity costs? Will the law of increasing costs still hold? Please state briefly.
The only variable input a janitorial service uses to clean classrooms is workers who are paid...
The only variable input a janitorial service uses to clean classrooms is workers who are paid $8 an hour. Each worker can clean 4 classrooms in an hour. Determine equations for and graph the variable cost, average variable cost and marginal cost of cleaning offices
the only variable input a janitorial service uses to clean offices are workers who are paid...
the only variable input a janitorial service uses to clean offices are workers who are paid a wage of $20 an hour, known as w. each worker is capable of cleaning 10 offices in one hour. A) determine the average variable cost and marginal cost of cleaning one extra office b) draw the diagram of the total cost, average variable cost, and marginal cost curves showing their relationships c) how will these curves change with a lump sum franchise tax...
Write a C program using system call I/O to ****NOTE YOU MUST USE SYSTEM CALL I/O,...
Write a C program using system call I/O to ****NOTE YOU MUST USE SYSTEM CALL I/O, meaning STANDARD I/O IS NOT ALLOWED a) open an existing text file passed to your program as a command-line argument, then b) display the content of the file, c) ask the user what information he/she wants to append d) receive the info from the user via keyboard e) append the info received in d) to the end of the file f) display the updated...
Show for the following recurrence that T(n) = T(n/3) + n*log(n) is O(n*log(n)) (not using the...
Show for the following recurrence that T(n) = T(n/3) + n*log(n) is O(n*log(n)) (not using the Master theorem please)
1. For each of the following, prove using the definition of O(·): (a) 7n + log(n)...
1. For each of the following, prove using the definition of O(·): (a) 7n + log(n) = O(n) (b) n2 + 4n + 7 = O(n2 ) (c) n! = O(nn) (d) 2n = O(22n) Please explain the procedure clearly for all (They are of the same question)
Write a log-in log-out session using PHP, CSS, and HTML only. NO MYSQL and JavaScript allowed....
Write a log-in log-out session using PHP, CSS, and HTML only. NO MYSQL and JavaScript allowed. 1. Need an HTML form and a login form; separate file. 2. need a CSS file to make it look good 3. Must store visitors' info in a .txt file and validate from there if the user exists before granting access to the dashboard. If the user does not exist, render the form to signup. If the user exists take them to their dashboard....
log in form Requirements: Form: There should be at least 2 input fields for username and...
log in form Requirements: Form: There should be at least 2 input fields for username and password. Use an array as a database in which there are several usernames and passwords: Usernames can be either emails or nick names (WITHOUT WHITE SPACE) After the user submitted the form, students must: sanitize the inputs check if there is a match with one username and one password in the array. If there is no match, print out an error message to user...
A space shuttle has 6 O-rings. When launched an O-ring has the probability of failure of...
A space shuttle has 6 O-rings. When launched an O-ring has the probability of failure of .014. Whether an O-ring fails is the independent of the other O-rings. a.)What is the probability that during 23 launches no O-ring fails, but that at least one O-ring will fail during the 24th launch? b.) What is the probability the space shuttle will go no more than 10 launches without an O-ring failure? c.) What is the mean number of launches until an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT