Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Combinatorics

Tutorials

  • Combinatorics

Guides

  • Combinatorics
  • Functions I understand in combinatorics

Tech Notes

  • Combinatorics
  • Stirling permutation

Symbols

  • CanonicalMultiset
  • CentralBinomialCoefficient
  • ConjugatePartition
  • DescendingSublists
  • DivisorHasseDiagram
  • DominatingIntegerPartitionQ
  • DurfeeSquare
  • EnumerateMultisetPartialDerangements
  • EulerianCatalanNumber
  • EulerianNumber
  • EulerianNumberOfTheSecondKind
  • FerrersDiagram
  • Fibbinary
  • FibonacciEncode
  • FindAscentElements
  • FindAscentPositions
  • FindDescentElements
  • FindDescentPositions
  • FrobeniusSymbolFromPartition
  • FromInversionVector
  • FromPartitionPlusNotation
  • FromPartitionSuperscriptNotation
  • GaussFactorial
  • GrayCode
  • HasseDiagram
  • HookLengths
  • HuffmanCodeWords
  • HuffmanDecode
  • HuffmanEncode
  • IntegerPartitionQ
  • InverseFibonacci
  • InverseGrayCode
  • InversionCount
  • InversionVectorQ
  • LehmerCodeFromPermutation
  • LucasNumberU1
  • LucasNumberV2
  • ModifiedCentralBinomialCoefficient
  • Multichoose
  • MultisetAssociation
  • MultisetPartialDerangements
  • NarayanaNumber
  • NextPermutation
  • NumberOfTableaux
  • OrderedTupleFromIndex
  • OrderedTupleIndex
  • OrderlessCombinations
  • OrderlessCombinationsOfUnmarkedElements
  • PartialOrderGraphQ
  • PartitionCrank
  • PartitionFromFrobeniusSymbol
  • PartitionPlusNotation
  • PartitionRank
  • PartitionSuperscriptNotation
  • PermutationCountByInversions
  • PermutationFromIndex
  • PermutationGraph
  • PermutationIndex
  • PermutationMajorIndex
  • PermutationToTableaux
  • Phitorial
  • PosetQ
  • PosetToTableau
  • Primorial
  • QExponential
  • QMultinomial
  • RandomYoungTableau
  • RationalNumberRepeatingDecimalPeriod
  • ReflexiveGraphQ
  • SecantNumber
  • SelectPermutations
  • SelectSubsets
  • SelectTuples
  • SelfConjugatePartitionQ
  • SignedLahNumber
  • StandardYoungTableaux
  • StirlingPermutationGraph
  • StirlingPermutations
  • StrictIntegerPartitions
  • SubsetFromIndex
  • SubsetIndex
  • TableauQ
  • TableauToPoset
  • TableauxToPermutation
  • TangentNumber
  • ToInversionVector
  • TransitiveGraphQ
  • TransposeTableau
  • TupleFromIndex
  • TupleIndex
  • UnsignedLahNumber
  • YoungDiagram
  • ZeckendorfRepresentation
PeterBurbery`Combinatorics`
MultisetStrictAscents
​
MultisetStrictAscents
[perm]
finds the ascents of the
permutation
of a multiset
perm
​
Examples  
(1)
Basic Examples  
(1)
PermutationAscents does not work with multisets.
In[1]:=
PermutationAscents
[{1,1,2,2,3,3}]
Out[1]=
PermutationAscents[{1,1,2,2,3,3}]
You have to use this function.
In[2]:=
MultisetStrictAscents
[{1,1,2,2,3,3}]
Out[2]=
{{2},{4}}
In[3]:=
Extract{1,1,2,2,3,3},
MultisetStrictAscents
[{1,1,2,2,3,3}]
Out[3]=
{1,2}
In[4]:=
Partition[{1,1,2,2,3,3},2,1]
Out[4]=
{{1,1},{1,2},{2,2},{2,3},{3,3}}
Here are the ascents.
In[5]:=
ExtractPartition[{1,1,2,2,3,3},2,1],
MultisetStrictAscents
[{1,1,2,2,3,3}]
Out[5]=
{{1,2},{2,3}}
Make a plot.
In[6]:=
ListPlot[{1,1,2,2,3,3}]
Out[6]=
In[7]:=
ListLinePlot[{1,1,2,2,3,3}]
Out[7]=
This is useful for finding the ascents of a Stirling permutation.
In[8]:=
StirlingPermutations
[3]
Out[8]=
{{3,3,2,2,1,1},{2,3,3,2,1,1},{2,2,3,3,1,1},{2,2,1,3,3,1},{2,2,1,1,3,3},{3,3,1,2,2,1},{1,3,3,2,2,1},{1,2,3,3,2,1},{1,2,2,3,3,1},{1,2,2,1,3,3},{3,3,1,1,2,2},{1,3,3,1,2,2},{1,1,3,3,2,2},{1,1,2,3,3,2},{1,1,2,2,3,3}}
In[9]:=
FromDigits/@
StirlingPermutations
[3]
Out[9]=
{332211,233211,223311,221331,221133,331221,133221,123321,122331,122133,331122,133122,113322,112332,112233}
In[10]:=
SelectLength
MultisetStrictAscents
[#]1&
StirlingPermutations
[3]
Out[10]=
{{2,3,3,2,1,1},{2,2,3,3,1,1},{2,2,1,3,3,1},{2,2,1,1,3,3},{3,3,1,2,2,1},{1,3,3,2,2,1},{3,3,1,1,2,2},{1,1,3,3,2,2}}
In[11]:=
FromDigits/@SelectLength
MultisetStrictAscents
[#]1&
StirlingPermutations
[3]
Out[11]=
{233211,223311,221331,221133,331221,133221,331122,113322}
In[12]:=
LengthFromDigits/@SelectLength
MultisetStrictAscents
[#]1&
StirlingPermutations
[3]
Out[12]=
8
This the EulerianNumberOfTheSecondKind with 3 and 1.
In[13]:=
EulerianNumberOfTheSecondKind
[3,1]
Out[13]=
8
We write this as

3
1
8
.
In[14]:=

3
1
8;
SeeAlso
PermutationAscents
 
▪
EulerianNumberOfTheSecondKind
 
▪
StirlingPermutations
RelatedGuides
▪
Combinatorics
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com