Skip to content

Instantly share code, notes, and snippets.

@VladimirFokow
Last active July 17, 2023 15:19
Show Gist options
  • Save VladimirFokow/aebc3dc937d0585018690a8aceba3ebf to your computer and use it in GitHub Desktop.
Save VladimirFokow/aebc3dc937d0585018690a8aceba3ebf to your computer and use it in GitHub Desktop.
examples of low-n collisions

If we use the "Solution B" encoding, I've found all the polycubes of n=9 and n=10 that will have collisions:

  • n=9: 4 polycubes
  • n=10: 43 polycubes

I discarded any collisions with arrays of 1s and 0s that don't have fully connected 1s. So the polycube is counted only if it collides with some other valid polycube (or itself in a different orientation: we have 3 such polycubes for n=10).


for n=9

Only 4 collisions occur.

  • interestingly, they all collide with their mirrors.

  • Each collision has only 2 colliding arrays, no more.

They are listed below.

  • Here right before each polycube I give index at which it can be found in my cubes_9.npy cache file. (But yours may differ.)

  • Each example here shows 2 polycubes which give the same encoding, but are not the same polycube.

(in my cache: index 5346)
[array([[[0, 1, 1],
        [1, 1, 0],
        [0, 1, 0]],

       [[1, 1, 0],
        [0, 1, 1],
        [0, 0, 0]]], dtype=int8), 

array([[[1, 1, 0],
        [0, 1, 1],
        [0, 1, 0]],

       [[0, 1, 1],
        [1, 1, 0],
        [0, 0, 0]]], dtype=int8)]

---------------------------------------------


(in my cache: index 10390)
[array([[[0, 1, 1],
        [0, 1, 0],
        [1, 1, 0]],

       [[1, 1, 0],
        [0, 0, 0],
        [0, 1, 1]]], dtype=int8), 

array([[[1, 1, 0],
        [0, 1, 0],
        [0, 1, 1]],

       [[0, 1, 1],
        [0, 0, 0],
        [1, 1, 0]]], dtype=int8)]

---------------------------------------------


(in my cache: index 16922)
[array([[[0, 1, 1],
        [1, 1, 0]],

       [[1, 1, 0],
        [0, 1, 1]],

       [[0, 1, 0],
        [0, 0, 0]]], dtype=int8), 

array([[[1, 1, 0],
        [0, 1, 1]],

       [[0, 1, 1],
        [1, 1, 0]],

       [[0, 1, 0],
        [0, 0, 0]]], dtype=int8)]

---------------------------------------------


(in my cache: index 41023)
[array([[[0, 1, 1],
        [1, 1, 0]],

       [[0, 1, 0],
        [0, 0, 0]],

       [[1, 1, 0],
        [0, 1, 1]]], dtype=int8), 


array([[[1, 1, 0],
        [0, 1, 1]],

       [[0, 1, 0],
        [0, 0, 0]],

       [[0, 1, 1],
        [1, 1, 0]]], dtype=int8)]


---------------------------------------------

for n=10

There are 43 collisions

  • indices of these polycubes (in my cache) are:
[
    113287, 113690, 113892, 127208, 127720, 127909, 164466, 166462, 246544, 246545, 
    247787, 247951, 253327, 253538, 286741, 290539, 293311, 318866, 318976, 319896, 
    319942, 319972, 319973, 319975, 319976, 319977, 320070, 320200, 320419, 334842, 
    334880, 334881, 334882, 334883, 334940, 335136, 335238, 335369, 339187, 343901, 
    344908, 346087, 346113
]  # 43 indices of collisions
  • unlinke with n=9, not all collisions here have only 2 colliding arrays. Some have 3.
  • not only mirrors. 3 out of these 43 collisions are with themselves (just in another orientation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment