igi
igi

Reputation: 29

Propositional formula for A, B, AC and BC

I am struggling trying to get a propositional formula of the following truth table: A, B, AC, BC.

For A and B it's easy: A xor B. However, when you insert a new literal C...

I tried using Wolfram by inputting the truth table (A & ~B & ~C) || (~A & B & ~C) || (A & ~B & C) || (~A & B & C). However, the suggested minimal forms are wrong since they do not consider C.

Can someone help expressing this in propositional logic using logical connectives like (A xor B) => C? Thanks!

Upvotes: 0

Views: 142

Answers (3)

willeM_ Van Onsem
willeM_ Van Onsem

Reputation: 476729

Take a look at the expression:

(A & ~B & ~C) || (~A & B & ~C) ||
(A & ~B & C) || (~A & B & C)

Both lines are identical except for the negation of C, this means that C is irrelevant: the value for C doesn't change anything to the output of the function.

This is also the conclusion one draws from a truth table:

|A|B|C||F|
+-+-+-++-+
|F|F|F||F|
|F|F|T||F|
|F|T|F||T|
|F|T|T||T|
|T|F|F||F|
|T|F|T||F|
|T|T|F||F|
|T|T|T||F|

Here F being the outcome of the expression. If you for instance take the first line: |F|F|F||F| the result is false, which is the same for |F|F|T||F| (with C flipped). By doing this for every (A,B) configuration one sees that the value of C doesn't matter.

Therefore you can simply exclude C from the formula resulting in:

(A & ~B) || (~A & B)

Which means A xor B.

Wolfram Alpha comes to the same conclusion (see ANF expression).

Upvotes: 1

igi
igi

Reputation: 29

I have the answer

(A xor B) and (C => (A or B))

Upvotes: 0

mszymborski
mszymborski

Reputation: 1654

You can perform minimization by means of using Karnaugh maps (amongst other methods - this one is the simpliest, you'll have to introduce a dummy variable D and just ignore it in the results).

The solutions are right about not considering C, though - it doesn't matter what the C evaluates to, as long as A xor B evaluates to true. I just did check that, to remind myself about how the Karnaugh maps are constructed. Try drawing yourself a full truth table to see that.

Upvotes: 2

Related Questions