Eigenvalue computations

Generator matrix

    using InformationInequalities
    n=3
    G,K,L=find_matrixG(n)
    transpose(G)
7×18 transpose(::Matrix{Int64}) with eltype Int64:
 0   0   0  -1   0   1  -1   0  0   0  -1   0   1   0  0   0   1   0
 0   0   0   1   0  -1   1   0  0  -1   0   0   0   1  0   0   0   1
 0   0  -1   0   0   0   1   1  0   0   1   0  -1   0  0   1   0   0
 0  -1   0   1   1   0   0   0  0   0   1   1   0   0  0   0  -1   0
 0   0   1   0   0   0  -1  -1  0   1   0   0   0  -1  1   0   0   0
 0   1   0  -1  -1   0   0   0  1   1   0   0   0   0  0   0   0  -1
 1   1   1   0   0   0   0   0  0   0  -1  -1   0   0  0  -1   0   0

Note that the generator matrix is $K \times L$

Pictorial view for n=3:

    using InformationInequalities
    using Plots,LinearAlgebra
    n=3
    G,K,L=find_matrixG(n)
    heatmap(transpose(G),xaxis=nothing,yaxis=nothing,legend=nothing,color=:viridis)
    savefig("heatmapH3a.svg"); # hide

Pictorial view for n=4:

    using InformationInequalities
    using Plots,LinearAlgebra
    n=4
    G,K,L=find_matrixG(n)
    #heatmap(transpose(G),aspectratio=1,color=:viridis)
    heatmap(transpose(G),xaxis=nothing,yaxis=nothing,legend=nothing,color=:viridis)
    savefig("heatmapH4a.svg"); # hide

Pictorial view for n=6:

    using InformationInequalities
    using Plots,LinearAlgebra
    n=6
    G,K,L=find_matrixG(n)
    #heatmap(transpose(G),aspectratio=1,color=:viridis)
    heatmap(transpose(G),xaxis=nothing,yaxis=nothing,legend=nothing,color=:viridis)
    savefig("heatmapH6a.svg"); # hide

Pictorial view for n=7:

Singular values of the Entropic Space

The singular values of the generator matrix follows some structure.

using LinearAlgebra;
using InformationInequalities
using Plots
	scatter(svdvals(find_matrixG(2)[1]),label="Γ2")
    scatter!(svdvals(find_matrixG(3)[1]),label="Γ3")
    scatter!(svdvals(find_matrixG(4)[1]),label="Γ4")
    scatter!(svdvals(find_matrixG(5)[1]),label="Γ5")
    ylabel!("λ")

Interesting thing to notice is among the $2^n-n$ singular values of the generator matrix of $\lambda_{n}$, $n$ are inheited from $\lambda_{n-1}$. The new eigenvalue is $n\sqrt{2}$.

using LinearAlgebra;
using InformationInequalities
[n*√2 for n=1:10]
10-element Vector{Float64}:
  1.4142135623730951
  2.8284271247461903
  4.242640687119286
  5.656854249492381
  7.0710678118654755
  8.485281374238571
  9.899494936611665
 11.313708498984761
 12.727922061357857
 14.142135623730951
Note

A fascinating thing here is that, for a given $n$ the number of random variables, the entropy space $\Gamma_{n}$, the singular values of the generating matrix $G$ are such that $n$ of them are distinct from those of $\Gamma_{n-1}$ but the rest (overwhleming majority that) are integer multiples of $\sqrt{2}$.

Eigenvalues

Note

At the moment, ShannonMatrix is not rigorous, that is the computations for the non-interval eigenvalue problem solved internally are carried out using normal non-verified floating point computations. Julia internally has slight difference in floating point precision for some of the singular values when $\sqrt{2}$ and its multiples are evaluated. TBD

To demonstrate the functionality, let us consider the following interval matrix

using InformationInequalities

A = [3 2 1
     2 2 2
     0 1 2]
3×3 Matrix{Int64}:
 3  2  1
 2  2  2
 0  1  2

To get a qualitative evaluation of the enclosure, we can simulate the solution set of $\mathbf{A}$ using Montecarlo, as it is done in the following example

using InformationInequalities
using LinearAlgebra;
using Plots
N = 1000

evalues = zeros(ComplexF64, 4, N)

for i in 1:N
    evalues[:, i] = eigvals(rand(4,4))
end

rpart = real.(evalues)
ipart = imag.(evalues)

plot(; ratio=1, label="closure")
scatter!(rpart[1, :], ipart[1, :]; label="λ₁")
scatter!(rpart[2, :], ipart[2, :]; label="λ₂")
scatter!(rpart[3, :], ipart[3, :]; label="λ₃")
scatter!(rpart[4, :], ipart[4, :]; label="λ₄")
xlabel!("real")
ylabel!("imag")

Internally, the generical interval eigenvalue problem is