peal / vole

A GAP package for backtrack search in permutation groups with graphs
https://peal.github.io/vole
Mozilla Public License 2.0
8 stars 2 forks source link

Implement an `IsEven` constraint #31

Closed wilfwilson closed 2 years ago

wilfwilson commented 2 years ago

If we manage to add VoleCon.IsEven, then it would be nice to also have VoleCon.IsOdd.

Thoughts welcome. My thoughts below:

Currently, for any individual case, we can achieve this result by doing VoleCon.InGroup(AlternatingGroup(n)) for an appropriate n.

However, in general, we might not necessarily know what the right n should be, at the point that we instantiate the constraint. In particular, this approach does not give us a "universal" constraint for evenness. This means that we can't just translate IsEven once to an instance of VoleCon.InGroup(AlternatingGroup(n)) that we can use forevermore, because we would have to choose n = infinity for this to work all the time, and that is not possible.

One way around this would be to implement the "lazy" translation of constraints into refiners, as asked for in #26. If this was implemented, we could have a constraint VoleCon.IsEven that doesn't do anything, but is translated into the appropriate VoleCon.InGroup(AlternatingGroup(n)) once a bound for the search is known.

Perhaps the solution is that a 'refiner' for IsEven shouldn't actually be doing anything involving alternating groups... I'll create a separate issue for this.

wilfwilson commented 2 years ago

Resolved by #41