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.
翻译:约束编程(CP)是建模数学概念与对象、寻找解或反例的强大工具。CP的主要优势之一在于问题可轻松组合或拓展。本文阐述这种通用性使CP成为探索置换模式问题的理想工具。我们通过CP声明式地定义置换性质、置换模式规避与包含约束,并展示其如何解决广泛问题。研究证明该方法能实现这些条件的任意组合,并便捷添加额外约束。通过建模六种置换模式的包含与规避、八种置换性质,并测量所得置换的五项统计数据,我们验证了该技术的有效性。除计算生成置换的性质与统计量外,任意附加约束也可高效添加。该方法使数学家能够快速有效地研究置换模式问题。通过便捷高效地扩展关于1324规避置换类的猜想已知置换计数,我们展示了CP对置换模式问题的实用价值。针对该问题,我们将固定逆序数的1324规避置换枚举扩展至长度为16的置换,首次证明在其枚举序列中出现了整数序列在线百科全书中的独有模式。