%display latex
load("../specifier.py")
We consider the class $\mathcal T = \mathrm{Av}(2413,3142, 2143,34512)$. It contains no simple permutation, and the non-simple avoided patterns are $2143$ and $34512$.
S = Specification([],[[3,4,5,1,2],[2,1,4,3]])
S
S.solve()
We can check that critical families are those with the same denominator as $\mathcal T_0$, that is $\mathcal T_0,\mathcal T_3,\mathcal T_7,\mathcal T_8,\mathcal T_{12},\mathcal T_{13}$, that removing $\mathcal T_0$ yields a strongly connected critical component, and that we are in the essentially linear case. We see below that the denominator of $T_0$ has two real roots, $1$ and $\rho<1$. Then $\rho$ is the radius of convergence of our class. We store it (seen by sage as an element of the algebraic field) along with its minimal polynomial.
S.solve()[0].denominator().factor()
poly = z^3-z^2+4*z-1
[x.n() for x in poly.roots(multiplicities=False)]
rho_alg = AA(poly.roots(multiplicities=False)[2])
rho_alg.n()
We may now perform a Boltzmann sampling close to the radius of convergence.
C = S.sampler(0.260)
perm = C.run(10)
list_plot(perm)
It seems that the limit is a X-permuton. Indeed we are in the essentially linear case. To compute the parameters of the limiting permuton of the classes $\mathcal T_3,\mathcal T_7,\mathcal T_8,\mathcal T_{12},\mathcal T_{13}$, we retrieve from the specification the matrices $\mathbb M^\star, \mathbb D^{\mathrm{left},+},\mathbb D^{\mathrm{right},+},\mathbb D^{\mathrm{left},-},\mathbb D^{\mathrm{right},-}$ that appear in the analysis of the limit shape.
M,Dlp,Drp,Dlm,Drm = S.linear_analysis([3,4,7,8,12,13])
M,Dlp,Drp,Dlm,Drm
We need to compute the value of those matrices at $z=\rho$. To that end, we will work in the number field $\mathbb Q(\rho)$.
K.<rho> = NumberField(poly,embedding = rho_alg)
Mrho = apply_symbolic_matrix(M,QQ,z,rho)
Dlprho = apply_symbolic_matrix(Dlp,QQ,z,rho)
Drprho = apply_symbolic_matrix(Drp,QQ,z,rho)
Dlmrho = apply_symbolic_matrix(Dlm,QQ,z,rho)
Drmrho = apply_symbolic_matrix(Drm,QQ,z,rho)
Mrho,Dlprho,Drprho,Dlmrho,Drmrho
The CAS has simplified the expression of $\mathbb M^\star, \mathbb D^{\mathrm{left},+},\mathbb D^{\mathrm{right},+},\mathbb D^{\mathrm{left},-},\mathbb D^{\mathrm{right},-}$ thanks to the knoweldge of the minimal polynomial of $\rho$.
Let us now compute the left and right eigenvectors of $\mathbb M^\star(\rho)$.
index_one = Mrho.eigenvalues().index(1)
u = Matrix(Mrho.left_eigenvectors()[index_one][1][0])
v = transpose(Matrix(Mrho.right_eigenvectors()[index_one][1][0]))
We are now able to compute the vector $\mathbf p$.
nlp,nrp,nlm,nrm = (u*Dlprho*v)[0,0],(u*Drprho*v)[0,0],(u*Dlmrho*v)[0,0],(u*Drmrho*v)[0,0]
norm = nlp+nrp+nlm+nrm
plp,prp,plm,prm=nlp/norm,nrp/norm,nlm/norm,nrm/norm
The vector $\mathbf p$ is expressed in terms of $\rho$, we can then compute numerical approximations, minimal polynomials and radical expressions for those numbers.
(597*plp,597*prp,597*plm,597*prm)
(plp.n(),prp.n(),plm.n(),prm.n())
AA(plp).minpoly()*199, AA(prp).minpoly()*199, AA(plm).minpoly()*597, AA(prm).minpoly()*597
AA(plp).radical_expression(), AA(prp).radical_expression(), -(5879/290142- 4879/6415362*sqrt(597))^(1/3) - 2*649/32238/(5879/290142-4879/6415362*sqrt(597))^(1/3) + 8/9, AA(prm).radical_expression()
For plm the radical expression given by sage was a bit funky so we simplified it by hand. Let us check we did not do any mistake.
AA(-(5879/290142- 4879/6415362*sqrt(597))^(1/3) - 2*649/32238/(5879/290142-4879/6415362*sqrt(597))^(1/3) + 8/9) == AA(plm)
We plot the shape of the limiting permuton.
show(plot_X_permuton(plp,plm,prp,prm),aspect_ratio=1, axes = False)