Boolean algebra: Simplifying logical expression

Click For Summary

Discussion Overview

The discussion revolves around the simplification of a logical expression in Boolean algebra and the properties of Boolean operations, particularly focusing on associativity, commutativity, and distributivity. Participants explore methods for proving these properties, including the use of truth tables and mathematical induction.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks to simplify a logical expression without using a truth table, considering the application of De Morgan's Laws.
  • Another participant suggests using the distributive law and mentions the cancellation property of Boolean algebra.
  • There is a discussion about whether Boolean addition is associative, distributive, and commutative, with some participants proposing that these properties can be proven using truth tables and induction.
  • Some participants argue that commutativity does not imply associativity, while others assert that they are independent axioms of Boolean algebra.
  • Several participants emphasize the importance of truth tables for proving properties of Boolean operations, especially for binary cases.
  • There is a contention regarding the relationship between commutativity and associativity, with differing views on how they relate to each other in Boolean algebra.
  • One participant expresses uncertainty about their understanding of the connection between commutativity and associativity, acknowledging a potential misunderstanding.
  • Ultimately, there is a consensus that truth tables are a practical approach for proving properties in Boolean algebra.

Areas of Agreement / Disagreement

Participants express differing views on the relationship between commutativity and associativity, with no consensus reached on whether one implies the other. The discussion remains unresolved regarding the best approach to prove these properties without relying solely on truth tables.

Contextual Notes

Some participants mention the limitations of truth tables for larger inputs and the need for induction, while others highlight the independence of the axioms in Boolean algebra. There is also a recognition that the properties discussed may not directly correspond to binary arithmetic intuitions.

Bipolarity
Messages
773
Reaction score
2
I was trying a while ago to prove associativity of the XOR operator. That led me to the following problem:

I am trying to prove \overline{(\overline{A}*B+\overline{B}*A)}*B + \overline{B}*(\overline{A}*B+\overline{B}*A) = B


Obviously it can be solved by just creating a truth table and plugging in the four possibilities, but I was wondering whether it can be done without resorting to truth tables. In other words, can the expressions be simplified without plugging in values for A and B?

Please don't give me a complete solution, just tell me hint. I would like to figure this out on my own. I considered using De Morgan's Laws but I then had a feeling it would only complicate the expressions further.

All help is appreciated. Thanks!

BiP
 
Physics news on Phys.org
Hey BiPolarity.

You have two opportunities to use the distributive law of which one form is (A + B)C = AC + BC where + is OR and AC is just A AND C. You should cancellations (and recall that Not B + B = 1).
 
Thanks chiro.

So boolean addition is associative, distributive and also commutative? Can this be proven? I assume in the case of two inputs we would use a truth table to prove these properties, but with 'n' inputs we can use mathematical induction?

BiP
 
For the rules regarding commutativity, you just use the truth table and show that A + B = B + A and that AB = BA. For associativity, just use commutativity (since anything that is commutative has to be associative).

For distributivity just do it on (A + B)C through a truth table and then the general situation like (A + B + C + D)E or (A + B)(C + D) and so on can be done by induction (you basically just group two variables as one and do it that way).

So like you proposed with induction, you have (A + B + C)D and you let B + C = F in which you have (A + F)D = AD + BF = AD + (B + C)F and since you proved the three variable case you're done.
 
chiro said:
For associativity, just use commutativity (since anything that is commutative has to be associative).
That's not true. Commutativity is: a*b = b*a. Associativity is: (a*b)*c = a*(b*c). There is no reason why one should entail the other and indeed there are counter-examples to that.
 
Preno said:
That's not true. Commutativity is: a*b = b*a. Associativity is: (a*b)*c = a*(b*c). There is no reason why one should entail the other and indeed there are counter-examples to that.

Commutativity implies associativity, for this example. You can re-arrange the terms in any order and you will always get the same result with or without brackets.

It's a form of scalar multiplication not some exotic algebra. (AND is multiplication of bits and OR is basically max of (a + b) and both have the above property.
 
chiro said:
Commutativity implies associativity, for this example.

No, both are axioms for Boolean algebra's. Commutativity doesn't imply associativity as we need it to be a separate axiom.
 
I'm referring to associativity for a single operation: how is this not true? Consider a binary operation AND and a separate one for OR: how are they not associative? You can just arrange them in any order!
 
chiro said:
I'm referring to associativity for a single operation: how is this not true? Consider a binary operation AND and a separate one for OR: how are they not associative? You can just arrange them in any order!

Sure, but this requires a proof or an axiom. And the proof of associativity does not use commutativity. The two conditions are independent.
 
  • #10
If it's binary, just use a truth table.

XOR is usually used in the context of binary operations and not in sets (we use a symmetric difference for the same thing).

Once you do proof for two or three variables via a truth table, the rest can be shown via induction.

You're not using the Peano axioms or constructing the naturals or ZFC here!
 
  • #11
chiro said:
If it's binary, just use a truth table.

XOR is usually used in the context of binary operations and not in sets (we use a symmetric difference for the same thing).

Once you do proof for two or three variables via a truth table, the rest can be shown via induction.

OK, if you are proving associativity using a truth table, how exactly are you using commutativity?

Furthermore, you do understand that a boolean algebra is an algebraic object that does not necessarily coincide with the AND and OR from logic, right?
 
  • #12
micromass said:
OK, if you are proving associativity using a truth table, how exactly are you using commutativity?

Furthermore, you do understand that a boolean algebra is an algebraic object that does not necessarily coincide with the AND and OR from logic, right?

Well you just use a*b = b*a and then make one of them a sub-variable c*d. So you get the fact that all permutations of AND or OR are the same (i.e. using the same operation) and you're done.

You could of course just use a truth table only for associativity and then compare the results in each appropriate column: that would work as well. The above just shows how commutivity in this case allows you multiply them in any order which has a subset of results that prove associativity. (So that basically you get as subset of all possible permutations of multiplications the associative property).

Also I know that binary operations for bits are different than logic, but the guy mentioned a truth table in his first post! He didn't mention a set result.

The stuff the OP mentioned is really basic 101 notation for binary digits: it's what they introduce in 1st year elec engineering or computer science.
 
  • #13
chiro said:
Well you just use a*b = b*a and then make one of them a sub-variable c*d. So you get the fact that all permutations of AND or OR are the same (i.e. using the same operation) and you're done.

OK, then you get a*(c*d)=(c*d)*a. I don't see how that proves associativity.
 
  • #14
micromass said:
OK, then you get a*(c*d)=(c*d)*a. I don't see how that proves associativity.

No what I mean is that you generate all permutations of the order of operations for the three variables: So basically (a)(b)(c) = (a)(bc) = (ab)(c). Since (a)(b) = (ab) = (ba) = (b)(a) and (b)(c) = (bc) = (cb) = (c)(b), then you exhaust the small space you need to exhaust to show that it holds.

The commutativity helps intuitively since (a)(b) = (b)(a) and ab = ba which helps understand that any kind of grouping (not only ordering which commutativity specifically shows) in this case won't change a thing.

We know that if (a)(x) = (a)(y) then x = y.

You generate more information in the above, but a subset of this shows associativity when you look at the specific permutations.
 
  • #15
chiro said:
So basically (a)(b)(c) = (a)(bc) = (ab)(c).

I don't see how that follows from commutativity.

We know that if (a)(x) = (a)(y) then x = y.

This is not true in Boolean algebras.
 
  • #16
micromass said:
I don't see how that follows from commutativity.

I think I'm just taking the trivial intuition I have for granted with binary arithmetic. I think I have screwed up the connection with commutativity, but basically my thinking process was that any permutation of applying things in both order and in terms of composition are always the same.

This is not true in Boolean algebras.

Yeah I screwed that one up as well.

Bottom line though: just use a truth table since we are dealing with 1's and 0's that are easily exhaustible and if you want to prove all the other stuff (distributive laws and all that) just use truth table for simplest case and then apply induction for the rest.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
8K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K