Академический Документы
Профессиональный Документы
Культура Документы
Shoaib u Din
Department of Mathematics
University of the Punjab Lahore
shoaibdin@gmail.com
Khalil Ahmad
Department of Mathematics
University Of Management and Technology Lahore
khalil@umt.edu.pk
ABSTRACT
Greedy algorithm is used to develop a class of binary error-correcting codes for given
length n and minimum distance d by arranging all strings of length n in B-odering. On
the basis of minimum distance d a non negative integer is assigned to each string in the
B-odering called g-value [2]. In this paper, We proposed a new algorithm for the
allocation of g-values to the binary vectors along with a g-value decoding algorithm for
binary linear codes.
1 INTRODUCTION choice.
The application of greedy algorithm requires
C(n,k,d) a binary linear error correcting code is some sort of ordering in the choices, e.g. in activity
k selection problem greedy algorithm works with the
a set of code words, each of length n, contains 2
assumption that input activities are ordered by
code words with the condition that minimum
increasing finishing time. In knapsack problem items
distance between any two code words is greater than
are ordered in increasing weight. In greedy codes we
or equal to d. There are a number of ways to generate
apply greedy algorithm on the choices arranged
an error correcting code, however in this paper only
according to B-ordering.
greedy codes are discussed. Greedy codes are the
A greedy code is a code generated by the
codes generated by the application of greedy
application of a greedy algorithm, where the vectors
algorithm on the vectors arranged in B-ordering[4].
are arranged in a certain type of ordering. When first
Each vector is assigned a unique non negative
vector in the list having a given property is selected,
integer known as g-value. All possible vectors of a
the algorithm continues recursively, until the list is
given length are divided onto various classes
exhausted. The problem is to maximize the number
according to there g-values. On the basis of
of vectors in the code. The use of greedy algorithm
properties of g-values an algorithm for decoding is
for generating codes is especially attractive due to its
designed.
natural way of producing a code with a given
minimum distance. The vectors are arranged in an
2 B-ORDERING ordering and each vector is analyzed in turn for being
accepted or rejected according to its distance from
Greedy algorithm at any stage makes the choice vectors already chosen.
that appears to be the best at that stage. That is, it The ordering is important and it happens that the
makes a locally optimal choice in the hope that this B-ordering, a very natural type of ordering, gives a
choice will lead to a globally optimal solution. The linear code every time.
choice made by greedy algorithm may depend on B-ordering is a generalization of lexicographic
previous choices, but it doesn’t depend on any future ordering[7]. It was first defined and discussed by
Table 1
g-value
0 1 2 3 4 5 6 7
S.No.
1 0000000 0000001 0000011 0000010 0001111 0001110 0001100 0001101
2 0000111 0000110 0000100 0000101 0001000 0001001 0001011 0001010
3 0011110 0011111 0011101 0011100 0010001 0010000 0010010 0010011
4 0011001 0011000 0011010 0011011 0010110 0010111 0010101 0010100
5 0110011 0110010 0110000 0110001 0111100 0111101 0111111 0111110
6 0110100 0110101 0110111 0110110 0111011 0111010 0111000 0111001
7 0101101 0101100 0101110 0101111 0100010 0100011 0100001 0100000
8 0101010 0101011 0101001 0101000 0100101 0100100 0100110 0100111
9 1111111 1111110 1111100 1111101 1110000 1110001 1110011 1110010
10 1111000 1111001 1111011 1111010 1110111 1110110 1110100 1110101
11 1100001 1100000 1100010 1100010 1101110 1101111 1101101 1101100
12 1100110 1100111 1100101 1100100 1101001 1101000 1101010 1101011
13 1001100 1001101 1001111 1001110 1000011 1000010 1000000 1000001
14 1001011 1001010 1001000 1001001 1000100 1000101 1000111 1000110
15 1010010 1010011 1010001 1010000 1011101 1011100 1011110 1011111
16 1010101 1010100 1010110 1010111 1011010 1011011 1011001 1011000
Number of different g-values = 2n-k =27-4 =23=8 let it is i. Build the set G i of all words with g-value i.