Constraint programming (CP) is a powerful tool for modeling mathematical concepts and objects and finding both solutions or counter examples. One of the major strengths of CP is that problems can easily be combined or expanded. In this paper, we illustrate that this versatility makes CP an ideal tool for exploring problems in permutation patterns. We declaratively define permutation properties, permutation pattern avoidance and containment constraints using CP and show how this allows us to solve a wide range of problems. We show how this approach enables the arbitrary composition of these conditions, and also allows the easy addition of extra conditions. We demonstrate the effectiveness of our techniques by modelling the containment and avoidance of six permutation patterns, eight permutation properties and measuring five statistics on the resulting permutations. In addition to calculating properties and statistics for the generated permutations, we show that arbitrary additional constraints can also be easily and efficiently added. This approach enables mathematicians to investigate permutation pattern problems in a quick and efficient manner. We demonstrate the utility of constraint programming for permutation patterns by showing how we can easily and efficiently extend the known permutation counts for a conjecture involving the class of $1324$ avoiding permutations. For this problem, we expand the enumeration of $1324$-avoiding permutations with a fixed number of inversions to permutations of length 16 and show for the first time that in the enumeration there is a pattern occurring which follows a unique sequence on the Online Encyclopedia of Integer Sequences.
翻译:约束规划是一种强大的工具,可用于建模数学概念与对象,并寻找解或反例。约束规划的主要优势之一在于问题能够轻松组合或扩展。本文论证了这种多功能性使约束规划成为探索排列模式问题的理想工具。我们使用约束规划声明式地定义了排列性质、排列模式避免与包含约束,并展示了该方法如何帮助我们解决各类问题。我们说明了该方法如何实现这些条件的任意组合,并允许轻松添加额外条件。通过建模六种排列模式的包含与避免、八种排列性质,并对生成排列的五类统计量进行测量,我们验证了所提技术的有效性。除计算生成排列的性质与统计量外,我们还证明任意附加约束同样能够被简便高效地添加。该方法使数学家能够快速有效地研究排列模式问题。我们通过展示如何轻松高效地扩展涉及$1324$避免排列类猜想的已知排列计数,证明了约束规划在排列模式研究中的实用性。针对该问题,我们将具有固定逆序数的$1324$避免排列的枚举扩展至长度为16的排列,并首次揭示该枚举中出现的模式遵循整数序列在线百科全书中的独特序列。