We find generating functions the number of strings (words) containing a specified number of occurrences of certain types of order-isomorphic classes of substrings called subword patterns. In particular, we find generating functions for the number of strings containing a specified number of occurrences of a given 3-letter subword pattern.
We consider sigma-words, which are words used by Evdokimov in the construction of the sigma-sequence. We then find the number of occurrences of certain patterns and subwords in these words.
The Pascal matrix, $P$, is an upper diagonal matrix whose entries are the binomial coefficients. In 1993 Call and Velleman demonstrated that it satisfies the beautiful relation $P=\exp(H)$ in which $H$ has the numbers 1, 2, 3, etc. on its superdiagonal and zeros elsewhere. We generalize this identity to the incidence algebras $I(A^*)$ and $I(\mathcal{S})$ of functions on words and permutations, respectively. In $I(A^*)$ the entries of $P$ and $H$ count subwords; in $I(\mathcal{S})$ they count permutation patterns. Inspired by vincular permutation patterns we define what it means for a subword …
The word inference problem is to determine languages such that the information on the number of occurrences of those subwords in the language can uniquely identify a word. A considerable amount of work has been done on this problem, but the same cannot be said for circular words despite growing interests on the latter due to their applications -- for example, in splicing systems. Meanwhile, Parikh matrices are useful tools and well established in the study of subword occurrences. In this work, we propose two ways of counting subword occurrences in circular words. We then extend the idea of Par…
An avoidance pattern where the letters within an occurrence of which are required to be adjacent is referred to as a subword. In this paper, we enumerate members of the set NC_n of non-crossing partitions of length n according to the number of occurrences of several infinite families of subword patterns each containing repeated letters. As a consequence of our results, we obtain explicit generating function formulas counting the members of NC_n for n >= 0 according to all subword patterns of length three containing a repeated letter. Further, simple expressions are deduced for the total number…
In this paper, we consider the number of occurrences of descents, ascents, 123-subwords, 321-subwords, peaks and valleys in flattened permutations, which were recently introduced by Callan in his study of finite set partitions. For descents and ascents, we make use of the kernel method and obtain an explicit formula (in terms of Eulerian polynomials) for the distribution on $\mathcal{S}_n$ in the flattened sense. For the other four patterns in question, we develop a unified approach to obtain explicit formulas for the comparable distributions. We find that the formulas so obtained for 123- and…
We count the number of distinct (scattered) subwords occurring in the base-b expansion of the non-negative integers. More precisely, we consider the sequence $(S_b(n))_{n\ge 0}$ counting the number of positive entries on each row of a generalization of the Pascal triangle to binomial coefficients of base-$b$ expansions. By using a convenient tree structure, we provide recurrence relations for $(S_b(n))_{n\ge 0}$ leading to the $b$-regularity of the latter sequence. Then we deduce the asymptotics of the summatory function of the sequence $(S_b(n))_{n\ge 0}$.
We generalize the combinatorial approaches of Rapaport and Higgins--Lyndon to the Whitehead algorithm. We show that for every automorphism $φ$ of a free group $F$ and every word $u\in F$ there exists a finite multiset of words $S_{u,φ}$ satisfying the following property: For every cyclic word $w$, the number of times $u$ appears as a subword of $φ\left(w\right)$ depends only on the appearances of words in $S_{u,φ}$ as subwords of $w$. We use this fact to construct a faithful representation of $\text{Out}\left(F_{n}\right)$ on an inverse limit of $\mathbb{Z}$-modules, so that each automorphism …
A 3-dimensional Catalan word is a word on three letters so that the subword on any two letters is a Dyck path. For a given Dyck path $D$, a recently defined statistic counts the number of Catalan words with the property that any subword on two letters is exactly $D$. In this paper, we enumerate Dyck paths with this statistic equal to certain values, including all primes. The formulas obtained are in terms of Motzkin numbers and Motzkin ballot numbers.
We study word reconstruction problems. Improving a previous result by P. Fleischmann, M. Lejeune, F. Manea, D. Nowotka and M. Rigo, we prove that, for any unknown word $w$ of length $n$ over an alphabet of cardinality $k$, $w$ can be reconstructed from the number of occurrences as subwords (or scattered factors) of $O(k^2\sqrt{n\log_2(n)})$ words. Two previous upper bounds obtained by S. S. Skiena and G. Sundaram are also slightly improved: one when considering information on the existence of subwords instead of on the numbers of their occurrences, and, the other when considering information o…
A double occurrence word $w$ over a finite alphabet $Σ$ is a word in which each alphabet letter appears exactly twice. Such words arise naturally in the study of topology, graph theory, and combinatorics. Recently, double occurrence words have been used for studying DNA recombination events. We develop formulas for counting and enumerating several elementary classes of double occurrence words such as palindromic, irreducible, and strongly-irreducible words.
We introduce Peano words, which are words corresponding to finite approximations of the Peano space filling curve. We then find the number of occurrences of certain patterns in these words.
We study the generating function for the number of involutions on $n$ letters containing exactly $r\gs0$ occurrences of 3412. It is shown that finding this function for a given $r$ amounts to a routine check of all involutions on $2r+1$ letters.
We study the generating function for the number of even (or odd) permutations on n letters containing exactly $r\gs0$ occurrences of 132. It is shown that finding this function for a given r amounts to a routine check of all permutations in $S_{2r}$.
In this document we achieve exact and asymptotic enumeration of words, compositions over a finite group, and/or integer compositions characterized by local restrictions and, separately, subsequence pattern avoidance. We also count cyclically restricted and circular objects. This either fills gaps in the current literature by e.g. considering particular new patterns, or involves general progress, notably with locally restricted compositions over a finite group. We associate these compositions to walks on a covering graph whose structure is exploited to simplify asymptotic expressions. Specifica…
We count the number of occurrences of certain patterns in given words. We choose these words to be the set of all finite approximations of a sequence generated by a morphism with certain restrictions. The patterns in our considerations are either classical patterns 1-2, 2-1, 1-1-...-1, or arbitrary generalized patterns without internal dashes, in which repetitions of letters are allowed. In particular, we find the number of occurrences of the patterns 1-2, 2-1, 12, 21, 123 and 1-1-...-1 in the words obtained by iterations of the morphism 1->123, 2->13, 3->2, which is a classical example of a m…
We introduce a notion of pattern occurrence that generalizes both classical permutation patterns as well as poset containment. Many questions about pattern statistics and avoidance generalize naturally to this setting, and we focus on functional complexity problems -- particularly those that arise by constraining the order dimensions of the pattern and text posets. We show that counting the number of induced, injective occurrences among dimension 2 posets is #P-hard; enumerating the linear extensions that occur in realizers of dimension 2 posets can be done in polynomial time, while for uncons…
Recently, Kitaev and Remmel [Classifying descents according to parity, Annals of Combinatorics, to appear 2007] refined the well-known permutation statistic ``descent'' by fixing parity of one of the descent's numbers. Results in that paper were extended and generalized in several ways. In this paper, we shall fix a set partition of the natural numbers $N$, $(N_1, ..., N_t)$, and we study the distribution of descents, levels, and rises according to whether the first letter of the descent, rise, or level lies in $N_i$ over the set of words over the alphabet $[k]$. In particular, we refine and g…
The Goulden-Jackson cluster method is a powerful tool for obtaining generating functions for counting words in a free monoid by occurrences of a set of subwords. We introduce a generalization of the cluster method for monoid networks, which generalize the combinatorial framework of free monoids. As a sample application of the generalized cluster method, we compute bivariate and multivariate generating functions counting Motzkin paths---both with height bounded and unbounded---by statistics corresponding to the number of occurrences of various subwords, yielding both closed-form and continued f…
Babson and Steingr\'ımsson introduced generalized permutation patterns that allow the requirement that two adjacent letters in a pattern must be adjacent in the permutation. Claesson presented a complete solution for the number of permutations avoiding any single pattern of type $(1,2)$ or $(2,1)$. For eight of these twelve patterns the answer is given by the Bell numbers. For the remaining four the answer is given by the Catalan numbers. With respect to being equidistributed there are three different classes of patterns of type $(1,2)$ or $(2,1)$. We present a recursion for the number of perm…
We apply ideas from the cluster method to q-count the permutations of a multiset according to the number of occurrences of certain generalized patterns, as defined by Babson and Steingrimsson. In particular, we consider those patterns with three letters and one internal dash, as well as permutation statistics composed of counting the number of occurrences of multisets of such patterns. Counting is done via recurrences which simplify in the case of permutations. A collection of Maple procedures implementing these recurrences accompanies the article.
The Goulden-Jackson cluster method is a powerful tool for counting words by occurrences of prescribed subwords, and was adapted by Elizalde and Noy for counting permutations by occurrences of prescribed consecutive patterns. In this paper, we lift the cluster method for permutations to the Malvenuto-Reutenauer algebra. Upon applying standard homomorphisms, our result specializes to both the cluster method for permutations as well as a q-analogue which keeps track of the inversion number statistic. We construct additional homomorphisms using the theory of shuffle-compatibility, leading to furth…
We prove that the generating function for the number of flattened permutations having a given number of occurrences of the pattern 13-2 is rational, by using the recurrence relations and the kernel method.
For a given language $L$, we study the languages $X$ such that for all distinct words $u, v \in L$, there exists a word $x \in X$ that appears a different number of times as a factor in $u$ and in $v$. In particular, we are interested in the following question: For which languages $L$ does there exist a finite language $X$ satisfying the above condition? We answer this question for all regular languages and for all sets of factors of infinite words.
This paper is about counting the number of distinct (scattered) subwords occurring in a given word. More precisely, we consider the generalization of the Pascal triangle to binomial coefficients of words and the sequence $(S(n))_{n\ge 0}$ counting the number of positive entries on each row. By introducing a convenient tree structure, we provide a recurrence relation for $(S(n))_{n\ge 0}$. This leads to a connection with the $2$-regular Stern-Brocot sequence and the sequence of denominators occurring in the Farey tree. Then we extend our construction to the Zeckendorf numeration system based on…
In their study of cyclic pattern containment, Domagalski et al. conjecture differential equations for the generating functions of circular permutations avoiding consecutive patterns of length 3. In this note, we prove and significantly generalize these conjectures. We show that, for every consecutive pattern $σ$ beginning with 1, the bivariate generating function counting occurrences of $σ$ in circular permutations can be obtained from the generating function counting occurrences of $σ$ in (linear) permutations. This includes all the patterns for which the latter generating function is known.
Two finite words $u,v$ are 2-binomially equivalent if, for all words $x$ of length at most 2, the number of occurrences of $x$ as a (scattered) subword of $u$ is equal to the number of occurrences of $x$ in $v$. This notion is a refinement of the usual abelian equivalence. A 2-binomial square is a word $uv$ where $u$ and $v$ are 2-binomially equivalent. In this paper, considering pure morphic words, we prove that 2-binomial squares (resp. cubes) are avoidable over a 3-letter (resp. 2-letter) alphabet. The sizes of the alphabets are optimal.
Given a set $Π$ of permutation patterns of length at most $k$, we present an algorithm for building $S_{\le n}(Π)$, the set of permutations of length at most $n$ avoiding the patterns in $Π$, in time $O(|S_{\le n - 1}(Π)| \cdot k + |S_{n}(Π)|)$. Additionally, we present an $O(n!k)$-time algorithm for counting the number of copies of patterns from $Π$ in each permutation in $S_n$. Surprisingly, when $|Π| = 1$, this runtime can be improved to $O(n!)$, spending only constant time per permutation. Whereas the previous best algorithms, based on generate-and-check, take exponential time per permutat…
The notion of a word-representable graph has been studied in a series of papers in the literature. A graph $G=(V,E)$ is word-representable if there exists a word $w$ over the alphabet $V$ such that letters $x$ and $y$ alternate in $w$ if and only if $xy$ is an edge in $E$. If $V =\{1, \ldots, n\}$, this is equivalent to saying that $G$ is word-representable if for all $x,y \in \{1, \ldots, n\}$, $xy \in E$ if and only if the subword $w_{\{x,y\}}$ of $w$ consisting of all occurrences of $x$ or $y$ in $w$ has no consecutive occurrence of the pattern 11. In this paper, we introduce the study of $…
A redundant generating function is a generating function having terms which are not part of the solution of the original problem. We use redundant generating functions to study two path problems. In the first application we explain a surprising occurrence of Catalan numbers in counting paths that stay below the line y = 2x. In the second application we prove a conjecture of Niederhausen and Sullivan.
A perfect matching M in an edge-colored complete bipartite graph K_{n,n} is rainbow if no pair of edges in M have the same color. We obtain asymptotic enumeration results for the number of rainbow matchings in terms of the maximum number of occurrences of a color. We also consider two natural models of random edge-colored K_{n,n} and show that, if the number of colors is at least n, then there is with high probability a random matching. This in particular shows that almost every square matrix of order n in which every entry appears at most n times has a Latin transversal.
We introduce a formal definition of a pattern poset which encompasses several previously studied posets in the literature. Using this definition we present some general results on the Möbius function and topology of such pattern posets. We prove our results using a poset fibration based on the embeddings of the poset, where embeddings are representations of occurrences. We show that the Möbius function of these posets is intrinsically linked to the number of embeddings, and in particular to so called normal embeddings. We present results on when topological properties such as Cohen-Macaulaynes…
In this short note we look at the problem of counting juggling patterns with one ball or two balls with a throw at every occurrence. We will do this for both traditional juggling and for spherical juggling. In the latter case we will show a connection to the "associated Mersenne numbers" (A001350) and so as a result will be able to recover a proof that the $p$th Lucas number is congruent to 1 modulo p when p is a prime.
One of the most challenging problems in enumerative combinatorics is to count Wilf classes, where you are given a pattern, or set of patterns, and you are asked to find a "formula", or at least an efficient algorithm, that inputs a positive integer n and outputs the number of permutations avoiding that pattern. In 1996, John Noonan and Doron Zeilberger initiated the counting of permutations that have a prescribed, r, say, occurrences of a given pattern. They gave an ingenious method to generate Functional Equations, alas, with an unbounded number of "catalytic variables", but then described a …
We consider the problem of counting the occurrences of patterns of the form $xy-z$ within flattened permutations of a given length. Using symmetric functions, we find recurrence relations satisfied by the distributions on $\mathcal{S}_n$ for the patterns 12-3, 21-3, 23-1 and 32-1, and develop a unified approach to obtain explicit formulas. By these recurrences, we are able to determine simple closed form expressions for the number of permutations that, when flattened, avoid one of these patterns as well as expressions for the average number of occurrences. In particular, we find that the avera…
The Ramsey number $R(P_1,P_2,...,P_t;r)$ is a valve value such that as long as the cardinality $n$ of the $n$-set $V_n={1,...,n}$ is no less than $R$,however all the $\binom{n}{r}$ $r$-subsets of $V_n$ are distributed into $t$ boxes, $V_n$ will always have a property $W$ expressed as eq.(1).Thus, by calculating the number of ways of distribution of $r$-subsets that makes $W$ true,one can get an equation for $R(P_1,P_2,...,P_t;r)$.The evaluation of the general term in this eq. and the counting of the frequencies of occurrence of the various values the general term takes can be reduced to the pr…
Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this area is deciding whether a given permutation of length $n$ contains a given pattern of length $k$. In this work we give two new algorithms for this well-studied problem, one whose running time is $n^{k/4 + o(k)}$, and a polynomial-space algorithm whose running time is the better of $O(1.6181^n)$ and $O(n^{k/2 + 1})$. These results improve the earlier best bo…
A sample of n generic points in the xy-plane defines a permutation that relates their ranks along the two axes. Every subset of k points similarly defines a pattern, which occurs in that permutation. The number of occurrences of small patterns in a large permutation arises in many areas, including nonparametric statistics. It is therefore desirable to count them more efficiently than the straightforward ~O(n^k) time algorithm. This work proposes new algorithms for counting patterns. We show that all patterns of order 2 and 3, as well as eight patterns of order 4, can be counted in nearly linea…