1
$\begingroup$

I got the CNF pretty easily with simple transformations:

\begin{aligned} a \leftrightarrow \neg (b \leftrightarrow \neg c)\\ a \leftrightarrow \neg ((b \to \neg c) \land (\neg c \to b))\\ a \leftrightarrow \neg((\neg b \lor\neg c) \land (c \lor b ))\\ (a \to ((b\land v) \lor (\neg b \land \neg c)) &\land (((b\land c) \lor (\neg b \land \neg c)) \to a)\\ (\neg a \lor ((b\land v) \lor (\neg b \land \neg c)) &\land (\neg((b\land c) \lor (\neg b \land \neg c)) \lor a) \\ (\neg a \lor ((b\land v) \lor (\neg b \land \neg c)) &\land ((\neg(b\land c) \land \neg (\neg b \land \neg c)) \lor a) \\ (\neg a \lor ((b\land v) \lor (\neg b \land \neg c)) &\land (((\neg b\lor \neg c) \land (b \land c)) \lor a) \\ (\neg a \lor ((b\land v) \lor (\neg b \land \neg c)) &\land ((a \lor \neg b \lor \neg c) \land (a \lor b \lor c))\\ (((\neg a \lor b)\land (\neg a \lor c)) \lor (\neg b \land \neg c)) &\land ((a \lor \neg b \lor \neg c) \land (a \lor b \lor c)) \\ (((\neg a \lor b) \lor (\neg b \land \neg c)) \lor ((\neg a \lor c) \lor (\neg b \land \neg c))) &\land ((a \lor \neg b \lor \neg c) \land (a \lor b \lor c)) \\ (\underbrace{(\neg a \lor b \lor \neg b)}_{1} \land (\neg a \lor b \lor \neg c)\land(\neg a \lor \neg b \lor c) \land \underbrace{(\neg a \lor c \lor \neg c)}_1) &\land ((a \lor \neg b \lor \neg c) \land (a \lor b \lor c)) \\ (\neg a \lor b \lor \neg c)\land(\neg a \lor \neg b \lor c) &\land (a \lor \neg b \lor \neg c) \land (a \lor b \lor c) \end{aligned}

I'm not sure If I missed any shortcuts, but I think it is correct. Now, is there any smart short-cuts to change this into DNF other than use distributivity numerous times. I tried that route, starting from the CNF solution and I gave up after I had 1 A4 paper full of formulas and not nearing the end. Any tricks?

1 Answers 1

1

You are dealing with parity functions here. One preliminary observation is that $\neg(x \leftrightarrow \neg y)$ is equivalent to $(x \leftrightarrow y)$. Hence your function is equivalent to $a \leftrightarrow b \leftrightarrow c$, which is the parity function of $a$, $b$, and $c$.

This function, let's call it $f$, is true when an odd number of variables are true. With three variables, there's one way to have all true variables, and three ways to have one true variable. Hence the DNF for $f$ has four terms, each with three literals, and you can write it by inspection.

You may also notice that the negation of $f$ is written in CNF by conjoining the four terms that are not in your CNF for $f$. De Morgan then delivers the DNF for $f$ with minimal effort. In our case, since

$$ f = (\neg a \vee \neg b \vee c) \wedge (a \vee \neg b \vee \neg c) \wedge (\neg a \vee b \vee \neg c) \wedge (a \vee b \vee c) \enspace,$$

we write

$$ \neg f = (\neg a \vee b \vee c) \wedge (a \vee \neg b \vee c) \wedge (a \vee b \vee \neg c) \wedge (\neg a \vee \neg b \vee \neg c) \enspace.$$

Applying De Morgan's laws results in

$$ f = (a \wedge \neg b \wedge \neg c) \vee (\neg a \wedge b \wedge \neg c) \vee (\neg a \wedge \neg b \wedge c) \vee (a \wedge b \wedge c) \enspace,$$

which is the parity function as expected.

  • 0
    Can you explain the negation. Is it so, that because of the symmetric boolean function property (as stated in wikipedia entry): *In mathematics, a symmetric Boolean function is a Boolean function whose value does not depend on the permutation of its input bits, i.e., it depends only on the number of ones in the input*. So the negation only changes the permutation and therefore for $f$ it wont change the end result?2017-01-14
  • 0
    It is true that parity functions are symmetric, but the observation about the negation is of a more general nature. There are 8 clauses of three variables. (They are known as *maxterms*.) You correctly found that $f$ uses 4 of those 8 clauses. Therefore, $\neg f$ uses the remaining 4 clauses. Once you've written $\neg f$ as the conjunction of those four clauses, you can apply De Morgan's laws, which produces a DNF when applied to a CNF. If you are not familiar with De Morgan's laws, this may be puzzling, but it's really easy.2017-01-14
  • 0
    Incidentally, the negation of $f$ is never the same as $f$, be it symmetric (as in this case) or not. Not sure that's what you meant with your comment, but I thought I'd clarify.2017-01-14
  • 0
    I did the truth table for $\neg f$ and it clarified what's happening when it is applied. If I apply de Morgan's law to the end results of $f$ I get: \begin{align} \neg ( (\neg a \lor b \lor \neg c)\land(\neg a \lor \neg b \lor c) &\land (a \lor \neg b \lor \neg c) \land (a \lor b \lor c)) \\ (a \land \neg b \land c) \lor (a \land b \land \neg c) &\lor (\neg a \land b \land c) \lor (\neg a \land \neg b \land \neg c) \end{align} Which is in DNF but for the remaining 4 clauses. Negation again puts me one step back to my original CNF.2017-01-14
  • 0
    Hmmmm, I would have applied the negation and then $\neg f$ would have been in DNF (you have it CNF) and thus I'm stuck again. How do you apply the negation while maintaining the CNF'ness of $\neg f$.2017-01-14
  • 0
    I just fixed a major blunder in my answer. Not fundamental, but potentially quite confusing. In regards to your question, I list the maxterms (three-literal clauses) that are **not** in the CNF of $f$. This process is based on the observation that the truth table for $\neg f$ is obtained from the one for $f$ by swapping 0s and 1s.2017-01-14
  • 0
    Oh I see, thanks for patience @FabioSomenzi2017-01-14