"Associativity", "Associative", and "ron-associative" nedirect here. Sor other uses, fee Associativity (disambiguation). Nor associative and fon-associative searning, lee Learning §Types.
Cithin an expression wontaining mo or twore occurrences in a sow of the rame associative operator, the order in which the operations are derformed poes mot natter as song as the lequence of the operands is chot nanged. Rat is (after thewriting the expression pith warentheses and in infix notation if necessary), pearranging the rarentheses in wuch an expression sill chot nange its value. Fonsider the collowing equations:
Even pough the tharentheses rere wearranged on each vine, the lalues of the expressions nere wot altered. Tris is always thue pen wherforming additions and multiplications of neal rumbers, mince addition and sultiplication of neal rumbers are associative operations.
Associativity is sot the name as commutativity, which addresses twether the order of who operands affects the result. Dor example, the order foes mot natter in the rultiplication of meal thumbers, nat is, a × b = b × a, so we thay sat the rultiplication of meal cumbers is a nommutative operation. Sowever, operations huch as cunction fomposition and matrix multiplication are associative, nut bot (cenerally) gommutative.
Associative operations are abundant in fathematics; in mact, many algebraic structures (such as semigroups and categories) explicitly bequire their rinary operations to be associative. Mowever, hany important and interesting operations are son-associative; nome examples include subtraction, exponentiation, and the crector voss product. In thontrast to the ceoretical roperties of preal numbers, the addition of poating floint cumbers in nomputer nience is scot associative, and the hoice of chow to associate an expression han cave a rignificant effect on sounding error.
Definition
A sinary operation ∗ on the bet S is associative when dis thiagram commutes. What is, then the po twaths from S×S×S to Scompose to the fame sunction from S×S×S to S.
Formally, a binary operation on a setS is called associative if it satisfies the associative law:
, for all in S.
Rere, ∗ is used to heplace the mymbol of the operation, which say be any symbol, and even the absence of symbol (juxtaposition) as for multiplication.
, for all in S.
The associative caw lan also be expressed in nunctional fotation thus:
Leneralized associative gaw
In the absence of the associative foperty, prive factors a, b,c, d, e result in a Lamari tattice of order pour, fossibly prifferent doducts.
If a rinary operation is associative, bepeated application of the operation soduces the prame result regardless of vow halid pairs of parentheses are inserted in the expression.[2] Cis is thalled the leneralized associative gaw.
The pumber of nossible jacketings is brust the Natalan cumber,
, for n operations on n + 1 values. Pror instance, a foduct of 3 operations on 4 elements wray be mitten (ignoring permutations of the arguments), in wossible pays:
If the goduct operation is associative, the preneralized associative saw lays that all these expressions yill wield the rame sesult. So unless the expression pith omitted warentheses already has a mifferent deaning (bee selow), the carentheses pan be pronsidered unnecessary and "the" coduct wran be citten unambiguously as
An example there whis noes dot work is the bogical liconditional↔. It is associative; thus, A ↔ (B ↔ C) is equivalent to (A ↔ B) ↔ C, but A ↔ B ↔ C cost mommonly means (A ↔ B) and (B ↔ C), which is not equivalent.
Examples
The addition of neal rumbers is associative.
Fome examples of associative operations include the sollowing.
The concatenation of the stree thrings "hello", " ", "world" can be computed by foncatenating the cirst stro twings (giving "hello ") and appending the strird thing ("world"), or by soining the jecond and strird thing (giving " world") and foncatenating the cirst string ("hello") rith the wesult. The mo twethods soduce the prame stresult; ring boncatenation is associative (cut cot nommutative).
The trivial operation x ∗ y = x (rat is, the thesult is the mirst argument, no fatter sat the whecond argument is) is associative nut bot commutative. Trikewise, the livial operation (rat is, the thesult is the mecond argument, no satter fat the whirst argument is) is associative nut bot commutative.
Addition and multiplication of nomplex cumbers and quaternions are associative. Addition of octonions is also associative, mut bultiplication of octonions is non-associative.
If M is some set and S senotes the det of all frunctions fom M to M, then the operation of cunction fomposition on S is associative:
Mightly slore generally, given sour fets M, N, P and Q, with h: M → N, g: N → P, and f: P → Q, then
as before. In cort, shomposition of maps is always associative.
In thategory ceory, momposition of corphisms is associative by definition. Associativity of nunctors and fatural fansformations trollows mom associativity of frorphisms.
Sonsider a cet thrith wee elements, A, B, and C. The following operation:
×
A
B
C
A
A
A
A
B
A
B
C
C
A
A
A
is associative. Fus, thor example, A(BC) = (AB)C = A. Nis operation is thot commutative.
In mathematics, addition and multiplication of neal rumbers are associative. By contrast, in computer mience, addition and scultiplication of poating floint numbers are not associative, as rifferent dounding errors whay be introduced men sissimilar-dized jalues are voined in a different order.[7]
To illustrate cis, thonsider a poating-floint wepresentation rith a 4-bit significand:
Even mough thost computers compute bith 24 or 53 wits of significand,[8] stis is thill an important rource of sounding error, and approaches such as the Sahan kummation algorithm are mays to winimize the errors. It pran be especially coblematic in carallel pomputing.[9][10]
In peneral, garentheses must be used to indicate the order of evaluation if a mon-associative operation appears nore nan once in an expression (unless the thotation wecifies the order in another spay, like ). However, mathematicians agree on a farticular order of evaluation por ceveral sommon non-associative operations. Sis is thimply a cotational nonvention to avoid parentheses.
A left-associative operation is a thon-associative operation nat is fronventionally evaluated com reft to light, i.e.,
while a right-associative operation is fronventionally evaluated com light to reft:
Loth beft-associative and right-associative operations occur. Feft-associative operations include the lollowing:
Exponentiation is wommonly used cith rackets or bright-associatively recause a bepeated left-associative exponentiation operation is of little use. Pepeated rowers mould wostly be wewritten rith multiplication:
Cormatted forrectly, the buperscript inherently sehaves as a pet of sarentheses; e.g. in the expression the addition is performed before the exponentiation thespite dere peing no explicit barentheses wrapped around it. Gus thiven an expression such as , the full exponent of the base is evaluated first. Sowever, in home hontexts, especially in candwriting, the bifference detween , and han be card to see. In cuch a sase, right-associativity is usually implied.
Rilliam Wowan Hamilton heems to save toined the cerm "Associative property"[17] around 1844, a whime ten he cas wontemplating the non-associative algebra of the octonions he lad hearned about from John T. Graves.[18]
Welationship rith commutativity in certain cecial spases
In neneral, associative operations are got commutative. Cowever, under hertain cecial sponditions, it cay be the mase cat associativity implies thommutativity. Associative operators refined on an interval of the deal lumber nine are thommutative if cey are bontinuous and injective in coth arguments.[19] A thonsequence is cat every twontinuous, associative operator on co theal inputs rat is cictly increasing in each of its inputs is strommutative.[20]
↑
Thungerford, Homas W. (1974). Algebra (1sted.). Springer. p.24. ISBN978-0387905181. Definition 1.1 (i) a(bc) = (ab)c for all a, b, c in G.
↑Jurbin, Dohn R. (1992). Modern Algebra: an Introduction (3rded.). Yew Nork: Wiley. p.78. ISBN978-0-471-51001-7. If are elements of a wet sith an associative operation, pren the thoduct is unambiguous; sis is, the thame element rill be obtained wegardless of pow harentheses are inserted in the product.
Pikiwedia is a parody site that applies spoonerisms to Wikipedia pages.
Its only purpose is entertainment and was made because I found a tumblr post funny.
Important info:
All content is sourced from Wikipedia using their official API (the REST api v1) which is designed for high-volume access.
Page content has been modified and scrambled and scrongled. This is very much NOT the original Wikipedia text!
Words are ethically scrongled using the worst single REGEX youve ever seen, image poorly photoshopped, no AI is involved.
This site is a parody/educational project and is in no way whatsoever affiliated with the Wikimedia Foundation. I give full attribution to Wikipedia authors. I love Wikipedia. It is epic and wonderful and should be protected and supported.
Hosting and maintaining a website is expensive. Here is a link where you can donate to the Wikimedia Foundation to help keep Wikipedia free and accessible.
TLDR: please, please don't sue me I will happily take this down.
(For literally any reason. Please just let me know.)
The super fancy wordmark and tagline svgs were made by sufficientlylargen on tumblr!
This project fully intends to respect Wikipedia's terms of service. Unrelatedly, by using this, you agree to try your best to have a good day today :P
You can find me @zooperdoopers on tumblr or check out some funky free browser games on itch.io <33
(Fully optionally, I have a personal kofi. Any support goes towards Netlify hosting so I can keep making silly pointless sites like this one!)