Efficient Algorithm for Solving CNF/DNF Logic Problem with 9 Input Literals

  • Thread starter Thread starter DrAlexMV
  • Start date Start date
  • Tags Tags
    Logic
Click For Summary
The discussion focuses on developing an algorithm to determine the output of a function f, given its CNF and DNF representations, while only examining 9 input literals. CNF is structured as a series of clauses combined with OR, where each clause consists of 3 literals, while DNF consists of terms combined with AND, each with 3 literals. The key insight is that checking one literal in a CNF clause can indicate whether that clause is false, which can also be applied to the corresponding DNF term to determine its truth. Participants express uncertainty about further steps in the algorithm development. The conversation emphasizes understanding the relationship between CNF and DNF in the context of evaluating the function efficiently.
DrAlexMV
Messages
24
Reaction score
0

Homework Statement



There exists a function f. Assume that you are given f's CNF representation and f's DNF representation. The CNF representation has some number of clauses, and each clause has 3 literals. The DNF representation has some number of terms where each term has 3 literals. The CNF representation and the DNF representation correspond to the same function f. Now you are also given an input x = x_1,...,x_n. Give an algorithm for determining f(x) (either T or F) that only looks at 9 literals within x.


Homework Equations



Just the definition of CNF and DNF

The Attempt at a Solution



CNF is formatted such as: (A and B and C) or (D and E and F).
DNF is formatted such as: (A or B or C) and (D or E or F).

Somehow since you only need to look at one literal in a term of the CNF to know whether that term will be false, you can look also look at that same literal in the DNF to see if that term will be true in the DNF.

I am not sure what else to do.
 
Physics news on Phys.org
DrAlexMV said:

Homework Statement



There exists a function f. Assume that you are given f's CNF representation and f's DNF representation. The CNF representation has some number of clauses, and each clause has 3 literals. The DNF representation has some number of terms where each term has 3 literals. The CNF representation and the DNF representation correspond to the same function f. Now you are also given an input x = x_1,...,x_n. Give an algorithm for determining f(x) (either T or F) that only looks at 9 literals within x.


Homework Equations



Just the definition of CNF and DNF

The Attempt at a Solution



CNF is formatted such as: (A and B and C) or (D and E and F).
DNF is formatted such as: (A or B or C) and (D or E or F).

Somehow since you only need to look at one literal in a term of the CNF to know whether that term will be false, you can look also look at that same literal in the DNF to see if that term will be true in the DNF.

I am not sure what else to do.

What do CNF and DNF mean?
 
Disjunctive normal form and Conjunctive normal form
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
471
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K