Conference PaperPDF Available

# On the number of code words of a DC2-balanced code

Authors:

## Abstract

In this paper we derive a formula for the number of code words of a DC2-balanced codes. This number is expressed as a coefficient of a generating function in two variables. In addition, we establish a lower as well as an upper bound for this number. In particular, we show that the information rate tends to unity when the code length tends to infinity.
133
ON THE NUMBER OF CODE WORDS OF A DCz-BAlANCED CODE
Gerard F.M. Beenker and Kees A. Schouhamer Immink*
In this paper we derive a formula for the number of
code words of a DCz-balanced cod~. This number is
expressed
as
a coefficient of a generating function
in two variables. In addition. we establish a lower
as
well
as
an upper bound for this number. In
particular we show that the information rate tends
to unity when the code length tends to infinity.
1. INTRODUCTION
In [1
J
a DCz-balanced code of length n is defined to be the
set of of all binary vectors
K
=
(x .x •...• x (x E{-l.l})
1 2
n
i
of length n which satisfy the following conditions
n
~
x
O.
i
=
1
n
j
L
L
x
o.
j=l
i
=
1
( 1)
( 2 )
The first condition states that the number of l's in
each vector X equals the number of -l's. This implies
that n must be even. The second condition asserts that
the sum of the partial sums also vanishes. We shall see
that this implies that n is a multiple of four. The
vectors
K
are called code words. In this paper we are
*
The authors are with the Philips Research laboratories.
P.D. Box 80.000, 5600JA. Eindhoven. The Netherlands
134
concerned wi th the number of; c o d e i.wo r d s . For the
practical
a
pp Li c a
t
j
o n s we refer ·to
[1
J.
In section 2 we
derive a formula for the number of code words of a
DC2-balanced code of length n. In section
3
we establish
a lower and an upper bound for this number,
2. THE NUMBER OF CODE WORDS
Let
A
be the number of binary sequences of length n which
n
satisfy the conditions (1) and (2).By changing the order
of summation in (2) and using condition(l) it is
straightforward to show that
A
equals the number of
n
binary sequences ~
(x , x
1 2
•• , x
n
which satisfy
n
L
x
n
L
i
x
o.
( 3 )
i
=
1
.i
=
1
We have already seen that the number of l's in the code
words equals the number of -l's. Hence it follows that
any sequence ~ corresponds to a unique partition of the
index set I {1,2, ... ,n} into two disjoint subsets, say
n
{p ,p , ... ,p and
1 2 n/2
(~orresPOndlng to the
{m
,m , ... ,m } of size n/Z
1 Z n/7
l's and -l's respectively) such that
n/Z
L
p
n/Z
[
m
=
n
1/2
2:=
i
=
1
n(n+l)/4.
(4 )
i
=
1
i
=
1
(As n is even it now follows that n has to be a multiple
of four). On the other hand to each such partition there
corresponds a unique code word x given by x if
- i
i ~ {p ,p , ... ,p and x
=
-1 if i ~{m ,m , ... ,m }.
1 2 n/2 i 1 2 n/2
This implies that the number of code words equals the
number of ways to write n(n+l)/4 as a sum of exactly n/2
distinct elements taken from I This number can be
n
expressed as a coefficient of a generating function in
135
two variables tc
t .
[2, Ch. 6).
Hence we can show the following theorem.
Theorem 1. The number A of code words of a DCz-balanced
nrs
code of length n equals the coefficient of x y (where
r = n(n+1)/4, s n/2) of the polynomial p (x,y) given by
n
2
n
p (x,y) = (1 + xy)(l + x y) ... (l + x y),
n
( 5)
if n = 0 mod 4, and
A
= 0 otherwise.
n
As
p
(x,y)
=
n
derive a
n
(l+x y)p (x,y), it is straigtforward to
n-1
recurrence relation for the coefficients of
p (x,y). Using this relation the values of A up to n=36
n n
have been calculated. These values and those of the
corresponding information rate R = (21ogA )/n are given
n
n
in Table
1.
n A
R
n n
420.250
8 8 0.375
12 58 0.488
16 526 0.565
20 5448 0.621
24 61108 0.662
28 723354 0.695
32 8908546 0.722
36 113093022 0.743
Table I - The number of code words and the corresponding
information rate of DC2-balanced codes.
Theorem 1 does not give much information about the order
of magnitude of A . In the next section we derive a lower
n
as well as an upper bound for this number. We will see
136
that A increases exponentia11y as a function of n.
n
3. BOUNDS FOR THE NUMBER OF CODE WORDS
n
the upper bound.
Let Q be the collection of all subsets of size n/2 of the
set I with the property that the sum of their elements
n
equals n(n+1)/4. We have that A
=
IQI, the cardinality
n
of
Q.
Let B
=
{b ,b , ... ,b } be any subset of with
1 2 n/2 n
n/2 elements and denote S(B) [b Obviously there qre
exactly n
2
/4 distinct subsets of size n/2 of which
n
have n/2-1 elementsin common with B, for each element of
B can be exchanged for n/2 elements not in B. Among these
n
2
/4 subsets there are at most n/2 subsets which belong
to
Q.
This can be seen as follows. If
c;"B, then S(B) is replaced by S(B)
equals nIn+T )/4 for at most one c ~ B,
bE.B is replaced
1
b +
C
and this
1
viz. c c
=
1
by
=
n(n+1)/4-S(B)+b
1
In the same way one can see that the exchange procedure
applied to a subset in Q will never yield another subset
in
Q.
Hence, by applying the exchange procedure n
2
/4
times
on each element öf Q, we can construct n
2
A /4
subsets not
n
belonging to
Q.
These subsets are not necessarily dif-
ferent but we have shown that any of them can be obtained
from at most n/2 subsets in
Q.
That implies that we have
obtained at least (n
2
A /4)/(n/2) nA /2 different
subsets of I
n n
of size n/2 which do not belong to
Q.
n
In other words we have constructed at least nA /2 + A
different subsets of I n n
of size n/2. This number is less
n
than or equal to the total number of subsets of
I of size n/2. Hence we have shown that
n
A
\$
n
( 6 )
To derive a lower bound for A we consider the polynomial
"
137
p (x,y) defined by (5) in more detail. Let p (x,y) be
n n
given by its expansion as a polynomial in y
p
(x,y)
n
m
y
(7)
m=l
Then one can show that
t
c
f .
12, Ch.
6,
prob
7).
p
(x,y)
n
n
Lm m(m+1)/2
y
x
(8 )
m=O
where
[
:
]
n n-m+1
(1-x
>' ..
(1-x )
---------m--
(1-
x )
( 9 )
(1-
x)
The coefficient is called the Gaussian binomial
coefficient 13). As a direct consequence of
(8)
the
coefficients are polynomials in x. Moreover it is not
difficult to see that
1
i
m
x->l
[~] = (~).
( 10)
This implies that the sum of the coefficients of
equals (~). The combination of Theorem
1
and
(8)
[~]
to the fact that A
of [n~2], where u ~
u
is equal to the coefficient of x
A
C
(11 )
n
x
As [n~2] is a polynomial of degree n
Z
/4
we see that A
is the middle most coefficient of [n~2] n
Without proof we mention the following lemma.
138
Lemma 1. Let
a
+
a x
+ ..
o
1
t
a
x,
where ot
t
(n-k)k.
Then
(a ) for all i, O::;i::;t,
a
=
a
i t-i
(b ) there is an m, O::;m::;t,
suc h that
a
s
a
s
...
::;
a
::;
a
~
a ~ ... ~a
~
a
0
1
m-I m m+I t-I t
( 12)
( 13)
The proof of Lemma (a) is straightforward but
there is no elementary proof of Lemma I (b) known.
t
c
f
[3,
Th.
3.10]>'
Using this lemma we may conclude
that A is the largest among the n2/4+1 coefficients of
[n~2].nAS the sum of the coefficients equals (n~2) we
have found
4
( 14 )
A
n
+
4
Combination of
(6)
and (14) leads to the following
theorem.
n
DC2-balanced code of length n, n
=
0
mod 4. Then
Theorem
2.
Let A be the number of code words of a
4
2
( 15)
::;A
n2
+
4
nn
+
2
Using well-known bounds for the binomial coefficients
([4, Ch.lO, lemma
6])
we can show that
R
satisfies
n
5 3
1 - __ (210g n
-3/5) ::; R ::;
1 - (21og n
-1).
(16)
2n n----zn
In particular it follows that
1
i
m
n
->
00
R
=
1.
n
( 17)
Observe that the bounds are rather tight as the
difference between the upper and lower bound of
R
n
respectively is 210g n /n.
139
4. CONCLUSIONS
In this paper we have derived a formula for the number
of code words of a DC2-balanced code. This number has
been given as coefficient of a generating polynomial in
two variables. From this formula bounds for the number
of code words and for the information rate have been
established.
REFERENCES
[1) K.A. Schouhamer Immink, Spectrum shaping with
binary DC2-constrained codes, Philips J. Res., vol. 40,
pp. 40-53, 1985.
[2)
J. Riordan, An introduction to combinatorial
analysis, Princeton University Press, 1980.
[3) G.E Andrews, The theory of partitions, Encyclopedia
2, Addisonof Mathematics and its Applications, vol.
Wes1ey Publishing Company, 1976.
[4) F.J. MacWil1iams and N.J.A. S1oane, The theory of
error correcting codes, North-Holland Publishing
Company, 1978.
Article
A method is presented for designing binary channel codes in such a way that both the power spectral density function and its low-order derivatives vanish at zero frequency. The performance of the new codes is compared with that of channel codes designed with a constraint on the unbalance Of the number of transmitted positive and negative pulses. Some remarks are made on the error-correcting capabilities of these codes.
ResearchGate has not been able to resolve any references for this publication.