Boolean algebra: Simplifying logical expression

In summary, boolean addition is associative, distributive, and commutative. The rules can be proven without resorting to a truth table.
  • #1
Bipolarity
776
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 [tex] \overline{(\overline{A}*B+\overline{B}*A)}*B + \overline{B}*(\overline{A}*B+\overline{B}*A) = B [/tex]


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
  • #2
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).
 
  • #3
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
 
  • #4
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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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.
 
  • #8
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!
 
  • #9
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.
 

1. What is Boolean algebra?

Boolean algebra is a branch of mathematics that deals with logical operations and relationships between propositions, usually represented by variables that can only have two values: true or false.

2. How is Boolean algebra used in science?

Boolean algebra is used in science to simplify complex logical expressions and to analyze and manipulate logical systems. It is commonly used in computer science, digital electronics, and decision-making processes.

3. What are logical expressions in Boolean algebra?

Logical expressions in Boolean algebra are mathematical statements that are made up of logical operators, such as AND, OR, and NOT, and logical variables, which can only have two values: true or false.

4. How do you simplify a logical expression using Boolean algebra?

To simplify a logical expression using Boolean algebra, you can use algebraic laws and theorems to manipulate the expression and reduce it to its simplest form. This involves combining like terms, eliminating redundant or unnecessary terms, and applying the properties of logical operators.

5. What are the benefits of simplifying logical expressions using Boolean algebra?

Simplifying logical expressions using Boolean algebra can help to make complex systems easier to understand and analyze. It can also make problem-solving more efficient and reduce the likelihood of errors. In addition, simplified expressions can be used to create truth tables and to test the validity of logical arguments.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
21
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
35K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
Back
Top