OFFSET
2,3
COMMENTS
C(n) = A000108(n) is the Catalan number binomial(2n, n)/(n+1). P_n is the Catalan poset, which is the poset product of a 2-chain and an n-chain. The number of linear extensions of P_n is the Catalan number C(n). d(n) is Min_{x,y in P_n} |p_n(x<y) - p_n(x>y)|, where p_n(x<y) is the probability that x is less than y in the uniform random linear extension of P_n. It has been proved that a(n)/C(n) = O(n^{-5/4}), see the references: Chan, Pak, and Panova. In particular, we have a(n) < C(n).
LINKS
Swee Hong Chan, Table of n, a(n) for n = 2..1000
S. H. Chan, I. Pak, and G. Panova, Sorting probability of Catalan posets, preprint arXiv:2005.13686 [math.CO] (2020), 10 pp.
PROG
(Sage)
def a(n):
lsp=[];
minloc=[];
for y in range (1, n+1):
sum=0;
for z in range (0, y+1):
K=(binomial(2*y-z-1, y-1)*binomial(2*n-2*y+z, n-y+z)*(z)*(z+1)*(n+1))/(binomial(2*n, n)*(y)*(n-y+z+1));
sum=sum+K;
if 2*sum >= 1:
h=sum-K;
a_1=1-2*h;
a_2=2*sum-1;
if a_1< a_2:
minloc.append(x-1);
lsp.append((a_1)*(binomial(2*n, n)/(n+1)));
else:
minloc.append(x);
lsp.append((a_2)*(binomial(2*n, n))/(n+1));
break;
return min(lsp)
CROSSREFS
KEYWORD
nonn
AUTHOR
Swee Hong Chan, May 26 2020
STATUS
approved