Canonical linear extension of a partial order for addition-subtraction chains

24 Views Asked by At

An addition-subtraction chain (a/s chain) is a sequence of positive integers (elements) with target $n$:

$1=a_0, a_1, ... , a_r=n, a_i=a_j\pm a_k, i> j\ge 0, i> k\ge 0$

The construction of each element imposes a partial order since elements used in the construction of another must come first in the sequence. Since elements may be constructed in more than one way, we will assume a sort of formal chain where we record how each element is constructed.

It can be possible to rearrange the elements in an a/s chain in more than one way (linear extension) and still satisfy the partial order imposed by construction.

While enumerating a/s chains I would like some way of only exploring a single canonical representation of a chain. The best I have come up with so far is to order additions such that they must increase the sequence $a_i<a_{i+1}, a_{i+1}=a_j+a_k$. The rule for subtraction is more complex $a_i<a_{i+1},a_{i+1}=a_j-a_k,j\ne i, k\ne i$. In both cases we bar element equality for a different reason. If we only consider shortest a/s chains for a given target it seems to be quite rare we explore essentially equivalent chains. The smallest example I found are these two:

1 2 4 8 16 32 64 128 256 512 1024 2048 4096 4080 4095 3071 8160 11231

1 2 4 8 16 32 64 128 256 512 1024 2048 4096 4095 3071 4080 8160 11231

Are there techniques that have been devised to enumerate other sequencies to avoid such duplication? Edited to correct my initial definition showing the sequence being monotonically increasing.