0

I'm having troubles with converting this formula to DNF form:

$[(p \vee q) \Rightarrow (q \vee r)] \Rightarrow [(p \Rightarrow q) \wedge \sim r]$

I've changed it to something like this (with steps):

$\sim[(p \vee q) \Rightarrow (q \vee r)] \vee [(\sim p \vee q) \wedge \sim r]$

$(p \vee q) \wedge (\sim q \wedge \sim r) \vee (\sim p \vee \sim r) \vee (q \wedge \sim r)$

$p \vee q \wedge (\sim q \wedge \sim r) \vee (\sim p \vee \sim r) \vee (q \wedge \sim r)$

What should I do next to convert it finally into CNF? I thought about the distributivity law, but I don't know how to use it in that example. I hope I didn't make any error in my calculations. Could you please help me? I will be very grateful.

Miszka
  • 37
  • Why don't you use a truth table? That's the easiest way for me to find CNF/DNF – Vasili Oct 24 '19 at 12:53
  • In our university they didn't show us that method, but I made a truth table. I will try to search that in Google, maybe this method will help me. Thanks. – Miszka Oct 24 '19 at 12:55
  • It's really easy. Find all rows where the result it true. Let's say it's true when $p=T, q=F, r=F$ then corresponding expression in the DNF will be $p \wedge \neg q \wedge \neg r$, etc. – Vasili Oct 24 '19 at 13:03
  • Thank you so much. – Miszka Oct 24 '19 at 13:08

2 Answers2

1

As @Vasya suggested, let's try a truth table.

The values for $p,\,q,\,r$ that make the statement true are $FFF, FTF, TFF, TTF$. Therefore, the DNF is $(\neg p\land\neg q\land \neg r)\lor(\neg p\land q\land \neg r)\lor(p\land\neg q\land \neg r)\lor(p\land q\land \neg r)$. Of course, this can be simplified to $\neg r$.

J.G.
  • 115,835
  • Wow, that was so easy! Thank you so much! I wonder why didn't they show us this method in the university. Simplification is done by using distributive law, right? – Miszka Oct 24 '19 at 13:06
1

As suggested, a truth-table will always work.

But, if you want to stick to algebra:

First, you have some small mistakes. You have:

$(p \vee q) \wedge (\sim q \wedge \sim r) \vee (\sim p \vee \sim r) \vee (q \wedge \sim r)$

But that should be:

$(p \vee q) \wedge (\sim q \wedge \sim r) \vee (\sim p \color{red}\land \sim r) \vee (q \wedge \sim r)$

Also, you have a mix of $\lor$'s and $\land$'s here, so make sure to use parentheses. Looking at the statement before, we understand they must go here:

$ \color{red}((p \vee q) \wedge (\sim q \wedge \sim r)\color{red}) \vee (\sim p \land \sim r) \vee (q \wedge \sim r)$

OK so what you really have is:

$ ((p \vee q) \wedge (\sim q \wedge \sim r)) \vee (\sim p \land \sim r) \vee (q \wedge \sim r)$

Now, first we can drop a pair of parentheses:

$ ((p \vee q) \wedge \sim q \wedge \sim r) \vee (\sim p \land \sim r) \vee (q \wedge \sim r)$

Then, a handy equivalence principle is:

Reduction

$p \lor (\sim p \land q) = p \lor q$

We can apply Reduction to the start of the statement to get:

$ (p \wedge \sim q \wedge \sim r) \vee (\sim p \land \sim r) \vee (q \wedge \sim r)$

Now, there is also:

Nested Reduction

$(p \land r) \lor (\sim p \land q \land r) = (p \land r) \lor (q \land r)$

We can apply Nested Reduction to get:

$ (\sim q \wedge \sim r) \vee (\sim p \land \sim r) \vee (q \wedge \sim r)$

OK, now we use:

Adjacency

$(p \lor q) \land (p \lor \sim q) = p$

Applying Adjacency gets you:

$ \sim r \vee (\sim p \land \sim r)$

OK, finally we use

Absorption

$p \lor (p \land q) = p$

and with that, your statement becomes just

$\sim r$

OK, so that's still pretty involved ... but once you get used to some of these more advanced equivalence principles, you can simplify these expressions pretty quickly. In fact, I can tell you I personally got the answer more quickly this way than using a truth-table.

Bram28
  • 100,612
  • 6
  • 70
  • 118
  • Awesome! My teacher told me that I have to stick with algebra. Thank you very much! – Miszka Oct 25 '19 at 21:22
  • @Miszka OK, glad I could help! However, please know that some of the principles i used are pretty advanced, so your teacher may want you to stick to more basic principles. All the advanced principles can be derived from the more basic ones though ... it might be a good exercise to do that. Good luck with your studies! – Bram28 Oct 26 '19 at 00:37