ArticleslgStudy

science

Expander code

Expander code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Expander code rather than just read about it. In short: In coding theory, expander codes form a class of error-correcting codes that are constructed from bipartite expander graphs. Along with Justesen codes, expander codes are of particular interest since they have a constant positive rate, positive relative distance, and alphabet size.

Expander code — main illustration
Expander code — illustration

Key takeaways

  • Expander code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Expander code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Expander code from memory before moving on to harder problems.

Reference excerpt

In coding theory, expander codes form a class of error-correcting codes that are constructed from bipartite expander graphs. Along with Justesen codes, expander codes are of particular interest since they have a constant positive rate, positive relative distance, and alphabet size. In fact, the alphabet contains only two elements, so expander codes belong to the class of binary codes. Furthermore, expander codes can be both encoded and decoded in time proportional to the block length of the code.

Expander codes In coding theory, an expander code is a [n,n−m]2 linear block code whose parity check matrix is the adjacency matrix of a bipartite expander graph. These codes have good relative distance 2(1−ε)γ, where ε and γ are properties of the expander graph as defined later, rate (1−mn), and decodability (algorithms of running time O(n) exist).

Definition Let B be a (c,d)-biregular graph between a set of n nodes {v1,⋯,vn}, called variables, and a set of cn/d nodes {C1,⋯,Ccn/d}, called constraints. Let b(i,j) be a function designed so that, for each constraint Ci, the variables neighbouring Ci are vb(i,1),⋯,vb(i,d). Let 𝒮 be an error-correcting code of block length d. The expander code 𝒞(B,𝒮) is the code of block length n whose code words are the words (x1,⋯,xn) such that, for 1≤i≤cn/d, (xb(i,1),⋯,xb(i,d)) is a code word of 𝒮. It has been shown that nontrivial lossless expander graphs exist. Moreover, we can explicitly construct them.

Rate The rate of C is its dimension divided by its block length. In this case, the parity check matrix has size m×n, and hence C has rate at least (n−m)/n=1−m/n.

Distance Suppose ε<12. Then the distance of a (n,m,d,γ,1−ε) expander code C is at least 2(1−ε)γn.

Proof Note that we can consider every code word c in C as a subset of vertices S⊂L, by saying that vertex vi∈S if and only if the ith index of the code word is a 1. Then c is a code word if every vertex v∈R is adjacent to an even number of vertices in S. (In order to be a code word, cP=0, where P is the parity check matrix. Then, each vertex in R corresponds to each column of P. Matrix multiplication over GF(2)={0,1} then gives the desired result.) So, if a vertex v∈R is adjacent to a single vertex in S, we know immediately that c is not a code word. Let N(S) denote the neighbours in R of S, and U(S) denote those neighbours of S which are unique, i.e., adjacent to a single vertex of S.

Lemma 1 For every S⊂L of size |S|≤γn, d|S|≥|N(S)|≥|U(S)|≥d(1−2ε)|S|.

Proof Trivially, |N(S)|≥|U(S)|, since v∈U(S) implies v∈N(S). |N(S)|≤d|S| follows since the degree of every vertex in S is d. By the expansion property of the graph, there must be a set of d(1−ε)|S| edges which go to distinct vertices. The remaining dε|S| edges make at most dε|S|neighbours not unique, so U(S)≥d(1−ε)|S|−dε|S|=d(1−2ε)|S|.

Corollary Every sufficiently small S has a unique neighbour. This follows since ε<12.

Lemma 2 Every subset T⊂L with |T|<2(1−ε)γn has a unique neighbour.

Proof Lemma 1 proves the case |T|≤γn, so suppose 2(1−ε)γn>|T|>γn. Let S⊂T such that |S|=γn. By Lemma 1, we know that |U(S)|≥d(1−2ε)|S|. Then a vertex v∈U(S) is in U(T) if v∉N(T∖S), and we know that |T∖S|≤2(1−ε)γn−γn=(1−2ε)γn, so by the first part of Lemma 1, we know |N(T∖S)|≤d(1−2ε)γn. Since ε<12, |U(T)|≥|U(S)∖N(T∖S)|≥|U(S)|−|N(T∖S)|>0, and hence U(T) is not empty.

Corollary Note that if a T⊂L has at least 1 unique neighbour, i.e. |U(T)|>0, then the corresponding word c corresponding to T cannot be a code word, as it will not multiply to the all zeros vector by the parity check matrix. By the previous argument, c∈C⟹wt(c)≥2(1−ε)γn. Since C is linear, we conclude that C has distance at least 2(1−ε)γn.

Encoding The encoding time for an expander code is upper bounded by that of a general linear code - O(n2) by matrix multiplication. A result due to Spielman shows that encoding is possible in O(n) time.

Decoding Decoding of expander codes is possible in O(n) time when ε<14 using the following algorithm. Let vi be the vertex of L that corresponds to the iindex in the code words of C. Let y∈{0,1}n be a received word, and V(y)={vi∣the ith position of y is a 1}. Let e(i) be |{v∈R∣vi∈N(v) and N(v)∩V(y) is even}|, and o(i) be |{v∈R∣vi∈N(v) and N(v)∩V(y) is odd}|. Then consider the greedy algorithm:

Input: received word y.

initialize y' to y while there is a v in R adjacent to an odd number of vertices in V(y') if there is an i such that o(i) > e(i) flip entry i in y' else fail

Output: fail, or modified code word y′.

Proof We show first the correctness of the algorithm, and then examine its running time.

Correctness We must show that the algorithm terminates with the correct code word when the received code word is within half the code's distance of the original code word. Let the set of corrupt variables be S, s=|S|, and the set of unsatisfied (adjacent to an odd number of vertices) vertices in R be c. The following lemma will prove useful.

Lemma 3 If 0<s<γn, then there is a vi with o(i)>e(i).

Proof By Lemma 1, we know that U(S)≥d(1−2ε)s. So an average vertex has at least d(1−2ε)>d/2 unique neighbours (recall unique neighbours are unsatisfied and hence contribute to o(i)), since ε<14, and thus there is a vertex vi with o(i)>e(i). So, if we have not yet reached a code word, then there will always be some vertex to flip. Next, we show that the number of errors can never increase beyond γn.

Lemma 4 If we start with s<γ(1−2ε)n, then we never reach s=γn at any point in the algorithm.

… excerpt ends here. Continue reading the full article.

Illustrations

Expander code illustration

Worked examples

Example 1 — a first encounter with Expander code

Start with the simplest possible case. Write down what Expander code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Expander code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Expander code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Expander code

In research
Expander code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Expander code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Expander code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Capacity-approaching codes, Coding theory, Error detection and correction, so understanding it makes those chapters shorter.
In everyday life
Look for Expander code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Expander code” →

How to study Expander code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Expander code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Expander code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Expander code in simple terms?

In coding theory, expander codes form a class of error-correcting codes that are constructed from bipartite expander graphs. Along with Justesen codes, expander codes are of particular interest since they have a constant positive rate, positive relative distance, and alphabet size.

Why does Expander code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Expander code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Expander code.

Tags

  • Capacity-approaching codes
  • Coding theory
  • Error detection and correction

Keep exploring