Finding a truth function

159 Views Asked by At

I wanted to find a truth function $f$ if it exists that make the formula below true:

$((p\to \lnot(q \oplus \lnot p)) \to (\lnot r \oplus (q \to p)))$

Where the $\oplus$ operator is defined as:

$(A \oplus B) \equiv ((A \land \lnot B) \lor (B \land \lnot A))$

My understanding was that to find the truth function that makes this formula true I needed to construct a truth table and the write down all rows where the LHS $\to $ RHS e.g $f(1,0,1) = 1$ However with the $\oplus$ operator definition the truth table would get quite length so I tried to simplify it with logical laws to make the formulas shorter for the LHS I simplified it down to $p \to \lnot q $ but for the RHS I had a bit more trouble with the logical laws and only managed to get it down to:

$((\lnot r \land (q \land \lnot p)) \lor (r \land (\lnot q \lor p))$

Am I on the right track with how I've attempted this question? Is it necessary to simplify the RHS further before putting it in a truth table?

1

There are 1 best solutions below

1
On BEST ANSWER

I don't think that it would be necessary to simplify everything, in its current form one can derive the truth table of $\small\tt P$ without too much work, $$\begin{array}{|c|c|c|c|c|c|c|c|}\hline \small\color{green}{p} &\small \color{green}{q} &\small \color{green}{r} &\small \lnot p &\small (q\oplus\lnot p) &\small \lnot(q\oplus\lnot p) &\small ((p\to \lnot(q \oplus \lnot p)) &\small \lnot r &\small (q\to p)&\small (\lnot r \oplus (q \to p))) & \small\tt P \\ \hline \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} \\ \hline \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} \\ \hline \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} \\ \hline \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} \\ \hline \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} \\ \hline \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} \\ \hline \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} \\ \hline \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{royalblue}{1} & \small\color{#C00}{0} & \small\color{#C00}{0} \\ \hline \end{array}$$