Proving Associativity in Binary Operations: Math Help for Unambiguous Results

  • Thread starter ehrenfest
  • Start date
In summary: We can also use the commutativity property to rearrange the terms in a different order and then use the associativity property to group them in the same way as in the other tree. This shows that the two trees are equivalent, and therefore the product is unambiguous. In summary, we proved that if the binary operation * is associative, then a_1*a_2*...*a_n is unambiguous by using the properties of associativity and induction.
  • #1
ehrenfest
2,020
1

Homework Statement


I am trying to prove that if the binary operation * is associative, then

[tex]a_1*a_2*...*a_n [/tex]

is unambiguous.

Homework Equations


The Attempt at a Solution


This clearly calls for induction. The base case, n=3, is true by the definition of associativity. Assume that the result is true for n=k. From the induction hypothesis, it is clear that (a_1*...*a_n)*a_{k+1} is unambiguous. It is also clear that a_1*(a_2*...*a_{k+1}) is unambiguous. Because both of these expressions are unambiguous and because we have the n=3 case, we know that
[tex](a_1*...*a_k)*a_{k+1} = (a_1*(a_2*...*a_k))*a_{k+1} = a_1*((a_2*...*a_k)*a_{k+1}) = (a_1*...*a_k)*a_{k+1}[/tex]
So, that shows the result for one very specific case. I cannot think of how to knock out all the cases at once though...
 
Last edited:
Physics news on Phys.org
  • #2
Do you know what a parse tree is? That should help organize things conceptually.

Anyways, the general case is suppose you have to factorizations of your product:

A * B
C * D

where A has fewer terms than C...
 
  • #3
Proofs of these important fundamental properties must be in a textbook somewhere. But I've never seen this proof before. Where are these proofs stored? Why doesn't the math literature keep a central inventory of proofs?
 
  • #4
mathboy said:
Why doesn't the math literature keep a central inventory of proofs?
It's called a library. :wink:
 
  • #5
I see. Suppose we represent two different ways of multiplying

a_1*a_2*...*a_n

with parse trees T_1 and T_2. For these parse trees to make sense in this context, we require that every node has exactly two branches. Also require that this parse is embedded in a plane such that the leafs a_1,...,a_n are laid out in a straight line and that THERE ARE NO CROSSING BRANCHES. This ensures that the parse tree represents some way of inserting parenthesis in that product such that every pair of parenthesis encloses two elements. Also, we can easily draw a parse tree representing any way of evaluating the product.

Now, in our two different parse trees, let A and B be the two second-level nodes of T_1, with A to the left of B and let C and D be the two second-level nodes of T_2, with C to the left of D. If C has the same number of elements as A,we apply the induction hypothesis to A and C, and B and D, and we are done. If A has fewer terms than C, then I think I am stuck. :(
 
  • #6
ehrenfest said:
If A has fewer terms than C, then I think I am stuck. :(
Well, it does mean that A only has a subset of the terms of C...

If I diagram it, it might look like:

Code:
|--A--|----B----|
|----C----|--D--|
 
  • #7
Hurkyl said:
Well, it does mean that A only has a subset of the terms of C...

If I diagram it, it might look like:

Code:
|--A--|----B----|
|----C----|--D--|

The terms in A are a subset of the terms in C. That does NOT mean that there is a node below C that contains exactly the same terms as A. So, I am not really sure how to apply the IH.
 
  • #8
ehrenfest said:
The terms in A are a subset of the terms in C. That does NOT mean that there is a node below C that contains exactly the same terms as A. So, I am not really sure how to apply the IH.
The IH says you can rearrange the tree without changing the value!
 
  • #9
Hurkyl said:
The IH says you can rearrange the tree without changing the value!

It says you can reevaluate k terms in a different way without changing the value. I am not seeing which k terms in T_1 I need to reevaluate to get T_2.
 
Last edited:
  • #10
ehrenfest said:
It says you can reevaluate k terms in a different way without changing the value. I am not seeing which k terms in T_1 I need to reevaluate to get T_2.
You identified a specific obstacle earlier -- can you see how to overcome it?
 
  • #11
Hurkyl said:
You identified a specific obstacle earlier -- can you see how to overcome it?

I'll try. Let A = abcdefghij. let B = klmnopqr...wxyz

Let C = abcdefghijklmno. Let D = pqrst...wxyz.

We want to show that A*B = C*D. The induction hypothesis tells us that A,B,C,and D are unambiguous. The induction hypothesis also tells us that

A*B = (abcdefghij)(klmnopqrstuvwxyz)=(abcdefghij)((klmno)(pqrstuvwxyz))

We now apply the property of associativity (n=3) to get that:

(abcdefghij)((klmno)(pqrstuvwxyz))=((abcdefghij)(klmno))(pqrstuvwxyz)

We again apply the IH to get that

((abcdefghij)(klmno))(pqrstuvwxyz)=(abcdefghijklmno)(pqrstuvwxyz)=C*D

Does that work?
 
  • #12
Yes, that's the basic idea.
 

FAQ: Proving Associativity in Binary Operations: Math Help for Unambiguous Results

How do you define associativity in binary operations?

Associativity in binary operations means that the order in which the operations are performed does not affect the result. In other words, if we have three elements A, B, and C, and we perform the binary operation on them in pairs (A*B)*C and A*(B*C), the result will be the same.

Why is proving associativity important in mathematics?

Proving associativity is important because it ensures that the results of binary operations are unambiguous and consistent. This is crucial in many areas of mathematics, such as algebra and calculus, where the order of operations can greatly affect the final result.

What are some common binary operations that are associative?

Some common binary operations that are associative include addition, multiplication, and exponentiation. These operations are used frequently in mathematics and have been proven to be associative through various proofs and examples.

How do you prove associativity in binary operations?

To prove associativity in binary operations, we need to show that for any given elements A, B, and C, the result of (A*B)*C is equal to A*(B*C). This can be done through algebraic manipulation, using properties of the operation, or through mathematical induction.

Can you give an example of a binary operation that is not associative?

Yes, subtraction is an example of a binary operation that is not associative. For example, (5-3)-1 is not equal to 5-(3-1). In this case, the order of operations does affect the result, making subtraction a non-associative operation.

Similar threads

Replies
5
Views
2K
Replies
3
Views
1K
Replies
7
Views
892
Replies
6
Views
2K
Replies
5
Views
2K
Back
Top