Construction and Applications of CRT Sequences

Construction and Applications of CRT Sequences


Protocol sequences are used for channel access in the collision channel without feedback. Each user accesses the channel according to a deterministic zero-one pattern, called the protocol sequence. In order to minimize fluctuation of throughput due to delay offsets, we want to construct protocol sequences whose pairwise Hamming cross-correlation is as close to a constant as possible. In this paper, we present a construction of protocol sequences which is based on the bijective mapping between one-dimensional sequence and two-dimensional array by the Chinese Remainder Theorem (CRT). In the application to the collision channel without feedback, a worst-case lower bound on system throughput is derived.

Tags: Protocol sequences, collision channel without feedback, cyclically permutable constant-weight codes, optical orthogonal codes.

I Introduction

I-a Background and Motivation


Randomness is commonly used in the design of multiple-access schemes. For example, in slotted ALOHA, each user transmits a packet with probability independently. Implementations of such random access schemes in practice usually substitute random variables by pseudo-random numbers. However, high-quality pseudo-random number generation may be too complicated for applications, such as wireless sensor networks, where computing power is limited. The objective of this paper is to construct binary pseudo-random sequences, called protocol sequences, that are tailored to the quality-of-service requirements of interest, such as high throughput and bounded delay.

Protocol sequences are used in multiple-access in the collision channel without feedback [1]. In this paper, we consider a time-slotted system, consisting of a number of transmitters and one receiver. A user sends a packet within the boundaries of a time slot. If exactly one user transmits in a time slot, the received packet is received successfully. If two or more users transmit in the same time slot, a collision is incurred, and the received packet is assumed unrecoverable. If no user transmits in a time slot, that time slot is idle. Since there is no feedback from the receiver, collision resolution algorithm such as the stack algorithm is not possible. Each user repeats his assigned binary protocol sequence periodically, and transmits a packet if and only if the value of the protocol sequence at that time slot equals one. We note that the transmission schedule is independent of the data being sent and there is no cooperation among the users.

The capacity of the collision channel without feedback is characterized by Massey and Mathys in [1]. It is shown that the zero-error sum-capacity is . They use protocol sequences having the special property that the Hamming cross-correlation is independent of relative delay offsets. In fact, the Hamming cross-correlation they considered is a generalized notion of Hamming cross-correlation, which is defined for all nonempty subsets of users, not just for pairs of users. Protocol sequences with this property are called shift-invariant sequences [2]. Shift-invariant protocol sequences have the advantage that there is no fluctuation in throughput no matter what the delay offsets are, and hence have the largest worst-case system throughput. Constructions of shift-invariant protocol sequences are considered in [1, 3, 2]. Nevertheless, shift-invariant protocol sequences have the drawback that the period grows exponentially in the number of users [2]. Even if we relax this requirement and consider protocol sequence sets with only pairwise Hamming cross-correlation being constant, it is shown in [4] that the period grows exponentially in the number of users as well. Long period length has the disadvantage that individual or system throughput is invariant only if it is averaged over a long period. Individual users may suffer short-time starvation. In order to achieve short period length, we must seek for protocol sequences with some small variance in Hamming cross-correlation allowed.

After the seminal work of [1], more constructions of protocol sequences are given in [5, 6, 7, 8, 9], sometime under the name of cyclically permutable constant-weight codes, or optical orthogonal codes. The main difference between these works in the literature and our construction is that, the protocol sequences in these papers are required to have small Hamming cross-correlation and auto-correlation. In our construction, Hamming auto-correlation may be very large.

Another class of protocol sequences, called wobbling sequences [10], has period equal to , where is the number of users, with worst-case system throughput provably larger than a positive constant that is approximately equal to 0.25 when is large. The result in this paper improves upon the wobbling sequences by constructing protocol sequences of order or , depending on the models of user activity, while the guarantee of the worst-case system throughput remains the same.

The construction proposed in this paper is based on the Chinese remainder theorem (CRT), and thereby the constructed sequences are called CRT sequences. We remark that the use of CRT in the construction of protocol sequences is not new. The constructions of optical orthogonal codes in [5, 6, 7] also employ CRT. However, the specific construction proposed here is novel. Although the analysis of CRT sequences is quite involved, the generation of such sequences requires no more than computing linear operations in modular arithmetics

The proposed CRT sequences have two special features, user-identification and frame-synchronization capability. The sender of each successfully received packet can be identified by looking at the channel activity only, without looking into the packet contents. Also, we can determine the start time of a protocol sequence, again, based on the channel activity only. One potential application based on this property is tracking targets by detecting energy pulses coming from multiple distributed sources, for example, as in a multistatic radar system or in a ultrasound based sensor network. While it may be difficult to identify the transmitting source of a single pulse, if each source employs a CRT sequence and sends multiple pulses according to the corresponding protocol sequence, then the identifiability property ensures that a detector can identify the transmitting sources of the pulses and make use of the information for more accurate tracking of the targets.

I-B Main Results

The main construction is given in Section II. One of the key ingredients in the construction is the one-to-one correspondence between one-dimensional sequence and two-dimensional arrays via CRT. The correlation property of the constructed sequences is analyzed in Section III.

Applications to the collision channel without feedback are addressed in Section IV with two different user activity models [11]. In the first model, an infinite backlog of data is assumed and the users are active throughout the transmission. We show in Theorem 7 that under this user activity model, we can achieve a throughput of 0.25 with sequence period, where is the number of users.

In the second model, users become active only if they have data to send, and remain idle otherwise. If a user becomes active, it is required that the user remains active for at least one period of the protocol sequence assigned. We show in the second part of Section IV that if the number of active users is no more than one half of the number of potential users, and if the protocol sequences are sufficiently long, namely , the receiver can detect the set of active users and determine their starting time correctly, even without any packet header.

To facilitate comparison between different protocol sequences, we introduce in Section V a notion called -uniformity, which measures the variation of Hamming cross-correlation. Other applications of CRT are given in Section VI.

I-C Definitions and Notations

Let be the ring of residues mod for a positive integer . We will reserve the letter for sequence length.

Definition 1. The components in a sequence of length are indexed from 0 to . The time indices is identified with . The Hamming weight of a binary sequence of length is denoted by . The duty factor [1] of is the Hamming weight divided by the length,

For two binary sequences and of length , their Hamming correlation function is defined as

where is the delay offset, and is the difference in modulo- arithmetic. When , is called the Hamming auto-correlation of . When and are two different sequences, is called the Hamming cross-correlation of and .

When the number of ones in a zero-one sequence is small in compare to the length, the sequence can be compactly represented by specifying the locations of ones.

Definition 2. Given a sequence of length , let the characteristic set of , denoted by , be the subset of such that if and only if .
Shifting a sequence cyclically by is equivalent to translating its characteristic set by , with addition performed modulo . Given a subset in , and , we denote the translation of by as

Expressed in terms of the characteristic set, the Hamming correlation of sequences and equals

for all , where denote the size of a set .

Ii The CRT Construction

Ii-a The CRT correspondence

We shall construct sequences with length , where and are relatively prime integers. In subsequent discussions, we take to be a prime number and an integer not divisible by .

Define a mapping from to the direct sum


By Chinese remainder theorem [12, p.34], is a bijective map. We will call the CRT correspondence. When the values of and are clear from the context, we write instead of .

It can be easily checked that the CRT correspondence is a linear map, meaning that

Here, the addition on the left hand side is the addition in , and the addition on the right hand side is the addition in .

A sequence of length is associated with a array , where and range from 0 to and 0 to respectively, via the relation

The corresponding characteristic set of in is mapped to a subset of via as well.

Under the CRT correspondence, a one-dimensional cyclic shift of by one time unit is equivalent to a column-wise shift followed by a row-wise shift. One-dimensional correlation properties can be translated to the two-dimensional ones.

For illustration, consider the time indices as an integer sequence of length , and . By the bijection , this integer sequence is mapped to

When is cyclically shifted to , the corresponding array is

Note that the second array can be obtained from the first one by cyclically shift downward by one row and then to the right one column.

For , define the Hamming correlation between two 2-dimensional arrays and by

with the subtraction calculated in , and running over all elements in . It is easy to check that this definition of Hamming correlation is compatible with the 1-dimensional analog, i.e.,

with and .

The Hamming correlation between two 2-dimensional arrays and can be expressed in terms of their characteristic set and as

where denotes the characteristic set of ,

and the addition in is performed in .

Ii-B The CRT sequences

We will construct sequences by specifying characteristic sets in . Rows and columns of matrices and arrays will be indexed by and respectively.

Definition 3. Let be prime and be an integer not divisible by . For , we define


The notation simply means the sum of copies of in ,

We say that is generated by , and is the generator of . If and are clear from the context, we write  instead of .

The elements in form an arithmetic progression in with common difference . We can re-write in the following form

with the product in the first component reduced mod .

Remarks: For , the array with as the characteristic set contains exactly one “1” in each column. For , each block of consecutive columns form a permutation matrix. (Recall that a permutation matrix is a square zero-one matrix with exactly one “1” in each row and each column.)

Definition 4. (CRT sequences) For , define the CRT sequence generated by , denoted by , be the binary sequence of length obtained by setting

We will write if the values of and are understood.

Example 1. and . The three characteristic sets are:

The three arrays are shown in Fig. 1. The top left corner in each array is the -entry. The generated CRT sequences are listed as follows

Fig. 1: The three arrays associated with characteristic sets , , .

CRT sequences satisfy the following properties.

Theorem 1.
  1. The Hamming weight of each CRT sequence is .

  2. , i.e., the least period of sequence is .

  3. For each residue , there is exactly one “1” at in .


As the characteristic set contains elements and the CRT correspondence preserves Hamming weight, the first statement in the proposition follows immediately.

For , the elements in characteristic set have the first coordinate identically equal to zero. For , The pre-image of under is a multiple of . We have whenever is a multiple of .

For the last statement in the proposition, consider the image of , for , under the mapping ,

The second coordinate is constant. If goes through to , will go through the th column in the array with characteristic set . Because there is exactly one “1” in each column, there is exactly one “1” in positions . ∎

Iii Correlation Properties of CRT Sequences

We continue to use the notation that is a prime number, is an integer not divisible by . Let denotes the sequence length. In this section, we determine the Hamming correlation of the CRT sequences. In this section, we will use the notation for the remainder of after division by . We distinguish the two additions mod and mod by and , respectively.

For , the array corresponding to sequence is denoted by . Recall that the characteristic set of is given in (1), and if and only if , for and . For notational convenience, we let


Iii-a Hamming Cross-correlation

Let and be two distinct elements in . As argued in the previous section, the cross-correlation of CRT sequences and is equivalent to the cross-correlation of the associated arrays and , namely by counting the number of elements in common to and . By definition, the translation of is


By a change of variable, (3) can be written as

where denotes subtraction mod . In the calculation of , must be first reduced to an integer between 0 and before we reduce modulo . The intersection of and equals to the number of solutions to


for .

For nonzero , we can divide both sides of (4) by and re-write it as

For each fixed , as runs through , also runs through . Therefore, the distribution of Hamming cross-correlation between and is the same as the distribution of Hamming cross-correlation between and . From this observation, it suffices to take without any loss of generality. We will consider the Hamming cross-correlation between and , for and .

The following simple lemma is used repeatedly in the derivation of Hamming cross-correlation properties.

Lemma 1.

For each , the number of solutions to

for going through consecutive integers , equals

where equals either 0 or 1.


Suppose that is divisible by . If we reduce the integers , mod , we have each element in repeated times. Hence, for each , there are exactly integers in whose residue mod equal 

Now suppose that is not divisible by , we divide the consecutive integers into two parts. Among the first integers, for each , exactly equals mod . The residues of the remaining integers are distinct. The number of integers in whose residues equal is either or . ∎

We obtain the following theorem immediately from Lemma 1.

Theorem 2.

The Hamming cross-correlation of and is equal to either or .


If we put and in (4), we get

The number of integers in that equal is either or by Lemma 1. ∎

From now on, we assume , which is the case of practical interest.

Theorem 3.

Suppose . Let be the quotient of divided by , i.e., , and let , . Let be the residue of mod , and


The Hamming cross-correlation between and is bounded between

The proof of Theorem 3 is in Appendix A. We remark that in Theorem 3, is neither 0 nor . The value of is nonzero mod because both and are nonzero. On the other hand, is equal to only if , which is excluded by assumption.

With more careful book-keeping, we can determine exactly the frequencies of occurrence of Hamming cross-correlation.

Definition 5. Let the distribution of be


for .

Theorem 4.

With notation as in Theorem 3, we have

  1. , .

  2. If , then



  3. If , then



The proof is relegated to Appendix B.

Example 2. For the CRT sequences in Example II-B with parameters and , we tabulate the distribution of Hamming cross-correlation between , and , for , as follows.

0 1 5 10 0
2 2 7 6 2

We note that if , then is 2 mod 3. By Theorem 3, equals 1, 2, or 3. The Hamming cross-correlation is distributed according to the third part of Theorem 4.

When , the Hamming cross-correlations have three distinct values, for all pairs of distinct CRT sequences chosen from , .

Theorem 5.

Suppose .

  1. Let be of the form . For , is between and .

  2. Let be of the form . For , is between and .


For the first part of the theorem, we have equal to 1 mod . So

When runs from to , the value of runs over all elements in except 0 and . For odd , the multiplicative inverse of is itself. Hence the range of is . We thus obtain . The result now follows from Theorem 3.

The second part can be proved similarly. ∎

Iii-B Hamming Auto-correlation

The distribution of the Hamming auto-correlation can also be determined explicitly.

Theorem 6.

For , and ,


The first statement follows by the second part of Theorem 1 that has least period .

For the second statement, we note that runs through the whole group as runs from 0 to . This follows from CRT, because for any and ,

has one and only one solution mod . Via a bijective mapping , the set can be regarded as an arithmetic progression in . The intersection is a subset of that is also an arithmetic progression. The intersection is nonempty if and only . If is nonzero, then is equal to for some , and

Iv Application to the Collision Channel without Feedback

Consider a time-slotted collision channel with transmitters and one receiver as described in the introductory section in this paper, and assume that there is no cooperation among the users, and no feedback from the receiver. We regard a packet as a -ary alphabet chosen from the alphabet set . The channel output at slot equals

Each user is assigned a deterministic and periodic zero-one sequence, called protocol sequence [1]. For , the protocol sequence associated with user  is denoted by , which is a periodic binary sequence of period . As there is no feedback from the receiver and no cooperation among the users, each user has a relative delay offset , which is random but remains fixed throughout the communication session. User sends a packet at slot if , and remains silent if .

We consider two different factors in the system model: (i) systems with packet header or without packet header, and (ii) systems with permanent user activity or partial user activity. For system without packet header, the receiver has to identify the set of active users (user identification), and determine the sender of each successfully received packet (packet identification). If packet header is present, information such as user identity is obtained readily by looking up the header, and there is no user and packet identification problem.

For system with partial user activity, the number of active users is smaller than the total number of potential users . When a user changes from inactive to active, packets are sent according to the protocol sequence assigned. It is assumed that after all the data are sent, the user must remain inactive for at least slots before becoming active again. On the other hand, if permanent user activity is assumed, the number of active users is equal to the total number of users, and each user sends packets periodically according to the protocol sequence.

Iv-a Permanent User Activity with Header

For systems with a packet header, the users are simply identified by packet headers. We calculate the achievable throughput when CRT sequences are used. Let the number of users be . We pick sequences from the CRT sequences generated with parameters and . To take advantage of the three-valued property mentioned in Theorem 5 we pick a which is mod .

Construction 1. Let be a prime number and a positive integer. We choose . The CRT construction in Definition II-B yields protocol sequences of length and weight . We pick any sequences from this set of CRT sequences.

Since the Hamming weight is and the pairwise Hamming cross-correlation is at most by Theorem 5, the total number of successful packets (summed over all users) is lower bounded by


By completing square, we can write the above as


Consider (14) as a function of . The maximum value is obtained when


and the maximal value is


After dividing the above by the period, we obtain the following lower bound on throughput.

Theorem 7.


in Construction IV-A. The system throughput is lower bounded by


Consider the expression in (14) as a function of , and denote it by . The coefficient of is . If we take , we deviate from the optimal value of by at most 1. Therefore,

If we put in (13), we drop from the optimal value in (16) by at most . Hence the total number of successful packets, divided by the period, is lower bounded by (17). ∎

Theorem 7 provides a lower bound on the worst-case throughput. The mean system throughput, averaged over all delay offsets, is however much higher than the lower bound.

Example 3. We consider an example with users, using CRT sequences with . The throughput is plotted against sequence length with increasing , while keeping the duty factor fixed at . We compare the lower bound in (17) of worst-case throughput with the average throughput obtained by simulation in Fig. 2. For each , 100000 delay offset combinations are randomly generated. Beside the mean throughput, the maximum and minimum throughput obtained among these 100000 delay offset combinations are also plotted. We can observe that the mean system throughput is about 0.31, in accordance with the theoretical value

When the length increases, the lower bound approaches .

Fig. 2: System Throughput of CRT Sequences for 19 Users, .

Asymptotically, if we increase and in such a way that increases much slower than , we obtain a lower bound on the system throughput of .

Theorem 8.

For arbitrarily small , there exists an infinite class of protocol sequence sets of length , where is the number of sequences, with system throughput lower bounded by for all sufficiently large .


We choose . The lower bound of system throughput in Theorem 7 tends to , with

We can find an integer sufficiently large such that is less than . The theorem then holds for all . ∎

Iv-B Partial User Activity without Header

In this application, we use a modified version of the CRT correspondence. Let be the multiplicative inverse of in , i.e., . Since and are relatively prime, such inverse exists. Define the mapping by

It can also be shown that is a group isomorphism between and .

Because of its unfavorable Hamming auto-correlation property, the sequence generated by is not used in this application. Given a prime number , the system supports potential users. We label the users from 1 to .

Construction 2. Let be a prime number, and be an integer relatively prime to . Choose as described above. For , construct the CRT sequence of length by setting

The sequence generated by is assigned to user . We have used in the above construction, instead of as in Construction IV-A. The cross-correlation properties of the resulting modified CRT sequences are exactly the same as in the previous section, because the proof in the previous section is essentially about two-dimensional Hamming cross-correlation. If is replaced by , all theorems about Hamming cross-correlation and auto-correlation also hold.

Sequence synchronization

For systems without a header, we need to identify the sender of a successful packet. Also, as users may come and go, we also need to determine when a user becomes active. We show that these two tasks can be achieved by merely observing the channel activity, that is whether a time slot is idle, containing a collision or a successful transmission, without looking into the packet contents.

Definition 6. For each time index , let be 0 if it is an idle slot, 1 if exactly one user transmits a packet, or * if two or more users transmit. We call the channel-activity signal. We say that is matched to at time if .

The receiver stores the channel-activity signal in a first-in-first-out queue.

We want to determine (a) the time when a user becomes active, and (b) the time when an active user change status from active to idle. The receiver keeps track of the active users by maintaining Boolean variables , for . The value of is set to if the user is idle, and if the user is active. To determine whether user becomes active at time , the receiver wait until time . At that time the channel-activity signal , are available. The receiver then checks whether is matched to at time . If there is a match, we declare that user is active and the starting time of user is stored in variable . We summarizes the procedure in Algorithm 1 below.

1:  for  do
2:     if  then
3:        if  is matched to at  then
6:        end if
7:     else
8:        if  is a multiple of is not matched to at time  then
11:        end if
12:     end if
13:  end for
Algorithm 1 Determining when a user becomes active or inactive at time .

Under some conditions on the number of active users and period length, we can show that the above algorithm is able to identify the starting time of each user.

Theorem 9.

Let be a prime number, and be an integer relatively prime to . Construct CRT sequences by Construction IV-B and assign them to users 1 to . Suppose that at most users are active at the same time. Then Algorithm 1 can successfully identify the active users and determine their starting time.

The proof of Theorem 9 is given in Appendix C.

Example 4. Consider the CRT sequences generated with parameters , and . The period is equal to 56. Suppose that users 1, 2, 3, 4 and 6 are active. The relative delay offsets of users 1 and 2 are 0, and the relative delay offsets of users 3, 4 and 6 are 1. The CRT sequences to and and the induced channel-activity signal are shown in Fig. 3

Fig. 3: CRT sequences in Example IV-B. Sequence periods are indicated by underbraces.

By comparing with , the receiver declares that the channel-activity signal is matched to at time . The receiver cannot distinguish whether user 6 starts transmitting at time 0 or 1, and erroneously detects that user 6 becomes active at time , while the actual delay offsets is 1. Thus Algorithm 1 fails in this case.

The preceding example illustrates that Algorithm 1 does not work if there are too many active users. Theorem 9 asserts that such error in synchronization does not occur if and the number of simultaneously active users does not exceed .

If , the Hamming cross-correlation of the resulting CRT sequences is three-valued (see Theorem 5). For these preferred choices of , we can improve Theorem 9 by relaxing the requirement to .

Theorem 9.

Let be a prime number, and be an integer such that . Construct CRT sequences by Construction IV-B and assign them to users 1 to . Then Algorithm 1 can identify the active users and determine their starting time, provided that the number of simultaneously active users is no more than .

The proof of Theorem 9’ is analogous to the proof of Theorem 9 in Appendix C.

Erasure Correction and Throughput

We have shown in Theorem 9 that the receiver is able to figure out the delay offsets of the active users. From a specific user’s point of view, the channel reduces to an erasure channel.

In the remainder of this section, we pick to be an integer of the form , for some integer , so that is larger than and Theorem 9’ can be applied.

For each user, the number of successfully received packets in a length is lower bounded by


The first term is the total number of packets sent by a user in a period. The factor is the maximum Hamming cross-correlation from Theorem 5. After some simplifications, (18) can be written as


An erasure-correcting code can be applied across the packets in a period. We pick to be a power of prime such that . We encode information packets using a shortened Reed-Solomon (RS) code of length over the finite field of size . The encoded packets are sent out according to the assigned protocol sequence. Because of the maximal-distance separable property of RS codes, we can recover the information packets. We have thus proved the following

Theorem 10.

Suppose that there are active users out of potential users in the collision channel without feedback, where is an odd prime. Each active user can send information packets in a period of time slots, where is given in (19) and is an integer larger than or equal to . In particular, if we take , the resultant CRT sequences have period , and when users are active, the system throughput is lower bounded by

Example 5. We pick , and in Theorem 10. Generate 18 CRT sequences of length by Construction IV-A. Pick , which is a prime power larger than the Hamming weight of the CRT sequences under consideration. Using a shortened RS code of length 362 and dimension over the finite field of size , we encode 182 information packets in each period for each active user. When 10 users are active, the total number of information packets sent through the system is , achieving system throughput no less than .

V Comparison with Other Protocol Sequences

In order to compare the variation of Hamming cross-correlation due to delay offsets, we introduce in this section a measure of deviation called -uniformity.

Given any two binary and periodic sequences and , let be the expectation of Hamming cross-correlation, with delay offset chosen uniformly at random over a period.

Definition 7. We say that the Hamming cross-correlation is -uniform if


for all . A sequence set is called -uniform if is the smallest number such that each pair of distinct sequences is -uniform. We say that a sequence set is pairwise shift-invariant if it is 0-uniform.

In other words,