Manuscript Offprint
arXiv:2610.17910Jumbled Simon's Equivalence and Embeddings
Abstract
Jumbled scattered factors are a generalisation of scattered factors (or subsequences) where a jumbled scattered factor is obtained from another word by deleting and rearranging letters. For limiting the number of rearrangements, we distinguish -jumbled scattered factors where limits the number of letters that may occur rearranged. For instance, car, start, rat, cat are jumbled scattered factors of abstract even though car, start and cat are no scattered factors and each need one jumble. An example for a jumbled scattered factor with 2 jumbles is tatar. In this work, we investigate two problems on jumbled scattered factors from an algorithmic perspective. First, we give algorithms for testing jumbled Simon's equivalence where two words are equivalent if they share the same -jumbled scattered factors up to length k. Second, we investigate how to count the possible occurrences of a jumbled scattered factor – the jumbled binomial coefficient. After defining the jumbled binomial coefficient, we study jumbled embeddings and factorisations of such as well.
2012 ACM Subject Classification Mathematics of computing → Combinatorics on words; Mathematics of computing → Permutations and combinations; Theory of computation → Formal languages and automata theory
Keywords and phrases scattered factor, jumbled scattered factor, longest common subsequence, permutations
Funding Tore Koß: this research was supported by the University of Liege under Special Funds for Research, IPD-STEMA Programme
1 Introduction
A reoccurring topic in computer science, data science and bioinformatics is the analysis of data. One theoretical model for data are scattered factors (also called subsequences, subwords) which are obtained by deleting some letters in a given string while preserving the order of the remaining letters. Formally, a scattered factor of a word w is another word u of length m such that there exist (possibly empty) words satisfying . For example, cat, care, and sad are scattered factors of scattered, while dare and dart are not. Scattered factors are of ongoing research interest, dating back to the early investigations by Higman [19] and Haines [17] in the 1950s and 1960s. In 1975, Imre Simon continued the research on scattered factors (piecewise subwords) in the context of piecewise-testable languages [38, 39]. Since then, scattered factors attracted widespread attention in many fields such as combinatorics on words [28, 33], algorithms and stringology [3, 4, 7, 12, 32, 40], logics [5, 18, 29, 30], and language and automata theory [1, 21, 22, 38, 39, 42]. Further applications of scattered factors can be found in bioinformatics [9, 41], formal software verification [18, 42] and database theory [2, 14, 26, 27, 35]. The fundamental work of Simon [38] also introduced a congruence relation that is nowadays called Simon's congruence. Two words are Simon k-congruent for a natural number k, if they share the same scattered factors up to length k. Recent developments consider problems of testing and deciding Simon's congruence [10, 15, 25].
Ongoing research on scattered factors motivated the introduction of jumbled scattered factors, a generalisation of scattered factors which considers not only scattered factors but also rearrangements (see e.g. [34, 23] for abelian equivalence of words) of them [11]. A word of length is a jumbled scattered factor of if for some permutation and (possibly empty) words . For example, apart from all scattered factors, dare and dart are jumbled scattered factors of scattered but retreat is not since occurs only once in scattered. Further, they also considered restrictions on the number of jumbles, i.e. is -jumbled in if at most characters are out of order or, in other words, there is a common scattered factor of and of length . In that sense, the word dare is 1-jumbled and dart is 2-jumbled in scattered. In general, there is an inverse relation between the required number of jumbles and the longest common scattered factors. Simon's congruence and universality were also generalised to jumbled scattered factors in the hope that insights on the jumbled version translate to the non-jumbled case; though, notably, the jumbled version of Simons congruence is only an equivalence and not a congruence relation [11].
While thus-far-mentioned research mainly focused on the existence of (jumbled) scattered factors, there has also been research on the number of occurrences of a scattered factor in a word. Here, separate occurrences are usually modelled using word embeddings, i.e. strictly increasing maps from the set of positions of a scattered factor u into the set of positions of w such that their letters match. Typically, denotes the number of distinct embeddings of u in w [31]. For example, we get . However, there is no such research on jumbled scattered factors as of yet.
Our Contribution. In this work, we develop the work on jumbled scattered factors in two directions: on the one hand we investigate the problem of testing jumbled k-Simon-equivalence by presenting an algorithm for fixed k and using finite automata and another one harnessing the connection between jumbled scattered factors and longest common scattered factors. On the other hand, we investigate the problem of counting the amount of occurrences of a given jumbled scattered factor in a given word.
For any set , let us denote the mapping which maps each element of to itself as . For sets such that and a mapping we denote by the restriction of to , i.e. the mapping which satisfies for all . Further, we denote the composition of mappings by , i.e. for three sets and mappings and we denote by the mapping which satisfies for all . Moreover, we call any mapping bijective (surjective; injective) if for any there is exactly (at least; at most) one such that and recall that is bijective if and only if there is an inverse mapping satisfying and .
For the algorithmic results we use the standard computational model RAM with logarithmic word-size (see, e.g. [24]), i.e. we follow a standard assumption from stringology, that if is the input word for our algorithms, then we assume .
We define scattered factors, also known as subsequences or subwords, which will built the fundament for their generalised version, the jumbled scattered factors.
▶ Definition 1. A word is called a scattered factor of if we can delete letters from and obtain . Let be the set of all scattered factors of , and let and be the set of scattered factors respectively with length exactly and length at most .
▶ Definition 2. Let . The set of common scattered factors of and is defined as . Further, let us denote the set of longest common scattered factors of and with . Their length is denoted by .
For instance, abca is a scattered factor of cbacbacba but bccc is not. Furthermore, for and , we have . Note that the letters of the word abc occur in but not in the same order. Thus, the concept of jumbled scattered factors was introduced to describe words whose letters appear out-of-order in a larger word.
▶ Definition 3. Let . A word is called a jumbled scattered factor of if there exists such that . The set of jumbled scattered factors of is denoted by .
For example, any word that consists of at most two occurrences of each a, b, and c is a jumbled scattered factor of ccbbaa. However, this definition is extreme in the sense that whether or not a word is a jumbled scattered factor of another word depends only on their Parikh vectors, which means that the order of letters in nor do not matter. Indeed, is a jumbled scattered factor of if and only if . Therefore, we formalise the extent to which letters in appear out-of-order in as the number of letters to jumble in to obtain a scattered factor of .
▶ Definition 4. Let . The word is called a scattered factor of with jumbles (or is -jumbled in ) if and . The set of scattered factors of needing at most jumbles is denoted by . Again, the restriction to jumbled scattered factors of length exactly (at most) is denoted by a subscript ( ).
In [11], a more restrictive variant of jumbled scattered factors than in Theorem 4 is considered: there is an additional requirement with the intention that every time at least one letter of the jumbled scattered factor fits and one letter can not be “out of order”. This condition implies the anomaly that but which does not match the intuition that the set of words obtained by not jumbling any letter is equal to the set of classical scattered factors. Since we are interested in a natural extension of the classical scattered factors, especially in the case of jumbled embeddings, we drop the condition which results in for all . Further, if and then , thus, is -jumbled in if and only if it is -jumbled in for any . Accordingly, we adjust the definition of -jumbled scattered factors of a word , where is the degree a jumbled scattered factor deviates from being a scattered factor of .
Note that, for , implies that every scattered factor of is at most -jumbled in . By Theorem 4 we have that owl is 1-jumbled and wolf is not only 2-jumbled but also 3-jumbled depending on which 1 in cauliflower is chosen. For a more precise description of the different possibilities in which a jumbled scattered factor appears in a word, we extend the notion of embeddings introduced in [8].
▶ Definition 5. Let , and . An -jumbled embedding of into is an injective function such that for all and there exists a subset of size such that the restriction is strictly increasing. The set of -jumbled embeddings of into is denoted by .
Consider for example wolf as a 2-jumbled scattered factor in cauliflower. A 2-jumbled embedding of wolf is, e.g. with the strictly increasing restriction . Notice that, analogously to classical embeddings of scattered factors, jumbled embeddings may not be unique within a word, e.g. is a 3-jumbled embedding of wolf in cauliflower.
Based on the longest common scattered factor we define the jumbled neighbourhood.
▶ Definition 6. For , the -jumbled neighbourhood of is defined as the language .
The following result links the jumbled scattered factors of a word with the downward closure of the -jumble-neighbourhood.
▶ Proposition 7. Let , with . Then .
Proof. We first prove that . Therefore, let . Further, there must exist a common scattered factor of and with length at least . Furthermore, since , we have where
– is the element-wise subtraction operation. Therefore, for all , we can reposition occurrences of in so that is a scattered factor of the new word. The sum of all elements in is at most , thus .
We now prove that . Let . Then, by definition, there exists a word such that is a scattered factor of . Since , we have . Let such that fix a longest common scattered factor and let . For any scattered factor in , the intersection has at most elements. Further, the positions not contained in that intersection form a scattered factor of a longest common scattered factor of and . Consequently, we obtain a common scattered factor of and by removing at most many letters from and, thus, is -jumbled in . Let be the scattered factor of obtained by removing letters from including all the letters that correspond to the jumbled letters in . Then, with . Furthermore, , and therefore .
▶ Lemma 8. For and , there are at most words in the -jumble neighbourhood of .
Proof. We first choose from the letters to jumble. There are at most choices in choosing and ordering positions of . Then, we sample with replacement positions in the remaining gaps in the word and insert the letters in the chosen places in the designated order. This gives us combinations for each of the orderings. Therefore, the statement follows.
We end this section by recalling the jumbled variant of Simon’s congruence [39]. This leads to the problem of investigating the jumbled variant of Simon’s congruence relation.
▶ Definition 9. Let and . We say that is -jumble -Simon equivalent to , for short iff . We denote the equivalence class of under by .
▶ Problem 1. Given two words and two integers is ?
3 Testing Jumbled Simon's Equivalence
Although is an extension of Simon's congruence, it is not a congruence relation. For example, consider the words abcd and dabc, as well as the words efgh and hefg. Each pair of words is 1-jumble 4-Simon equivalent. However, the words abcdefgh and dabchefg obtained by concatenating, respectively the first and second words in each pair, are not 1-jumble 4-Simon equivalent due to the counterexample cdgh. Nevertheless, a natural question is the one of Problem 1, i.e. testing the -jumbled k-Simon's equivalence for two given words. First, we present combinatorial insights on before considering procedures for testing the equivalence of two words.
▶ Proposition 10. Let and . Then, we get if and only if either or for all .
Proof. “⇒”: We show this by contraposition. Let and such that there exists with w.l.o.g. and . Let where . Then, and but .
“⇐”: We show this by contraposition. Let and with . First, we look at the case that or . Let w.l.o.g. . Then, there is such that since otherwise we would find which implies . Next, let . Then, according to [11, Lemma 11], we find w.l.o.g. such that . Thus, but . So there exists with . We get .
▶ Corollary 11. Let . We get the index for the jumbled Simon's equivalence .
Proof. From Theorem 10, we know that the equivalence classes of are characterised by for any . Thus, we have that .
Previously, Fleischmann et al. [11] discovered equivalence classes of size 1, , and where denotes the set of words with the same Parikh vector as some representative w. We prove that there are other equivalence classes whose cardinality does not belong in one of the three cases by the following example.
▶ Example 12. The equivalence class is an example for a class that has finite size which is not the number of permutations of acbab. One may verify that
First, we justify why all of those words have the same 1-jumbled scattered factors of length 3. Every word produced by a shuffle is 2-universal w.r.t. a and b, i.e. they contain every word of length 3 that has a component-wise smaller Parikh vector than . The same holds for the four words in the second line due to the placement of c. Second, we justify that there are no other words contained in this set. Any word with more occurrences of a, b or c does contain , , or as a scattered factor. Further, any other position of c than the four within the second row would lead to fewer jumbled scattered factors, e.g. in shifting the c in acabb or aabcb we are losing bac when shifting c to the first position, bca when shifting into the middle, and cba when appending c.
3.1 Equivalence testing for small k
▶ Proposition 13. Let . For all , we can decide whether v holds in time .
Proof. Consider Algorithm 1 as an algorithm solving Problem 1.
Correctness: we want to test w which is satisfied if each string of length is either -jumbled scattered factor of both and or of neither one. Further, is -jumbled in if and only if and . Algorithm 1 tries to find a witness for w by simply testing for each string of length up to whether it is -jumbled scattered factor of and not of or vice-versa. This is done by checking each possible string whether it has a common scattered factor with of length at least while also being a scattered factor of or, respectively, . Since being a scattered factor of implies the existence of such string witnesses being an -jumbled scattered factor of . Conversely, if is an -jumbled scattered factor of , by Definition 4, there has to be a common scattered factor of and of length , hence,
Algorithm 1 Jumbled Simon's equivalence for small k
Given: two strings , two integers
for all strings do
▷ The set of strings obtained using jumbles on
for all strings of length at most do
if and then add to
for all strings do
if is a scattered factor of then
if is a scattered factor of then
if then return False
return True
satisfies and is a scattered factor of . Accordingly, after each run of the outer for-loop correctly indicates whether is -jumbled scattered factor of , analogously correctly indicates whether is -jumbled scattered factor of . Now is a witness for if an only if . Finally, if none of the strings of length up to witnesses the non-equivalence of and then Algorithm 1 correctly outputs that is true.
Complexity: for each , the construction of the set takes time, since the computation of LCSF takes time and the construction of the Parikh vector takes time for each choice of . There are choices of , and since , the bound follows. Then, in the enumeration of the strings in , we spend time for each choice of in . Since there are at most strings in , we spend at most in the enumeration of the strings in . Finally, there are at most choices of ; therefore the overall running time of the algorithm is .
▶ Corollary 14. If is in , then we can decide whether or not holds in polynomial time .
3.2 An automaton-based approach
We present an automata approach for testing -jumbled k-Simon equivalence between two strings. However, the following result makes it unlikely to have an efficient solution by constructing an automaton for all jumbled scattered factors of a given word for the case of general k and .
▶ Lemma 15. Let satisfying . For satisfying , the size of the minimal NFA recognising is exponential in the size of .
Proof. We prove a lower bound on the number of states of an NFA using a fooling set argument (see e.g. [6, 20]). Recall the fooling set argument: let be a regular language and suppose there exists a set of pairs , called the fooling set, such that
-
for , and
-
implies or for .
Then any NFA which recognises has at least many states.
For a subset of , let us define the word of length that satisfies whenever and otherwise. Let us choose the string and . Then contains all permutations of . Consider the fooling set that consists of the pairs for each subset of . For any two distinct subsets of , we prove that either or is not in the language. Without loss of generality, there exists a letter that appears in but not in . Then, the word contains two instances of , and therefore it is not in . Therefore, there are at least elements in a fooling set for , and thus the smallest NFA recognizing has size exponential in .
Theorem 15 implies that, for arbitrary , an automaton which recognises all -jumbled scattered factors of length at most of a word can have size . Since the Parikh-vector can easily be checked algorithmically we focus on automata to accept the set of all words admitting a longest common scattered factor of sufficient length. As a useful tool, we define the X-ranker [37] that outputs the next occurrence of the letter after the index in or if the letter is not occurring any more. For example, since , and since is the next occurrence of after the first .
For the first approach, we characterise non-equivalent words by their longest common scattered factors. For a string and an integer , let be the vector of size where .
▶ Lemma 16. For and two integers , we have if and only if , or there exists a string of length at most with either or .
Proof. “⇐”: Let us first consider the case where . Choose a character with and let where is the maximum between and . Note that , and only one of and contains as an -jumbled scattered factor. Therefore, we have . For the other case when there exists a string of length at most with either or , let us assume without loss of generality that . By the definition of the jumbled scattered factor of a string, is an -jumbled scattered factor of but not for . Therefore, we have .
“⇒”: Let ; then there exists a string of length at most that is an -jumbled scattered factor of one string but is not of the other. Without loss of generality, let be an -jumbled scattered factor of ; then we have . First, consider the case when for some . Then, since and , we have . Otherwise, we have for all . Then, we have . In other words, for to not be an -jumbled scattered factor of , the length of the longest common scattered factor of and should be of length strictly less than . Since is an -jumbled scattered factor of , we have , and thus the claim holds.
We now use Theorem 16 for constructing a DFA dependent on some word that accepts all words of length at most that share a common scattered factor of length with . The idea is to compare the DFAs for different words to decide equivalence. Therefore, we define the set of words that share a longest common scattered factor of length at least with a given word .
▶ Definition 17. For and , we define .
Given a string and two integers and , we construct a DFA that recognises LCSF. The idea is to simulate the classic LCS dynamic programming algorithm (cf., e.g. [16]) one row at a time, where each row corresponds to a character of the input and each column corresponds to a character in . We leverage two important observations. First, the values of each cell can grow up to , and if any value exceeds , then we should automatically accept the input. Second, the values in each row are non-decreasing. Therefore, it suffices to remember a non-decreasing sequence of positions of , where the position is the index of the smallest cell in the current row of the DP table with value greater than . We formally construct the automaton as follows:
,
,
for and , the transition function is defined as , where and
for all ,
.
In other words, each state is a pair where the first item is a counter that grows up to , and the second item is a non-decreasing sequence of positions representing a row of the DP table. Here, indicates that there is no cell in the current row with value at least . Then, it is easy to see that represents the first row of the DP table. At each input, we increment the counter if it is less than ; we reject if the counter is already . Then, we update the vector accordingly so that correctly contains the smallest index of the DP table with value at least . Finally, we accept if the counter is exactly , and the cell has a value other than , which means there is a cell with value in the DP table. Therefore, we have the following lemma.
▶ Theorem 18. There exists a DFA of size that recognises LCSF .
▶ Corollary 19. If for some constant , we can decide whether or not in polynomial time.
Proof. We first test whether or not . If not, we return false. Otherwise, for each , we construct DFAs that recognise LCSF( ) and LCSF( ), respectively. If the two DFAs are not equivalent, we return false. If the pairs of DFAs are equivalent for all , then we return true. The correctness of this procedure follows from Lemma 16. Furthermore, since , the size of the DFA is , where is the length of or . Therefore, the size of the DFA is polynomial in and , and since the equivalence of two DFAs can be checked in polynomial time, the entire procedure takes polynomial time.
We now modify the DFA construction based on the intuition that the length of the longest common scattered factor between and the suffix of another string is at most the length of the suffix. In other words, in constructing LCSF, we do not need to consider scattered factors that start after reading characters, because there are only remaining characters to read. In this sense, we construct a new automaton as follows.
■ for and , the transition function is defined as
if , then and
for all ,
otherwise, and
for all ,
The idea is to simulate the automaton using a window of size on the non-decreasing sequence of positions; in the first steps, this window captures the first elements, and in the later steps, say step, this window captures the sequence of elements starting from the element. Therefore, at the step, the element in the DFA is the element in the DFA , and thus we accept if .
▶ Theorem 20. There exists a DFA of size that recognises LCSF .
▶ Corollary 21. If is constant, we can decide whether holds in polynomial time.
Proof. We use exactly the same procedure as Corollary 19, but this time we use the DFA B instead of the DFA A. Then, the size of the DFA is at most , which is polynomial in k and n. Therefore, we can decide whether or not in polynomial time if is constant.
Unfortunately, when and are arbitrary, it is difficult to construct a DFA that accepts all strings in LCSF( ). Instead, we present an NFA that accepts LCSF( ) in the following. Let the NFA A be defined by
■ for all , define
Note that an equivalent DFA can be obtained by applying the powerset construction on A. For an exemplary construction of the NFA for and , consider Figure 1.

Figure 1 The NFA for recognising the 1-jumbled scattered factors of .
4 The Jumbled Binomial Coefficient
Research on scattered factors has been successful in finding formulas and identities for counting the different ways a scattered factor can be found in a word (multiplicities). For classical scattered factors the binomial coefficient is defined as the number of embeddings of u in w as a scattered factor (with no jumbles), i.e. where denotes the set of embeddings of u in w. In this section, we want to expand such efforts to jumbled scattered factors.
First though, we have to clarify what exactly we mean by multiplicities. This leads us to the jumbled binomial coefficient.
▶ Definition 22 (Jumbled Binomial Coefficient). Let . Then, the jumbled binomial coefficient is defined as . Further, we also define the -jumbled binomial coefficient as .
Therefore, the number of ways to find a jumbled scattered factor in a word is the number of jumbled embeddings. For example, let , then since we can find the following embeddings (cf. Figure 2).




Figure 2 Four (jumbled) embeddings of an in anna with a blue arrow indicating jumbles.
We can also immediately see that since only the first two embeddings are non-jumbled.
▶ Proposition 23. Let and . Then,
Proof. Since we do not restrict the jumbles, we just count all possible injective mappings with for all . If then there is only the trivial mapping, so . For the case , we first note that any with will be mapped independently by any such mapping, since we know for all jumbled embeddings . Now consider sets and for any . Then, for any jumbled embedding we know that there are injective mappings . The formula follows immediately from the independence of and for any , with .
▶ Corollary 24. If with , then for all . Further, if and for all we have , then for all .
We list some example calculations, but we do not list all possible embeddings explicitly.
Notably, it becomes more complex when we restrict the number of jumbles. One strategy to compute all the -jumbled embeddings and thus the -jumbled binomial coefficient is to 1. enumerate all jumbled embeddings, ignoring the restrictions on the number of jumbles, 2. check the amount of jumbles by checking the longest increasing common scattered factor. This strategy also leads us to the following recurrence for the -jumbled binomial coefficient.
▶ Proposition 25. Given , an integer , and , let be an alphabet disjoint from that satisfies whenever . Then, the -jumbled binomial coefficient can be computed by the recursion
where if the length of the longest increasing subsequence of among the characters in is at least and 0 otherwise.
Proof. Let and . We prove the following statements.
-
Let as above and be the words that we get when Equation (1) applies. Then, for all and there is one unique embedding and .
-
Let and with
for all . Then, the computation of will reach .
- Assume that, after replacing every letter of , we arrive at for some . Then, for all .
Ad 1. By construction, every is assigned only once, thus . For the same reason . By Theorem 24, we get that there is a unique embedding . Since is only assigned to the same letter in and , we also get .
Ad 2. Let . Then, by Equation (2) we can choose to assign the letter of to the letter of since . Doing this for all letters of gives said words.
Ad 3. Let with and . After the first recursion there will be many summands where is obtained from by replacing the occurrence of by . Hence the statement holds after the first step. Now assume after steps we have , for some and for all . Then for any the coefficient will split up into unique summands with the same argument as in the base case. Furthermore, since and differ in the positions of the letters , which are untouched be the recursion step, every summand derived from differs in the positions of from every summand derived from . Statement 3 follows by induction.
Now, by Statement 3, splits up into several unique coefficients , each of them corresponds to one jumbled embedding of into by Statement 2 and only one of those embeddings by Statement 1. Lastly, if and only if the embedding of into has at most jumbles. Accordingly, the recursion correctly computes the amount of jumbled embeddings of into .
4.1 Decompositions of -Jumbled Embeddings
Before we continue, we will note two interesting properties of the jumbled binomial coefficients and investigate the behaviour of -jumbled embeddings more closely.
▶ Lemma 26. Let , and . If , then is bijective and .
Proof. Let with such that increasing. By definition is injective. Thus, implies that is bijective. Since is increasing, so is . Also, .
▶ Corollary 27. Let and . If , then
Proof. This follows immediately from Theorem 26 and the fact that iff for any .
▶ Lemma 28. Let , and .
-
Then, we can factor such that and for any with .
-
In particular, the factorisation is unique if .
-
Conversely, given any , , , the composition .
Proof. Ad 1. Let , and . Let and be an embedding with . Then, , is a well-defined jumbled embedding and . Finally, for any set with increasing, we know that must be increasing since is increasing.
Ad 2. Now, let and be another factorisation with , . From Lemma 26 we know that , are bijective. Thus, image( ) = image( ) = image( ) and since , are increasing and injective. Now, and thus since is injective.
Ad 3. Finally, let , , and . Then, is injective as the composition of injective functions and for any we know that increasing implies is increasing as the composition of increasing functions. Further, .
▶ Remark 29. Notably, by the proof of Theorem 28, there is also only one such that we get a unique factorisation since . From now on, we will denote this word by .
▶ Theorem 30. Let and . Then
Proof. By Theorem 28, any jumbled embedding factorises uniquely over . Since , this implies . On the other hand, any and yields a jumbled embedding , so .
4.2 A Connection to Young Tableaux
In 1961 Schensted related permutations to Young tableaux [36]. A Young tableaux, which is an arrangement of boxes labelled with numbers, has a shape . The shape represents a partition of and the largest element of this partition is called the width of the shape. In his work Schensted showed that there is a one-to-one correspondence between permutations of the numbers and pairs of standard Young tableaux that have the same shape with boxes. Moreover, the width of the shape is exactly the length of the longest increasing subsequence of the permutation represented. Since Young tableaux are well-researched we spend the rest of this section to illuminate the connection between Young tableaux and the jumbled binomial coefficient. To be more precise, we consider the hook length formula which uses the hook lengths (see [13]) to obtain the following result.
▶ Proposition 31. Let . Then, the number of permutations with length and longest increasing subsequence of length is
where is a shape having size n and width and are the hook lengths of .
Proof. Let . The hook length formula [13] states the number of standard Young tableaux of shape is given by . By Schensted's correspondence [36], we know that permutations correspond to pairs of standard Young tableaux and thus there are permutations that yield different pairs of Young tableaux of shape under repeated application of Schensted's operation. Now, we know that the length of the longest increasing subsequence is exactly the width of the shape. So, the sum over all shapes with width yields the number of permutations with length and longest increasing subsequence .
We know that the jumbled binomial coefficient counts a restricted set of permutations with longest increasing subsequence of length at least . This, leads us to the following corollary.
▶ Corollary 32. Let , and . Then, for and we get
Proof. By Theorem 30, we know since either or is the only scattered factor of . Now, counts exactly the bijective mappings with longest increasing subsequence of length at most which is exactly by Theorem 31.
5 Conclusion
In this work, we followed the very young research of jumbled scattered factors introduced in [11]. Even though the definition of jumbled scattered factors in [11] is in a way a generalisation of scattered factors, we altered this definition in order to obtain for all . Moreover, we tightened the connection between jumbled scattered factors and longest common scattered factors by introducing the language as all words of length having a longest common scattered factor with of length least .
Furthermore, we worked in two distinct but related directions: the jumbled k-Simon equivalence and the number of embeddings of a jumbled scattered factor in a word. Regarding the first part, we presented three algorithms for testing the -jumbled k-Simon equivalence. Specifically, we tested the equivalence for a small k in the first algorithm, and we tested the equivalence for arbitrary k where and are constant, respectively. In the second part, we extended the well-established research on the number of embeddings (different occurrences) from scattered factors (or even factors) to jumbled scattered factors. Therefore, we firstly introduced the notion of the jumbled binomial coefficient as a generalisation of the binomial coefficient for scattered factors. Here, we presented a recursion to compute the number of jumbled embeddings based on the well-known notion of longest increasing subsequences. In a second step, we computed the jumbled binomial coefficient based on decomposition. Lastly, we connected it to the famous Young tableaux. Furthermore, we contributed to the possible sizes of the jumbled Simon equivalence classes.
Acknowledgment. We like to thank Melf Kammholz for sharing ideas and fruitful discussions.
Disclaimer. The authors ensure that the research was conducted without any AI usage.
References
1 D. Adamson, P. Fleischmann, A. Huch, T. Koß, F. Manea, and D. Nowotka. k-universality of regular languages. In ISAAC 2023, volume 283 of LIPIcs, pages 4:1–4:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023.
2 A. Artikis, A. Margara, M. Ugarte, S. Vansummeren, and M. Weidlich. Complex event recognition languages: Tutorial. In DEBS, pages 7–10, 2017.
3 R. A. Baeza-Yates. Searching subsequences. Theor. Comput. Sci., 78(2):363–376, 1991.
4 H. Bannai, T. I, T. Kociumaka, D. Köppl, and S. J. Puglisi. Computing longest Lyndon subsequences and longest common Lyndon subsequences. Algorithmica, 86(3):735–756, 2024.
5 P. Baumann, M. Ganardi, R. S. Thinniyam, and G. Zetzsche. Existential definability over the subword ordering. Log. Methods Comput. Sci., 19(4), 2023.
6 J.-C. Birget. Intersection and union of regular languages and state complexity. Inf. Process. Lett., 43(4):185–190, 1992.
7 K. Bringmann and M. Künnemann. Multivariate fine-grained complexity of longest common subsequence. In SODA 2018, pages 1216–1235. SIAM, 2018.
8 J.D. Day, M. Kosche, F. Manea, and M.L. Schmid. Subsequences with gap constraints: Complexity bounds for matching and analysis problems. In ISAAC, volume 248 of LIPIcs, pages 64:1–64:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022.
9 D. T. Do, T. T. Q. Le, and N.-Q.-K. Le. Using deep neural networks and biological subwords to detect protein s-sulfenylation sites. Briefings Bioinform., 22(3), 2021.
10 L. Fleischer and M. Kufleitner. Testing Simon's congruence. In MFCS 2018, volume 117 of LIPIcs, pages 62:1–62:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018.
11 P. Fleischmann, A. Huch, M. Kammholz, and T. Koß. Jumbled scattered factors. In Sang-Ki Ko and Florin Manea, editors, DLT, volume 16036 of Lecture Notes in Computer Science, pages 261–277. Springer, 2025.
12 P. J. Forrester and A. Mays. Finite size corrections relating to distributions of the length of longest increasing subsequences. Adv. Appl. Math., 145:102482, 2023.
13 J. S. Frame, G. de B. Robinson, and R. M. Thrall. The hook graphs of the symmetric group. Canadian Journal of Mathematics, 6:316–324, 1954. doi:10.4153/CJM-1954-030-1.
14 A. Frochaux and S. Kleest-Meißner. Puzzling over subsequence-query extensions: Disjunction and generalised gaps. In AMW 2023, volume 3409 of CEUR Workshop Proceedings. CEUR-WS.org, 2023.
15 P. Gawrychowski, M. Kosche, T. Koß, F. Manea, and S. Siemer. Efficiently testing Simon's congruence. In STACS 2021, volume 187 of LIPIcs, pages 34:1–34:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021.
16 D. Gusfield. Algorithms on Strings, Trees, and Sequences - Computer Science and Computational Biology. Cambridge University Press, 1997.
17 L.H. Haines. On free monoids partially ordered by embedding. J. Comb. Theory. Ser., 6(1):94–98, 1969.
18 S. Halfon, P. Schnoebelen, and G. Zetzsche. Decidability, complexity, and expressiveness of first-order logic over the subword ordering. In LICS 2017, pages 1–12. IEEE Computer Society, 2017.
19 G. Higman. Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society, 3(1):326–336, 1952.
20 M. Holzer and M. Kutrib. Nondeterministic finite automata - recent results on the descriptional and computational complexity. Int. J. Found. Comput. Sci., 20(4):563–580, 2009.
21 P. Karandikar, M. Kufleitner, and P. Schnoebelen. On the index of Simon's congruence for piecewise testability. Inf. Process. Lett., 115(4):515–519, 2015.
22 P. Karandikar and P. Schnoebelen. The height of piecewise-testable languages and the complexity of the logic of subwords. Log. Methods Comput. Sci., 15(2), 2019.
23 J. Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland. On cardinalities of k-abelian equivalence classes. Theor. Comput. Sci., 658:190–204, 2017.
24 J. Kärkkäinen, P. Sanders, and S. Burkhardt. Linear work suffix array construction. J. ACM, 53(6):918–936, 2006.
25 S. Kim, Y.-S. Han, S.-K. Ko, and K. Salomaa. On the Simon's congruence neighborhood of languages. In DLT, volume 13911 of LNCS, pages 168–181. Springer, 2023.
26 S. Kleest-Meißner, R. Sattler, M. L. Schmid, N. Schweikardt, and M. Weidlich. Discovering event queries from traces: Laying foundations for subsequence-queries with wildcards and gap-size constraints. In ICDT, volume 220 of LIPIcs, pages 18:1–18:21, 2022.
27 S. Kleest-Meißner, R. Sattler, Markus L. Schmid, N. Schweikardt, and M. Weidlich. Discovering multi-dimensional subsequence queries from traces - from theory to practice. In BTW, volume P-331 of LNI, pages 511–533, 2023.
28 M. Kosche, T. Koß, F. Manea, and S. Siemer. Absent subsequences in words. Fundam. Informaticae, 189(3-4):199–240, 2022.
29 D. Kuske. The subtrace order and counting first-order logic. In CSR, pages 289–302. Springer International Publishing, 2020.
30 D. Kuske and G. Zetzsche. Languages ordered by the subword order. In FoSSaCS, pages 348–364. Springer International Publishing, 2019.
31 M. Lothaire. Combinatorics on Words. Cambridge Mathematical Library. Cambridge University Press, 1997.
32 D. Maier. The complexity of some problems on subsequences and supersequences. J. ACM, 25(2):322–336, 1978.
33 A. Mateescu, A. Salomaa, and S. Yu. Subword histories and parikh matrices. J. Comput. Syst. Sci., 68(1):1–21, 2004.
34 S. Puzynina. Abelian properties of words. In WORDS 2019, volume 11682 of LNCS, pages 28–45. Springer, 2019.
35 R. Sattler, S. Kleest-Meißner, S. Lange, M. L. Schmid, N. Schweikardt, and M. Weidlich. Disces: Systematic discovery of event stream queries. Proc. ACM Manag. Data, 3(1), 2025.
36 C. Schensted. Longest increasing and decreasing subsequences. Canadian Journal of Mathematics, 13:179–191, 1961.
37 Thomas Schwentick, Denis Thérien, and Heribert Vollmer. Partially-ordered two-way automata: A new characterization of DA. In Proceedings of the 5th International Conference on Developments in Language Theory, DLT, pages 239–250, 2001.
38 I. Simon. Hierarchies of events with dot-depth one. PhD thesis, University of Waterloo, 1972.
39 I. Simon. Piecewise testable events. In AFL, 2nd GI Conference, Kaiserslautern, May 20-23, 1975, volume 33 of LNCS, pages 214–222. Springer, 1975.
40 R. A. Wagner and M. J. Fischer. The string-to-string correction problem. J. ACM, 21(1):168–173, 1974.
41 C. Wang, K. Cho, and J. Gu. Neural machine translation with byte-level subwords. In EAAI 2020, pages 9154–9160. AAAI Press, 2020.
42 G. Zetzsche. The Complexity of Downward Closure Comparisons. In ICALP 2016, volume 55 of LIPIcs, pages 123:1–123:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016.