Binary words of given trace and subtrace.
Here we consider the set S(n;t,s) of length n
words
a1a2···an
over the alphabet {0,1} that have trace t
and subtrace s. The trace of a binary word
is the sum of its digits mod 2, i.e.
t = a1+a2+
··· +an
mod 2. The subtrace is the sum of the products
of all n(n-1)/2 pairs of digits taken mod 2, i.e.
s = SUM( aiaj :
1 < i < j < n ).
|
| (trace,subtrace) |
| n
| (0,0)
| (0,1)
| (1,0)
| (1,1)
|
| 1 |
1 | 0 | 1
| 0
|
|---|
| 2 |
1 | 1 | 2
| 0
|
|---|
| 3 |
1 | 3 | 3
| 1
|
|---|
| 4 |
2 | 6 | 4
| 4
|
|---|
| 5 |
6 | 10 | 6
| 10
|
|---|
| 6 |
16 | 16 | 12
| 20
|
|---|
| 7 |
36 | 28 | 28
| 36
|
|---|
| 8 |
72 | 56 | 64
| 64
|
|---|
| 9 |
136 | 120 | 136
| 120
|
|---|
| 10 |
256 | 256 | 272
| 240
|
|---|
| 11 |
496 | 528 | 528
| 496
|
|---|
| 12 |
992 | 1056 | 1024
| 1024
|
|---|
| 13 |
2016 | 2080 | 2016
| 2080
|
|---|
| 14 |
4096 | 4096 | 4032
| 4160
|
|---|
| 15 |
8256 | 8128 | 8128
| 8256
|
|---|
| 16 |
16512 | 16256 | 16384
| 16384
|
|---|
| 17 |
32896 | 32640 | 32896
| 32640
|
|---|
| 18 |
65536 | 65536 | 65792
| 65280
|
|---|
| 19 |
130816 | 131328 | 131328
| 130816
|
|---|
| 20 |
261632 | 262656 | 262144
| 262144
|
|---|
Examples:
-
The two binary strings of trace 0, subtrace 0 and length
4 are { 0000, 1111 }.
-
The two binary strings of trace 1, subtrace 0 and length
2 are { 10, 01 }.
-
The three binary strings of trace 0, subtrace 1 and length
3 are { 011, 101, 110 }.
-
The four binary strings of trace 1, subtrace 1 and length
4 are { 0111, 1011, 1101, 1110 }.
Further Notes:
-
The number S(n;t,s) can be computed from the following
recurrence relation
S(n;t,s) = S(n-1;t,s) + S(n-1;t-1,s-(t-1))
= S(n-1;t,s) + S(n-1;t+1,s+t+1))
-
Column (0,0) is sequence
A038503 in
Neil J. Sloane's
database
of integer sequences.
The value is
( n0 ) +
( n4 ) +
( n8 ) +
··· ,
which has the closed form expression
( 2n + (1+i)n
+ (1-i)n )/4,
where i is the square root of -1.
The i can be eliminated to get
( 2n + 2 sqrt(2)n cos( Pi.n/4 )/4.
The sequence has the rational generating function
(1-x)3/((1-x)4-x4).
-
Column (0,1) is sequence
A038505 in
Neil J. Sloane's
database
of integer sequences.
The value is
( n2 ) +
( n6 ) +
( n10 ) +
··· ,
which has the closed form expression
( 2n - (1+i)n
- (1-i)n )/4,
where i is the square root of -1.
The i can be eliminated to get
( 2n - 2 sqrt(2)n cos( Pi.n/4 )/4.
The sequence has the rational generating function
x2(1-x)/((1-x)4-x4).
-
Column (1,0) is sequence
A038504 in
Neil J. Sloane's
database
of integer sequences.
The value is
( n1 ) +
( n5 ) +
( n9 ) +
··· ,
which has the closed form expression
( 2n - i(1+i)n)
+ i(1-i)n )/4,
where i is the square root of -1.
The i can be eliminated to get
( 2n + 2 sqrt(2)n sin( Pi.n/4 )/4.
The sequence has the rational generating function
x(1-x)2/((1-x)4-x4).
-
Column (1,1) is sequence
A00749 in
Neil J. Sloane's
database
of integer sequences.
The value is
( n3 ) +
( n7 ) +
( n11 ) +
··· ,
which has the closed form expression
( 2n + i(1+i)n)
- i(1-i)n )/4,
where i is the square root of -1.
The i can be eliminated to get
( 2n - 2 sqrt(2)n sin( Pi.n/4 )/4.
The sequence has the rational generating function
x3/((1-x)4-x4).
Questions?? Email
The wizard of COS.

(Please note that the suffix XXXX must be removed from the preceeding
email address.)
It was last updated Wednesday, 10-May-2006 10:32:13 PDT.
There have been 1127 visitors to this page since May 16, 2000
.
©Frank Ruskey, 1995-2003.