This tests the solvability of a linear network code by seeing if the linear network coding ideal is a non-trivial ideal, which implies that there is a solution to it.
Install sage and libsingular.
get_groebner_basis(field, graph, sources, sinks)
Does not support multi-edges
Field is a type of field. Example:
GF(2)
The type of graph is a labelled digraph. The nodes need to be given names in order for the sinks and sources to be mapped. Example:
DiGraph({'s': ['t','u'], 't': ['x','y'], 'u': ['x','z'], 'x': ['y','z']})
The type of sources is a dictionary of lists, mapping a source node name to the list of processes inside it. Example:
sources = {'s': [0,1]}
The type of sinks is a dictionary of dictionary of lists, mapping a sink node name to to its demands. The demands are a dictionary mapping the sources from which the sink demands, to the processes from that source that are demanded. Example:
sinks = {'y': {'s':[0,1]} , 'z': {'s':[0,1]}}
It returns the groebner basis for that particular multicast network
-------------------------------------------------------------------------------------------
Generates the sink matrix B to calculate the transfer matrix, defined as
|
Generates the source matrix A to calculate the transfer matrix, defined as
|
Generates the source matrix F to calculate the transfer matrix, defined as
|
Genenerates the transfer matrix , that maps inputs to outputs
|
Helper functions to find which rows in A and B are assigned to which source process or to which sink.
|
Given the sink demands and the sources, these helper functions find which submatrices of the transfer function need to have determinant different from 0 and which entries need to be equal to 0.
|
Calculates the ideal of the linear network problem, as stated on http://www.mit.edu/~medard/mpapers/aaatnetworkcoding.pdf.
It is the ideal of all values that should be equal to 0.
|
Calculates the groebner basis of the ideal of the linear network problem.
|
|
has solution in GF2 => True groebner_basis = [e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_uzs0*source_st1^2*sink_ty\ s0*e_su_uz*e_st_ty*sink_xzs1*sink_xys1*normalizer*e_su_ux + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_uzs0*sink_tys0*e_su_uz*sou\ rce_st0^2*e_st_ty*sink_xzs1*sink_xys1*normalizer*e_su_ux + e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*source_st1^2*sink_tys0*e_su_uz*\ e_st_ty*sink_xys1*normalizer*sink_xzs0*sink_uzs1*e_su_ux + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys0*e_su_uz*source_st0^2*\ e_st_ty*sink_xys1*normalizer*sink_xzs0*sink_uzs1*e_su_ux + e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_tys1*sink_uzs0*source_st1^\ 2*e_su_uz*e_st_ty*sink_xzs1*normalizer*e_su_ux*sink_xys0 + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys1*sink_uzs0*e_su_uz*sou\ rce_st0^2*e_st_ty*sink_xzs1*normalizer*e_su_ux*sink_xys0 + e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_tys1*source_st1^2*e_su_uz*\ e_st_ty*normalizer*sink_xzs0*sink_uzs1*e_su_ux*sink_xys0 + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys1*e_su_uz*source_st0^2*\ e_st_ty*normalizer*sink_xzs0*sink_uzs1*e_su_ux*sink_xys0 + 1] has solution in GF3 => True groebner_basis = [e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_uzs0*source_st1^2*sink_ty\ s0*e_su_uz*e_st_ty*sink_xzs1*sink_xys1*normalizer*e_su_ux + e_ux_xy*e_tx_xz*source_su0*e_st_tx*source_su1*sink_uzs0*source_st1*s\ ink_tys0*e_su_uz*source_st0*e_st_ty*sink_xzs1*sink_xys1*normalizer*e\ _su_ux + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_uzs0*sink_tys0*e_su_uz*sou\ rce_st0^2*e_st_ty*sink_xzs1*sink_xys1*normalizer*e_su_ux - e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*source_st1^2*sink_tys0*e_su_uz*\ e_st_ty*sink_xys1*normalizer*sink_xzs0*sink_uzs1*e_su_ux - e_ux_xy*e_tx_xz*source_su0*e_st_tx*source_su1*source_st1*sink_tys0*e\ _su_uz*source_st0*e_st_ty*sink_xys1*normalizer*sink_xzs0*sink_uzs1*e\ _su_ux - e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys0*e_su_uz*source_st0^2*\ e_st_ty*sink_xys1*normalizer*sink_xzs0*sink_uzs1*e_su_ux - e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_tys1*sink_uzs0*source_st1^\ 2*e_su_uz*e_st_ty*sink_xzs1*normalizer*e_su_ux*sink_xys0 - e_ux_xy*e_tx_xz*source_su0*e_st_tx*source_su1*sink_tys1*sink_uzs0*so\ urce_st1*e_su_uz*source_st0*e_st_ty*sink_xzs1*normalizer*e_su_ux*sin\ k_xys0 - e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys1*sink_uzs0*e_su_uz*sou\ rce_st0^2*e_st_ty*sink_xzs1*normalizer*e_su_ux*sink_xys0 + e_ux_xy*e_tx_xz*source_su0^2*e_st_tx*sink_tys1*source_st1^2*e_su_uz*\ e_st_ty*normalizer*sink_xzs0*sink_uzs1*e_su_ux*sink_xys0 + e_ux_xy*e_tx_xz*source_su0*e_st_tx*source_su1*sink_tys1*source_st1*e\ _su_uz*source_st0*e_st_ty*normalizer*sink_xzs0*sink_uzs1*e_su_ux*sin\ k_xys0 + e_ux_xy*e_tx_xz*e_st_tx*source_su1^2*sink_tys1*e_su_uz*source_st0^2*\ e_st_ty*normalizer*sink_xzs0*sink_uzs1*e_su_ux*sink_xys0 + 1] 6 nodes, 8 edges, 1 sources, 2 sinks CPU time: 0.23 s, Wall time: 0.23 s |
M network, from
has solution in GF2 => False groebner_basis = [1] has solution in GF3 => False groebner_basis = [1] 9 nodes, 16 edges, 2 sources, 4 sinks CPU time: 0.56 s, Wall time: 0.56 s |
Network N1 from http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1468297
It has solution over even fields but no solution over odd fields.
has solution in GF2 => True groebner_basis = Polynomial Sequence with 25 Polynomials in 29 Variables has solution in GF3 => False groebner_basis = [1] 14 nodes, 18 edges, 3 sources, 3 sinks CPU time: 0.53 s, Wall time: 0.53 s |
Network N2 from http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1468297
It has a scalar linear solution over any ring where is a unit, but has no linear solution for any vector dimension over a finite field with characteristic two. Also, the coding capacity of is .
has solution in GF3 => True groebner_basis = Polynomial Sequence with 2025 Polynomials in 75 Variables 30 nodes, 46 edges, 5 sources, 7 sinks CPU time: 4.58 s, Wall time: 4.60 s |
Network N3 from http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1468297
It has no scalar nor vector solutions.
has solution in GF2 => False groebner_basis = [1] has solution in GF3 => False groebner_basis = [1] 46 nodes, 69 edges, 5 sources, 10 sinks CPU time: 2.52 s, Wall time: 2.52 s |
Network N1 From:
Unachievability of Network Coding Capacity
Randall Dougherty, Chris Freiling, and Kenneth Zeger, Fellow, IEEE
Only has solution over alphabets that have property P, as defined in the paper
has solution in GF2 => True groebner_basis = Polynomial Sequence with 22 Polynomials in 31 Variables has solution in GF3 => True groebner_basis = Polynomial Sequence with 22 Polynomials in 31 Variables 14 nodes, 19 edges, 3 sources, 4 sinks CPU time: 0.38 s, Wall time: 0.39 s |
Network N2 From:
Unachievability of Network Coding Capacity
Randall Dougherty, Chris Freiling, and Kenneth Zeger, Fellow, IEEE
Only has solution over alphabets that have property P, as defined in the paper, and no elements of order 2.
has solution in GF2 => False groebner_basis = [1] has solution in GF3 => True groebner_basis = Polynomial Sequence with 57 Polynomials in 37 Variables 15 nodes, 22 edges, 3 sources, 4 sinks CPU time: 0.47 s, Wall time: 0.47 s |
Network N3 From:
Unachievability of Network Coding Capacity
Randall Dougherty, Chris Freiling, and Kenneth Zeger, Fellow, IEEE
Only has solution over alphabets that have property P, as defined in the paper, and all non zero elements have order 2.
has solution in GF2 => True groebner_basis = Polynomial Sequence with 25 Polynomials in 29 Variables has solution in GF3 => False groebner_basis = [1] has solution in GF4 => True groebner_basis = Polynomial Sequence with 25 Polynomials in 29 Variables 14 nodes, 18 edges, 3 sources, 3 sinks CPU time: 0.57 s, Wall time: 0.60 s |
|