mikepound / opencubes

A community improved version of the polycubes project!
MIT License
44 stars 23 forks source link

No hash table needed #11

Open presseyt opened 1 year ago

presseyt commented 1 year ago

Here's an algorithm that is able to identify unique cubes without using a hash table:

  1. Start with a polycube p
  2. For each possible expansion q of p:
    1. Compute all possible ways of removing one cube from q and have it still be connected, call this set S
    2. If p has the minimal canonical representation out of all polycubes in S, save q

We already have steps 1 and 2. I'm not sure how expensive steps 2 i. will be, but this should be parallelizable/distributable as well as avoiding any memory issues. Could be worth playing around with - I won't have time this weekend but I may try this out the weekend after if somebody else doesn't want to try this first.