Advanced maths

Index coding minrank calculator from a side information graph

Find scalar linear index-coding minrank and return broadcast and receiver factor matrices.

Your numbers

Valid JSON; preserve the shown array or object structure.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A sender holds all messages, while receiver i wants message i and already knows specified other messages. Index coding exploits that side information to shorten a shared broadcast. The input direction convention must state that i to j means receiver i knows message j.

THE FORMULAConvention: receiveri wantsxi and knowsxj for each directedsideinformationedgei→j. FittingmatrixM hasMii=1, Mij=0wheni≠jandjnotknownbyi; allowedpositionsfree. Enumerate all allowedcoefficients overGF(p), boundstatesbeforesearch; minimizeexactrank. FactorM=D*B withBrowbasisofM andDrowcoordinates. Broadcasty=B*x; receiveri computesD_i*y=M_i*x then subtractsknownoffdiagonal terms. Verify DB=M and each forbiddenentryzero. Result onlyscalarlinearminrank,notgeneralindexcodingcapacity.

A worked example

With the prefilled inputs, scalarLinearBroadcastLength = 1.

Good to know

One independent message per receiver;diagonal1 and row-known allowed nonzeros. Exact scalar linear minrank only, not nonlinear or vector coding optimum.

Each receiver knows a different subset of messages

A sender holds all messages, while receiver i wants message i and already knows specified other messages. Index coding exploits that side information to shorten a shared broadcast. The input direction convention must state that i to j means receiver i knows message j.

The optimized quantity here is the length of a scalar linear broadcast over the selected finite field. It does not claim the best nonlinear code or the asymptotic rate of arbitrarily long vector codes. Those broader tasks can have different answers.

A scalar linear index code of length twoTwo broadcasts solve the directed three-cycle instance012Broadcasts:b1 = x0 + x1b2 = x1 + x2Receiver 2: x2 = b1+b2+x0i → j means receiver i already knows xj.
Scroll across to see the full diagram.
Receivers 0,1,2 know x1,x2,x0 respectively. Broadcasting x0+x1 and x1+x2 lets every receiver recover its requested bit.

Compare with the Chromatic polynomial calculator from a graph edge list. Find the minimumrank fittingmatrix for scalarlinear broadcast coding and decodingwitnesses; graphcoloring supplies a bound but notthegeneralminrankoptimum.

Fit a matrix to the side-information pattern

Use the prefilled input structure and preserve the declared column or index order. The fitting matrix has diagonal entries one so each receiver's own message appears with known nonzero coefficient. Off-diagonal entries must be zero when the receiver lacks that message as side information. Entries corresponding to known messages are free field coefficients.

A low-rank fitting matrix allows its rows to be generated from a smaller row basis. Those basis combinations become broadcasts. The diagonal normalization is important: allowing a zero diagonal could erase a receiver's requested message and create a spuriously small rank.

Minimize rank and return the factorization

Enumerate the allowed off-diagonal coefficients and compute each completed matrix's exact field rank. The minimum rank among all fitting matrices is the scalar linear broadcast length under the stated model. A cap during enumeration leaves that minimum unresolved.

Factor the selected fitting matrix as D times B, where B contains independent broadcast rows and D expresses each receiver row in that basis. Verifying the factorization and zero pattern gives a concrete decoding certificate separate from the global rank-minimization search.

Broadcast two combinations around a directed three-cycle

Let receiver zero know x1, receiver one know x2 and receiver two know x0. Broadcast x0+x1 and x1+x2 over the binary field. The first two receivers subtract their known symbol from the appropriate broadcast, while the third combines both broadcasts and x0.

The fitting rows are (1,1,0), (0,1,1) and (1,0,1). The third is the sum of the first two, so rank is two. Rank one is impossible because the required diagonal ones would force off-diagonal entries that the directed side-information pattern forbids.

Show receiver equations beside the side-information graph

A useful SVG draws directed knowledge edges with an explicit legend, then shows the two broadcast combinations and each receiver's decoding expression. This separates who knows a message from who sends it; reversing the arrow interpretation would describe a different instance.

The result should include the fitting matrix, broadcast basis and receiver coefficient matrix. These tables let readers check D times B and confirm that every unwanted unknown message has zero coefficient in its receiver's reconstructed row. The graphic explains the same certificate rather than replacing it.

A smaller field can change available linear codes

All coefficient enumeration and rank tests take place in the selected prime field. A matrix dependent modulo two can be independent over another field, so real-valued rank is not a valid shortcut. The reported minimum belongs to that field and scalar-message convention.

Known side information permits a coefficient but does not require it to be nonzero. Forcing every allowed entry to one would search only one completion and can miss better codes. Conversely, permitting a coefficient in a forbidden entry would let a receiver use information it never had.

Preserve bounds when the completion search stops

A valid fitting matrix of rank r gives an upper bound of r broadcasts. Optimality requires completing all lower-rank possibilities or an independent lower bound. The page must distinguish a found code from a proven minimum when the work budget is exhausted.

Test an empty side-information graph, complete mutual knowledge and the directed three-cycle. Their scalar linear lengths are the number of messages, one for a nonempty complete instance, and two respectively. These contrasting cases test direction, diagonal normalization and factorization. The public prefill has two receivers with mutual side information. One broadcast x0+x1 suffices, so the returned length is one and both receiver decoding rows contain the coefficient one. The directed three-cycle example in the explanation instead needs two broadcasts. These demonstrate the same scalar minrank formulation at different sizes, not competing answers for one instance. One independent message per receiver;diagonal1 and row-known allowed nonzeros. Exact scalar linear minrank only, not nonlinear or vector coding optimum.

A few questions, answered

What does an arrow from i to j mean?

Under this page's convention, receiver i knows message j before the broadcast.

Does minrank give the best possible nonlinear code?

No. It gives the optimal scalar linear broadcast length over the selected field within the completed fitting-matrix search.

Why must diagonal entries equal one?

Each receiver row must retain its requested message. Nonzero diagonal entries can be normalized to one without changing rank.

Must all allowed side-information coefficients be nonzero?

No. They are free choices and may be zero. Forcing them all to one can miss the optimum.

Find your calculator

Start typing to explore the library.