

A006245


Number of primitive sorting networks on n elements; also number of rhombic tilings of a 2ngon.
(Formerly M1894)


23



1, 1, 2, 8, 62, 908, 24698, 1232944, 112018190, 18410581880, 5449192389984, 2894710651370536, 2752596959306389652, 4675651520558571537540, 14163808995580022218786390, 76413073725772593230461936736
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Also the number of commutation classes of reduced words for the longest element of a Weyl group of type A_{n1} (see Armstrong reference).
Also the number of signotopes of rank 3, i.e., mappings X:{{1..n} choose 3}>{+,} such that for any four indices a < b < c < d, the sequence X(a,b,c), X(a,b,d), X(a,c,d), X(b,c,d) changes its sign at most once (see FelsnerWeil and BalkoFulekKynčl reference).  Manfred Scheucher, Oct 20 2019
There is a relation to nondegenerate oriented matroids of rank 3 on n elements (see FolkmanLawrence reference).  Manfred Scheucher, Feb 09 2022, based on comment by Matthew J. Samuel, Jan 19 2013
Also the number of tilings of the 2dimensional zonotope constructed from D vectors. The zonotope Z(D,d) is the projection of the Ddimensional hypercube onto the ddimensional space and the tiles are the projections of the ddimensional faces of the hypercube. Here d=2 and D varies.
Also the number of simple arrangements of n pseudolines in the Euclidean plane.  Manfred Scheucher, Jun 22 2023


REFERENCES

Shinichi Minato, Counting by ZDD, Encyclopedia of Algorithms, 2014, pp. 16.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

J. Folkman and J. Lawrence, Oriented matroids, Journal of Combinatorial Theory, Series B 25 (1978), no. 2, 199236.
Katsuhisa Yamanaka, Takashi Horiyama, Takeaki Uno and Kunihiro Wasa, LadderLottery Realization, 30th Canadian Conference on Computational Geometry (CCCG 2018) Winnipeg.


FORMULA

Felsner and Valtr show that 0.1887 <= log_2(a(n))/n^2 <= 0.6571 for sufficiently large n.  Jeremy Tan, Nov 20 2017
Dumitrescu and Mandal improved the lower bound to 0.2083 <= log_2(a(n))/n^2 for sufficiently large n.  Manfred Scheucher, Sep 13 2021


EXAMPLE

This is a wiring diagram, one sample of the 62 objects that are counted for n=5:
1111 44 55
X X
2 33 4 1 5 44
X X X
3 2 4 3 5 1 33
X X X
44 2 5 33 1 2
X X
555 2222 1
Each X denotes a comparator that exchanges the two incoming strands from the left. The whole network has n*(n1)/2 such comparators and exchanges the order 12345 at the left edge into the reverse order 54321 at the right edge. It is also a pseudoline arrangement consisting of n xmonotone curves (from left to right), which pairwise cross exactly once.


MAPLE

# classes: Wrapper for computing number of commutation classes;
# pass a permutation as a list
# Returns number of commutation classes of reduced words
# Longest element is of the form [n, n1, ..., 1] (see Comments)
classes:=proc(perm) option remember:
RETURN(classesRecurse(Array(perm), 0, 1)):
end:
#classesRecurse: Recursive procedure for computing number of commutation classes
classesRecurse:=proc(perm, spot, negs) local swaps, i, sums, c, doneany:
sums:=0:
doneany:=0:
for i from spot to ArrayNumElems(perm)2 do
if perm[i+1]>perm[i+2] then
swaps:=perm[i+1]:
perm[i+1]:=perm[i+2]:
perm[i+2]:=swaps:
c:=classes(convert(perm, `list`)):
sums:=sums+negs*c+classesRecurse(perm, i+2, negs):
swaps:=perm[i+1]:
perm[i+1]:=perm[i+2]:
perm[i+2]:=swaps:
doneany:=1:
end:
end:
if spot=0 and doneany=0 then RETURN(1):
else RETURN(sums):
end:
end:
seq(classes([seq(n+1i, i = 1 .. n)]), n = 1 .. 9)


MATHEMATICA

classes[perm_List] := classes[perm] = classesRecurse[perm, 0, 1];
classesRecurse[perm_List, spot_, negs_] := Module[{swaps, i, Sums, c, doneany, prm = perm}, Sums = 0; doneany = 0; For[i = spot, i <= Length[prm]2, i++, If[prm[[i+1]] > prm[[i+2]], swaps = prm[[i+1]]; prm[[i+1]] = prm[[i+2]]; prm[[i+2]] = swaps; c = classes[prm]; Sums = Sums + negs*c + classesRecurse[prm, i+2, negs]; swaps = prm[[i+1]]; prm[[i+1]] = prm[[i+2]]; prm[[i+2]] = swaps; doneany = 1]]; If[spot == 0 && doneany == 0, Return[1], Return[Sums]]];
a[n_] := a[n] = classes[Range[n] // Reverse];
Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 9}] (* JeanFrançois Alcover, May 09 2017, translated from Maple *)


CROSSREFS



KEYWORD

nonn,nice,more


AUTHOR



EXTENSIONS

More terms from Sebastien Veigneau (sv(AT)univmlv.fr), Jan 15 1997
a(10) confirmed by Katsuhisa Yamanaka(yamanaka(AT)hol.is.uec.ac.jp), May 06 2009. This value was also confirmed by Takashi Horiyama of Saitama Univ.
a(11) from Katsuhisa Yamanaka(yamanaka(AT)hol.is.uec.ac.jp), May 06 2009
Reference with formula that the Maple program implements added and a(11) verified by Matthew J. Samuel, Jan 25 2011
Removed invalid comment concerning the denominators of the indicated polynomials; added a(12).  Matthew J. Samuel, Jan 30 2011


STATUS

approved



