Counting words without non-decreasing subwords of fixed length
arXiv:2607.19410
2026
Sampling
1 ideas extracted · analyzed Aug 30, 2026
What the math gives to ML
The paper gives an exact rational generating function for n-ary sequences whose longest nondecreasing subsequence has length below k. The transferable asset is not the enumeration itself, but the resulting finite combinatorial state space and exact counting recurrence, which can be used to build uniform constrained sequence samplers or hard-validity decoders. A practical neural application is an autoregressive decoder that samples or searches only among sequences guaranteed not to contain a nondecreasing subsequence of length k, with dynamic-programming counts providing unbiased next-token choices and a precise validity baseline.
Ideas from this paper
Unverified
2026
Equip an autoregressive model with a hard constraint that generated token ranks cannot contain a nondecreasing subsequence of length k. Maintain a patience-sorting-style state representing the smallest ending token rank achievable by subsequences of lengths 1 through k-1, mask tokens that would create a length-k subsequence, and optionally sample uniformly among valid continuations using exact suffix counts. This provides a mathematically controlled data-augmentation or decoding regime for…
Useful6/10
Difficulty5/10
Novelty7/10