Algebra to solve logic puzzles Convert boolean polynomials to probability
License: GPL3
ubuntu2204
/ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__("pkg_resources").declare_namespace(__name__)
/ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('scikits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
__import__("pkg_resources").declare_namespace(__name__)
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35
36 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X35 = R[5,5]
Defining x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35
t
1/3*t^3 - 1/2*t^2 + 7/6*t
Polynomial Sequence with 61 Polynomials in 36 Variables
0
1
2
X1*X8 + X1*X2
Defining x2
x2
Defining x2
Defining x8
0
1
3
X1*X9 + X1*X3
Defining x3
x3
Defining x3
Defining x9
0
1
4
X1*X10 + X1*X4
Defining x4
x4
Defining x4
Defining x10
0
1
5
X1*X11 + X1*X5
Defining x5
x5
Defining x5
Defining x11
0
2
3
X2*X15 + X2*X3
Defining x3
x3
Defining x3
Defining x15
0
2
4
X2*X16 + X2*X4
Defining x4
x4
Defining x4
Defining x16
0
2
5
X2*X17 + X2*X5
Defining x5
x5
Defining x5
Defining x17
0
3
4
X3*X22 + X3*X4
Defining x4
x4
Defining x4
Defining x22
0
3
5
X3*X23 + X3*X5
Defining x5
x5
Defining x5
Defining x23
0
4
5
X4*X29 + X4*X5
Defining x5
x5
Defining x5
Defining x29
1
2
3
X8*X15 + X8*X9
Defining x9
x9
Defining x9
Defining x15
1
2
4
X8*X16 + X8*X10
Defining x10
x10
Defining x10
Defining x16
1
2
5
X8*X17 + X8*X11
Defining x11
x11
Defining x11
Defining x17
1
3
4
X9*X22 + X9*X10
Defining x10
x10
Defining x10
Defining x22
1
3
5
X9*X23 + X9*X11
Defining x11
x11
Defining x11
Defining x23
1
4
5
X10*X29 + X10*X11
Defining x11
x11
Defining x11
Defining x29
2
3
4
X15*X22 + X15*X16
Defining x16
x16
Defining x16
Defining x22
2
3
5
X15*X23 + X15*X17
Defining x17
x17
Defining x17
Defining x23
2
4
5
X16*X29 + X16*X17
Defining x17
x17
Defining x17
Defining x29
3
4
5
X22*X29 + X22*X23
Defining x23
x23
Defining x23
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x8 + x2*x8
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35
36 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X35 = R[5,5]
Defining x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35
t
1/3*t^3 - 1/2*t^2 + 7/6*t
Polynomial Sequence with 61 Polynomials in 36 Variables
0
1
2
X1*X8 + X1*X2
Defining x2
x2
Defining x2
Defining x8
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
3
X1*X9 + X1*X3
Defining x3
x3
Defining x3
Defining x9
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
4
X1*X10 + X1*X4
Defining x4
x4
Defining x4
Defining x10
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
5
X1*X11 + X1*X5
Defining x5
x5
Defining x5
Defining x11
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
3
X2*X15 + X2*X3
Defining x3
x3
Defining x3
Defining x15
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
4
X2*X16 + X2*X4
Defining x4
x4
Defining x4
Defining x16
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
5
X2*X17 + X2*X5
Defining x5
x5
Defining x5
Defining x17
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
3
4
X3*X22 + X3*X4
Defining x4
x4
Defining x4
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
3
5
X3*X23 + X3*X5
Defining x5
x5
Defining x5
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
4
5
X4*X29 + X4*X5
Defining x5
x5
Defining x5
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
3
X8*X15 + X8*X9
Defining x9
x9
Defining x9
Defining x15
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
4
X8*X16 + X8*X10
Defining x10
x10
Defining x10
Defining x16
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
5
X8*X17 + X8*X11
Defining x11
x11
Defining x11
Defining x17
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
3
4
X9*X22 + X9*X10
Defining x10
x10
Defining x10
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
3
5
X9*X23 + X9*X11
Defining x11
x11
Defining x11
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
4
5
X10*X29 + X10*X11
Defining x11
x11
Defining x11
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
3
4
X15*X22 + X15*X16
Defining x16
x16
Defining x16
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
3
5
X15*X23 + X15*X17
Defining x17
x17
Defining x17
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
4
5
X16*X29 + X16*X17
Defining x17
x17
Defining x17
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
3
4
5
X22*X29 + X22*X23
Defining x23
x23
Defining x23
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
Error in lines 4-4
Traceback (most recent call last):
File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1250, in execute
exec(
File "", line 1, in <module>
NameError: name 'X1' is not defined
objects = 12
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35, X36, X37, X38, X39, X40, X41, X42, X43, X44, X45, X46, X47
[1 0 0 0|0 1 0 0|0 0 0 1]
[0 1 0 0|0 0 0 1|1 0 0 0]
[0 0 1 0|1 0 0 0|0 0 1 0]
[0 0 0 1|0 0 1 0|0 1 0 0]
[-------+-------+-------]
[0 0 1 0|1 0 0 0|0 0 1 0]
[1 0 0 0|0 1 0 0|0 0 0 1]
[0 0 0 1|0 0 1 0|0 1 0 0]
[0 1 0 0|0 0 0 1|1 0 0 0]
[-------+-------+-------]
[0 1 0 0|0 0 0 1|1 0 0 0]
[0 0 0 1|0 0 1 0|0 1 0 0]
[0 0 1 0|1 0 0 0|0 0 1 0]
[1 0 0 0|0 1 0 0|0 0 0 1]
objects = 12
types = 3
rel_classes = 4
144 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X143 = R[11,11]
REI.gens() = 1589
A 1st pass
type 0 to type 1
[ X138 X124 + X126 + X128 0 X90 + X115 + X139]
[ X49 X61 0 X85]
[ X138 + 1 X124 + X125 + X126 + X129 + 1 X124 + X129 + 1 X88 + X90 + X115]
[ X51 X63 X75 X87]
type 0 to type 2
[ X138 + X140 X138 X126 + X129 + X142 X138 + 1]
[ X97 X138 X121 X133]
[X124 + X126 + X128 + X129 + 1 X124 + X129 + X138 + 1 X124 + X126 + X129 X138]
[ X99 X111 X123 X135]
type 1 to type 2
[X124 + X126 + X128 + X129 + X138 + 1 X124 + X129 + 1 X124 0]
[ X101 X125 + X129 + X137 + 1 X125 X137]
[ X116 + X138 X138 + 1 X126 X138]
[ X103 X115 X127 X139]
number of variables left to be determined: 31
REI.gens() = 1613
A 2nd pass
type 0 to type 1
[0 1 0 0]
[0 0 0 1]
[1 0 0 0]
[0 0 1 0]
type 0 to type 2
[0 0 0 1]
[1 0 0 0]
[0 0 1 0]
[0 1 0 0]
type 1 to type 2
[0 0 1 0]
[0 0 0 1]
[0 1 0 0]
[1 0 0 0]
objects = 24
types = 4
rel_classes = 6
576 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X575 = R[23,23]
REI.gens() = 13413
A 1st pass
type 0 to type 1
[ 0 X7 X7 + 1 0 0 0]
[ X30 X31 0 0 0 0]
[ X54 X55 X56 X57 X58 0]
[ 0 X79 X80 0 X82 0]
[ X102 X103 X104 X105 X106 0]
[ 0 0 0 0 0 1]
type 0 to type 2
[ X12 X13 X14 X15 0 X17]
[ 0 0 0 0 1 0]
[ X60 X61 X62 X63 0 X65]
[ X84 0 0 0 0 X89]
[X108 X109 X110 0 0 X113]
[X132 X133 X134 X135 0 X137]
type 0 to type 3
[ X18 0 X13 0 0 X23]
[ 0 0 X30 + 1 X30 0 0]
[ X66 X67 X68 X54 0 X71]
[X30 + 1 X30 0 0 0 0]
[ X114 X115 X116 X102 0 0]
[ 0 0 0 0 1 0]
type 1 to type 2
[ 0 X30 + 1 0 0 X30 0]
[ X180 X181 X182 X183 X31 X185]
[ X204 X205 0 X207 0 0]
[ X228 0 0 0 0 0]
[ X252 0 0 X255 0 0]
[ X132 X133 X134 X135 0 X137]
type 1 to type 3
[ 0 0 0 1 0 0]
[ X186 X187 X181 + X31 0 0 X191]
[ X210 X211 X205 0 0 X215]
[X133 + X30 X30 + 1 X133 0 0 0]
[ X258 X259 0 0 0 X263]
[ 0 0 0 0 1 0]
type 2 to type 3
[ X306 X307 X308 0 X132 X311]
[ 0 0 X133 + X30 X30 + 1 X133 0]
[ X354 0 0 0 X134 X359]
[ 0 0 0 0 X135 X135 + 1]
[ 0 0 X30 + 1 X30 0 0]
[ X426 X427 0 0 X137 X431]
number of variables left to be determined: 75
REI.gens() = 13463
A 2nd pass
type 0 to type 1
[0 0 1 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 1 0]
[0 1 0 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
type 0 to type 2
[0 1 0 0 0 0]
[0 0 0 0 1 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
[1 0 0 0 0 0]
[0 0 1 0 0 0]
type 0 to type 3
[0 0 1 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
[0 1 0 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 1 0]
type 1 to type 2
[0 0 0 0 1 0]
[0 0 0 0 0 1]
[0 1 0 0 0 0]
[1 0 0 0 0 0]
[0 0 0 1 0 0]
[0 0 1 0 0 0]
type 1 to type 3
[0 0 0 1 0 0]
[0 1 0 0 0 0]
[0 0 1 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 0 1]
[0 0 0 0 1 0]
type 2 to type 3
[1 0 0 0 0 0]
[0 0 1 0 0 0]
[0 0 0 0 1 0]
[0 0 0 0 0 1]
[0 0 0 1 0 0]
[0 1 0 0 0 0]
percolation
[0 1 1 1 1]
[1 0 1 0 0]
[1 1 0 1 1]
[1 0 1 0 1]
[1 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X2
Defining x0, x1, x2
2
X0*X1*X2 + X1*X2 + X0*X2 + X0*X1 + X2 + X1 + X0 + 1
[X0*X1*X2, X1*X2, X0*X2, X0*X1, X2, X1, X0, 1]
(X0, X1, X2)
Defining x0, x1, x2
[x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1]
(X0, X1, X2)
<built-in method order of sage.rings.polynomial.pbori.pbori.BooleanPolynomialRing object at 0x7fb60d09d9c0>
Defining X0, X1, X2
Defining x0, x1, x2
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
Defining x0, x1, x2
2*x0*x1*x2 - x0*x1 - x0*x2 + x0
Defining x0, x1, x2
((2, 0, -1, 0, -1, 0, 1, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
X0*X1*X2 + X0*X1 + X0*X2 + X0 + X1*X2 + X1 + X2 + 1
Boolean PolynomialRing in X0, X1, X2
(X0, X1, X2)
3
[X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1]
8
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
Defining x0, x1, x2
[x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1]
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 1, 0, 0, 1, 0, 0, 0)
(-2, 1, 0, 0, 1, 0, 0, 0)
'x'
'XcGGt1u'
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
X0*X1*X2
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
(x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1)
(X0*X1*X2, X0*X1*X2 + X0*X1, X0*X1*X2 + X0*X2, X0*X1*X2 + X0*X1 + X0*X2 + X0, X0*X1*X2 + X1*X2, X0*X1*X2 + X0*X1 + X1*X2 + X1, X0*X1*X2 + X0*X2 + X1*X2 + X2, X0*X1*X2 + X0*X1 + X0*X2 + X0 + X1*X2 + X1 + X2 + 1)
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
(0.216897236248995, 0.125181737169618, 0.123043301373761, 0.0748467738425043, 0.125643838286659, 0.0283746925135870, 0.122649911882767, 0.183362508682108)
1.00000000000000
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
(0.216897236248995, 0.342078973418613, 0.339940537622756, 0.539969048634878, 0.342541074535654, 0.496097504218859, 0.588234287792182, 1.00000000000000)
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 0, 0, 0, 1, 1, 0, 0)
(0, 1, 0, 0, 0, 1, 0, 0)
(0, 1, 0, 0, 0, 1, 0, 0)
Defining x0, x1, x2
-2*x0*x1*x2 + x0*x2 + x1
Defining x0, x1, x2
((-2, 0, 1, 0, 0, 1, 0, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
X0*X1 + X0*X2 + X0
(X0, X1, X2)
[X0*X1, X0*X2, X0]
[0, 0, 0, 0, 0, 0, 0, 0]
3
(X0, X1)
'mm='
3
(X0, X2)
'mm='
5
(X0,)
'mm='
1
[0, 1, 0, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 1, 0, 1, 0]
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
(1, 0, 0, 0, 0, 0, 1, 0)
(2, 0, -1, 0, -1, 0, 1, 0)
Defining x0, x1, x2
2*x0*x1*x2 - x0*x1 - x0*x2 + x0
Defining x0, x1, x2
((2, 0, -1, 0, -1, 0, 1, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
Defining x0, x1, x2
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
X0*X1 + X0*X2 + X0
'x0,x1,x2'
Defining x0, x1, x2
'Mvect'
[0, 0, 1, 0, 1, 0, 1, 0]
'Avect'
(1, 0, 0, 0, 0, 0, 1, 0)
'Pvect'
(2, 0, -1, 0, -1, 0, 1, 0)
(x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1)
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
[0, 1, 1, 1, 0, 0, 0, 0]
lp term order
'0000000'
'1'
'100'
0
''
'0'
'0000'
'0001'
'0010'
'0011'
'0100'
'0101'
'0110'
'0111'
'1000'
'1001'
'1010'
'1011'
'1100'
'1101'
'1110'
'1111'
Creating a Boolean polynomial ring with 3 generators which will act as two state random variables.
The generators of the Boolean Polynomial Ring, BPR
Defining X0, X1, X2
lp term order
Generators for the probability polynomials over QQ
Defining x0, x1, x2
lp term order
Probabilities (heads) of the 3 generators taken as distinguishable (unfair) coin tosses. These are independent probabilities, and do not sum to 1.0
+----------------+--------------+--------------+--------------+
| generators | P(X0) = x0 | P(X1) = x1 | P(X2) = x2 |
+================+==============+==============+==============+
| prob. of heads | 0.970432 | 0.994518 | 0.119172 |
+----------------+--------------+--------------+--------------+
| coin toss 1 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 2 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 3 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 4 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 5 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 6 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 7 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 8 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 9 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 10 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 11 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 12 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 13 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 14 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 15 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 16 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 17 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 18 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 19 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 20 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 21 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 22 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 23 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 24 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 25 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 26 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 27 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 28 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 29 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 30 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| freq. of heads | 1 | 1 | 0.1 |
+----------------+--------------+--------------+--------------+
The number of atoms is 8 = 2**3 generators. The generator probabilities induce the following probability scheme for the 8 atoms.
Aprob
[0.115014, 0.850098, 0.000634, 0.004686, 0.003504, 0.025901, 1.9e-05, 0.000143]
Total probability (just checking)
1.0
Table of atoms and monomials. With the exception of the 0th atom and monomial the rest are not equal.
+-----+-------+----------------------+-------------+
| # | bin | atoms | monomials |
+=====+=======+======================+=============+
| 0 | 000 | (X0+0)*(X1+0)*(X2+0) | X0*X1*X2 |
+-----+-------+----------------------+-------------+
| 1 | 001 | (X0+0)*(X1+0)*(X2+1) | X0*X1 |
+-----+-------+----------------------+-------------+
| 2 | 010 | (X0+0)*(X1+1)*(X2+0) | X0*X2 |
+-----+-------+----------------------+-------------+
| 3 | 011 | (X0+0)*(X1+1)*(X2+1) | X0 |
+-----+-------+----------------------+-------------+
| 4 | 100 | (X0+1)*(X1+0)*(X2+0) | X1*X2 |
+-----+-------+----------------------+-------------+
| 5 | 101 | (X0+1)*(X1+0)*(X2+1) | X1 |
+-----+-------+----------------------+-------------+
| 6 | 110 | (X0+1)*(X1+1)*(X2+0) | X2 |
+-----+-------+----------------------+-------------+
| 7 | 111 | (X0+1)*(X1+1)*(X2+1) | 1 |
+-----+-------+----------------------+-------------+
An example Boolean polynomial:
myBP
X0*X1 + X0*X2 + X0 + 1
Monomial vector
MonVec
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
Polynomial vector
Mvect = (MGA*Avect)mod 2, Mvect is 0-1 vector with a 1 corresponding to each monomial in the Bollean polynomial, 0 otherwise
(0, 1, 1, 1, 0, 0, 0, 1)
Atom vector
Avect = (MGA*Mvect)mod 2
(0, 1, 1, 0, 1, 1, 1, 1)
Multigrade And matrix, it's totally unimodular over ZZ, and it's an involution(self inverse) mod 2
MGA =
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
Inverse of Multigrade And matrix in ZZ, QQ, or RR
MGAinv
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
Monomial probabilities(which do not sum to 1.0)
but the last term is the sum of all atom probabilities = 1.0
Mprob = Aprob*MGA
[0.115014, 0.965112, 0.115648, 0.970432, 0.118519, 0.994518, 0.119172, 1.0]
Generators for the probability polynomial or formula over RR
Pvect = MGAinv*Avect, the coefficients of the probability polynomial or formula
[-2.0, 1.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0]
Monoms, monomials over RR
Probability polynomial when Boolean Ring generators are independent two state random variables
ProbPoly = Pvect*Monoms
-2*x0*x1*x2 + x0*x1 + x0*x2 - x0 + 1
Probability formula whether or not the generators are independent,
P(X0*X1 + X0*X2 + X0 + 1) = -2*P(X0*X1*X2) + P(X0*X1) + P(X0*X2) - P(X0) + P(1)
In this example with independent generators the numerical probability (using the dot product of vectors), P(X0*X1 + X0*X2 + X0 + 1) =
Pvect*Mprob =
0.880299732641442
or Avect*Aprob =
0.880299732641442
An example where the generators are not independent is constructed by creating a probability schema for the atoms arbitrarily
Probability schema for the atoms, PS =
[0.036326, 0.026352, 0.219059, 0.037976, 0.113768, 0.101268, 0.225121, 0.240132]
Monomial probabilities
MP = PS*MGA =
[0.036326, 0.062677, 0.255384, 0.319712, 0.150093, 0.277713, 0.594273, 1.0]
In this example with non-independent generators the numerical probability, P(X0*X1 + X0*X2 + X0 + 1) =
Pvect*MP =
0.925698661517172
Avect*PS =
0.925698661517172
The square matrix, TRM, of data in the following table represents the flow of goods and services in a complete directed multigraph of 7 nodes as valued in a single currency. The nodes of the graph might represent the nations of a small world. The data can be interpreted in either of two ways. Here we choose the interpretation that the value, X, in the cell corresponding to row 0 and column 1 is the amount received by node 0 from node 1. The value, Y, corresponding to row 1 and column 0 is the amount received by node 1 from node 0. One of these values will generally be greater than(though possibly equal to) the other. The net effect is a positive flow of |X-Y| in one direction or the other. A negative entry represents a flow in the direction opposite to a given edge in the graph. The column, R, is the sum along each row, and represents the total amount received from the network for each node. The row, S, represents the amount sent into the network for each node. The column, R-S, represents the net inflow or outflow of money for each node during a given time step. The data for this table was generated with a random variable from a half-normal distribution, i.e. |Z| where Z ~ N(0,sigma^2). TRM is my abbreviation for transaction matrix.
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| TRM | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+==========+=========+=========+=========+=========+=========+=====+==========+=====+==========+
| N0 | 1606.00 | 877.00 | 343.00 | 764.00 | 731.00 | 495.00 | 1351.00 | | 6167.00 | | -859.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N1 | 459.00 | 1154.00 | 678.00 | 817.00 | 719.00 | 367.00 | 2389.00 | | 6583.00 | | -4081.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N2 | 1160.00 | 1838.00 | 539.00 | 295.00 | 672.00 | 582.00 | 193.00 | | 5279.00 | | -1926.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N3 | 1100.00 | 2073.00 | 888.00 | 1065.00 | 330.00 | 1092.00 | 542.00 | | 7090.00 | | 1607.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N4 | 588.00 | 1241.00 | 1516.00 | 1399.00 | 468.00 | 9.00 | 436.00 | | 5657.00 | | 197.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N5 | 1628.00 | 951.00 | 1535.00 | 114.00 | 1333.00 | 666.00 | 17.00 | | 6244.00 | | 2711.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N6 | 485.00 | 2530.00 | 1706.00 | 1029.00 | 1207.00 | 322.00 | 1872.00 | | 9151.00 | | 2351.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| S | 7026.00 | 10664.00 | 7205.00 | 5483.00 | 5460.00 | 3533.00 | 6800.00 | | 46171.00 | | 0.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
To see the net effect of money transfers from node to node, we first form a skew-symmetric matrix(each entry is the negative of it's mirror reflection through the main diagonal) from TRM given by SKEW = TRM - TRM.transpose().
+--------+------+------+-------+-------+-------+-------+-------+
| SKEW | N0 | N1 | N2 | N3 | N4 | N5 | N6 |
+========+======+======+=======+=======+=======+=======+=======+
| N0 | 0 | 418 | -817 | -336 | 143 | -1133 | 866 |
+--------+------+------+-------+-------+-------+-------+-------+
| N1 | -418 | 0 | -1160 | -1256 | -522 | -584 | -141 |
+--------+------+------+-------+-------+-------+-------+-------+
| N2 | 817 | 1160 | 0 | -593 | -844 | -953 | -1513 |
+--------+------+------+-------+-------+-------+-------+-------+
| N3 | 336 | 1256 | 593 | 0 | -1069 | 978 | -487 |
+--------+------+------+-------+-------+-------+-------+-------+
| N4 | -143 | 522 | 844 | 1069 | 0 | -1324 | -771 |
+--------+------+------+-------+-------+-------+-------+-------+
| N5 | 1133 | 584 | 953 | -978 | 1324 | 0 | -305 |
+--------+------+------+-------+-------+-------+-------+-------+
| N6 | -866 | 141 | 1513 | 487 | 771 | 305 | 0 |
+--------+------+------+-------+-------+-------+-------+-------+
Next, we set the negative entries of SKEW to 0, and keep the rest to obtain the matrix, NET. For instance if you send me $10, and I send you $5, then the net effect is you sent me $5, and I sent you $0, we're just expressing everything in non-negative numbers. We could apply x*H(x) where H is the Heaviside step function to each entry of SKEW to obtain NET. Note that the R-S column vector for NET has not changed from that of TRM. We also note that for any square matrix, the sum over the R vector equals the sum over the S vector which is just the sum of all entries in the matrix, and therefore the R-S vector always sums to 0.
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| NET | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+=========+=========+=========+=========+=========+========+=====+==========+=====+==========+
| N0 | 0.00 | 418.00 | 0.00 | 0.00 | 143.00 | 0.00 | 866.00 | | 1427.00 | | -859.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 0.00 | | -4081.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N2 | 817.00 | 1160.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 1977.00 | | -1926.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N3 | 336.00 | 1256.00 | 593.00 | 0.00 | 0.00 | 978.00 | 0.00 | | 3163.00 | | 1607.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N4 | 0.00 | 522.00 | 844.00 | 1069.00 | 0.00 | 0.00 | 0.00 | | 2435.00 | | 197.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N5 | 1133.00 | 584.00 | 953.00 | 0.00 | 1324.00 | 0.00 | 0.00 | | 3994.00 | | 2711.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N6 | 0.00 | 141.00 | 1513.00 | 487.00 | 771.00 | 305.00 | 0.00 | | 3217.00 | | 2351.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| S | 2286.00 | 4081.00 | 3903.00 | 1556.00 | 2238.00 | 1283.00 | 866.00 | | 16213.00 | | 0.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
Closer analysis using some graph theory and linear algebra allows us to express the net effect of all transactions in TRM efficiently as the projection of TRM into the cocycle space of the complete directed multigraph on N vertices and 2*N*(N-1) edges. The dimension of the cocycle space is N-1. Projecting TRM thusly we obtain the skew-symmetric matrix, LMD. I called it this for no good reason having inherited it from a Visual Basic version I wrote a number of years ago. Note here also, the R-S vector remains unchanged from TRM. As a further note the numbers here are rounded to two decimal places whereas they have many more significant digits so the numbers may not add up exactly, if checking.
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| LMD | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+=========+=========+=========+=========+==========+==========+=====+==========+=====+==========+
| N0 | 0.00 | 230.14 | 76.21 | -176.14 | -75.43 | -255.00 | -229.29 | | -429.50 | | -859.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N1 | -230.14 | 0.00 | -153.93 | -406.29 | -305.57 | -485.14 | -459.43 | | -2040.50 | | -4081.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N2 | -76.21 | 153.93 | 0.00 | -252.36 | -151.64 | -331.21 | -305.50 | | -963.00 | | -1926.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N3 | 176.14 | 406.29 | 252.36 | 0.00 | 100.71 | -78.86 | -53.14 | | 803.50 | | 1607.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N4 | 75.43 | 305.57 | 151.64 | -100.71 | 0.00 | -179.57 | -153.86 | | 98.50 | | 197.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N5 | 255.00 | 485.14 | 331.21 | 78.86 | 179.57 | 0.00 | 25.71 | | 1355.50 | | 2711.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N6 | 229.29 | 459.43 | 305.50 | 53.14 | 153.86 | -25.71 | 0.00 | | 1175.50 | | 2351.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| S | 429.50 | 2040.50 | 963.00 | -803.50 | -98.50 | -1355.50 | -1175.50 | | 0.00 | | 0.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
To express the transactions in LMD as non-negative numbers only form SKEW = LMD - LMD.transpose, and set the negatives to 0. We obtain the matrix NETL. Again R-S is unchanged.
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| NETL | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+========+========+======+=======+=====+=========+=====+==========+
| N0 | 0.00 | 460.29 | 152.43 | 0.00 | 0.00 | 0.00 | 0.00 | | 612.71 | | -859.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 0.00 | | -4081.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N2 | 0.00 | 307.86 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 307.86 | | -1926.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N3 | 352.29 | 812.57 | 504.71 | 0.00 | 201.43 | 0.00 | 0.00 | | 1871.00 | | 1607.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N4 | 150.86 | 611.14 | 303.29 | 0.00 | 0.00 | 0.00 | 0.00 | | 1065.29 | | 197.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N5 | 510.00 | 970.29 | 662.43 | 157.71 | 359.14 | 0.00 | 51.43 | | 2711.00 | | 2711.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N6 | 458.57 | 918.86 | 611.00 | 106.29 | 307.71 | 0.00 | 0.00 | | 2402.43 | | 2351.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| S | 1471.71 | 4081.00 | 2233.86 | 264.00 | 868.29 | 0.00 | 51.43 | | 8970.29 | | 0.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
Any matrix where the R-S vector is the 0-vector(not merely summing to 0, but every entry is 0) lies in the cycle space of the complete directed graph. We can project TRM into the cycle space to obtain a matrix, CYC. This can be obtained by simply subtracting LMD from TRM, thus CYC = TRM - LMD. CYC can be broken down further into symmetric and skew-symmetric matrices, CYCS and CYCK respectively where CYCS = (CYC + CYC.transpose())/2 and CYCK = (CYC - CYC.transpose())/2. We have TRM = LMD + CYCS + CYCK.
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| CYCS | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+=========+=========+=========+=========+=====+==========+=====+=======+
| N0 | 1606.00 | 668.00 | 751.50 | 932.00 | 659.50 | 1061.50 | 918.00 | | 6596.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N1 | 668.00 | 1154.00 | 1258.00 | 1445.00 | 980.00 | 659.00 | 2459.50 | | 8623.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N2 | 751.50 | 1258.00 | 539.00 | 591.50 | 1094.00 | 1058.50 | 949.50 | | 6242.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N3 | 932.00 | 1445.00 | 591.50 | 1065.00 | 864.50 | 603.00 | 785.50 | | 6286.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N4 | 659.50 | 980.00 | 1094.00 | 864.50 | 468.00 | 671.00 | 821.50 | | 5558.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N5 | 1061.50 | 659.00 | 1058.50 | 603.00 | 671.00 | 666.00 | 169.50 | | 4888.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N6 | 918.00 | 2459.50 | 949.50 | 785.50 | 821.50 | 169.50 | 1872.00 | | 7975.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| S | 6596.50 | 8623.50 | 6242.00 | 6286.50 | 5558.50 | 4888.50 | 7975.50 | | 46171.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
The space of all N×N square matrices' dimension is N^2. The cocycle space is dimension N-1, so that the cycle space is dimension N^2 - N + 1. The cycle space is further broken down into the symmetric cycles and the skew-symmetric cycles. Every symmetric matrix is a cycle, and the dimension of the symmetric matrices is N*(N+1)/2. The dimension of the skew-symmetric matrices is N*(N-1)/2 leaving the dimension of the skew-symmetric cycles (N-1)*(N-2)/2.
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| CYCK | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+=========+=========+=========+=========+=====+=======+=====+=======+
| N0 | 0.00 | -21.14 | -484.71 | 8.14 | 146.93 | -311.50 | 662.29 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N1 | 21.14 | 0.00 | -426.07 | -221.71 | 44.57 | 193.14 | 388.93 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N2 | 484.71 | 426.07 | 0.00 | -44.14 | -270.36 | -145.29 | -451.00 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N3 | -8.14 | 221.71 | 44.14 | 0.00 | -635.21 | 567.86 | -190.36 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N4 | -146.93 | -44.57 | 270.36 | 635.21 | 0.00 | -482.43 | -231.64 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N5 | 311.50 | -193.14 | 145.29 | -567.86 | 482.43 | 0.00 | -178.21 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N6 | -662.29 | -388.93 | 451.00 | 190.36 | 231.64 | 178.21 | 0.00 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| S | 0.00 | 0.00 | 0.00 | 0.00 | -0.00 | 0.00 | 0.00 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
Defining x0, x1, x2
x0*x1*x2 + x0*x1 + x0*x2 + x0 + x1*x2 + x1 + x2 + 1
bitarray('1')
bitarray('110')
3
[10, 22, bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')]
0
1
bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
[-8628, 1767, 3650, -5510, -73, -3795, -929, 7069, 1690, 4759]
0
[10, 22, bitarray('0000000000000000000000100000000000000000000001010000000000000000000010101000000000000000000001010100000000000000000000100100000000000000000000101000100000000000000000010001000000000000000000100011000000000000000001000011'), bitarray('1110000000000000000000100111000000000000000001010011100000000000000010101001100000000000000001010101111100000000000000100100001100000000000000101000101000000000000000010001011000000000000000100011010000000000000001000011')]
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| PHI | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | SD |
+=======+=====+=====+=====+=====+=====+=====+=====+=====+=====+======+======+======+======+======+======+======+======+======+======+======+======+======+=======+
| 23 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8628 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 24 | -1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1767 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 25 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3650 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 26 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -5510 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 27 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | -73 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | -3795 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | 0 | 0 | -1 | 0 | 1 | 0 | 0 | 0 | -929 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | -1 | 0 | 1 | 1 | 0 | 7069 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | -1 | -1 | 0 | 1 | 1690 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | -1 | -1 | 4759 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| cost | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
Simplex method complete after 21 Xchange operations
[10, 22, bitarray('0000000000000000000000000000010000000000000000011000001100000000000100000000000000000000000010000011100010000000000000000000000010000000001001000010100000000000010000010101110000000000000000000000111110010011000111000000'), bitarray('0000000100000100011000000000110100000010000011011000001100000000000101100000100000000000111010000011100010000000001100000110000010000000001101000010100110000000010000010101110111100100110001110000111110010011000111000000')]
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| PHI | 23 | 24 | 25 | 4 | 5 | 26 | 12 | 17 | 27 | 28 | 6 | 3 | 7 | 29 | 30 | 31 | 9 | 13 | 11 | 20 | 21 | 22 | SD |
+=======+======+======+======+=====+=====+======+======+======+======+======+=====+=====+=====+======+======+======+=====+======+======+======+======+======+=======+
| 19 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 929 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 18 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | -1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3795 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 2 | 1 | 1 | 0 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6861 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 1 | 0 | -1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1767 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 8 | 1 | 1 | 1 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | -1 | -1 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | 3211 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 10 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 5510 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 14 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 1 | 0 | -1 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 0 | 3274 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | -1 | -1 | 0 | 1 | 761 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 16 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | -1 | -1 | 4759 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 32 | -1 | -1 | -1 | 0 | 0 | -1 | 0 | 0 | -1 | -1 | 0 | 0 | 0 | -1 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| cost | 3 | 2 | 2 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 30867 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
Shipping vector =
[1767.0, 6861.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3211.0, 0.0, 5510.0, 0.0, 0.0, 0.0, 3274.0, 761.0, 4759.0, 0.0, 3795.0, 929.0, 0.0, 0.0, 0.0]
+----+------+------+------+------+------+------+------+------+------+------+
| | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
+====+======+======+======+======+======+======+======+======+======+======+
| 23 | 0 | 1767 | 6861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 25 | 0 | 0 | 0 | 0 | 3211 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 26 | 0 | 0 | 0 | 0 | 5510 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 27 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3274 | 761 | 4759 |
+----+------+------+------+------+------+------+------+------+------+------+
| 28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3795 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 929 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
Receive minus Send vector
[8628.0, -1767.0, -3650.0, 5510.0, 73.0, 3795.0, 929.0, -7069.0, -1690.0, -4759.0]
0.000000000000000
/ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__("pkg_resources").declare_namespace(__name__)
/ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('scikits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
__import__("pkg_resources").declare_namespace(__name__)
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35
36 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X35 = R[5,5]
Defining x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35
t
1/3*t^3 - 1/2*t^2 + 7/6*t
Polynomial Sequence with 61 Polynomials in 36 Variables
0
1
2
X1*X8 + X1*X2
Defining x2
x2
Defining x2
Defining x8
0
1
3
X1*X9 + X1*X3
Defining x3
x3
Defining x3
Defining x9
0
1
4
X1*X10 + X1*X4
Defining x4
x4
Defining x4
Defining x10
0
1
5
X1*X11 + X1*X5
Defining x5
x5
Defining x5
Defining x11
0
2
3
X2*X15 + X2*X3
Defining x3
x3
Defining x3
Defining x15
0
2
4
X2*X16 + X2*X4
Defining x4
x4
Defining x4
Defining x16
0
2
5
X2*X17 + X2*X5
Defining x5
x5
Defining x5
Defining x17
0
3
4
X3*X22 + X3*X4
Defining x4
x4
Defining x4
Defining x22
0
3
5
X3*X23 + X3*X5
Defining x5
x5
Defining x5
Defining x23
0
4
5
X4*X29 + X4*X5
Defining x5
x5
Defining x5
Defining x29
1
2
3
X8*X15 + X8*X9
Defining x9
x9
Defining x9
Defining x15
1
2
4
X8*X16 + X8*X10
Defining x10
x10
Defining x10
Defining x16
1
2
5
X8*X17 + X8*X11
Defining x11
x11
Defining x11
Defining x17
1
3
4
X9*X22 + X9*X10
Defining x10
x10
Defining x10
Defining x22
1
3
5
X9*X23 + X9*X11
Defining x11
x11
Defining x11
Defining x23
1
4
5
X10*X29 + X10*X11
Defining x11
x11
Defining x11
Defining x29
2
3
4
X15*X22 + X15*X16
Defining x16
x16
Defining x16
Defining x22
2
3
5
X15*X23 + X15*X17
Defining x17
x17
Defining x17
Defining x23
2
4
5
X16*X29 + X16*X17
Defining x17
x17
Defining x17
Defining x29
3
4
5
X22*X29 + X22*X23
Defining x23
x23
Defining x23
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x8 + x2*x8
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35
36 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X35 = R[5,5]
Defining x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35
t
1/3*t^3 - 1/2*t^2 + 7/6*t
Polynomial Sequence with 61 Polynomials in 36 Variables
0
1
2
X1*X8 + X1*X2
Defining x2
x2
Defining x2
Defining x8
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
3
X1*X9 + X1*X3
Defining x3
x3
Defining x3
Defining x9
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
4
X1*X10 + X1*X4
Defining x4
x4
Defining x4
Defining x10
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
1
5
X1*X11 + X1*X5
Defining x5
x5
Defining x5
Defining x11
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
3
X2*X15 + X2*X3
Defining x3
x3
Defining x3
Defining x15
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
4
X2*X16 + X2*X4
Defining x4
x4
Defining x4
Defining x16
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
2
5
X2*X17 + X2*X5
Defining x5
x5
Defining x5
Defining x17
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
3
4
X3*X22 + X3*X4
Defining x4
x4
Defining x4
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
3
5
X3*X23 + X3*X5
Defining x5
x5
Defining x5
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
0
4
5
X4*X29 + X4*X5
Defining x5
x5
Defining x5
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
3
X8*X15 + X8*X9
Defining x9
x9
Defining x9
Defining x15
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
4
X8*X16 + X8*X10
Defining x10
x10
Defining x10
Defining x16
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
2
5
X8*X17 + X8*X11
Defining x11
x11
Defining x11
Defining x17
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
3
4
X9*X22 + X9*X10
Defining x10
x10
Defining x10
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
3
5
X9*X23 + X9*X11
Defining x11
x11
Defining x11
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
1
4
5
X10*X29 + X10*X11
Defining x11
x11
Defining x11
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
3
4
X15*X22 + X15*X16
Defining x16
x16
Defining x16
Defining x22
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
3
5
X15*X23 + X15*X17
Defining x17
x17
Defining x17
Defining x23
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
2
4
5
X16*X29 + X16*X17
Defining x17
x17
Defining x17
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
3
4
5
X22*X29 + X22*X23
Defining x23
x23
Defining x23
Defining x29
Defining x1, x2, x8
-2*x1*x2*x8 + x1*x2 + x1*x8
Error in lines 4-4
Traceback (most recent call last):
File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1250, in execute
exec(
File "", line 1, in <module>
NameError: name 'X1' is not defined
objects = 12
Defining X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30, X31, X32, X33, X34, X35, X36, X37, X38, X39, X40, X41, X42, X43, X44, X45, X46, X47
[1 0 0 0|0 1 0 0|0 0 0 1]
[0 1 0 0|0 0 0 1|1 0 0 0]
[0 0 1 0|1 0 0 0|0 0 1 0]
[0 0 0 1|0 0 1 0|0 1 0 0]
[-------+-------+-------]
[0 0 1 0|1 0 0 0|0 0 1 0]
[1 0 0 0|0 1 0 0|0 0 0 1]
[0 0 0 1|0 0 1 0|0 1 0 0]
[0 1 0 0|0 0 0 1|1 0 0 0]
[-------+-------+-------]
[0 1 0 0|0 0 0 1|1 0 0 0]
[0 0 0 1|0 0 1 0|0 1 0 0]
[0 0 1 0|1 0 0 0|0 0 1 0]
[1 0 0 0|0 1 0 0|0 0 0 1]
objects = 12
types = 3
rel_classes = 4
144 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X143 = R[11,11]
REI.gens() = 1589
A 1st pass
type 0 to type 1
[ X138 X124 + X126 + X128 0 X90 + X115 + X139]
[ X49 X61 0 X85]
[ X138 + 1 X124 + X125 + X126 + X129 + 1 X124 + X129 + 1 X88 + X90 + X115]
[ X51 X63 X75 X87]
type 0 to type 2
[ X138 + X140 X138 X126 + X129 + X142 X138 + 1]
[ X97 X138 X121 X133]
[X124 + X126 + X128 + X129 + 1 X124 + X129 + X138 + 1 X124 + X126 + X129 X138]
[ X99 X111 X123 X135]
type 1 to type 2
[X124 + X126 + X128 + X129 + X138 + 1 X124 + X129 + 1 X124 0]
[ X101 X125 + X129 + X137 + 1 X125 X137]
[ X116 + X138 X138 + 1 X126 X138]
[ X103 X115 X127 X139]
number of variables left to be determined: 31
REI.gens() = 1613
A 2nd pass
type 0 to type 1
[0 1 0 0]
[0 0 0 1]
[1 0 0 0]
[0 0 1 0]
type 0 to type 2
[0 0 0 1]
[1 0 0 0]
[0 0 1 0]
[0 1 0 0]
type 1 to type 2
[0 0 1 0]
[0 0 0 1]
[0 1 0 0]
[1 0 0 0]
objects = 24
types = 4
rel_classes = 6
576 Free Boolean Algebra generators: X0 = R[0,0], X1 = R[0,1], X2 = R[0,2],..., X575 = R[23,23]
REI.gens() = 13413
A 1st pass
type 0 to type 1
[ 0 X7 X7 + 1 0 0 0]
[ X30 X31 0 0 0 0]
[ X54 X55 X56 X57 X58 0]
[ 0 X79 X80 0 X82 0]
[ X102 X103 X104 X105 X106 0]
[ 0 0 0 0 0 1]
type 0 to type 2
[ X12 X13 X14 X15 0 X17]
[ 0 0 0 0 1 0]
[ X60 X61 X62 X63 0 X65]
[ X84 0 0 0 0 X89]
[X108 X109 X110 0 0 X113]
[X132 X133 X134 X135 0 X137]
type 0 to type 3
[ X18 0 X13 0 0 X23]
[ 0 0 X30 + 1 X30 0 0]
[ X66 X67 X68 X54 0 X71]
[X30 + 1 X30 0 0 0 0]
[ X114 X115 X116 X102 0 0]
[ 0 0 0 0 1 0]
type 1 to type 2
[ 0 X30 + 1 0 0 X30 0]
[ X180 X181 X182 X183 X31 X185]
[ X204 X205 0 X207 0 0]
[ X228 0 0 0 0 0]
[ X252 0 0 X255 0 0]
[ X132 X133 X134 X135 0 X137]
type 1 to type 3
[ 0 0 0 1 0 0]
[ X186 X187 X181 + X31 0 0 X191]
[ X210 X211 X205 0 0 X215]
[X133 + X30 X30 + 1 X133 0 0 0]
[ X258 X259 0 0 0 X263]
[ 0 0 0 0 1 0]
type 2 to type 3
[ X306 X307 X308 0 X132 X311]
[ 0 0 X133 + X30 X30 + 1 X133 0]
[ X354 0 0 0 X134 X359]
[ 0 0 0 0 X135 X135 + 1]
[ 0 0 X30 + 1 X30 0 0]
[ X426 X427 0 0 X137 X431]
number of variables left to be determined: 75
REI.gens() = 13463
A 2nd pass
type 0 to type 1
[0 0 1 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 1 0]
[0 1 0 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
type 0 to type 2
[0 1 0 0 0 0]
[0 0 0 0 1 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
[1 0 0 0 0 0]
[0 0 1 0 0 0]
type 0 to type 3
[0 0 1 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 0 1]
[0 1 0 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 1 0]
type 1 to type 2
[0 0 0 0 1 0]
[0 0 0 0 0 1]
[0 1 0 0 0 0]
[1 0 0 0 0 0]
[0 0 0 1 0 0]
[0 0 1 0 0 0]
type 1 to type 3
[0 0 0 1 0 0]
[0 1 0 0 0 0]
[0 0 1 0 0 0]
[1 0 0 0 0 0]
[0 0 0 0 0 1]
[0 0 0 0 1 0]
type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0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
(X0, X1, X2)
3
<built-in method order of sage.rings.polynomial.pbori.pbori.BooleanPolynomialRing object at 0x7f811f893040>
Defining X0, X1, X2
Defining x0, x1, x2
2
X0*X1*X2 + X1*X2 + X0*X2 + X0*X1 + X2 + X1 + X0 + 1
[X0*X1*X2, X1*X2, X0*X2, X0*X1, X2, X1, X0, 1]
(X0, X1, X2)
Defining x0, x1, x2
[x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1]
(X0, X1, X2)
<built-in method order of sage.rings.polynomial.pbori.pbori.BooleanPolynomialRing object at 0x7fb60d09d9c0>
Defining X0, X1, X2
Defining x0, x1, x2
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
Defining x0, x1, x2
2*x0*x1*x2 - x0*x1 - x0*x2 + x0
Defining x0, x1, x2
((2, 0, -1, 0, -1, 0, 1, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
X0*X1*X2 + X0*X1 + X0*X2 + X0 + X1*X2 + X1 + X2 + 1
Boolean PolynomialRing in X0, X1, X2
(X0, X1, X2)
3
[X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1]
8
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
Defining x0, x1, x2
[x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1]
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 1, 0, 0, 1, 0, 0, 0)
(-2, 1, 0, 0, 1, 0, 0, 0)
'x'
'XcGGt1u'
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
X0*X1*X2
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
(x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1)
(X0*X1*X2, X0*X1*X2 + X0*X1, X0*X1*X2 + X0*X2, X0*X1*X2 + X0*X1 + X0*X2 + X0, X0*X1*X2 + X1*X2, X0*X1*X2 + X0*X1 + X1*X2 + X1, X0*X1*X2 + X0*X2 + X1*X2 + X2, X0*X1*X2 + X0*X1 + X0*X2 + X0 + X1*X2 + X1 + X2 + 1)
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
(0.216897236248995, 0.125181737169618, 0.123043301373761, 0.0748467738425043, 0.125643838286659, 0.0283746925135870, 0.122649911882767, 0.183362508682108)
1.00000000000000
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
(0.216897236248995, 0.342078973418613, 0.339940537622756, 0.539969048634878, 0.342541074535654, 0.496097504218859, 0.588234287792182, 1.00000000000000)
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 1, 0, 0, 1, 0, 0, 0)
(0, 0, 0, 0, 1, 1, 0, 0)
(0, 1, 0, 0, 0, 1, 0, 0)
(0, 1, 0, 0, 0, 1, 0, 0)
Defining x0, x1, x2
-2*x0*x1*x2 + x0*x2 + x1
Defining x0, x1, x2
((-2, 0, 1, 0, 0, 1, 0, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
X0*X1 + X0*X2 + X0
(X0, X1, X2)
[X0*X1, X0*X2, X0]
[0, 0, 0, 0, 0, 0, 0, 0]
3
(X0, X1)
'mm='
3
(X0, X2)
'mm='
5
(X0,)
'mm='
1
[0, 1, 0, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 1, 0, 1, 0]
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
(1, 0, 0, 0, 0, 0, 1, 0)
(2, 0, -1, 0, -1, 0, 1, 0)
Defining x0, x1, x2
2*x0*x1*x2 - x0*x1 - x0*x2 + x0
Defining x0, x1, x2
((2, 0, -1, 0, -1, 0, 1, 0), (x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1))
Defining x0, x1, x2
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
X0*X1 + X0*X2 + X0
'x0,x1,x2'
Defining x0, x1, x2
'Mvect'
[0, 0, 1, 0, 1, 0, 1, 0]
'Avect'
(1, 0, 0, 0, 0, 0, 1, 0)
'Pvect'
(2, 0, -1, 0, -1, 0, 1, 0)
(x0*x1*x2, x1*x2, x0*x2, x2, x0*x1, x1, x0, 1)
2*x0*x1*x2 - x0*x2 - x0*x1 + x0
[0, 1, 1, 1, 0, 0, 0, 0]
lp term order
'0000000'
'1'
'100'
0
''
'0'
'0000'
'0001'
'0010'
'0011'
'0100'
'0101'
'0110'
'0111'
'1000'
'1001'
'1010'
'1011'
'1100'
'1101'
'1110'
'1111'
Creating a Boolean polynomial ring with 3 generators which will act as two state random variables.
The generators of the Boolean Polynomial Ring, BPR
Defining X0, X1, X2
lp term order
Generators for the probability polynomials over QQ
Defining x0, x1, x2
lp term order
Probabilities (heads) of the 3 generators taken as distinguishable (unfair) coin tosses. These are independent probabilities, and do not sum to 1.0
+----------------+--------------+--------------+--------------+
| generators | P(X0) = x0 | P(X1) = x1 | P(X2) = x2 |
+================+==============+==============+==============+
| prob. of heads | 0.970432 | 0.994518 | 0.119172 |
+----------------+--------------+--------------+--------------+
| coin toss 1 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 2 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 3 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 4 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 5 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 6 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 7 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 8 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 9 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 10 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 11 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 12 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 13 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 14 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 15 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 16 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 17 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 18 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 19 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 20 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 21 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 22 | 1 | 1 | 1 |
+----------------+--------------+--------------+--------------+
| coin toss 23 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 24 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 25 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 26 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 27 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 28 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 29 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| coin toss 30 | 1 | 1 | 0 |
+----------------+--------------+--------------+--------------+
| freq. of heads | 1 | 1 | 0.1 |
+----------------+--------------+--------------+--------------+
The number of atoms is 8 = 2**3 generators. The generator probabilities induce the following probability scheme for the 8 atoms.
Aprob
[0.115014, 0.850098, 0.000634, 0.004686, 0.003504, 0.025901, 1.9e-05, 0.000143]
Total probability (just checking)
1.0
Table of atoms and monomials. With the exception of the 0th atom and monomial the rest are not equal.
+-----+-------+----------------------+-------------+
| # | bin | atoms | monomials |
+=====+=======+======================+=============+
| 0 | 000 | (X0+0)*(X1+0)*(X2+0) | X0*X1*X2 |
+-----+-------+----------------------+-------------+
| 1 | 001 | (X0+0)*(X1+0)*(X2+1) | X0*X1 |
+-----+-------+----------------------+-------------+
| 2 | 010 | (X0+0)*(X1+1)*(X2+0) | X0*X2 |
+-----+-------+----------------------+-------------+
| 3 | 011 | (X0+0)*(X1+1)*(X2+1) | X0 |
+-----+-------+----------------------+-------------+
| 4 | 100 | (X0+1)*(X1+0)*(X2+0) | X1*X2 |
+-----+-------+----------------------+-------------+
| 5 | 101 | (X0+1)*(X1+0)*(X2+1) | X1 |
+-----+-------+----------------------+-------------+
| 6 | 110 | (X0+1)*(X1+1)*(X2+0) | X2 |
+-----+-------+----------------------+-------------+
| 7 | 111 | (X0+1)*(X1+1)*(X2+1) | 1 |
+-----+-------+----------------------+-------------+
An example Boolean polynomial:
myBP
X0*X1 + X0*X2 + X0 + 1
Monomial vector
MonVec
(X0*X1*X2, X0*X1, X0*X2, X0, X1*X2, X1, X2, 1)
Polynomial vector
Mvect = (MGA*Avect)mod 2, Mvect is 0-1 vector with a 1 corresponding to each monomial in the Bollean polynomial, 0 otherwise
(0, 1, 1, 1, 0, 0, 0, 1)
Atom vector
Avect = (MGA*Mvect)mod 2
(0, 1, 1, 0, 1, 1, 1, 1)
Multigrade And matrix, it's totally unimodular over ZZ, and it's an involution(self inverse) mod 2
MGA =
[1 1 1 1 1 1 1 1]
[0 1 0 1 0 1 0 1]
[0 0 1 1 0 0 1 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 1 1 1]
[0 0 0 0 0 1 0 1]
[0 0 0 0 0 0 1 1]
[0 0 0 0 0 0 0 1]
Inverse of Multigrade And matrix in ZZ, QQ, or RR
MGAinv
[ 1 -1 -1 1 -1 1 1 -1]
[ 0 1 0 -1 0 -1 0 1]
[ 0 0 1 -1 0 0 -1 1]
[ 0 0 0 1 0 0 0 -1]
[ 0 0 0 0 1 -1 -1 1]
[ 0 0 0 0 0 1 0 -1]
[ 0 0 0 0 0 0 1 -1]
[ 0 0 0 0 0 0 0 1]
Monomial probabilities(which do not sum to 1.0)
but the last term is the sum of all atom probabilities = 1.0
Mprob = Aprob*MGA
[0.115014, 0.965112, 0.115648, 0.970432, 0.118519, 0.994518, 0.119172, 1.0]
Generators for the probability polynomial or formula over RR
Pvect = MGAinv*Avect, the coefficients of the probability polynomial or formula
[-2.0, 1.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0]
Monoms, monomials over RR
Probability polynomial when Boolean Ring generators are independent two state random variables
ProbPoly = Pvect*Monoms
-2*x0*x1*x2 + x0*x1 + x0*x2 - x0 + 1
Probability formula whether or not the generators are independent,
P(X0*X1 + X0*X2 + X0 + 1) = -2*P(X0*X1*X2) + P(X0*X1) + P(X0*X2) - P(X0) + P(1)
In this example with independent generators the numerical probability (using the dot product of vectors), P(X0*X1 + X0*X2 + X0 + 1) =
Pvect*Mprob =
0.880299732641442
or Avect*Aprob =
0.880299732641442
An example where the generators are not independent is constructed by creating a probability schema for the atoms arbitrarily
Probability schema for the atoms, PS =
[0.036326, 0.026352, 0.219059, 0.037976, 0.113768, 0.101268, 0.225121, 0.240132]
Monomial probabilities
MP = PS*MGA =
[0.036326, 0.062677, 0.255384, 0.319712, 0.150093, 0.277713, 0.594273, 1.0]
In this example with non-independent generators the numerical probability, P(X0*X1 + X0*X2 + X0 + 1) =
Pvect*MP =
0.925698661517172
Avect*PS =
0.925698661517172
The square matrix, TRM, of data in the following table represents the flow of goods and services in a complete directed multigraph of 7 nodes as valued in a single currency. The nodes of the graph might represent the nations of a small world. The data can be interpreted in either of two ways. Here we choose the interpretation that the value, X, in the cell corresponding to row 0 and column 1 is the amount received by node 0 from node 1. The value, Y, corresponding to row 1 and column 0 is the amount received by node 1 from node 0. One of these values will generally be greater than(though possibly equal to) the other. The net effect is a positive flow of |X-Y| in one direction or the other. A negative entry represents a flow in the direction opposite to a given edge in the graph. The column, R, is the sum along each row, and represents the total amount received from the network for each node. The row, S, represents the amount sent into the network for each node. The column, R-S, represents the net inflow or outflow of money for each node during a given time step. The data for this table was generated with a random variable from a half-normal distribution, i.e. |Z| where Z ~ N(0,sigma^2). TRM is my abbreviation for transaction matrix.
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| TRM | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+==========+=========+=========+=========+=========+=========+=====+==========+=====+==========+
| N0 | 1606.00 | 877.00 | 343.00 | 764.00 | 731.00 | 495.00 | 1351.00 | | 6167.00 | | -859.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N1 | 459.00 | 1154.00 | 678.00 | 817.00 | 719.00 | 367.00 | 2389.00 | | 6583.00 | | -4081.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N2 | 1160.00 | 1838.00 | 539.00 | 295.00 | 672.00 | 582.00 | 193.00 | | 5279.00 | | -1926.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N3 | 1100.00 | 2073.00 | 888.00 | 1065.00 | 330.00 | 1092.00 | 542.00 | | 7090.00 | | 1607.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N4 | 588.00 | 1241.00 | 1516.00 | 1399.00 | 468.00 | 9.00 | 436.00 | | 5657.00 | | 197.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N5 | 1628.00 | 951.00 | 1535.00 | 114.00 | 1333.00 | 666.00 | 17.00 | | 6244.00 | | 2711.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| N6 | 485.00 | 2530.00 | 1706.00 | 1029.00 | 1207.00 | 322.00 | 1872.00 | | 9151.00 | | 2351.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
| S | 7026.00 | 10664.00 | 7205.00 | 5483.00 | 5460.00 | 3533.00 | 6800.00 | | 46171.00 | | 0.00 |
+-------+---------+----------+---------+---------+---------+---------+---------+-----+----------+-----+----------+
To see the net effect of money transfers from node to node, we first form a skew-symmetric matrix(each entry is the negative of it's mirror reflection through the main diagonal) from TRM given by SKEW = TRM - TRM.transpose().
+--------+------+------+-------+-------+-------+-------+-------+
| SKEW | N0 | N1 | N2 | N3 | N4 | N5 | N6 |
+========+======+======+=======+=======+=======+=======+=======+
| N0 | 0 | 418 | -817 | -336 | 143 | -1133 | 866 |
+--------+------+------+-------+-------+-------+-------+-------+
| N1 | -418 | 0 | -1160 | -1256 | -522 | -584 | -141 |
+--------+------+------+-------+-------+-------+-------+-------+
| N2 | 817 | 1160 | 0 | -593 | -844 | -953 | -1513 |
+--------+------+------+-------+-------+-------+-------+-------+
| N3 | 336 | 1256 | 593 | 0 | -1069 | 978 | -487 |
+--------+------+------+-------+-------+-------+-------+-------+
| N4 | -143 | 522 | 844 | 1069 | 0 | -1324 | -771 |
+--------+------+------+-------+-------+-------+-------+-------+
| N5 | 1133 | 584 | 953 | -978 | 1324 | 0 | -305 |
+--------+------+------+-------+-------+-------+-------+-------+
| N6 | -866 | 141 | 1513 | 487 | 771 | 305 | 0 |
+--------+------+------+-------+-------+-------+-------+-------+
Next, we set the negative entries of SKEW to 0, and keep the rest to obtain the matrix, NET. For instance if you send me $10, and I send you $5, then the net effect is you sent me $5, and I sent you $0, we're just expressing everything in non-negative numbers. We could apply x*H(x) where H is the Heaviside step function to each entry of SKEW to obtain NET. Note that the R-S column vector for NET has not changed from that of TRM. We also note that for any square matrix, the sum over the R vector equals the sum over the S vector which is just the sum of all entries in the matrix, and therefore the R-S vector always sums to 0.
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| NET | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+=========+=========+=========+=========+=========+========+=====+==========+=====+==========+
| N0 | 0.00 | 418.00 | 0.00 | 0.00 | 143.00 | 0.00 | 866.00 | | 1427.00 | | -859.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 0.00 | | -4081.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N2 | 817.00 | 1160.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 1977.00 | | -1926.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N3 | 336.00 | 1256.00 | 593.00 | 0.00 | 0.00 | 978.00 | 0.00 | | 3163.00 | | 1607.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N4 | 0.00 | 522.00 | 844.00 | 1069.00 | 0.00 | 0.00 | 0.00 | | 2435.00 | | 197.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N5 | 1133.00 | 584.00 | 953.00 | 0.00 | 1324.00 | 0.00 | 0.00 | | 3994.00 | | 2711.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| N6 | 0.00 | 141.00 | 1513.00 | 487.00 | 771.00 | 305.00 | 0.00 | | 3217.00 | | 2351.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
| S | 2286.00 | 4081.00 | 3903.00 | 1556.00 | 2238.00 | 1283.00 | 866.00 | | 16213.00 | | 0.00 |
+-------+---------+---------+---------+---------+---------+---------+--------+-----+----------+-----+----------+
Closer analysis using some graph theory and linear algebra allows us to express the net effect of all transactions in TRM efficiently as the projection of TRM into the cocycle space of the complete directed multigraph on N vertices and 2*N*(N-1) edges. The dimension of the cocycle space is N-1. Projecting TRM thusly we obtain the skew-symmetric matrix, LMD. I called it this for no good reason having inherited it from a Visual Basic version I wrote a number of years ago. Note here also, the R-S vector remains unchanged from TRM. As a further note the numbers here are rounded to two decimal places whereas they have many more significant digits so the numbers may not add up exactly, if checking.
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| LMD | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+=======+=========+=========+=========+=========+=========+==========+==========+=====+==========+=====+==========+
| N0 | 0.00 | 230.14 | 76.21 | -176.14 | -75.43 | -255.00 | -229.29 | | -429.50 | | -859.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N1 | -230.14 | 0.00 | -153.93 | -406.29 | -305.57 | -485.14 | -459.43 | | -2040.50 | | -4081.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N2 | -76.21 | 153.93 | 0.00 | -252.36 | -151.64 | -331.21 | -305.50 | | -963.00 | | -1926.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N3 | 176.14 | 406.29 | 252.36 | 0.00 | 100.71 | -78.86 | -53.14 | | 803.50 | | 1607.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N4 | 75.43 | 305.57 | 151.64 | -100.71 | 0.00 | -179.57 | -153.86 | | 98.50 | | 197.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N5 | 255.00 | 485.14 | 331.21 | 78.86 | 179.57 | 0.00 | 25.71 | | 1355.50 | | 2711.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| N6 | 229.29 | 459.43 | 305.50 | 53.14 | 153.86 | -25.71 | 0.00 | | 1175.50 | | 2351.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| | | | | | | | | | | | |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
| S | 429.50 | 2040.50 | 963.00 | -803.50 | -98.50 | -1355.50 | -1175.50 | | 0.00 | | 0.00 |
+-------+---------+---------+---------+---------+---------+----------+----------+-----+----------+-----+----------+
To express the transactions in LMD as non-negative numbers only form SKEW = LMD - LMD.transpose, and set the negatives to 0. We obtain the matrix NETL. Again R-S is unchanged.
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| NETL | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+========+========+======+=======+=====+=========+=====+==========+
| N0 | 0.00 | 460.29 | 152.43 | 0.00 | 0.00 | 0.00 | 0.00 | | 612.71 | | -859.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 0.00 | | -4081.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N2 | 0.00 | 307.86 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | | 307.86 | | -1926.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N3 | 352.29 | 812.57 | 504.71 | 0.00 | 201.43 | 0.00 | 0.00 | | 1871.00 | | 1607.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N4 | 150.86 | 611.14 | 303.29 | 0.00 | 0.00 | 0.00 | 0.00 | | 1065.29 | | 197.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N5 | 510.00 | 970.29 | 662.43 | 157.71 | 359.14 | 0.00 | 51.43 | | 2711.00 | | 2711.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| N6 | 458.57 | 918.86 | 611.00 | 106.29 | 307.71 | 0.00 | 0.00 | | 2402.43 | | 2351.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
| S | 1471.71 | 4081.00 | 2233.86 | 264.00 | 868.29 | 0.00 | 51.43 | | 8970.29 | | 0.00 |
+--------+---------+---------+---------+--------+--------+------+-------+-----+---------+-----+----------+
Any matrix where the R-S vector is the 0-vector(not merely summing to 0, but every entry is 0) lies in the cycle space of the complete directed graph. We can project TRM into the cycle space to obtain a matrix, CYC. This can be obtained by simply subtracting LMD from TRM, thus CYC = TRM - LMD. CYC can be broken down further into symmetric and skew-symmetric matrices, CYCS and CYCK respectively where CYCS = (CYC + CYC.transpose())/2 and CYCK = (CYC - CYC.transpose())/2. We have TRM = LMD + CYCS + CYCK.
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| CYCS | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+=========+=========+=========+=========+=====+==========+=====+=======+
| N0 | 1606.00 | 668.00 | 751.50 | 932.00 | 659.50 | 1061.50 | 918.00 | | 6596.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N1 | 668.00 | 1154.00 | 1258.00 | 1445.00 | 980.00 | 659.00 | 2459.50 | | 8623.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N2 | 751.50 | 1258.00 | 539.00 | 591.50 | 1094.00 | 1058.50 | 949.50 | | 6242.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N3 | 932.00 | 1445.00 | 591.50 | 1065.00 | 864.50 | 603.00 | 785.50 | | 6286.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N4 | 659.50 | 980.00 | 1094.00 | 864.50 | 468.00 | 671.00 | 821.50 | | 5558.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N5 | 1061.50 | 659.00 | 1058.50 | 603.00 | 671.00 | 666.00 | 169.50 | | 4888.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| N6 | 918.00 | 2459.50 | 949.50 | 785.50 | 821.50 | 169.50 | 1872.00 | | 7975.50 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
| S | 6596.50 | 8623.50 | 6242.00 | 6286.50 | 5558.50 | 4888.50 | 7975.50 | | 46171.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+----------+-----+-------+
The space of all N×N square matrices' dimension is N^2. The cocycle space is dimension N-1, so that the cycle space is dimension N^2 - N + 1. The cycle space is further broken down into the symmetric cycles and the skew-symmetric cycles. Every symmetric matrix is a cycle, and the dimension of the symmetric matrices is N*(N+1)/2. The dimension of the skew-symmetric matrices is N*(N-1)/2 leaving the dimension of the skew-symmetric cycles (N-1)*(N-2)/2.
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| CYCK | N0 | N1 | N2 | N3 | N4 | N5 | N6 | | R | | R-S |
+========+=========+=========+=========+=========+=========+=========+=========+=====+=======+=====+=======+
| N0 | 0.00 | -21.14 | -484.71 | 8.14 | 146.93 | -311.50 | 662.29 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N1 | 21.14 | 0.00 | -426.07 | -221.71 | 44.57 | 193.14 | 388.93 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N2 | 484.71 | 426.07 | 0.00 | -44.14 | -270.36 | -145.29 | -451.00 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N3 | -8.14 | 221.71 | 44.14 | 0.00 | -635.21 | 567.86 | -190.36 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N4 | -146.93 | -44.57 | 270.36 | 635.21 | 0.00 | -482.43 | -231.64 | | 0.00 | | 0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N5 | 311.50 | -193.14 | 145.29 | -567.86 | 482.43 | 0.00 | -178.21 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| N6 | -662.29 | -388.93 | 451.00 | 190.36 | 231.64 | 178.21 | 0.00 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| | | | | | | | | | | | |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
| S | 0.00 | 0.00 | 0.00 | 0.00 | -0.00 | 0.00 | 0.00 | | -0.00 | | -0.00 |
+--------+---------+---------+---------+---------+---------+---------+---------+-----+-------+-----+-------+
Defining x0, x1, x2
x0*x1*x2 + x0*x1 + x0*x2 + x0 + x1*x2 + x1 + x2 + 1
bitarray('1')
bitarray('110')
3
[10, 22, bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')]
0
1
bitarray('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
[-8628, 1767, 3650, -5510, -73, -3795, -929, 7069, 1690, 4759]
0
[10, 22, bitarray('0000000000000000000000100000000000000000000001010000000000000000000010101000000000000000000001010100000000000000000000100100000000000000000000101000100000000000000000010001000000000000000000100011000000000000000001000011'), bitarray('1110000000000000000000100111000000000000000001010011100000000000000010101001100000000000000001010101111100000000000000100100001100000000000000101000101000000000000000010001011000000000000000100011010000000000000001000011')]
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| PHI | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | SD |
+=======+=====+=====+=====+=====+=====+=====+=====+=====+=====+======+======+======+======+======+======+======+======+======+======+======+======+======+=======+
| 23 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8628 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 24 | -1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1767 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 25 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3650 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 26 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -5510 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 27 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | -73 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | -3795 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | 0 | 0 | -1 | 0 | 1 | 0 | 0 | 0 | -929 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | -1 | 0 | 1 | 1 | 0 | 7069 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | -1 | -1 | 0 | 1 | 1690 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| 32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | -1 | -1 | 4759 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
| cost | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
+-------+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+-------+
Simplex method complete after 21 Xchange operations
[10, 22, bitarray('0000000000000000000000000000010000000000000000011000001100000000000100000000000000000000000010000011100010000000000000000000000010000000001001000010100000000000010000010101110000000000000000000000111110010011000111000000'), bitarray('0000000100000100011000000000110100000010000011011000001100000000000101100000100000000000111010000011100010000000001100000110000010000000001101000010100110000000010000010101110111100100110001110000111110010011000111000000')]
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| PHI | 23 | 24 | 25 | 4 | 5 | 26 | 12 | 17 | 27 | 28 | 6 | 3 | 7 | 29 | 30 | 31 | 9 | 13 | 11 | 20 | 21 | 22 | SD |
+=======+======+======+======+=====+=====+======+======+======+======+======+=====+=====+=====+======+======+======+=====+======+======+======+======+======+=======+
| 19 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 929 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 18 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | -1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3795 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 2 | 1 | 1 | 0 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6861 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 1 | 0 | -1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1767 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 8 | 1 | 1 | 1 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | -1 | -1 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | 3211 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 10 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 5510 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 14 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 1 | 0 | -1 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | 0 | 1 | 1 | 0 | 3274 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | -1 | 0 | -1 | 0 | -1 | -1 | -1 | 0 | 1 | 761 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 16 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | -1 | -1 | 4759 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| 32 | -1 | -1 | -1 | 0 | 0 | -1 | 0 | 0 | -1 | -1 | 0 | 0 | 0 | -1 | -1 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
| cost | 3 | 2 | 2 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 30867 |
+-------+------+------+------+-----+-----+------+------+------+------+------+-----+-----+-----+------+------+------+-----+------+------+------+------+------+-------+
Shipping vector =
[1767.0, 6861.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3211.0, 0.0, 5510.0, 0.0, 0.0, 0.0, 3274.0, 761.0, 4759.0, 0.0, 3795.0, 929.0, 0.0, 0.0, 0.0]
+----+------+------+------+------+------+------+------+------+------+------+
| | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
+====+======+======+======+======+======+======+======+======+======+======+
| 23 | 0 | 1767 | 6861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 25 | 0 | 0 | 0 | 0 | 3211 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 26 | 0 | 0 | 0 | 0 | 5510 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 27 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3274 | 761 | 4759 |
+----+------+------+------+------+------+------+------+------+------+------+
| 28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3795 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 929 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
| 32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+----+------+------+------+------+------+------+------+------+------+------+
Receive minus Send vector
[8628.0, -1767.0, -3650.0, 5510.0, 73.0, 3795.0, 929.0, -7069.0, -1690.0, -4759.0]
0.000000000000000