ASSOCIATIVE OPERATOR

Saumyojit

Senior Member
Joined
Jan 21, 2020
Messages
1,032
DOUBT 1:from this article I came across this lines "Within an expression containing two or more occurrences in a row of the same associative operator, the order in which the operations are performed does not matter as long as the sequence of the operands is not changed"
I dont understand this line

Consider the following equation:

(2+3)+4=2+(3+4)=9

Order & sequence which one is what ?
acc to me :
Order MEANS :
Anything that is to do with rearranging Paranthesis ?
in the first subexpression in 2+3 there is a parantheiss around it

in the second one paranthesis is around (3+4)

Sequence means
changing the position of each digit/operand from 2+3+4 to 3+2+4 or from 2+3+4 to 4+3+2
Am i interpreting correctly?

In a Associative expression If I change both the order and sequence the results are same.

q1:So why do they say "the order in which the
operations are performed does not matter as long as the sequence of the operands is not changed"

IF I AM CHANGING THE sequence of operands(2,3,4) then order will STILL not matter ,as they will give same result. Contradiction

BEFORE: (2+3)+4=9 <-- ORIGINAL SEQUENCE
AFTER Sequence change =(3+4)+2=9

DOUBT 2: From the same page i found out "The trivial operation xy = x (that is, the result is the first argument, no matter what the second argument is) is associative but not commutative"
Is the above line means that x has to be always 0 and y can be any real no so that x*y=x --> 0 * {0 to infinte)=0 (zero in x will satisfy this equation taken any y random real value.)
IF yes , then why it cant be commutative . See original LHS part is x*y so after commutative law it becomes y*x so y*x=x only if x=0

DOUBT 3:
I know about Cartesian product of 2 sets (A,B) A*B={(a,b)|a belongs to A ,b belongs to B}
121613222_358161752195305_5775030242808508010_n.png

HOW the formation of Table occurs? . I know how in cartesian product a table gets formed.

@Dr.Peterson @Draegon @JeffM
 
DOUBT 1:from this article I came across this lines "Within an expression containing two or more occurrences in a row of the same associative operator, the order in which the operations are performed does not matter as long as the sequence of the operands is not changed"
I dont understand this line

Consider the following equation:

(2+3)+4=2+(3+4)=9

Order & sequence which one is what ?
acc to me :
Order MEANS :
Anything that is to do with rearranging Paranthesis ?
in the first subexpression in 2+3 there is a parantheiss around it

in the second one paranthesis is around (3+4)

Sequence means
changing the position of each digit/operand from 2+3+4 to 3+2+4 or from 2+3+4 to 4+3+2
Am i interpreting correctly?

In a Associative expression If I change both the order and sequence the results are same.
You're focusing on the wrong words.

I don't care for their use of "order" and "sequence" there; I would probably use "order" for both. They mean essentially the same thing here; the important thing is the words that follow: "order in which the operations are performed" vs. "sequence of the operands".

In "(2+3)+4=2+(3+4)=9", the order of the operands, "2, 3, 4" is unchanged, but the order in which the operations are performed (first + done first, vs. second + done first) changes. The numbers are the operands, so moving them changes the order of operands (e.g. 2+3+4 vs 3+2+4); that change is covered by the commutative property. The parentheses determine the order in which the operations are done; that is what the associative property covers.

q1:So why do they say "the order in which the
operations are performed does not matter as long as the sequence of the operands is not changed"

IF I AM CHANGING THE sequence of operands(2,3,4) then order will STILL not matter ,as they will give same result. Contradiction

BEFORE: (2+3)+4=9 <-- ORIGINAL SEQUENCE
AFTER Sequence change =(3+4)+2=9
All they are saying is that the associative property applies to changing the order of the operations by changing parentheses, and does not apply if the operands (numbers) move.

To show that (2+3)+4 = (3+4)+2, you need to apply both properties: first associative, (2+3)+4 =2+(3+4), then commutative, 2+(3+4) = (3+4)+2. First I moved only the parentheses, then I moved only the two addends, 2 and 3+4.

DOUBT 2: From the same page i found out "The trivial operation xy = x (that is, the result is the first argument, no matter what the second argument is) is associative but not commutative"
Is the above line means that x has to be always 0 and y can be any real no so that x*y=x --> 0 * {0 to infinte)=0 (zero in x will satisfy this equation taken any y random real value.)
IF yes , then why it cant be commutative . See original LHS part is x*y so after commutative law it becomes y*x so y*x=x only if x=0
I think you are misunderstanding what they are doing. They are saying, if you invent a new operation called "*" (which is not multiplication!) such that the result of operating on any two numbers is the value of the first number, then that operation is not commutative. (For example, 1*5 = 1, but 5*1 = 5, since the result is always the first number.) They show their second "trivial operation" using a different symbol, "∘", which may be less confusing for those who are familiar with "*" used for multiplication.

DOUBT 3: I know about Cartesian product of 2 sets (A,B) A*B={(a,b)|a belongs to A ,b belongs to B}
121613222_358161752195305_5775030242808508010_n.png


HOW the formation of Table occurs? . I know how in cartesian product a table gets formed.
Again, you are totally misunderstanding this, because you are not familiar with the idea of abstract algebra, where we can make up any operation we want, for the sake of discussion. This has nothing to do with the Cartesian product of sets! They are just making up another operation, which they chose to call "×" (and subsequently use without a symbol), which they defined by (arbitrarily) deciding that A×A = A, A×B = A, and so on. The table is the definition of the operation, which is designed purely as an example of a noncommutative operation that is nevertheless associative.

You really need to stop reading low-quality sites like Wikipedia! ;)

Really, there is a danger in reading Wikipedia to learn basics, because it quickly goes beyond your level of understanding and becomes confusing. This is why I recommend just going through a single textbook and sticking to it, rather than wandering around the minefield of the internet.
 
Like Dr. Peterson, I do not like some of the wording in the wiki article. They are saying the order in which you do certain operations can be changed without changing the result. Remember that parentheses say DO ME FIRST. So

(4 + 3) + 9 says first compute 4 + 3 = 7 and then compute 9 + 7 = 16.

4 + (3 + 9) says first compute 3 + 9 = 12 and then compute 4 + 12 = 16

Same result although the order in which the operations were done was different.

Why they bother going on about associativity before presenting operations that are not associative or developing arithmetic from basic axioms is beyond me. It is an obvious property of numbers. Do not allow yourself to get all bogged down in what is a simple point
 
the order in which the operations are performed does not matter as long as the sequence of the operands is not changed
@Dr.Peterson How could u understnad what they are trying to say when both of us are reading the same text . It must be due to ur extreme knowledge in Maths and also English.
Seriously it takes a lot of intution and a good grasp of English to understand what the opposite side is trying to say.

That means when i am changing the sequence of operands from that point I am moving out of associative operator field to Commutative field As In commutatvie operation only changing of operands position happens not rearranging parenthis , which works only in Associative field.

if you invent a new operation called "*" (which is not multiplication!)
I am new to Discrete mathemtics
The trivial operation xy = x not commutative" this i understood from ur eg but how is it associative . (1*5=1) in associative operation there has to be atleast 3 operands to the best of my knowledge and paranthesis is must. Acc to me this will be a associative operation --> 1*(5*3)=(1*5)*3=1 using new operation called "*"
here is a danger in reading Wikipedia to learn basics
yes In wikipedia it is not right to learn basics but it contains many info thats why i am inclined towards it .
 
(17 - 9) - 2 = 8 - 2 = 6

17 - (9 - 2) = 17 - 7 = 10

Subtraction is not an associative operation. Parentheses matter.

(96 / 8) / 2 = 12 / 2 = 6

96 / (8 / 2) = 96 / 4 = 24

Division is not an associative operation. Parentheses matter.

11 - 2 = 9

2 - 11 = - 9

Subtraction is not a commutative operation. Order of operands matters.

20 / 5 = 4

5 / 20 = 0.25

Division is not a commutative operation. Order of operands matters.

Dealing with ordinary numbers, the operations of addition and multiplication are associative and commutative whereas the operations of subtraction and division are neither.

This is all you need to understand to learn arithmetic, elementary algebra, calculus of a real univariate function, and probability theory.

Are there operations that are associative and non-commutative? Yes, but the simplest example I know is in the arithmetic of matrices where the operation called multiplication of matrices is associative but not commutative.

You can't learn mathematics by flitting from one partially understood topic to a much more advanced topic. Abstract algebra was the hardest math course I ever took, and I was a quite decent math student. You do not have a full grasp of elementary algebra. I'd suggest getting really good at elementary algebra (a two-year course in U.S. high schools) and then also learning matrix algebra before plunging into abstract algebra. Warning: don't use the word "field" when talking about abstract algebra. It has a very detailed meaning in that branch of mathematics.
 
@Dr.Peterson How could u understnad what they are trying to say when both of us are reading the same text . It must be due to ur extreme knowledge in Maths and also English.
Seriously it takes a lot of intution and a good grasp of English to understand what the opposite side is trying to say.

A basic principle of reading comprehension is to look at a whole sentence, or even paragraph, when you are trying to figure out what words mean. Context is important; a word has no meaning in isolation. This is how I saw that they are not making a distinction between "order" and "sequence".

Another principle is to assume the author is trying to communicate something meaningful (they are not "the opposite side" in the sense of "the enemy"!), so any interpretation that makes no sense can be ignored.

Also, it can be important to understand logic: When they say, "does not matter as long as the sequence of the operands is not changed", they are only saying that if the operands are in the same order, the order of the operations doesn't matter; it does not say anything about what happens if the order of the operands is changed. So the contradiction you claimed is nonexistent. This is not a matter of English alone, but of reasoning in general.

But also, it does help that I have taught these concepts, so when they say something unclear, I can see what they intended. They did not clearly explain that they are talking about what is implied by associativity in contrast to commutativity. That's why they require the order of the operands to be unchanged: They are only talking about associativity at that point. Their examples are confusing from your perspective, because you don't have the experience to realize they are talking about other operations, and because they start mixing commutativity with associativity.

That means when i am changing the sequence of operands from that point I am moving out of associative operator field to Commutative field As In commutative operation only changing of operands position happens not rearranging parenthis , which works only in Associative field.

I am new to Discrete mathemtics
The trivial operation xy = x not commutative" this i understood from ur eg but how is it associative . (1*5=1) in associative operation there has to be atleast 3 operands to the best of my knowledge and paranthesis is must. Acc to me this will be a associative operation --> 1*(5*3)=(1*5)*3=1 using new operation called "*"

Are you saying that you are studying a course in Discrete Mathematics now? Or just that you haven't studied it at all? This topic is not really Discrete Math so much as Abstract Algebra, as I mentioned. (And, as JeffM mentioned, the word "field" has a very precise meaning in Abstract Algebra, so your use of it is confusing to us! I'm not even sure exactly what you meant.)

It's too bad that they just mention that the trivial operator is associative without proof, when this article is supposed to be all about associativity! It is not easy, in general to prove associativity, so they should show it somewhere. What you need to show is that for any three numbers a, b, and c, a*(b*c) = (a*b)*c. You have nicely shown one example. (Your question about needing at least three operands initially made me think you were confused again, as if you thought that associativity applies to the entire expression rather than to the operator itself.)

But here is a proof. For any a, b, c, a*(b*c) = a*b = a, since b*c = b and then a*b = a, by definition. On the other hand, (a*b)*c = a*c = a, because a*b = a, and then a*c = a, by definition. In other words, we can always do just what you did to show that 1*(5*3) = 1 and (1*5)*3 = 1.
 
I'd like to comment on some things Dr. Peterson said or implied in his most recent and excellent post.

I have found Wikipedia to be excellent as a refresher in something mathematical that I once learned, but have since forgotten or as an introduction to something closely related to something I already know. It is virtually useless in exploring mathematical ideas that are entirely new to me, which ideas frequently arose to resolve difficulties faced by professional mathematicians.

It would never occur to anyone not familiar with higher mathematics that when confronted with 4 + 9 + 17, you need to worry whether you will get a different result if you first add 4 and 9 and add that sum to 17 compared to the result if you first 9 and 17 and then add 4 to that sum. The need for a name for that fact about numbers only arises when you need to think about all sorts of operations and mathematical objects not dreamed about in arithmetic, elementary algebra, and calculus. We know how addition, subtraction, multiplication, and division work: we do not need special names for them.

In abstract algebra, it is standard to use +, *, and / to indicate operations that are not the same operations as are indicated by those symbols in regular algebra and calculus. It takes some getting used to. I reiterate that I found abstract algebra a challenging course. My recollection is that I got only a B in it after a lot of work. I was generally an A student in math after the boredom of arithmetic. You are not ready for abstract algebra; you will end up completely confusing yourself. I would make it a requirement that people study linear algebra in addition to regular algebra before trying abstract algebra so that the student grasps the idea of different kinds of algebra. (I am convinced I would have done much better in abstract algebra if I had studied linear algebra first.) Get solid on standard algebra and linear algebra before tackling abstract algebra.
 
Your question about needing at least three operands initially made me think you were confused again, as if you thought that associativity applies to the entire expression rather than to the operator itself
what did u mean?
i was saying if there is one binary associative operator and two operands a+b (+ means addition) ;there is no place where i can use associative property .
if there are two operators in a expression then i can apply associative property to the operators by rearanging paranthesis. (a+b)+c=a+(b+c)

For the trivial operation a*b=a --> in this eg is there any associative property used?
@Dr.Peterson
 
You said this:
The trivial operation xy = x not commutative" this i understood from ur eg but how is it associative . (1*5=1) in associative operation there has to be at least 3 operands to the best of my knowledge and paranthesis is must.
For the trivial operation a*b=a --> in this eg is there any associative property used?

The definition of the operation, of course, doesn't use the associative property. But that doesn't mean you can't write an expression with the operation to which the associative property can be applied. And in fact you did just that, which is why I realized you weren't saying what I initially thought you were (I hope):
Acc to me this will be a associative operation --> 1*(5*3)=(1*5)*3=1 using new operation called "*"

The operation "*" is called associative, because expressions such as you wrote here are always equal. But the operation is called associative even when you aren't at the moment using any parentheses. Associativity is a property of the operation, not just of an expression.
 
@Dr.Peterson
Associativity is a property of the operation, not just of an expression.
a*b=a ok that means this operation has the property of associtivity. If i create any expression using any no of operands with this operation , it will be equal to any new expression after rearranging only parenthis not the order of operands.
But the operation is called associative even when you aren't at the moment using any parentheses
For any associative operation denoted by * --> 5*3*2=5*3*2 this is still a associative operation (NO PARENTHESES)even if I havent represented them as this(5*3)*2=5*(3*2) . If its true ,then In wiki it defined as " associativity is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result . BY the way they should have mentioned "only in a row of the same associative operator"

Why they have mentioned about the parentheses part that rearranging them will not change the result if U are saying "the operation is called associative even when you aren't at the moment using any parentheses"
 
@Dr.Peterson

a*b=a ok that means this operation has the property of associtivity. If i create any expression using any no of operands with this operation , it will be equal to any new expression after rearranging only parenthis not the order of operands.

For any associative operation denoted by * --> 5*3*2=5*3*2 this is still a associative operation (NO PARENTHESES)even if I havent represented them as this(5*3)*2=5*(3*2) . If its true ,then In wiki it defined as " associativity is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result . BY the way they should have mentioned "only in a row of the same associative operator"

Why they have mentioned about the parentheses part that rearranging them will not change the result if U are saying "the operation is called associative even when you aren't at the moment using any parentheses"
I gave you an answer to this quite a while ago

What does

[MATH]56 \div 4 \div 2[/MATH] mean?

Does it mean

[MATH](56 \div 4) \div 2 = 14 \div 2 = 7 \text { or } 56 \div (4 \div 2) = 56 \div 2 = 28.[/MATH]
The order in which you do the operation of division multiple times makes a difference. Not associative.

The order in which you do the operation of multiplication multiple times does not make a difference. Associative.

If you want to, you can say that with an associative operation, you do not need parentheses.

Both Dr. Peterson and I told you that we were not enamored with the language in that wiki article. Once again, you are fussing about the exact words used instead of focusing on the idea. If you do an associative operation multiple times, parentheses are not needed to express your intended meaning unambiguously. If you do a non-associative operation multiple times, parentheses are needed to express your intended meaning unambiguously.
 
If its true ,then In wiki it defined as " associativity is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result . BY the way they should have mentioned "only in a row of the same associative operator"
Well, of course in that introductory line, they are referring only to an associative operator. Details are explained later. That's why we read in context, and don't focus on individual words -- as I've said before (#6).

Why they have mentioned about the parentheses part that rearranging them will not change the result if U are saying "the operation is called associative even when you aren't at the moment using any parentheses"
Because you said something that seemed to take "associative" to be something that applies to an entire expression rather than to the operator itself, and I wanted to make it clear. When I just write "+", I am already talking about an associative operator, before I do anything with it, just as I am right-handed even when I'm not using my hands, so you can't tell.
 
Under associative operation , if expression is a*b*c*d so can i equate like this : (a*b*c)*d=a*(b*c*d) or i have to use 2 pairs of paranthesis (a*b)*(c*d)=a*(b*(c*d)) just like they have done In wiki under "
Generalized associative law" they have taken four factors and 2 pair of parantheisis.
Is taking the pair of paranthesis has something to do with operators. For every one binary associative operator there has to be 1 pair of brackets if there are two operators then 2 pairs . ALthough the result will be same
 
Under associative operation , if expression is a*b*c*d so can i equate like this : (a*b*c)*d=a*(b*c*d) or i have to use 2 pairs of paranthesis (a*b)*(c*d)=a*(b*(c*d)) just like they have done In wiki under "Generalized associative law" they have taken four factors and 2 pair of parantheisis.

Is taking the pair of paranthesis has something to do with operators. For every one binary associative operator there has to be 1 pair of brackets if there are two operators then 2 pairs . ALthough the result will be same
Technically, a*b*c*d means ((a*b)*c)*d; that is, this is its literal translation, reading left to right. But the associative property implies that you will get the same result however you insert parentheses. That's what they are saying under this heading.

For example, ((a*b)*c)*d = (a*b)*(c*d), which in turn equals a*(b*(c*d)) = a*(b*c)*d, where each step used the property.

I'm not sure what your last paragraph means. But the point is that it is never required to insert parentheses, and the number inserted also makes no difference. You could also write a*b*(c*d) if you want (which would literally mean (a*b)*(c*d) ). The five forms they wrote are all "fully parenthesized".
 
which is why I realized you weren't saying what I initially thought you were
What was i initally telling? this "The trivial operation xy = x not commutative" this i understood from ur eg but how is it associative . (1*5=1) in associative operation there has to be at least 3 operands to the best of my knowledge and paranthesis is must.

"what did u initially thought? this "that associativity applies to the entire expression rather than to the operator itself. "
Which naturally raises the question below..

Associativity is a property of the operation, not just of an expression.

what would be the case if it was property of expression or if associativity applies to the entire expression rather than to the operator itself.


I'm not sure what your last paragraph means. But the point is that it is never required to insert parentheses,
can i write like this: (a*b*c)*d=a*(b*c*d) or i have to group them like this a*b*(c*d) . I was saying that only for every two operands i can have one pair of parenthesis ->(a+b)+c ......Now if there is 4 operands i can write them like this a*(b*c)*d which inherently means ->a*((b*c) *d) or (a(b*c))*d using 2 pairs of paranthesis but why it does not mean a*(b*c*d) .

i got the point that it is never required to insert parentheses, and the number inserted also makes no difference
 
Last edited:
All I'm saying is that we call an operator "associative", not an expression. And much of what we seem to be arguing about is based on something I said I wrongly thought about your thinking.

Can we just drop this?
 
can i write like this: (a*b*c)*d=a*(b*c*d) or i have to group them like this a*b*(c*d) . I was saying that only for every two operands i can have one pair of parenthesis ->(a+b)+c ......Now if there is 4 operands i can write them like this a*(b*c)*d which inherently means ->a*((b*c) *d) or (a(b*c))*d using 2 pairs of paranthesis but why it does not mean a*(b*c*d) .

i got the point that it is never required to insert parentheses, and the number inserted also makes no difference
what about this part?
 
can i write like this: (a*b*c)*d=a*(b*c*d) or i have to group them like this a*b*(c*d) . I was saying that only for every two operands i can have one pair of parenthesis ->(a+b)+c ......Now if there is 4 operands i can write them like this a*(b*c)*d which inherently means ->a*((b*c) *d) or (a(b*c))*d using 2 pairs of paranthesis but why it does not mean a*(b*c*d)? .
@Dr.Peterson @Jomo @JeffM
 
can i write like this: (a*b*c)*d=a*(b*c*d) or i have to group them like this a*b*(c*d) . I was saying that only for every two operands i can have one pair of parenthesis ->(a+b)+c ......Now if there is 4 operands i can write them like this a*(b*c)*d which inherently means ->a*((b*c) *d) or (a(b*c))*d using 2 pairs of paranthesis but why it does not mean a*(b*c*d) .

When I talk about what something "literally means", I am talking about following a left-to-right rule, which technically is part of the order of operations we use for traditional addition and multiplication, not for arbitrary operations. But if you do follow that rule here, then a*b*c*d "means" ((a*b)*c)*d because we do the operations from left to right. By that standard what you say is false. I have to guess that you mean something different by "inherently means".

By my standard, a*(b*c)*d "means" (a*(b*c))*d, since we would do the leftmost operation first. Why do you say it means a*((b*c)*d)? And why do you bring in a*(b*c*d), which is not fully parenthesized, as something an expression could "mean"?

But all this is totally unimportant, as all the expressions you mentioned are exactly equivalent as long as * is associative. You can use as many or as few parentheses as you wish: from a*b*c*d, to (a)*(b)*c*d, to (((((a*)))*((b*(c))*d))), for example. (I hope you would never do so.) Your a*(b*c*d) is perfectly legal, and has the same value as all the others.
 
Why do you say it means a*((b*c)*d)? ".
As it was originally this a*(b*c)*d so i thought what could be the representation which is fully parenthesized(FPE NOT SURE ) keeping b*c inside one parenthesis ; either a*((b*c) *d) or (a(b*c))*d But A FPE has exactly one set of Parentheses enclosing each operator and its operands.
The five forms they wrote are all "fully parenthesized".
abcd for this to be FPE this can be --> ( a*( (b*c)*d ) ) or ( (a*(b*c) )*d ) these are perfectly matching with the def of FPE. "exactly one set of Parentheses enclosing each operator and its operands" but taking any two of five forms a((bc)*d) or (a*b) * (c*d) these are not fully parentisesized.

fpe version of a((bc)*d --> ( a*( (b*c)*d ) )
fpe version of (a*b) * (c*d) -->( (a*b) * (c*d) )
What is FPE has to do with associative property?
 
Top