[Math] Propositional logic: Finding a formula F with statement variables from truth table

logicpropositional-calculus

I need to find a formula for $F$ with statement variables $H, M$ and $B$ such that the truth table for $F$ looks as follows:

truth table

Does anyone know a cool and/or easy way to solve problems like this? Would be much appreciated.

Thanks in advance!

Best Answer

Layout: You want the first line to be true when $H,M$ and $B$ are all true. So your statement $F$ must look like $(H\land M\land B)\lor \text{Something}$.

But you also want it to be true when $H,M$ are true and $B$ is false, equivalently, when $H, M$ and $\neg B$ is true. So, using the information in the paragraph above, $F$ must look like $(H\land M\land B)\lor (H\land M\land \neg B)\lor \text{Something else}$.

Proceed in this fashion to find $F$.

Edit: Firstly note that we need only apply this technique for the true lines, because by exactly pinpointing the true lines, the falsehoods will be determined.

So inspecting the true lines you can find: $$(H\land M\land B)\lor (H\land M\land \neg B)\lor (H\land \neg M\land B)\lor (\neg H\land M\land B),$$ which has the expected truth table: Truth Table