ArticleslgStudy

computer science

Linear network coding

Linear network coding is a computer 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 Linear network coding rather than just read about it. In short: In computer networking, linear network coding is a program in which intermediate nodes transmit data from source nodes to sink nodes by means of linear combinations. Linear network coding may be used to improve a network's throughput, efficiency, and scalability, as well as reducing attacks and eavesdropping.

Linear network coding — main illustration
Linear network coding — illustration

Key takeaways

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

Reference excerpt

In computer networking, linear network coding is a program in which intermediate nodes transmit data from source nodes to sink nodes by means of linear combinations. Linear network coding may be used to improve a network's throughput, efficiency, and scalability, as well as reducing attacks and eavesdropping. The nodes of a network take several packets and combine for transmission. This process may be used to attain the maximum possible information flow in a network. It has been proven that, theoretically, linear coding is enough to achieve the upper bound in multicast problems with one source. However linear coding is not sufficient in general; even for more general versions of linearity such as convolutional coding and filter-bank coding. Finding optimal coding solutions for general network problems with arbitrary demands is a hard problem, which can be NP-hard and even undecidable.

Encoding and decoding In a linear network coding problem, a group of nodes P are involved in moving the data from S source nodes to K sink nodes. Each node generates new packets which are linear combinations of past received packets by multiplying them by coefficients chosen from a finite field, typically of size GF(2s). More formally, each node, pk with indegree, InDeg(pk)=S, generates a message Xk from the linear combination of received messages {Mi}i=1S by the formula:

Xk=∑i=1Sgki⋅Mi Where the values gki are coefficients selected from GF(2s). Since operations are computed in a finite field, the generated message is of the same length as the original messages. Each node forwards the computed value Xk along with the coefficients, gki, used in the kth level, gki. Sink nodes receive these network coded messages, and collect them in a matrix. The original messages can be recovered by performing Gaussian elimination on the matrix. In reduced row echelon form, decoded packets correspond to the rows of the form ei=[0...010...0]

Background A network is represented by a directed graph 𝒢=(V,E,C). V is the set of nodes or vertices, E is the set of directed links (or edges), and C gives the capacity of each link of E. Let T(s,t) be the maximum possible throughput from node s to node t. By the max-flow min-cut theorem, T(s,t) is upper bounded by the minimum capacity of all cuts, which is the sum of the capacities of the edges on a cut, between these two nodes. Karl Menger proved that there is always a set of edge-disjoint paths achieving the upper bound in a unicast scenario, known as the max-flow min-cut theorem. Later, the Ford–Fulkerson algorithm was proposed to find such paths in polynomial time. Then, Edmonds proved in the paper "Edge-Disjoint Branchings" the upper bound in the broadcast scenario is also achievable, and proposed a polynomial time algorithm. However, the situation in the multicast scenario is more complicated, and in fact, such an upper bound can't be reached using traditional routing ideas. Ahlswede et al. proved that it can be achieved if additional computing tasks (incoming packets are combined into one or several outgoing packets) can be done in the intermediate nodes.

The Butterfly Network

The butterfly network is often used to illustrate how linear network coding can outperform routing. Two source nodes (at the top of the picture) have information A and B that must be transmitted to the two destination nodes (at the bottom). Each destination node wants to know both A and B. Each edge can carry only a single value (we can think of an edge transmitting a bit in each time slot). If only routing were allowed, then the central link would be only able to carry A or B, but not both. Supposing we send A through the center; then the left destination would receive A twice and not know B at all. Sending B poses a similar problem for the right destination. We say that routing is insufficient because no routing scheme can transmit both A and B to both destinations simultaneously. Meanwhile, it takes four time slots in total for both destination nodes to know A and B. Using a simple code, as shown, A and B can be transmitted to both destinations simultaneously by sending the sum of the symbols through the two relay nodes – encoding A and B using the formula "A+B". The left destination receives A and A + B, and can calculate B by subtracting the two values. Similarly, the right destination will receive B and A + B, and will also be able to determine both A and B. Therefore, with network coding, it takes only three time slots and improves the throughput.

Random Linear Network Coding Random linear network coding (RLNC) is a simple yet powerful encoding scheme, which in broadcast transmission schemes allows close to optimal throughput using a decentralized algorithm. Nodes transmit random linear combinations of the packets they receive, with coefficients chosen randomly, with a uniform distribution from a Galois field. If the field size is sufficiently large, the probability that the receiver(s) will obtain linearly independent combinations (and therefore obtain innovative information) approaches 1. It should however be noted that, although random linear network coding has excellent throughput performance, if a receiver obtains an insufficient number of packets, it is extremely unlikely that they can recover any of the original packets. This can be addressed by sending additional random linear combinations until the receiver obtains the appropriate number of packets.

… excerpt ends here. Continue reading the full article.

Illustrations

Linear network coding: Coding and recoding process in linear network coding. Each packet is seen as a set of elements from a Galois field. Therefore, multiplying and adding two packets means multiplying each of its symbols by a coding coefficient chosen from the Galois field and then adding the two packets together, symbol-wise.
Coding and recoding process in linear network coding. Each packet is seen as a set of elements from a Galois field. Therefore, multiplying and adding two packets means multiplying each of its symbols by a coding coefficient chosen from the Galois field and then adding the two packets together, symbol-wise.
Linear network coding: Expected linearly dependent packets at different stages of transmission for a Galois field GF(2) and a generation size of 16 packets. At the beginning of the transmission, the linear dependencies are minimal. It is the last packet of the transmission that is more likely to be linearly dependent.
Expected linearly dependent packets at different stages of transmission for a Galois field GF(2) and a generation size of 16 packets. At the beginning of the transmission, the linear dependencies are minimal. It is the last packet of the transmission that is more likely to be linearly dependent.
Linear network coding: The expected number of linearly dependent packets per generation is practically independent of the generation size.
The expected number of linearly dependent packets per generation is practically independent of the generation size.

Worked examples

Example 1 — a first encounter with Linear network coding

Start with the simplest possible case. Write down what Linear network coding claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 Linear network coding 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 Linear network coding 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 Linear network coding

In research
Linear network coding appears in computer 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 Linear network coding 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
Linear network coding is common in secondary-school and first-year university syllabi. It links to neighbouring topics Coding theory, Finite fields, Information theory, so understanding it makes those chapters shorter.
In everyday life
Look for Linear network coding 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 “Linear network coding” →

How to study Linear network coding in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Linear network coding 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 Linear network coding out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Linear network coding in simple terms?

In computer networking, linear network coding is a program in which intermediate nodes transmit data from source nodes to sink nodes by means of linear combinations. Linear network coding may be used to improve a network's throughput, efficiency, and scalability, as well as reducing attacks and eav…

Why does Linear network coding matter?

Because it connects several computer 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 Linear network coding?

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 Linear network coding.

Tags

  • Coding theory
  • Finite fields
  • Information theory
  • Network performance
  • Wireless sensor network

Keep exploring