Optimization of Generalized Unary Coding

Reading time: 5 minute
...

📝 Original Info

  • Title: Optimization of Generalized Unary Coding
  • ArXiv ID: 1611.03353
  • Date: 2016-11-11
  • Authors: Rakshitha Ravula

📝 Abstract

This paper proposes an optimum version of the recently advanced scheme for generalized unary coding. In this method, the block of 1s that identifies the number is allowed to be broken up, which extends the count. The result is established by a theorem. The number count is now n(n-k-1)+1 rather than the previously described (n-k)(n-k)-1.

💡 Deep Analysis

Deep Dive into Optimization of Generalized Unary Coding.

This paper proposes an optimum version of the recently advanced scheme for generalized unary coding. In this method, the block of 1s that identifies the number is allowed to be broken up, which extends the count. The result is established by a theorem. The number count is now n(n-k-1)+1 rather than the previously described (n-k)(n-k)-1.

📄 Full Content

Unary coding is found in the representation of information in biological systems as in the keeping of time in birdsong [1], [2]. It has also been used applications not only to computer arithmetic [3], neural network training [4], [5] and other coding applications (e.g. [6]). The history of unary coding goes back to the beginning of writing [7], [8].

The main shortcoming of the unary code is its relative inefficiency in representing number count. Recently, a generalized version of the standard unary code was proposed [9] in which instead of a count of n numbers using a n-bit code, the counting was extended to (n-k) 2 -1, where the number is represented by a string k 1s in the block. In this paper, we present a variant of this generalized coding scheme which extends the count to n(n-k-1) +1.

The generalization of unary coding [9] may be done in a variety of manner depending on how the 1s are used in relation to the 0s.

Increase k until k=n, where n is the size of the block. Table 1 presents the example of n=4 and the resulting count: The total count for n bits is 0 to n(n+1)/2. Here n=4, total count is from 0 to 10. The first cycle will count to n, the second to n-1, and so on. The total, therefore, is n

Here k is fixed and after the k+1 digits, the extra digits are marked by a 1 that is separated from the basic set of k 1s. The separation is first 1 unit, and then it is successively increased. Table 2 illustrates this for n=7 and k=3. In the fixed k method for n bits where the additional cycles are marked by a distance of 1 and more in succession, the total count is 0 through (n-k) 2 -1. The count is n -k+1 in the first cycle and each of the subsequent cycles. The total number of cycles possible is n -k -1. Therefore, the total count is (n

Here for n=7, k=3 total count is from 0 to 0 to 15.

Here k is fixed and for every value of s a bit is moved towards left. n is the total number of bits including k 1’s. For every cycle i.e. after every (s-1) digits starting from s=2, a 1 is appended to n and this is separated from the basic k 1’s by a zero. For additional cycles the number of zeros between the appended 1 and basic set k 1’s is increased by 1.

Here is an example for n=8, k=3 Theorem: In fixed k method moving 1 bit each time for n bits, the total count is 0 through n(n-k-1) +1.

Proof: There are k 1s in the n bit long sequence and hence there are (n-k) 0s. The unique sequences that are formed without considering the shifts are (n-k-1). Therefore, the total count in this process will be n(n-k-1) because each of these can be shifted n times. The last count will be the termination of the process. Hence, total count is from 0 to n(n-k-1)+1.

We now present methods for coding and decoding of the proposed scheme.

i. Inputs given n, k. Calculate n-1 ii. For s=0, n=00000000 (always). For n=1, append basic set of k 1’s to the right. iii. Shift each bit left for every increase in s value. This cycle repeats for every (n-1) times. iv. After s= 2n+1, the number of 0’s between the appended 1 and basic set of k 1’s is incremented. v. This process continues till the final count is n(n-k-1) +1.

i. Calculate n, k. ii. P denotes the multiple of n. P= {1, …. , (n-k)}. iii. For every s=Pn+1, the number of 0’s between the appended 1 and basic set of k 1’s is incremented.

Here consider an example n=8, k=4. To calculate 13: i. Find 1,9, 17,25 ii. 13 lies between 9 and 17.

iii. 13-9=4, so move first 4 bits to right and keep the rest of the bits as it is.

We now present results on the distance between different codewords which could be relevant in error situations. The distance function varies in a zig-zag manner for both the previous scheme as well as the new scheme proposed by us as shown by Figure 1. From the graph we observe the proposed scheme in this paper is more efficient as it has higher count than the previous method. The count in the first method is (n-k) 2 -1 and the count in the second method is n(n-k-1)+1. For fixed k=3 and varying values of n the variation in the count is represented clearly in the graph below:

An optimum version of the recently advanced generalized unary coding is proposed which extends the capacity to count beyond the result of the previous method. In this method, the block of 1’s that identifies the number is allowed to be broken up which extends the count. The result is established by a theorem. The number count is increased to n(n-k-1) +1 rather than the previously described (n-k) 2 -1.

📸 Image Gallery

cover.png

Reference

This content is AI-processed based on ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut