
Andrei is suggesting to look at each enum value as the set of "bits set to 1" in this value, and then apply a set-thoery term to the problem. A set of "cardinality 1" in this context is an enum value with only one "1", what you called canonical. The condition you defined is that any bit that is set anywhere, is also in a canonical value. Anyway, I don't know whether this kind of terminology is widely accessible. Maybe you could use something like @composite. As in, every non-canonical value in the enum is the composition of canonical values. On Mon, Jun 7, 2021 at 6:36 PM Ethan Furman <ethan@stoneleaf.us> wrote:
On 6/6/21 9:14 AM, Irit Katriel via Python-Dev wrote:
On 6 Jun 2021, at 16:58, Andrei Kulakov wrote:
In Math / CompSci there is a definition that almost exactly matches this: Exact Cover - https://en.wikipedia.org/wiki/Exact_cover
The difference is that, IIRC, solving the problem is finding and removing all subsets that are unneeded to create an exact cover, so it's kind of arriving at it from a different direction, but 'exact cover' definition itself is a good match.
I’m not sure it’s a quite the same - it doesn’t require that the sets in the cover have cardinality 1, which I think Ethan does.
Well, I'm not sure what "cardinality 1" means, so I don't know if I do or not. :)
-- ~Ethan~ _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BMCG6MA3... Code of Conduct: http://python.org/psf/codeofconduct/