# [seqfan] Re: Polycubes and canonical order of k-tuples of nonnegative integers

Pontus von Brömssen pontus.von.bromssen at gmail.com
Sun Aug 20 13:21:12 CEST 2023

```That's great, John! If there's a choice already in use I'll definitely use
that. On top of that, it's the same ordering as OEIS recommends (A144625).
(Like I wrote, the choice between lex/colex doesn't matter for the binary
code, but I'll choose the nonreversed version.)

One more question: I also plan to submit a similar sequence for polyominoes
with no restriction on the dimension (those counted by A005519). To define
a code similar to the binary code under discussion here, we need an
ordering of sequences of nonnegative integers with a finite number of
nonzero terms. There's an obvious choice for that, namely to interpret the
sequences as prime exponents, mapping (x_1, x_2, ...) to the product of
prime(i)^x_i for i >= 1. Then we get a binary code for polyominoes in any
dimension by choosing the orientation that minimizes the sum of the powers
of 2 with exponents corresponding to the labels of the cells of the
polyomino. What would be a good name for this code? Prime binary code?
Binary prime code? Binary prime exponent code? Any better suggestions?

Thanks also to Marc LeBrun for good advice and kind words.

All the best,

Pontus

On Sun, Aug 20, 2023 at 9:47 AM John Mason <masonmilan33 at gmail.com> wrote:

> Sorry, I see what you mean now.
> I hope you choose the graded colex (87) version, as that's what I've been
> using.
> John
>
> On Sun, Aug 20, 2023 at 3:33 AM Pontus von Brömssen <
> pontus.von.bromssen at gmail.com> wrote:
>
> > No, it's not independent of the ordering of the triples, basically
> because
> does
> > not correspond to any rotation/reflection.
> >
> > For the 3-dimensional V-pentomino I mentioned, the orientation that gives
> > the minimum binary code in graded colex order is (the cells it occupies
> are
> > marked with "X"):
> >   0. 000 X
> >   1. 100 X
> >   2. 010 X
> >   3. 001
> >   4. 200 X
> >   5. 110
> >   6. 020 X
> >   7. 101
> >   8. 011
> >   9. 002
> > This means that the binary code is 2^0+2^1+2^2+2^4+2^6 = 87 in this case.
> > In graded reverse lex order, it turns out that the minimum is given by
> the
> > same orientation (I'm sure there exist other examples where this is not
> the
> > case), but the numbers of the triples are not the same:
> >   0. 000 X
> >   1. 100 X
> >   2. 010 X
> >   3. 001
> >   4. 200 X
> >   5. 110
> >   6. 101
> >   7. 020 X
> >   8. 011
> >   9. 002
> > So the binary code is 2^0+2^1+2^2+2^4+2^7 = 151 in this case.
> >
> > Cheers,
> >
> > Pontus
> >
> > On Sat, Aug 19, 2023 at 7:25 PM John Mason <masonmilan33 at gmail.com>
> wrote:
> >
> > > Hi
> > > I am not sure I understand the problem.
> > > In the case of polyominoes, taking for example the asymmetric L-shaped
> > > tetromino, you can place it on the plane, pushed against the axes, in 8
> > > different ways.
> > > So you generate the 8 different representations of the tetromino and
> > choose
> > > the lowest one.
> > > You can apply the same process to generating representations of
> > polycubes,
> > > though the number of different representations will be up to 48,
> > according
> > > to symmetry.
> > > So the mechanism is independent of how you order the triples.
> > > john
> > >
> > > On Sat, Aug 19, 2023 at 5:17 PM Pontus von Brömssen <
> > > pontus.von.bromssen at gmail.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > I just wanted to double check that the OEIS canonical way to order
> > > k-tuples
> > > > of nonnegative integers is first by sum, then colexicographically, as
> > > > stated in A144625 (for triples). The canonical way to order integer
> > > > partitions (A080577) and compositions (A066099) seem to be by sum,
> then
> > > > reverse lexicographic, so it seemed a little inconsistent to me.
> > > >
> > > > The reason I ask is that I'm preparing a 3-dimensional analog of
> > > A246521: a
> > > > list of the binary codes of polycubes. The code depends on an
> ordering
> > of
> > > > the triples of nonnegative integers. As long as we restrict the
> > ordering
> > > > options to graded (i.e., first by sum) normal/reversed lex/colex, the
> > > > lex/colex choice doesn't matter because it just corresponds to a
> > > reordering
> > > > of the axes. In 2 dimensions, the normal/reversed option doesn't
> matter
> > > > either (because reverse colex = lex), but in higher dimensions it
> does.
> > > For
> > > > example the binary code of the 3-dimensional V-pentomino is 87 in
> > normal
> > > > (lex or colex) order, but 151 in reverse order.
> > > >
> > > > Of course, I could submit both normal and reversed versions, but it
> > would
> > > > still be nice to have one of them "canonical". It could be used to
> list
> > > > properties of the polycubes, like A335573 does for 2-dimensional
> > > > polyominoes.
> > > >
> > > > Best regards,
> > > >
> > > > Pontus von Brömssen
> > > >
> > > > --
> > > > Seqfan Mailing list - http://list.seqfan.eu/
> > > >
> > >
> > > --
> > > Seqfan Mailing list - http://list.seqfan.eu/
> > >
> >
> > --
> > Seqfan Mailing list - http://list.seqfan.eu/
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>
```