alg_deg
produces a table for the algebraic degree of semidefinite
programmin (see the accompanying vignette for reference to literature).
alg_deg(n)
n | size of matrix |
---|
The output of alg_deg
is a table of the algebraic degrees
for the given value of n
. To avoid loss of precision,
the algebraic degrees are given as strings. See the below example for
a simple conversion to numeric, including the problems associated with
that step.
Only some precomputed values of n
are available. See the literature
referenced in the accompanying vignette for general (combinatorial) formulas
for the algebraic degree.
Package: symconivol
AD_str <- alg_deg(6) # convert to integer matrix AD <- matrix( as.numeric(AD_str), dim(AD_str) ) colnames(AD) <- colnames(AD_str) rownames(AD) <- rownames(AD_str) # compare both matrices print(AD_str)#> r=1 r=2 r=3 r=4 r=5 #> m=1 "0" "0" "0" "0" "6" #> m=2 "0" "0" "0" "0" "30" #> m=3 "0" "0" "0" "35" "80" #> m=4 "0" "0" "0" "210" "120" #> m=5 "0" "0" "0" "672" "96" #> m=6 "0" "0" "112" "1400" "32" #> m=7 "0" "0" "672" "2040" "0" #> m=8 "0" "0" "1992" "2100" "0" #> m=9 "0" "0" "3812" "1470" "0" #> m=10 "0" "126" "5184" "630" "0" #> m=11 "0" "630" "5184" "126" "0" #> m=12 "0" "1470" "3812" "0" "0" #> m=13 "0" "2100" "1992" "0" "0" #> m=14 "0" "2040" "672" "0" "0" #> m=15 "32" "1400" "112" "0" "0" #> m=16 "96" "672" "0" "0" "0" #> m=17 "120" "210" "0" "0" "0" #> m=18 "80" "35" "0" "0" "0" #> m=19 "30" "0" "0" "0" "0" #> m=20 "6" "0" "0" "0" "0"print(AD)#> r=1 r=2 r=3 r=4 r=5 #> m=1 0 0 0 0 6 #> m=2 0 0 0 0 30 #> m=3 0 0 0 35 80 #> m=4 0 0 0 210 120 #> m=5 0 0 0 672 96 #> m=6 0 0 112 1400 32 #> m=7 0 0 672 2040 0 #> m=8 0 0 1992 2100 0 #> m=9 0 0 3812 1470 0 #> m=10 0 126 5184 630 0 #> m=11 0 630 5184 126 0 #> m=12 0 1470 3812 0 0 #> m=13 0 2100 1992 0 0 #> m=14 0 2040 672 0 0 #> m=15 32 1400 112 0 0 #> m=16 96 672 0 0 0 #> m=17 120 210 0 0 0 #> m=18 80 35 0 0 0 #> m=19 30 0 0 0 0 #> m=20 6 0 0 0 0# doing the same for larger n AD_str <- alg_deg(14) AD <- matrix( as.numeric(AD_str), dim(AD_str) ) # the conversion introduces rounding errors i <- which.max(AD_str) print(AD_str[i])#> [1] "233209506961054585248"print(AD[i],digits=20)#> [1] 233209506961054597120