Hubbry Logo
Parity (mathematics)Parity (mathematics)Main
Open search
Parity (mathematics)
Community hub
Parity (mathematics)
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Parity (mathematics)
Parity (mathematics)
from Wikipedia
Cuisenaire rods: 5 (yellow) cannot be evenly divided in 2 (red) by any 2 rods of the same color/length, while 6 (dark green) can be evenly divided in 2 by 3 (lime green).

In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is divisible by 2, and odd if it is not.[1] For example, −4, 0, and 82 are even numbers, while −3, 5, 23, and 67 are odd numbers.

The above definition of parity applies only to integer numbers, hence it cannot be applied to numbers with decimals or fractions like 1/2 or 4.6978. See the section "Higher mathematics" below for some extensions of the notion of parity to a larger class of "numbers" or in other more general settings.

Even and odd numbers have opposite parities, e.g., 22 (even number) and 13 (odd number) have opposite parities. In particular, the parity of zero is even.[2] Any two consecutive integers have opposite parity. A number (i.e., integer) expressed in the decimal numeral system is even or odd according to whether its last digit is even or odd. That is, if the last digit is 1, 3, 5, 7, or 9, then it is odd; otherwise it is even—as the last digit of any even number is 0, 2, 4, 6, or 8. The same idea will work using any even base. In particular, a number expressed in the binary numeral system is odd if its last digit is 1; and it is even if its last digit is 0. In an odd base, the number is even according to the sum of its digits—it is even if and only if the sum of its digits is even.[3]

Definition

[edit]

An even number is an integer of the form where k is an integer;[4] an odd number is an integer of the form

An equivalent definition is that an even number is divisible by 2: and an odd number is not:

The sets of even and odd numbers can be defined as following:[5]

The set of even numbers is a prime ideal of and the quotient ring is the field with two elements. Parity can then be defined as the unique ring homomorphism from to where odd numbers are 1 and even numbers are 0. The consequences of this homomorphism are covered below.

Properties

[edit]

The following laws can be verified using the properties of divisibility. They are a special case of rules in modular arithmetic, and are commonly used to check if an equality is likely to be correct by testing the parity of each side. As with ordinary arithmetic, multiplication and addition are commutative and associative in modulo 2 arithmetic, and multiplication is distributive over addition. However, subtraction in modulo 2 is identical to addition, so subtraction also possesses these properties, which is not true for normal integer arithmetic.

Addition and subtraction

[edit]
  • even ± even = even;[1]
  • even ± odd = odd;
  • odd ± odd = even;

Multiplication

[edit]
  • even × even = even;
  • even × odd = even;
  • odd × odd = odd.

By construction in the previous section, the structure ({even, odd}, +, ×) is in fact the field with two elements.

Division

[edit]

The division of two whole numbers does not necessarily result in a whole number. For example, 1 divided by 4 equals 1/4, which is neither even nor odd, since the concepts of even and odd apply only to integers. But when the quotient is an integer, it will be even if and only if the dividend has more factors of two than the divisor.[6]

History

[edit]

The ancient Greeks considered 1, the monad, to be neither fully odd nor fully even.[7] Some of this sentiment survived into the 19th century: Friedrich Wilhelm August Fröbel's 1826 The Education of Man instructs the teacher to drill students with the claim that 1 is neither even nor odd, to which Fröbel attaches the philosophical afterthought,

It is well to direct the pupil's attention here at once to a great far-reaching law of nature and of thought. It is this, that between two relatively different things or ideas there stands always a third, in a sort of balance, seeming to unite the two. Thus, there is here between odd and even numbers one number (one) which is neither of the two. Similarly, in form, the right angle stands between the acute and obtuse angles; and in language, the semi-vowels or aspirants between the mutes and vowels. A thoughtful teacher and a pupil taught to think for himself can scarcely help noticing this and other important laws.[8]

Higher mathematics

[edit]

Higher dimensions and more general classes of numbers

[edit]
abcdefgh
8
c8 black cross
e8 black cross
b7 black cross
f7 black cross
d6 black knight
b5 black cross
f5 black cross
c4 black cross
e4 black cross
c1 white bishop
f1 white bishop
8
77
66
55
44
33
22
11
abcdefgh
Each of the white bishops is confined to squares of the same parity; the black knight can only jump to squares of alternating parity.

Integer coordinates of points in Euclidean spaces of two or more dimensions also have a parity, usually defined as the parity of the sum of the coordinates. For instance, the face-centered cubic lattice and its higher-dimensional generalizations (the Dn lattices) consist of all of the integer points whose coordinates have an even sum.[9] This feature also manifests itself in chess, where the parity of a square is indicated by its color: bishops are constrained to moving between squares of the same parity, whereas knights alternate parity between moves.[10] This form of parity was famously used to solve the mutilated chessboard problem: if two opposite corner squares are removed from a chessboard, then the remaining board cannot be covered by dominoes, because each domino covers one square of each parity and there are two more squares of one parity than of the other.[11]

The parity of an ordinal number may be defined to be even if the number is a limit ordinal, or a limit ordinal plus a finite even number, and odd otherwise.[12]

Let R be a commutative ring and let I be an ideal of R whose index is 2. Elements of the coset may be called even, while elements of the coset may be called odd. As an example, let R = Z(2) be the localization of Z at the prime ideal (2). Then an element of R is even or odd if and only if its numerator is so in Z.

Number theory

[edit]

The even numbers form an ideal in the ring of integers,[13] but the odd numbers do not—this is clear from the fact that the identity element for addition, zero, is an element of the even numbers only. An integer is even if it is congruent to 0 modulo this ideal, in other words if it is congruent to 0 modulo 2, and odd if it is congruent to 1 modulo 2.

All prime numbers are odd, with one exception: the prime number 2.[14] All known perfect numbers are even; it is unknown whether any odd perfect numbers exist.[15]

Goldbach's conjecture states that every even integer greater than 2 can be represented as a sum of two prime numbers. Modern computer calculations have shown this conjecture to be true for integers up to at least 4 × 1018, but still no general proof has been found.[16]

Group theory

[edit]
Rubik's Revenge in solved state

The parity of a permutation (as defined in abstract algebra) is the parity of the number of transpositions into which the permutation can be decomposed.[17] For example (ABC) to (BCA) is even because it can be done by swapping A and B then C and A (two transpositions). It can be shown that no permutation can be decomposed both in an even and in an odd number of transpositions. Hence the above is a suitable definition. In Rubik's Cube, Megaminx, and other twisting puzzles, the moves of the puzzle allow only even permutations of the puzzle pieces, so parity is important in understanding the configuration space of these puzzles.[18]

The Feit–Thompson theorem states that a finite group is always solvable if its order is an odd number. This is an example of odd numbers playing a role in an advanced mathematical theorem where the method of application of the simple hypothesis of "odd order" is far from obvious.[19]

Analysis

[edit]

The parity of a function describes how its values change when its arguments are exchanged with their negations. An even function, such as an even power of a variable, gives the same result for any argument as for its negation. An odd function, such as an odd power of a variable, gives for any argument the negation of its result when given the negation of that argument. It is possible for a function to be neither odd nor even, and for the case f(x) = 0, to be both odd and even.[20] The Taylor series of an even function contains only terms whose exponent is an even number, and the Taylor series of an odd function contains only terms whose exponent is an odd number.[21]

Combinatorial game theory

[edit]

In combinatorial game theory, an evil number is a number that has an even number of 1's in its binary representation, and an odious number is a number that has an odd number of 1's in its binary representation; these numbers play an important role in the strategy for the game Kayles.[22] The parity function maps a number to the number of 1's in its binary representation, modulo 2, so its value is zero for evil numbers and one for odious numbers. The Thue–Morse sequence, an infinite sequence of 0's and 1's, has a 0 in position i when i is evil, and a 1 in that position when i is odious.[23]

Additional applications

[edit]

In information theory, a parity bit appended to a binary number provides the simplest form of error detecting code. If a single bit in the resulting value is changed, then it will no longer have the correct parity: changing a bit in the original number gives it a different parity than the recorded one, and changing the parity bit while not changing the number it was derived from again produces an incorrect result. In this way, all single-bit transmission errors may be reliably detected.[24] Some more sophisticated error detecting codes are also based on the use of multiple parity bits for subsets of the bits of the original encoded value.[25]

In wind instruments with a cylindrical bore and in effect closed at one end, such as the clarinet at the mouthpiece, the harmonics produced are odd multiples of the fundamental frequency. (With cylindrical pipes open at both ends, used for example in some organ stops such as the open diapason, the harmonics are even multiples of the same frequency for the given bore length, but this has the effect of the fundamental frequency being doubled and all multiples of this fundamental frequency being produced.) See harmonic series (music).[26]

In some countries, house numberings are chosen so that the houses on one side of a street have even numbers and the houses on the other side have odd numbers.[27] Similarly, among United States numbered highways, even numbers primarily indicate east–west highways while odd numbers primarily indicate north–south highways.[28] Among airline flight numbers, even numbers typically identify eastbound or northbound flights, and odd numbers typically identify westbound or southbound flights.[29]

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In mathematics, parity refers to the classification of an as even or odd based on its remainder when divided by 2: an even is divisible by 2 with 0, while an odd leaves a remainder of 1. This binary attribute—often represented as for even and 1 for odd—underpins fundamental concepts in , such as the parity of sums (even if an even number of odd addends) and products (odd only if all factors are odd). For example, the sum of two even numbers or two odd numbers is even, whereas the sum of an even and an odd number is odd. Beyond basic integers, parity extends to permutations in group theory, where a permutation is deemed even if it can be expressed as an even number of transpositions (2-cycles) and odd otherwise; this invariant property, independent of the decomposition chosen, defines the alternating group as the subgroup of even permutations. The parity of a permutation can also be determined by the number of inversions: even if even, odd if odd. In coding theory, parity manifests as a parity bit appended to a binary string to ensure the total number of 1s is even (even parity) or odd (odd parity), enabling single-error detection in data transmission.[](https://www.cs.cmu.edu/~venkatg/teaching/coding theory/notes/notes1.pdf) Parity principles appear across diverse mathematical domains, including (where parity equates to congruence modulo 2), (e.g., parity of cycle lengths), and (e.g., parity theorems for statistics on sets). These applications highlight parity's role in proofs by contradiction—such as establishing that √2 is irrational via parity mismatch—and in generating sequences like the Thue-Morse sequence, which encodes counts. Overall, parity provides a simple yet powerful tool for analyzing , invariance, and error structures in abstract mathematics.

Fundamentals

Definition

In , parity is the property of an that determines whether it is even or odd based on its divisibility by 2. An nn has even parity if there exists an kk such that n=2kn = 2k; it has odd parity if there exists an kk such that n=2k+1n = 2k + 1. The set of all even integers is denoted {2kkZ}\{ 2k \mid k \in \mathbb{Z} \}, while the set of all odd integers is {2k+1kZ}\{ 2k + 1 \mid k \in \mathbb{Z} \}. This binary classification aligns with the structure of the integers modulo 2, denoted Z/2Z\mathbb{Z}/2\mathbb{Z}, where even integers are congruent to 0 modulo 2 and odd integers are congruent to 1 modulo 2. Notably, zero possesses even parity, as 0=200 = 2 \cdot 0.

Even and Odd Integers

Even integers are those integers that can be expressed as twice some integer, such as ,4,2,0,2,4,\dots, -4, -2, 0, 2, 4, \dots, while odd integers are those that cannot, such as ,3,1,1,3,\dots, -3, -1, 1, 3, \dots. These sets partition the integers Z\mathbb{Z} into two disjoint classes based on parity, as per the modulo 2 equivalence. In the ordered sequence of all , even and odd alternate consecutively, such as ..., -2 (even), -1 (odd), 0 (even), 1 (odd), 2 (even), .... Asymptotically, each set comprises half of the up to any large bound NN, with the natural of even being 1/21/2. The parity of an is reflected in its representation across number bases. In (base 10), an is even if its last digit is 0, 2, 4, 6, or 8, and odd otherwise. In binary (base 2), the parity is determined by the least significant bit: even end with 0, while odd end with 1. Both the set of even integers and the set of odd integers are infinite subsets of Z\mathbb{Z}. Notably, the even integers form a of (Z,+)(\mathbb{Z}, +), closed under addition and containing additive inverses, whereas the odd integers do not. Intuitively, parity can be visualized on the , where even and odd integers alternate positions, creating a regular pattern of spacing by 1 unit between consecutive integers of the same parity. In counting applications, such as pairing objects, even counts pair completely without remainder, while odd counts leave one unpaired, highlighting the binary distinction.

Arithmetic Properties

Addition and Subtraction

In integer arithmetic, the parity of the sum of two integers is determined solely by the parities of the addends. Specifically, the sum of two even integers is even, the sum of an even integer and an odd integer is odd, and the sum of two odd integers is even. For example, 3+5=83 + 5 = 8, where both addends are odd and the result is even, illustrating how odd parities "cancel" to produce evenness. This property holds regardless of the magnitudes of the integers involved, as parity classification depends only on divisibility by 2. Subtraction follows analogous rules, treating it as of the , which preserves parity (the negative of an even is even, and the negative of an odd is odd). Thus, the difference of two even integers is even, the difference of an even and an odd is odd, the difference of an odd and an even is odd, and the difference of two odd integers is even. An example is 41=34 - 1 = 3, where the minuend is even and the subtrahend is odd, yielding an odd result. Like , the parity of the difference relies exclusively on the parities of the operands, independent of their absolute values. These rules can be rigorously established using modulo 2, where even integers are congruent to 0 and odd integers to 1. The addition property of congruences states that if ab(mod2)a \equiv b \pmod{2} and cd(mod2)c \equiv d \pmod{2}, then a+cb+d(mod2)a + c \equiv b + d \pmod{2}. To see this, suppose ab=2ka - b = 2k and cd=2lc - d = 2l for integers k,lk, l; then (a+c)(b+d)=2(k+l)(a + c) - (b + d) = 2(k + l), so a+cb+d(mod2)a + c \equiv b + d \pmod{2}. For parity, this implies (a+b)mod2=((amod2)+(bmod2))mod2(a + b) \mod 2 = ( (a \mod 2) + (b \mod 2) ) \mod 2, directly yielding the rules (e.g., 0+0=0mod20 + 0 = 0 \mod 2 for even + even). inherits this via ab=a+(b)a - b = a + (-b) and the fact that bb(mod2)-b \equiv b \pmod{2}, preserving the congruence.

Multiplication

In integer multiplication, the parity of the product is determined solely by the parities of the factors. Specifically, the product of two s is even if at least one factor is even, and odd only if both factors are odd. This follows from the definitions: an even is of the form 2k2k for some kk, while an odd is 2k+12k + 1. If one factor is even, say a=2ka = 2k, then a×b=2(kb)a \times b = 2(kb), which is divisible by 2 and thus even, regardless of bb's parity. Conversely, if both are odd, a=2m+1a = 2m + 1 and b=2n+1b = 2n + 1, their product expands to (2m+1)(2n+1)=4mn+2m+2n+1=2(2mn+m+n)+1(2m + 1)(2n + 1) = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1, which is odd. For instance, multiplying an even number by any yields even: 2×3=62 \times 3 = 6, which is even. In contrast, the product of two is odd: 3×5=153 \times 5 = 15. These rules highlight 's tendency to produce even results more frequently than , as only the all-odd case preserves odd parity. Formally, parity under aligns with operations 2, where even integers are congruent to and odds to 1. The product 2 satisfies (a×b)mod2=((amod2)×(bmod2))mod2(a \times b) \mod 2 = ((a \mod 2) \times (b \mod 2)) \mod 2, resulting in (even) unless both residues are 1, yielding 1 (odd). This congruence preserves the parity structure, confirming that the product's parity is odd exclusively when both factors are odd.

Division

In integer division, the parity of the and depends on the parities of the nn and d>0d > 0, as expressed by the division algorithm n=qd+rn = q d + r where qq is the and 0r<d0 \leq r < d. When nn and dd have the same parity (both even or both odd) and the division is exact (r=0r = 0), the parity of the qq is determined by comparing the 2-adic valuations v2(n)v_2(n) and v2(d)v_2(d), which count the highest power of 2 dividing each. The 2-adic valuation v2(k)v_2(k) equals 0 if kk is odd and is at least 1 if kk is even, increasing with higher powers of 2. In this case, v2(q)=v2(n)v2(d)v_2(q) = v_2(n) - v_2(d), so qq is even if and only if v2(n)>v2(d)v_2(n) > v_2(d), meaning the has more factors of 2 than the ; otherwise, qq is odd. If both are odd, then v2(n)=v2(d)=0v_2(n) = v_2(d) = 0, so qq is odd. For the remainder rr, its parity follows from the congruence rn(modd)r \equiv n \pmod{d}. If dd is even, then d0(mod2)d \equiv 0 \pmod{2}, so rn(mod2)r \equiv n \pmod{2}, meaning rr has the same parity as nn. If dd is odd, then d1(mod2)d \equiv 1 \pmod{2}, so rnqdnq(mod2)r \equiv n - q d \equiv n - q \pmod{2} (since qdq(mod2)q d \equiv q \pmod{2}), and the parity of rr is the parity of nn xor the parity of qq. Examples illustrate these rules. For 8÷2=48 \div 2 = 4 with r=0r = 0, both dividend and divisor are even (v2(8)=3>v2(2)=1v_2(8) = 3 > v_2(2) = 1), so the quotient 4 is even. For 7÷2=37 \div 2 = 3 with r=1r = 1, the dividend is odd and divisor even, yielding odd quotient 3 and odd remainder 1 matching the dividend's parity. For 9÷3=39 \div 3 = 3 with r=0r = 0, both odd (v2(9)=v2(3)=0v_2(9) = v_2(3) = 0), so quotient 3 is odd. A special case arises in division by 2, which directly determines parity: nn is even if and only if the n/2n/2 is an (i.e., r=0r = 0); otherwise, for odd nn, r=1r = 1 and the is (n1)/2(n-1)/2.

Historical Development

Ancient and Classical Concepts

In , the Pythagoreans attributed symbolic and metaphysical significance to the parity of numbers, viewing even numbers as representative of the unlimited principle, while odd numbers symbolized the limited principle. They considered the number one as both even and odd, positioning it as the primordial unity prior to numerical division. These ideas are preserved in accounts by later philosophers, reflecting the Pythagoreans' belief that numbers embodied cosmic opposites. Among Greek philosophers, incorporated concepts of even and odd numbers into rigorous mathematical proofs in his Elements, particularly in Book VII, where definitions distinguish even numbers as those divisible into two equal parts and odd numbers as those differing from even by a unit. These definitions underpin propositions on relatively prime numbers and multiples, such as those relying on parity to establish properties of products. , in his Metaphysics, critiqued and expanded on Pythagorean notions of parity, discussing odd and even as principles derived from unity and integrated into broader analyses of opposites and mathematical entities. He noted that infinite number series evade strict parity, being neither wholly odd nor even, while emphasizing parity's role in understanding numerical generation. In around 200 BCE, Pingala's Chandaḥśāstra explored binary-like patterns in the of poetic meters, using short (laghu) and long (guru) syllables analogous to 0 and 1, which implicitly distinguished patterns by parity in length and structure. This work laid early foundations for enumerating even and odd configurations in prosody, predating similar European developments. During the medieval Islamic period, scholars like Muhammad ibn Musa al-Khwarizmi advanced parity's practical application in arithmetic algorithms, notably in his multiplication method involving repeated halving and doubling, where rows corresponding to even factors are discarded to compute products efficiently. This technique, described in his treatise on Hindu numerals, integrated parity checks to simplify calculations and influenced algorithmic traditions.

Modern Formalization

In the , Friedrich Fröbel's educational treatise The Education of Man () reinforced philosophical perspectives on numerical properties, including representations of even numbers as double rows and odd numbers as double rows plus a singleton, echoing earlier debates on the status of 1 and viewing it as neither even nor odd despite its formal classification as odd. This period also saw parity emerge more systematically in texts, notably through Carl Friedrich Gauss's (1801), where even and odd integers were analyzed via congruences modulo 2, laying groundwork for modular distinctions in divisibility properties. By mid-century, such concepts permeated works like Augustus De Morgan's Elements of Arithmetic (1830), treating parity as a fundamental for integers in elementary proofs. The late 19th and early 20th centuries marked parity's integration into , exemplified by Dedekind's introduction of ideals in his 1871 supplement to Dirichlet's Vorlesungen über Zahlentheorie, highlighting its role in fields. This formalization culminated in the 20th-century view of parity as a from the additive group of integers (Z,+)(\mathbb{Z}, +) to the Z/2Z\mathbb{Z}/2\mathbb{Z}, mapping even integers to the identity and odd integers to the generator; this perspective was explicitly developed in foundational texts like Heinrich Weber's Lehrbuch der Algebra (1895–1897) and solidified in Emmy Noether's abstract advancements around 1920. Such algebraic framing emphasized parity's homomorphism properties, including kernel as the even integers and as the full target group. In computational contexts, parity found early algorithmic application in the 1930s as a precursor to error detection, at Bell Laboratories, where developed early relay-based calculators starting with the Model K (1937), and later incorporated parity checks in models like the Model II (1942) to verify integrity during numerical computations. This usage extended to data transmission demonstrations, automatically retransmitting records with parity errors, bridging mathematical parity to practical reliability. By the late 20th and early 21st centuries, up to 2025, parity-related theorems have undergone in proof assistants like Coq, enabling machine-checked proofs of properties such as the evenness of n(n+1)n(n+1) for all natural numbers nn and the sum of the first nn odd numbers equaling n2n^2. More advanced formalizations include the theory of parity complexes—a combinatorial structure for higher categories—verified in Coq to confirm excision algorithms and extremal properties. These efforts, often part of broader libraries like Coq's Mathematical Components, underscore parity's role in certified mathematics and software correctness.

Advanced Generalizations

Higher Dimensions and Other Number Systems

In higher-dimensional Euclidean spaces, the parity of a point with coordinates in Zn\mathbb{Z}^n is defined as the parity of the sum of its coordinates, partitioning the lattice into even and odd classes analogous to the black-and-white coloring of a two-dimensional . This coordinate parity facilitates analysis in lattice point enumeration and tiling problems, where paths or coverings must respect parity constraints to avoid impossibilities, such as in higher-dimensional board games or geometric dissections. For instance, in three dimensions, a can be colored based on the parity of the sum of three coordinates, ensuring adjacent unit cubes differ in color, which aids in studying tilings or random walks on the lattice. The parity of vector sums in Zn\mathbb{Z}^n extends this , where the parity class of a sum depends on the parities of the component vectors 2. Applications arise in counting lattice points within polytopes, where parity conditions help bound the number of points in even or odd classes, providing asymptotic estimates for volumes or discrepancies in discrepancy theory. In chess mathematics, the knight's move, represented by vectors like (1,2)(1,2) or (2,1)(2,1), always changes the parity of the position since the sum of coordinates in the displacement is odd (3 2), ensuring the knight alternates between even and odd parity squares on an infinite board. This parity alternation implies that closed knight tours on boards with unequal even and odd squares are impossible, as verified through graph bipartition arguments. In the ring of Gaussian integers Z\mathbb{Z}, parity is defined for α=a+bi\alpha = a + bi (with a,bZa, b \in \mathbb{Z}) as even if aa and bb have the same parity, and odd otherwise; this preserves rules, where the sum of two even (or two odd) elements is even, and the sum of even and odd is odd. The norm N(α)=a2+b2N(\alpha) = a^2 + b^2 2 aligns with this definition, as even Gaussian integers have even norm while odd ones have odd norm, influencing and unique representation properties in the ring. Such parity distinctions are crucial in studying perfect numbers or analogs over Z\mathbb{Z}. Extensions to other rings include the 2-adic integers Z2\mathbb{Z}_2, where parity is the residue 2, and parity sequences—iterative maps reducing elements 2—are analyzed in dynamical systems, such as the 3x+1 problem, revealing periodic behaviors tied to the 2-adic valuation. In quadratic fields Q(d)\mathbb{Q}(\sqrt{d})
Add your contribution
Related Hubs
User Avatar
No comments yet.