Construction and Applications of CRT Sequences
Abstract
Protocol sequences are used for channel access in the collision channel without feedback. Each user accesses the channel according to a deterministic zeroone 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 crosscorrelation 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 onedimensional sequence and twodimensional array by the Chinese Remainder Theorem (CRT). In the application to the collision channel without feedback, a worstcase lower bound on system throughput is derived.
Tags: Protocol sequences, collision channel without feedback, cyclically permutable constantweight codes, optical orthogonal codes.
I Introduction
Ia Background and Motivation
Randomness is commonly used in the design of multipleaccess 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 pseudorandom numbers. However, highquality pseudorandom 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 pseudorandom sequences, called protocol sequences, that are tailored to the qualityofservice requirements of interest, such as high throughput and bounded delay.
Protocol sequences are used in multipleaccess in the collision channel without feedback [1]. In this paper, we consider a timeslotted 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 zeroerror sumcapacity is . They use protocol sequences having the special property that the Hamming crosscorrelation is independent of relative delay offsets. In fact, the Hamming crosscorrelation they considered is a generalized notion of Hamming crosscorrelation, which is defined for all nonempty subsets of users, not just for pairs of users. Protocol sequences with this property are called shiftinvariant sequences [2]. Shiftinvariant protocol sequences have the advantage that there is no fluctuation in throughput no matter what the delay offsets are, and hence have the largest worstcase system throughput. Constructions of shiftinvariant protocol sequences are considered in [1, 3, 2]. Nevertheless, shiftinvariant 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 crosscorrelation 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 shorttime starvation. In order to achieve short period length, we must seek for protocol sequences with some small variance in Hamming crosscorrelation 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 constantweight 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 crosscorrelation and autocorrelation. In our construction, Hamming autocorrelation may be very large.
Another class of protocol sequences, called wobbling sequences [10], has period equal to , where is the number of users, with worstcase 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 worstcase 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, useridentification and framesynchronization 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.
IB Main Results
The main construction is given in Section II. One of the key ingredients in the construction is the onetoone correspondence between onedimensional sequence and twodimensional 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.
IC 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 autocorrelation of . When and are two different sequences, is called the Hamming crosscorrelation of and .
When the number of ones in a zeroone 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
Iia 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
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 onedimensional cyclic shift of by one time unit is equivalent to a columnwise shift followed by a rowwise shift. Onedimensional correlation properties can be translated to the twodimensional 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 2dimensional 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 1dimensional analog, i.e.,
with and .
The Hamming correlation between two 2dimensional 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 .
IiB 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
(1) 
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 rewrite 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 zeroone 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
CRT sequences satisfy the following properties.
Theorem 1.

The Hamming weight of each CRT sequence is .

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

For each residue , there is exactly one “1” at in .
Proof.
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 preimage 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
(2) 
Iiia Hamming Crosscorrelation
Let and be two distinct elements in . As argued in the previous section, the crosscorrelation of CRT sequences and is equivalent to the crosscorrelation of the associated arrays and , namely by counting the number of elements in common to and . By definition, the translation of is
(3) 
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
(4) 
for .
For nonzero , we can divide both sides of (4) by and rewrite it as
For each fixed , as runs through , also runs through . Therefore, the distribution of Hamming crosscorrelation between and is the same as the distribution of Hamming crosscorrelation between and . From this observation, it suffices to take without any loss of generality. We will consider the Hamming crosscorrelation between and , for and .
The following simple lemma is used repeatedly in the derivation of Hamming crosscorrelation properties.
Lemma 1.
For each , the number of solutions to
for going through consecutive integers , equals
where equals either 0 or 1.
Proof.
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 crosscorrelation of and is equal to either or .
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
(5) 
The Hamming crosscorrelation 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 bookkeeping, we can determine exactly the frequencies of occurrence of Hamming crosscorrelation.
Definition 5. Let the distribution of be
(6) 
for .
Theorem 4.
With notation as in Theorem 3, we have

, .

If , then
(7) (8) (9) where

If , then
(10) (11) (12) where
The proof is relegated to Appendix B.
Example 2. For the CRT sequences in Example IIB with parameters and , we tabulate the distribution of Hamming crosscorrelation 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 crosscorrelation is distributed according to the third part of Theorem 4.
When , the Hamming crosscorrelations have three distinct values, for all pairs of distinct CRT sequences chosen from , .
Theorem 5.
Suppose .

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

Let be of the form . For , is between and .
Proof.
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. ∎
IiiB Hamming Autocorrelation
The distribution of the Hamming autocorrelation can also be determined explicitly.
Theorem 6.
For , and ,
Proof.
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 timeslotted 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 zeroone 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.
Iva 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 threevalued 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 IIB 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 crosscorrelation is at most by Theorem 5, the total number of successful packets (summed over all users) is lower bounded by
(13) 
By completing square, we can write the above as
(14) 
Consider (14) as a function of . The maximum value is obtained when
(15) 
and the maximal value is
(16) 
After dividing the above by the period, we obtain the following lower bound on throughput.
Theorem 7.
Proof.
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 worstcase 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 worstcase 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 .
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 .
Proof.
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 . ∎
IvB 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 autocorrelation 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 IVA. The crosscorrelation 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 twodimensional Hamming crosscorrelation. If is replaced by , all theorems about Hamming crosscorrelation and autocorrelation 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 channelactivity signal. We say that is matched to at time if
.
The receiver stores the channelactivity signal in a firstinfirstout 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 channelactivity 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.
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.
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 channelactivity signal are shown in Fig. 3
By comparing with , the receiver declares that the channelactivity 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 crosscorrelation of the resulting CRT sequences is threevalued (see Theorem 5). For these preferred choices of , we can improve Theorem 9 by relaxing the requirement to .
Theorem 9’.
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
(18) 
The first term is the total number of packets sent by a user in a period. The factor is the maximum Hamming crosscorrelation from Theorem 5. After some simplifications, (18) can be written as
(19) 
An erasurecorrecting 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 ReedSolomon (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 maximaldistance 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 IVA. 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 crosscorrelation 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 crosscorrelation, with delay offset chosen uniformly at random over a period.
Definition 7. We say that the Hamming crosscorrelation is uniform if
(20) 
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 shiftinvariant if it is 0uniform.
In other words,