How this calculation works
A scalar linear network code assigns one field symbol to each directed unit-capacity edge. That symbol is a linear combination of information available at the edge's tail. Tracking its coefficients against the original source symbols describes what the edge actually conveys.
Evaluate user-supplied local coefficients only; canonical entries0..p−1. Peredge coefficientorder: incomingedgeindices thenlocal source-symbolindices. No coefficientsearch. Propagate globalvectorsintopologicalorderand report eachsinktransfer,rank,decodable flag. No computeddecoder ornetworkcapacityoptimization.A worked example
With the prefilled inputs, allSinksDecode = Yes. Coefficient row order: incoming edge indices, then source symbols located at the edge origin.
Good to know
User-supplied scalar linear code overGF(p); no coefficient search. Incoming vectors at sinks tested for full source-symbol rank, not general network capacity.
Reference: Primary method reference or author-maintained documentation (opens in a new tab) ↗
Edges carry linear combinations of source symbols
A scalar linear network code assigns one field symbol to each directed unit-capacity edge. That symbol is a linear combination of information available at the edge's tail. Tracking its coefficients against the original source symbols describes what the edge actually conveys.
The network is a directed acyclic graph so those coefficients can be propagated in topological order. A directed cycle would need delay or feedback semantics that are outside this scope. Rejecting cycles avoids pretending that mutually dependent edge equations have an obvious causal evaluation order.
Compare with the Maximum flow minimum cut calculator for a directed graph. Propagate linear coding coefficients through a directedacyclicnetwork and recover source symbols atsinks; maxflow counts capacity but provides nocoding coefficientcontract.
Specify local coefficients and source access
Coefficient row order: incoming edge indices, then source symbols located at the edge origin.Every outgoing edge needs coefficients for its allowed incoming edge symbols, and source nodes need explicit access to their originating symbols. A coefficient cannot refer to an edge that does not enter the node or to a source symbol unavailable there.
Use a supported prime field consistently. Addition modulo two is exclusive-or, whereas addition over another prime has different arithmetic. Coefficients written as integers are reduced in the selected field, and matrix rank must use that field rather than floating-point elimination.
Propagate global encoding vectors through the DAG
A source symbol begins with its coordinate unit vector. For each outgoing edge, combine the available incoming global vectors using its local coefficients. The resulting vector gives that edge's complete linear relation to the source message, making intermediate mixing inspectable.
At a sink, the engine stacks incoming global vectors into a transfer matrix and computes its field rank. Full source-dimension rank certifies that every source symbol can be recovered under this page’s all-symbol convention. The current result reports that rank and a decodable flag; it does not compute or return a left-inverse decoder matrix.
Decode two mixed binary observations
Suppose a sink receives y1=x1 and y2=x1+x2 over the binary field. Its transfer matrix has rows (1,0) and (1,1), which are independent. Recover x1 directly from y1, then obtain x2 as y1+y2.
The decoder matrix is the same two-by-two matrix in this example. Its product with the transfer matrix is identity modulo two. This tiny calculation checks matrix orientation and field addition independently; using ordinary real subtraction or transposing one matrix silently would change the certificate.
Show vectors on edges and decoders at sinks
The static worked figure can label edges with global encoding vectors and explain a manually derived decoder for its tiny example. For arbitrary submitted input, the engine returns edge vectors and each sink’s incoming edge indices, transfer matrix, rank and decodable flag. It does not return a decoder table or optimized local coefficients.
Large coefficient tables should remain readable as text beneath the SVG. A diagram alone can hide whether a coefficient belongs to an incoming edge or an unavailable source. Stable edge labels connect those tables to the actual directed network without relying on visual proximity.
A capacity bound does not construct a code
Max-flow or cut calculations can give necessary information-flow limits. They do not by themselves specify local linear coefficients or a decoder for a particular scalar field. An accepted encoding must still satisfy every local availability constraint and each sink's rank condition.
This interface evaluates only the supplied scalar coefficients. It does not search for alternative coefficients, optimize field size or prove that an undecodable network lacks every possible linear code. A false sink flag means that this entered encoding fails the full-rank test, not that the network’s capacity has been computed.
Keep encoding and decoding certificates separate from search
The supported network has two to fifteen vertices, one to twenty-five distinct directed edges and one to three distinct source vertices, with one source symbol per listed source. Coefficients for an outgoing edge are ordered by incoming edge index first, followed by the local source symbol when that node is a source. Every coefficient must be a canonical field integer between zero and p−1.
Test unavailable source access, coefficient-row length mismatches, cycles, rank-deficient sinks and routes carrying duplicate global vectors. A sink may have several observations that all carry the same source combination; counting incoming edges alone cannot replace field rank. The two-observation decoder in the worked text is an independent explanatory example, separate from the simpler public prefill and from the result schema. The public prefill is a three-vertex chain carrying one source symbol with coefficient one on both edges. Its sink transfer has rank one and is decodable. The two-symbol transfer example above is separate explanatory arithmetic. For a source node, its locally available symbol follows all incoming-edge vectors in the coefficient order, even when that source also has incoming information. User-supplied scalar linear code overGF(p); no coefficient search. Incoming vectors at sinks tested for full source-symbol rank, not general network capacity.
A few questions, answered
Can a node combine any source symbol it wants?
No. It can use only symbols available locally through source access or incoming edges.
Does the result include a decoder matrix?
No. It returns global edge vectors and sink transfer matrices, ranks and decodable flags. A full-rank transfer guarantees that a decoder exists, but this implementation does not construct it.
Will the calculator find better local coefficients?
No. It evaluates the coefficients entered by the user. A failed rank test does not establish that every possible encoding of the network fails.
Why are cyclic networks rejected?
Feedback requires timing or delay semantics beyond the supported acyclic scalar propagation model.