A cipher is a pair of keyed algorithms that maps a plaintext to a ciphertext and recovers the plaintext from the ciphertext when supplied with the appropriate key.
A binary code is a set of distinct words in whose minimum pairwise Hamming distance is . Here is the block length and is the number of codewords.
An error-correcting code is a set of codewords chosen with enough separation to detect or correct transmission errors.
A binary repetition code represents one bit by repeating it a fixed number of times. Majority decoding corrects fewer than half as many bit flips as the block length.
The Hamming distance between two equal-length words is the number of coordinates in which they differ.
On binary words of length , normalized Hamming distance is the fraction of differing coordinates. Unlike unscaled Hamming distance, it makes the Hamming cubes a Lévy family under uniform probability measures.
The Hamming cube is , or equivalently , equipped with Hamming distance. Under its uniform probability measure, the distance from a fixed vertex has the binomial distribution with parameters . This converts geometric ball sizes into probability tails.
An inclusion-maximal separated set of separation covers the Hamming cube by strict-radius balls. The Hoeffding lower-tail bound for Hamming balls then gives at least selected vertices. At this yields vertices, all separated by at least .
This Hamming distance on partitions identifies a group with its complement because exchanging the two group names does not change the partition. Complementation is an isometry of the ordinary Hamming distance, so minimizing over this two-element group action gives a quotient metric and preserves the triangle inequality. Negating a zero-one indicator is not complementation; with membership vectors, it is.
Suppose encodes the true partition and is a unit estimated eigenvector. Every coordinate of the wrong sign contributes at least to . Since this is at most , which is the squared Frobenius distance between the rank-one orthogonal projection matrices, the bound follows. Coordinates estimated as zero may be assigned consistently to either group.
The minimum distance of a code is the least Hamming distance between distinct codewords. For a linear code, translation invariance makes this equal to the least Hamming weight of a nonzero codeword.
The Hamming ball of radius about a word is the set of words whose Hamming distance from is at most .
For a uniform vertex of the Hamming cube, distance from a fixed vertex is the sum of independent Bernoulli random variables with parameter . The lower-tail Hoeffding inequality implies that the fraction of vertices at distance at most , , is at most . Strict-radius balls satisfy the same upper bound.
For , the number of binary words within Hamming distance of a fixed word is at most , with the binary entropy function in natural logarithms. In , each summand weight for is at least . Also , so . These two bounds give the approximate-recovery denominator in the list-decoding Fano inequality.
A code of minimum distance is perfect if its Hamming balls of radius partition the ambient word space. Every word then has a unique nearest codeword within the code's error-correction radius.
For a code of length , size , and minimum distance over an alphabet of size , puncturing coordinates gives the Singleton bound
The Plotkin bound limits a code whose minimum distance is more than the average distance between unrestricted words. For a binary code with and even ,
Puncturing a code at one coordinate deletes that coordinate from every codeword. For a code of minimum distance , puncturing preserves its number of words and gives minimum distance or .
For messages in a finite additive group, a one-time pad encrypts as , where the key is uniform and independent of , as long as the message, and never reused. Then is uniform and independent of , giving perfect secrecy.
If two plaintexts are encrypted by adding the same one-time-pad key, subtracting the ciphertexts cancels the key and reveals the difference of the plaintexts. Redundancy in natural language or another structured message space can then reveal both messages, so a one-time pad must never reuse key material.
An encryption scheme has perfect secrecy when the ciphertext and plaintext are independent random variables, so observing the ciphertext does not change the plaintext's probability distribution.
If an interceptor knows that an additive one-time-pad ciphertext encrypts plaintext and wants it to decrypt as , replacing it byworks without knowing the key, since .
A secret-sharing scheme distributes shares of a secret so that authorized collections can reconstruct it while unauthorized collections reveal no information about it.
An threshold secret-sharing scheme issues shares: every collection of at least shares reconstructs the secret, while every collection of fewer than shares has a distribution independent of the secret.
Shamir's secret sharing places a secret at the constant term of a random polynomial of degree at most and issues distinct nonzero evaluation pairs . Any shares recover by polynomial interpolation. Given fewer than shares, every candidate constant term has the same number of compatible coefficient tuples, which gives perfect secrecy.
Conditioned on any shares in Shamir's secret sharing, each candidate secret in remains equally likely. Appending to those shares determines exactly one degree-at-most- polynomial for every candidate , by the nonzero Vandermonde determinant.
A discrete memoryless channel has finite input and output alphabets and transition probabilities . Conditional on the input symbols, different channel uses have independent outputs governed by the same transition probabilities.
A finite-alphabet erasure channel transmits the input symbol unchanged with probability and replaces it by a distinct erasure flag with probability , independently of the symbol. Given the flag, the posterior remains the input distribution; otherwise the input is known. Thus its mutual information is .
For a finite-alphabet erasure channel with input symbols, . Maximizing Shannon entropy at the uniform input gives channel capacity bits per use, by the Shannon second coding theorem.
A binary erasure channel transmits each input bit correctly with probability and replaces it by an erasure symbol with probability . Its channel capacity is bits per use.
A Z-channel transmits one binary input without error while the other can change into the first. Unlike a binary symmetric channel, its errors are one-sided.
For a discrete memoryless channel, operational capacity equalsRates below admit codes whose error tends to zero, while rates above cannot have vanishing error.
A rate is reliably achievable through a channel when there is a sequence of length- channel codes with messages such thatand their decoding-error probability tends to zero.
A binary linear-feedback shift register of degree updates a -bit state by shifting and inserting a fixed linear combination over . With recurrenceits feedback polynomial is .
A feedback shift register updates a finite state by shifting its stored symbols and inserting the value of a feedback function of the previous state. The feedback function need not be linear.
The Berlekamp-Massey algorithm finds the shortest linear recurrence satisfied by a finite sequence over a field. It processes symbols incrementally, updating the connection polynomial whenever the current recurrence has a nonzero discrepancy.
The shortest binary linear recurrence producing the prefix has length three:Its connection polynomial is .
A degree- binary register has states. The zero state is fixed, so a nonzero periodic orbit has length at most .
A maximal-period feedback polynomial cannot have as a root. Over , this saysso an even number of the coefficients equal one and the full monic polynomial has an odd number of nonzero coefficients.
If an output prefix contains consecutive zeros followed by a one, no register of degree at most can generate it: the all-zero state would have been reached and would remain zero forever.
The seven consecutive zeros followed by one force degree at least eight. Degree eight is attained by , with initial state and feedback polynomial .
Let , let generate , and let be nonzero linear with nondegenerate bilinear form . If the minimal polynomial of is , then satisfiesso it is produced by an LFSR of length at most . Its period is exactly : any period would imply for every , hence by nondegeneracy.
A binary linear code is a -dimensional subspace of with least nonzero weight . A parity-check matrix presents it as a kernel.
The two-dimensional ternary linear code generated by and . Its eight nonzero words have exactly three nonzero entries, with precisely two opposite words for each position of the zero coordinate.
The homogeneous weight enumerator of a length- linear code is the polynomialIts coefficients count words of each Hamming weight. In this convention ; some references interchange .
For a binary linear code of dimension and its dual code, the weight enumerator convention givesTo prove it, insert into the enumerator sum. Summing independently over each coordinate of yields a factor if and if .
A parity bit records whether the number of one bits in a word is even or odd and can detect every error that flips an odd number of bits.
Apply one CNOT gate from each input qubit to the same target. Their actions commute because controls remain unchanged and each contribution is added modulo two. This reversible circuit computes the parity bit with exactly one two-qubit gate per input, and its inverse is the same circuit. Unlike measuring the inputs to compute parity classically, the unitary preserves quantum superposition and can be uncomputed after phase application.
The length- even-weight code consists of binary words whose coordinates sum to zero. It has parameters .
The minimum Hamming distance of a nonzero linear code is the smallest Hamming weight of a nonzero codeword.
Every binary linear code satisfiesPuncturing on the support of a minimum-weight codeword reduces the rank by one and leaves minimum distance at least , which proves the bound inductively.
A generator matrix for a linear code has a basis of the code as its rows, so its row space is the code.
The syndrome of a received word with respect to a parity-check matrix is . It vanishes exactly when is a codeword and otherwise identifies the coset containing the error pattern.
The parity-check extension of a binary linear code appends to each codeword the sum of its coordinates in , making every extended word have even Hamming weight.
Shortening a code at one coordinate first retains only words with a chosen symbol there and then applies puncturing at that coordinate. The minimum distance cannot decrease. In a binary code one coordinate-symbol fibre contains at least half of the words.
The dual code consists of the words orthogonal to every word of under the standard dot product. A parity-check matrix for is a generator matrix for .
The binary Reed-Muller code evaluates Boolean polynomials of degree at most on . It has parametersThe dimension counts square-free monomials, and the minimum weight follows inductively from the decomposition .
If have minimum distances , respectively, thenIndeed, , while the words and attain the two candidate bounds.
If is a parity-check matrix of , then a parity-check matrix of isIts equations say that the first half lies in and that the sum of the two halves lies in .
Under the standard binary inner product,The product of representing polynomials has degree at most , so its evaluation word has even weight; equality follows by comparing dimensions.
The binary Hamming code of redundancy has parameters . Its parity-check matrix has every nonzero vector of as a column.
A Hamming code has words, and each radius-one Hamming ball contains vectors. Its minimum distance is three, so these balls are disjoint, and their total size is . They therefore partition the ambient space, making the code perfect.
A code of minimum Hamming distance detects every pattern of at most errors and uniquely corrects every pattern of at most errors. The correction claim follows because Hamming balls of that radius around distinct codewords are disjoint.
The unique monic divisor of generating a cyclic code is its generator polynomial. The code has dimension .
Let be a root of the generator polynomial of a cyclic code . Every codeword satisfies , so a received word satisfies . For a single-symbol error , the evaluation identifies its value and position when the relevant powers of are distinct.
The dual of a cyclic code is cyclic. If , then the dual generator is the monic reciprocal polynomial .
Over ,Its eight monic divisors generate the eight cyclic codes of length seven: the whole-space, even-weight, two Hamming, two simplex, repetition, and zero codes.
Given a primitive th root , a BCH code of design distance has a generator polynomial vanishing at consecutive powers .
For error locations in a cyclic code with primitive root , the error locator polynomial is . Its roots encode the error positions.
The minimum distance of a BCH code is at least its design distance. A hypothetical word of smaller weight yields a square Vandermonde system from the consecutive-root equations; its support elements are distinct, so the determinant is nonzero and every word coefficient must vanish.
Rabin encryption sends to modulo a product of two secret primes. Decryption computes the four square roots by the Chinese remainder theorem.
If a purported authentication service returns a square root of every chosen square modulo a Rabin modulus, a verifier who knows one root obtains a different root with substantial probability and can factor the modulus. Repeating the challenge therefore reveals the private key.
Given a cyclic group generator and an element , the discrete logarithm problem asks for an exponent such that .
Alice publishes and Bob publishes in a public cyclic group; each can then compute the shared secret . Its security relies on the difficulty of recovering the exponents or otherwise solving the computational Diffie--Hellman problem.
Unique decodability means that every encoded message has at most one decomposition into codewords.
A code is decipherable, or uniquely decodable, when every finite concatenation of codewords has at most one decomposition into source codewords.
For a fixed source distribution and code alphabet, an optimal uniquely decodable code minimizes expected codeword length. Huffman coding gives an optimal binary prefix code, and the equivalence of attainable uniquely-decodable and prefix-code lengths gives the same minimum for both classes.
In a prefix code no codeword is the prefix of another, so concatenated messages have unique instantaneous decoding.
The lengths of every decipherable binary code satisfyConversely, any positive integer lengths satisfying this bound can be realized by a prefix code.
The lengths of a finite uniquely decodable code satisfy , even when the code is not a prefix code. Distinct concatenations of codewords remain distinct; counting the possible binary strings of each total length bounds by . Taking th roots proves the claim.
Prescribed positive word lengths admit a decipherable code if and only if they admit a prefix code. Counting length- concatenations of words proves the Kraft inequality for any decipherable code; choosing free vertices of the ordered -ary tree constructs a prefix code whenever this inequality holds. Each prefix code has unique decodability.
If a decipherable binary code has codewords of lengths , thenThis follows by applying the entropy lower bound with the uniform source distribution.
Articles were limited to the first 100 out of 111 total.
Articles by others on the same topic
Coding theory is a branch of mathematics and computer science that focuses on the design and analysis of error-correcting codes for data transmission and storage. The primary goals of coding theory are to ensure reliable communication over noisy channels and to efficiently store data. Here are some key concepts and components of coding theory: 1. **Error Detection and Correction**: Coding theory provides methods to detect and correct errors that may occur during the transmission or storage of data.