Module 2
Module 2
ALGEBRAIC STRUCTURE
Semigroups and Monoids
◦ Semigroups: If 𝑆 is a nonempty set and ∗ be a binary operation on 𝑆, then the algebraic
system {𝑆,∗} is called a semigroup, if the operation ∗ is associative.
◦ For any 𝑎, 𝑏, 𝑐 ∈ 𝑆 𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝐶)
◦ Monoid: If a semigroup {𝑀,∗} has an identity element with respect to the operation ∗
, then {𝑀,∗} is called a monoid.
◦ For any 𝑎, 𝑏, 𝑐 ∈ 𝑀, 𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝐶) and if there exists an element 𝑒 ∈ 𝑀 such that
for any 𝑎 ∈ 𝑀, 𝑒 ∗ 𝑎 = 𝑎 ∗ 𝑒 = 𝑎, then the algebraic system {𝑀,∗} is called a monoid
Problems:
1. If ∗ is the binary operation on the set 𝑅 of real numbers defined by 𝑎 ∗ 𝑏 = 𝑎 + 𝑏 + 2𝑎𝑏, (a)
Find if {𝑅,∗} is a semigroup. Is it commutative? (b) Find the identity element, if exists. (c)
which elements have inverse and what are they?
Solution:
(a) 𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 + 𝑏 + 2𝑎𝑏 + 𝑐 + 2 𝑎 + 𝑏 + 2𝑎𝑏 𝑐 = 𝑎 + 𝑏 + 𝑐 + 2 𝑎𝑏 + 𝑏𝑐 + 𝑐𝑎 + 4𝑎𝑏𝑐
𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 + 𝑏 + 𝑐 + 2𝑏𝑐 + 2𝑎 𝑏 + 𝑐 + 2𝑏𝑐 = 𝑎 + 𝑏 + 𝑐 + 2 𝑎𝑏 + 𝑏𝑐 + 𝑐𝑎 + 4𝑎𝑏𝑐
Hence, 𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝑐) is associative. Hence (𝑅,∗) is a semigroup.
Also 𝑏 ∗ 𝑎 = 𝑏 + 𝑎 + 2𝑏𝑎 = 𝑎 ∗ 𝑏. Therefore (R,∗) is a commutative.
(b) If the identity element exists, let it be 𝑒. Then for any 𝑎 ∈ 𝑅, 𝑎 ∗ 𝑒 = 𝑎
𝑎 + 𝑒 + 2𝑎𝑒 = 𝑎
𝑒 1 + 2𝑎 = 0
𝑒 = 0, since (1 + 2𝑎) ≠ 0, for any 𝑎 ∈ 𝑅
(c) Let 𝑎−1 be the inverse of an element 𝑎 ∈ 𝑅. Then 𝑎 ∗ 𝑎−1 = 𝑒
𝑎
𝑎−1 = − 1+2𝑎
1 𝑎
If 𝑎 ≠ − 2, 𝑎−1 exists and 𝑎−1 = − 1+2𝑎
◦ If ∗ is the operation defined on 𝑆 = 𝑄 × 𝑄, the set of ordered pairs of rational numbers
and given by 𝑎, 𝑏 ∗ 𝑥, 𝑦 = (𝑎𝑥, 𝑎𝑦 + 𝑏)
(a)Find if (𝑆,∗) is a semigroup. Is it commutative?
(b)Find the identity element of 𝑆.
(c) Which elements, if any, have inverses and what are they? Done
Solution:
(a) 𝑎, 𝑏 ∗ 𝑥, 𝑦 ∗ 𝑐, 𝑑 = 𝑎𝑥, 𝑎𝑦 + 𝑏 ∗ 𝑐, 𝑑 = (𝑎𝑐𝑥, 𝑎𝑑𝑥 + 𝑎𝑦 + 𝑏)
𝑎, 𝑏 ∗ 𝑥, 𝑦 ∗ 𝑐, 𝑑 = 𝑎, 𝑏 ∗ 𝑥𝑐, 𝑥𝑑 + 𝑦 = (𝑎𝑐𝑥, 𝑎𝑑𝑥 + 𝑎𝑦 + 𝑏)
Hence ∗ is Associative on 𝑆
∴ (𝑆,∗) is a semigroup
Commutative: 𝑥, 𝑦 ∗ 𝑎, 𝑏 = (𝑎𝑥, 𝑥𝑏 + 𝑦) ≠ (𝑎𝑥, 𝑎𝑦 + 𝑏)
∴ It is not commutative.
◦ If 𝑍6 is the set of all equivalence classes generated by the equivalence relation
“Congruence modulo 6”, prove that {𝑍6 ,×6 } is a monoid. Where the operation ×6 and 𝑍6 is
defined as 𝑖 ×6 𝑗 = [ 𝑖 × 𝑗 (𝑚𝑜𝑑 6)], for any 𝑖 , 𝑗 ∈ 𝑍6 . Which elements of the monoid are
invertible?
Solution: 𝑋6 [0] [1] [2] 3 [4] [5]
[0] 0 0 0 0 0 0
[1] 0 1 2 3 4 5
[2] 0 2 4 0 2 4
[3] 0 3 0 3 0 3
[4] 0 4 2 0 4 2
[5] 0 5 4 3 2 1
The operation ×6 is associative
For example: 2 ×6 4 ×6 5 = 2 ×6 5 = 4
2 ×6 4 ×6 5 = 2 ×6 2 = 4
Identity element of {𝑍6 ,×6 } is 0
Hence {𝑍6 ,×6 } is a monoid
From the table, it is clear that only 1 and 5 are invertible. Since 1 ×6 1 = 1 and
5 ×6 5 = [5]
Groups
◦ If 𝐺 is a non-empty set and ∗ is a binary operation of 𝐺, then the algebraic system {𝐺,∗} is
called a group if the following conditions are satisfied:
1. For all 𝑎, 𝑏, 𝑐 ∈ 𝐺, 𝑎 ∗ 𝑏 ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝑐) (Associativity)
2. There exists an element 𝑒 ∈ 𝐺 such that, for any 𝑎 ∈ 𝐺, 𝑎 ∗ 𝑒 = 𝑒 ∗ 𝑎 = 𝑎 (Existence of
Identity)
3. For every 𝑎 ∈ 𝐺, there exists an element 𝑎−1 ∈ 𝐺 such that 𝑎 ∗ 𝑎 −1 = 𝑎−1 ∗ 𝑎 = 𝑒
(Existence of inverse)
Definitions
◦ When 𝐺 is finite, the numbers of elements of 𝐺 is called the order of 𝐺 and denoted by
𝑂 𝐺 or 𝐺 .
◦ If the element 𝑎 ∈ 𝐺, where 𝐺 is a group with identity element 𝑒, then the least positive
integer 𝑚 for which 𝑎𝑚 = 𝑒 is called the order of the element 𝑎 and denoted as 𝑂(𝑎)
◦ If no such integer exists, then 𝑎 is of infinity order.
◦ A group (𝐺,∗), in which the binary operation ∗ is commutative, is called a commutative
group or abelian group
For example: The set of rational numbers excluding zero is an abelian group under the
usual multiplication
◦ Show that the set 𝑄+ of all positive rational numbers forms an abelian group under the
1
operation ∗ defined by 𝑎 ∗ 𝑏 = 2 𝑎𝑏; 𝑎, 𝑏 ∈ 𝑄+ . Done
Solution:
𝑎𝑏
When 𝑎, 𝑏 ∈ 𝑄+ , ∈ 𝑄+
2
∴ 𝑄+ is closed under the operation ∗
𝑎𝑏 𝑎𝑏𝑐
Now, 𝑎 ∗ 𝑏 ∗ 𝑐 = ∗ 𝑐=
2 4
𝑏𝑐 𝑎𝑏𝑐
𝑎∗ 𝑏∗𝑐 =𝑎∗ =
2 4
Hence ∗ is associative
Let 𝑒 be the identity element of 𝑄+ under ∗
∴ 𝑎 ∗ 𝑒 = 𝑒 ∗ 𝑎 = 𝑎 for 𝑎 ∈ 𝑄 +
1
𝑎𝑒 =𝑎
2
𝑒 = 2 ∈ 𝑄+
Hence identity element exists
◦ Let 𝑏 be the inverse of the element 𝑎 ∈ 𝐺
◦ Then 𝑎 ∗ 𝑏 = 𝑏 ∗ 𝑎 = 𝑒 = 2
1
◦ 2
𝑎𝑏 =2
4
◦ 𝑏 = 𝑎 ∈ 𝑄+
◦ Thus, every element of 𝑄+ is invertible
◦ Therefore, (𝑄 + ,∗) is a group
𝑎𝑏 𝑏𝑎
◦ Also 𝑎 ∗ 𝑏 = = =𝑏∗𝑎
2 2
Theorem: The necessary and sufficient condition for a non-empty subset 𝐻 of a group
{𝐺,∗} to be subgroup is 𝑎, 𝑏 ∈ 𝐻 ⇒ 𝑎 ∗ 𝑏 −1 ∈ 𝐻.
Group Homomorphism
◦ If {𝐺,∗} and 𝐺 ′ ,△ are two groups, then a mapping 𝑓: 𝐺 → 𝐺′ is called a group
homomorphism, if for any 𝑎, 𝑏 ∈ 𝐺.
𝑓 𝑎 ∗ 𝑏 = 𝑓(𝑎) △ 𝑓(𝑏)
◦ A group homomorphism 𝑓 is called group isomorphism, if 𝑓 is one-to-one and on-to.
𝑥𝑦 2
= 𝑒. i.e. we have 𝑥𝑦 ∈ 𝐻
Thus, all the 3 conditions in the definition of a subgroup are satisfied.
Therefore 𝐻 is a subgroup of 𝐺
◦ If 𝐺 is the set of all ordered pairs 𝑎, 𝑏 , where 𝑎(≠ 0) and 𝑏 are real and the binary operation
∗ on 𝐺 is defined by 𝑎, 𝑏 ∗ 𝑐, 𝑑 = (𝑎𝑐, 𝑏𝑐 + 𝑑). Show that (𝐺,∗) is a non-abelian group. Show
also that the subset 𝐻 of all those elements of 𝐺 which are of the form (1, 𝑏) is a subgroup of
𝐺.
Solution:
Let 𝑎, 𝑏 , (𝑐, 𝑑) ∈ 𝐺 , then 𝑎, 𝑏 ∗ 𝑐, 𝑑 = (𝑎𝑐, 𝑏𝑐 + 𝑑) ∈ 𝐺
∴ 𝐺 is closure under ∗
𝑎, 𝑏 ∗ 𝑐, 𝑑 ∗ 𝑒, 𝑓 = 𝑎, 𝑏 ∗ 𝑐𝑒, 𝑑𝑒 + 𝑓 = (𝑎𝑐𝑒, 𝑏𝑐𝑒 + 𝑑𝑒 + 𝑓)
𝑎, 𝑏 ∗ 𝑐, 𝑑 ∗ 𝑒, 𝑓 = 𝑎𝑐, 𝑏𝑐 + 𝑑 ∗ 𝑒, 𝑓 = (𝑎𝑐𝑒, 𝑏𝑐𝑒 + 𝑑𝑒 + 𝑓)
∴ 𝐺 is associative
Let (𝑒1 , 𝑒2 ) be the identity element of 𝐺 then 𝑎, 𝑏 ∗ 𝑒1 , 𝑒2 = (𝑎, 𝑏)
𝑒1 , 𝑒2 = (1,0)
Let (𝑥, 𝑦) be the inverse element of (𝑎, 𝑏) ∈ 𝐺 then 𝑎, 𝑏 ∗ 𝑥, 𝑦 = (1,0)
1 𝑏
𝑥 = 𝑎,𝑦 = −𝑎
Thus (𝐺,∗) is a group.
𝑎, 𝑏 ∗ 𝑐, 𝑑 = (𝑎𝑐, 𝑏𝑐 + 𝑑)
𝑐, 𝑑 ∗ 𝑎, 𝑏 = 𝑎𝑐, 𝑑𝑎 + 𝑏 ≠ 𝑎𝑐, 𝑏𝑐 + 𝑑 = 𝑎, 𝑏 ∗ 𝑐, 𝑑
Thus (𝐺,∗) is a non-abelian group
(ii) Show also that the subset 𝐻 of all those elements of 𝐺 which are of the form (1, 𝑏) is a
subgroup of 𝐺.
Proof:
The elements of 𝐻 = {(1, 𝑏)}
𝐻 is not an empty set
−1 1 𝑐
1, 𝑏 ∗ 1, 𝑐 = 1, 𝑏 ∗ ∗ −1
1
1, 𝑏 ∗ 1, 𝑐 −1
= 1, 𝑏 ∗ 1, −𝑐 = (1, 𝑏 − 𝑐)
(1, 𝑏 − 𝑐) ∈ 𝐻
Hence the necessary and sufficient condition for a subgroup is satisfied
Thus, H is a subgroup of 𝐺
◦ If 𝐺 is the set of all ordered pairs (𝑎, 𝑏) of real numbers and ∗ is binary operation defined by
𝑎, 𝑏 ∗ 𝑐, 𝑑 = (𝑎 + 𝑐, 𝑏 + 𝑑), prove that (𝐺,∗) is a group. If 𝐺′ is the additive group of all real
numbers, prove that the mapping 𝑓: 𝐺 → 𝐺′ defined by 𝑓 𝑎, 𝑏 = 𝑎 for all 𝑎, 𝑏 ∈ 𝐺 is a
homomorphism.
Solution
Let 𝑎, 𝑏 & (𝑐, 𝑑) ∈ 𝐺 then 𝑎, 𝑏 ∗ 𝑐, 𝑑 = (𝑎 + 𝑐, 𝑏 + 𝑑) ∈ 𝐺
Hence 𝐺 satisfies closure property
Let 𝑎, 𝑏 , (𝑐, 𝑑) & (𝑒, 𝑓) ∈ 𝐺 then
𝑎, 𝑏 ∗ 𝑐, 𝑑 ∗ 𝑒, 𝑓 = 𝑎, 𝑏 ∗ 𝑐 + 𝑒, 𝑑 + 𝑓 = (𝑎 + 𝑐 + 𝑒, 𝑏 + 𝑑 + 𝑓)
𝑎, 𝑏 ∗ 𝑐, 𝑑 ∗ 𝑒, 𝑓 = 𝑎 + 𝑐, 𝑏 + 𝑑 ∗ 𝑒, 𝑓 = (𝑎 + 𝑐 + 𝑒, 𝑏 + 𝑑 + 𝑓)
Therefore 𝐺 is associative
Let (𝑒1 , 𝑒2 ) be the identity element of 𝐺 then 𝑎, 𝑏 ∗ 𝑒1 , 𝑒2 = (𝑎, 𝑏)
𝑒1 = 0, 𝑒2 = 0
Therefore identity element of 𝐺 is (0, 0)
Let (𝑥, 𝑦) be the inverse element for any (𝑎, 𝑏) ∈ 𝐺, then
𝑥, 𝑦 ∗ 𝑎, 𝑏 = 0,0
𝑥, 𝑦 = −𝑎, −𝑏
Therefore (𝐺,∗) is a group.
(ii) If 𝐺′ is the additive group of all real numbers, prove that the mapping 𝑓: 𝐺 → 𝐺′ defined
by 𝑓 𝑎, 𝑏 = 𝑎 for all 𝑎, 𝑏 ∈ 𝐺 is a homomorphism.
To prove: 𝑓 𝑎, 𝑏 ∗ 𝑐, 𝑑 = 𝑓 𝑎, 𝑏 + 𝑓(𝑐, 𝑑)
Proof:
𝑓 𝑎, 𝑏 ∗ 𝑐, 𝑑 = 𝑓 𝑎 + 𝑐, 𝑏 + 𝑑 =𝑎+𝑐
𝑓 𝑎, 𝑏 + 𝑓 𝑐, 𝑑 = 𝑎 + 𝑐
Hence 𝑓: 𝐺 → 𝐺′ is a homomorphism
◦ If 𝐺 is the additive group of integers and 𝐻 is the subgroup of 𝐺 obtained by multiplying each
element of 𝐺 by 3, find the distinct right cosets of 𝐻 in 𝐺.
Solution:
𝐺 = {… , −3, −2, −1,0,1,2,3, … }
𝐻 = {… , −9, −6, −3,0,3,6,9, … }
Now 0 ∈ 𝐺
𝐻 + 0 = … , −9, −6, −3,0,3,6,9, … = 𝐻
1∈𝐺
𝐻 + 1 = {… , −8, −5, −2,1,4,7,10, … }
2∈𝐺
𝐻 + 2 = {… , −7, −4, −1,2, 5, 8, 11, … }
3∈𝐺
𝐻 + 3 = … , −6, −3,0,3,6,9,12, … = 𝐻
We see that 𝐻 + 4 = 𝐻 + 1, 𝐻 + 5 = 𝐻 + 2, 𝐻 + 6 = 𝐻, etc.
We can also see that 𝐻 + −1 = 𝐻 + 2, 𝐻 + −2 = 𝐻 + 1, 𝐻 + −3 = 𝐻 and so on
Hence the three distinct right cosets of 𝐻 in 𝐺 are 𝐻, 𝐻 + 1, 𝐻 + 2 as they are disjoint.
Also 𝐻 ∪ 𝐻 + 1 ∪ 𝐻 + 2 = 𝐺
◦ Assume that G is a finite group with subgroups H of order 12 and K of order 30. If the order of G is less
than 200, what are the possible values for the order of G.
Coding Theory
◦ The process of communication involves transmitting some information carrying signal
(message) that is conveyed by a sender to a receiver.
◦ Even though the sender may like to have his message received by the receive without
any distortion, it is not possible due to a variety of disturbances (noise) to which the
communication channel is subjected.
◦ Coding theory deals with minimizing the distortions of the conveyed message due to
noise and to retrieve the original message to the optimal extent possible from the
corrupted message.
Encoders and Decoders
◦ An encoder is a device which transforms the incoming messages in such a way that
the presence of noise in the transformed messages is detectable.
◦ A decoder is a device which transforms the encoded message in to their original form
that can be understood by the receiver.
Group Code
Definition:
◦ If 𝐵 = {0,1}, then 𝐵𝑛 = {𝑥1 , 𝑥2 , … , 𝑥𝑛 |𝑥𝑖 ∈ 𝐵, 𝑖 = 1, 2, 3, … , 𝑛} is a group under the binary
operation of additional modulo 2, denoted by ⊕. This group (𝐵𝑛 ,⊕) is a called a group
code.
◦ Prove that (𝐵𝑛 ,⊕) is a group.
Proof
If 𝑥1 , 𝑥2 , … , 𝑥𝑛 , {𝑦1 , 𝑦2 , … , 𝑦𝑛 } ∈ 𝐵𝑛 , then
𝑥1 , 𝑥2 , … , 𝑥𝑛 ⊕ 𝑦1 , 𝑦2 , … , 𝑦𝑛 = (𝑥1 + 𝑦1 , 𝑥2 + 𝑦2 , … , 𝑥𝑛 + 𝑦𝑛 ) ∈ 𝐵𝑛
𝑥𝑖 +2 𝑦𝑗 = 0 𝑜𝑟 1 , since 0 +2 0 = 0, 0 +2 1 = 1, 1 +2 0 = 1 and 1 +2 1 = 0
0, 0, … , 0 is the identity element of 𝐵𝑛 .Also the inverse of 𝑥1 , 𝑥2 , … , 𝑥𝑛 is itself.
Hence (𝐵𝑛 ,⊕) is a group and it is also abelian.
◦ In general, Any code which is group under the binary operation of addition modulo 2,
denoted by ⊕ is a group code.
Hamming Code
◦ The codes obtained by introducing additional digits called parity digits to the digits in
the original message are called Hamming codes
◦ If the original message is a binary string of length 𝒎, the Hamming encoded message is
string of length, 𝒏 (𝒏 > 𝒎). Of the 𝑛 digits, 𝒎 digits are used to represent the information
part of the message and the remaining (𝒏 − 𝒎) digits are used for the detection and
correction of errors in the message received.
◦ In Hamming’s single-error detecting code of length 𝑛, the first 𝑛 − 1 digits contain the
information part of the message and the last digit is made either 0 or 1.
◦ If the digit introduced in the last position gives an even number/odd numbers of 1’s in
the encoded word of length 𝑛, the extra digit is called an even/odd parity check.
Hamming distance
◦ The number of 1′ 𝑠 in the binary string 𝑥 ∈ 𝐵2 is called the weight of 𝑥 and is denoted by |𝑥|
◦ If 𝑥 and 𝑦 represent the binary strings 𝑥1 , 𝑥2 , … , 𝑥𝑛 and 𝑦1 , 𝑦2 , … , 𝑦𝑛 , the number of positions in
the strings for which 𝑥𝑖 ≠ 𝑦𝑖 is called the Hamming distance between 𝑥 and 𝑦 denoted by
𝐻(𝑥, 𝑦)
𝑛
𝐻 𝑥, 𝑦 = 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑥 ⊕ 𝑦 = (𝑥𝑖 +2 𝑦𝑖 )
𝑖=1
Step 2: We select some word 𝑦𝑗 ∈ 𝐵𝑛 but not in 𝐶 having minimum weight and construct
a new row or coset 𝑦𝑗 ⊕ 𝑐𝑖 for all 𝑖 such that 1 ≤ 𝑖 ≤ 2𝑚
Thus, we have
𝑦𝑗 ⊕ 𝑐1 𝑦𝑗 ⊕ 𝑐2 … 𝑦𝑗 ⊕ 𝑐2𝑚
Example, consider 𝑦2 = 10000, then the second row would be
10000 00110 11011 01101
◦ Step 3: We now form the third row by selecting some 𝑦𝑘 ∈ 𝐵𝑛 which is not in the
preceding two rows and which has the minimum weight and proceeding as in step 2.
Thus, we have 𝑦3 𝑦3 ⊕ 𝑐1 𝑦3 ⊕ 𝑐2 … 𝑦3 ⊕ 𝑐2𝑚
Example: If 𝑦3 = 01000, then the third row would be
1000 11110 00011 10101
◦ Step 4: This process is continued until all the elements in 𝐵𝑛 are entered in the table. The
complete decoding table will be of the form
𝑐1 (= 0) 𝑐2 𝑐3 … 𝑐2𝑚
𝑦2 𝑦2 ⊕ 𝑐2 𝑦2 ⊕ 𝑐3 … 𝑦2 ⊕ 𝑐2𝑚
… … … … …
𝑦2𝑛−𝑚 𝑦2𝑛−𝑚 ⊕ 𝑐2 𝑦2𝑛−𝑚 ⊕ 𝑐3 … 𝑦2𝑛−𝑚 ⊕ 𝑐2𝑚
◦ Step 5: once the decoding table is constructed, the decoding of any received word 𝑟
is done as follows.
◦ First we identify the column of the decoding table in which 𝑟 occurs. If the weight of
the coset leader corresponding to 𝑟 is 1, then the decoded word is the element at the
top of the column in which 𝑟 occurs.
◦ Step 6: If the weight of the coset leader corresponding to the received word 𝑟 is 2, the
decoding cannot be done, the coded word transmitted cannot be determined
uniquely, as two coded words might have been received as the same word 𝑟 due to 2
errors during transmission.
Coding Theory
◦ The process of communication involves transmitting some information carrying signal
(message) that is conveyed by a sender to a receiver.
◦ Even though the sender may like to have his message received by the receive without
any distortion, it is not possible due to a variety of disturbances (noise) to which the
communication channel is subjected.
◦ Coding theory deals with minimizing the distortions of the conveyed message due to
noise and to retrieve the original message to the optimal extent possible from the
corrupted message.
Encoders and Decoders
◦ An encoder is a device which transforms the incoming messages in such a way that
the presence of noise in the transformed messages is detectable.
◦ A decoder is a device which transforms the encoded message in to their original form
that can be understood by the receiver.
Group Code
Definition:
◦ If 𝐵 = {0,1}, then 𝐵𝑛 = {𝑥1 , 𝑥2 , … , 𝑥𝑛 |𝑥𝑖 ∈ 𝐵, 𝑖 = 1, 2, 3, … , 𝑛} is a group under the binary
operation of additional modulo 2, denoted by ⊕. This group (𝐵𝑛 ,⊕) is a called a group
code.
◦ Prove that (𝐵𝑛 ,⊕) is a group.
Proof
If 𝑥1 , 𝑥2 , … , 𝑥𝑛 , {𝑦1 , 𝑦2 , … , 𝑦𝑛 } ∈ 𝐵𝑛 , then
𝑥1 , 𝑥2 , … , 𝑥𝑛 ⊕ 𝑦1 , 𝑦2 , … , 𝑦𝑛 = (𝑥1 + 𝑦1 , 𝑥2 + 𝑦2 , … , 𝑥𝑛 + 𝑦𝑛 ) ∈ 𝐵𝑛
𝑥𝑖 +2 𝑦𝑗 = 0 𝑜𝑟 1 , since 0 +2 0 = 0, 0 +2 1 = 1, 1 +2 0 = 1 and 1 +2 1 = 0
0, 0, … , 0 is the identity element of 𝐵𝑛 .Also the inverse of 𝑥1 , 𝑥2 , … , 𝑥𝑛 is itself.
Hence (𝐵𝑛 ,⊕) is a group and it is also abelian.
◦ In general, Any code which is group under the binary operation of addition modulo 2,
denoted by ⊕ is a group code.
Hamming Code
◦ The codes obtained by introducing additional digits called parity digits to the digits in
the original message are called Hamming codes
◦ If the original message is a binary string of length 𝒎, the Hamming encoded message is
string of length, 𝒏 (𝒏 > 𝒎). Of the 𝑛 digits, 𝒎 digits are used to represent the information
part of the message and the remaining (𝒏 − 𝒎) digits are used for the detection and
correction of errors in the message received.
◦ In Hamming’s single-error detecting code of length 𝑛, the first 𝑛 − 1 digits contain the
information part of the message and the last digit is made either 0 or 1.
◦ If the digit introduced in the last position gives an even number/odd numbers of 1’s in
the encoded word of length 𝑛, the extra digit is called an even/odd parity check.
Hamming distance
◦ The number of 1′ 𝑠 in the binary string 𝑥 ∈ 𝐵2 is called the weight of 𝑥 and is denoted by |𝑥|
◦ If 𝑥 and 𝑦 represent the binary strings 𝑥1 , 𝑥2 , … , 𝑥𝑛 and 𝑦1 , 𝑦2 , … , 𝑦𝑛 , the number of positions in
the strings for which 𝑥𝑖 ≠ 𝑦𝑖 is called the Hamming distance between 𝑥 and 𝑦 denoted by
𝐻(𝑥, 𝑦)
𝑛
𝐻 𝑥, 𝑦 = 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑥 ⊕ 𝑦 = (𝑥𝑖 +2 𝑦𝑖 )
𝑖=1
0 1 1
parity check matrix 𝐻 = 1 0 0 .
0 1 0
0 0 1
Solution:
0 0 1 0 0
Rewriting the given matrix 𝐻 = 𝐻 : 𝐴 |𝐼𝑛−𝑚 = 𝐻 : 𝐴 𝐼5−2 = 1 1 0 1 0
𝑇 𝑇 𝑇 𝑇
1 1 0 0 1
0 0
0 1 1
Here 𝑛 = 5, 𝑚 = 2, 𝐴𝑇 = 1 1 , 𝐴 =
1 1 0 1 1
1 00 1 1
Generator Matrix, 𝐺 = 𝐼𝑚 𝐴 = 𝐼2 |𝐴 = |
0 10 1 1
Now, 𝐵2 ≡ {0 0, 0 1, 1 0, 1 1} and 𝑒 𝑤 = 𝑤 𝐺
1 0 0 1 1
𝑒 00 = 0 0 = [0 0 0 0 0]
0 1 0 1 1
1 0 0 1 1
𝑒 01 = 0 1 = [0 1 0 1 1]
0 1 0 1 1
1 0 0 1 1
𝑒 10 = 1 0 = [1 0 0 1 1]
0 1 0 1 1
1 0 0 1 1
𝑒 11 = 1 1 = [1 1 0 0 0]
0 1 0 1 1
Hence the code words generated by 𝐻 are 0 0 0 0 0, 0 1 0 1 1, 1 0 0 1 1 and 1 1 0 0 0
1 1 1
1 0 1
0 1 1
3. Find the code words generated by the parity check matrix 𝐻 = 1 0 0 when the
0 1 0
encoding function is 𝑒: 𝐵3 → 𝐵6. 0 0 1
Solution
Here, 𝑚 = 3, 𝑛 = 6
1 1 01 0 0
𝐻 = 𝐴𝑇 𝐼𝑚 = 𝐴𝑇 𝐼3 = 1 0 1|0 1 0
1 1 10 0 1
1 1 1
𝐴= 1 0 1
0 1 1
𝐺 = 𝐼𝑚 |𝐴
1 0 0 1 1 1
𝐺= 0 1 0 1 0 1
0 0 1 0 1 1
Now 𝐵3 = {0 0 0 , 0 0 1, 0 1 0, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1}
𝑒 𝑤 = 𝑤𝐺
1 0 0 1 1 1
𝑒 000 = 0 0 0 0 1 0 1 0 1 = 0 0 0 0 0 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 001 = 0 0 1 0 1 0 1 0 1 = 0 0 1 0 1 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 010 = 0 1 0 0 1 0 1 0 1 = 0 1 0 1 0 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 100 = 1 0 0 0 1 0 1 0 1 = 1 0 0 1 1 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 011 = 0 1 1 0 1 0 1 0 1 = 0 1 1 1 1 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 101 = 1 0 1 0 1 0 1 0 1 = 1 0 1 1 0 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 110 = 1 1 0 0 1 0 1 0 1 = 1 1 0 0 1 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 111 = 1 1 1 0 1 0 1 0 1 = 1 1 1 0 0 1
0 0 1 0 1 1
Thus, the code words generated are 000000, 001011, 010101, 100111, 011110, 101100, 110010, 111001
4.Decode each of the following received words corresponding to the encoding
function 𝑒: 𝐵3 → 𝐵6 given by 𝑒 000 = 000 000 , 𝑒 001 = 001 011 , 𝑒 010 =
010 101, 𝑒 100 = 100 111, 𝑒 011 = 011 110, 𝑒 101 = 101 100, 𝑒 110 = 110 010 and
𝑒 111 = 111 001 , assuming that no error or signal error has occurred:
0 1 1 1 1 0, 1 1 0 1 1 1, 1 1 0 0 0 0, 1 1 1 0 0 0, 0 1 1 1 1 1.
Solution
We note that the minimum distance between the code words (the minimum weight of the non-zero
code words) is 3 and hence, at most 1 error can be corrected that might have occurred in the received word.
𝑚 = 3, 𝑛 = 6
(i) The word 0 1 1 1 1 0 is identical with 𝑒(0 1 1). Hence no error has occurred in this word and the original
message is 0 1 1.
(ii) The word 1 1 0 1 1 1 is differs from 𝑒 1 0 0 = 1 0 0 1 1 1 in the second position only. Correcting the single error,
the transmitted word is 1 0 0 1 1 1 and the original message is
100
(iii) The word 1 1 0 0 0 0 is differs from 𝑒 1 1 0 = 1 1 0 0 1 0 in the fifth position only. Correcting the single error, the
transmitted word is 1 1 0 0 1 0 and the original message is 1 1 0
(iv) The word 1 1 1 0 0 0 differs from 𝑒 1 1 1 = 1 1 1 0 0 1 in the sixth position only. Correcting the single error, the
transmitted word is 1 1 1 0 0 1 and the original message is 1 1 1
(v) The word 0 1 1 1 1 1 differs from 𝑒 0 1 1 = 0 1 1 1 1 0 in the sixth position only. Correcting the single error, the
transmitted word is 0 1 1 1 1 0 and the original message is 0 1 1.
1 0 0 1 1 0
5. Given the generator matrix 𝐺 ≡ 0 1 0 0 1 1 corresponding to the encoding function 𝑒: 𝐵3 → 𝐵6 ,
0 0 1 1 0 1
find the corresponding parity check matrix and use it to decode the following received words and hence
to find the original message. Are all the words decoded uniquely? (i) 110101 (ii)001111 (iii)110001 (iv)111111
Solution:
W.K.T 𝐺 = 𝐼3 𝐴 , 𝑡ℎ𝑒𝑛 𝐻 = [𝐴𝑇 |𝐼3 ]
1 1 0 1 0 1
Here 𝐴 = 0 1 1 , 𝐴 = 1 1 0
𝑇
1 0 1 0 1 1
1 0 1 1 0 0
𝐻 = 1 1 0|0 1 0
0 1 1 0 0 1
We compute the syndrome of each of the received word by using 𝐻. 𝑟 𝑇
1
1 0 1 1 0 0 1 0
𝑇 0
(i) 𝐻. 𝑟 = 1 1 0 0 1 0 . = 0
1
0 1 1 0 0 1 0 0
1
0
Since 𝐻. 𝑒 𝑤 𝑇 = 0 , the received word has zero error, hence in this case is the transmitted encoded word
0
itself. Hence the original message is 1 1 0
0
1 0 1 1 0 0 0 0
1
(ii) 𝐻. 𝑟 𝑇
= 1 1 0 0 1 0 . = 1
1
0 1 1 0 0 1 1 0
1
0
Since 𝐻. 𝑒 𝑤 = 1 , is the same as the fifth column of 𝐻1 , the element in the fifth position of
𝑇
0
𝑟 is changed. The decoded word is 0 0 1 1 0 1 and the original message is 0 0 1
1
1 0 1 1 0 0 1 1
0
(iii) 𝐻. 𝑟 = 1 1 0 0 1 0 .
𝑇
= 0
0
0 1 1 0 0 1 0 0
1
1
Since 𝐻. 𝑒 𝑤 𝑇
= 0 , is the same as the fourth column of 𝐻1 , the element in the fourth
0
position of 𝑟 is changed. The decoded word is 1 1 0 1 0 1 and the original message is 1 1 0
1
1 0 1 1 0 0 1 1
1
(iv) 𝐻. 𝑟 𝑇
= 1 1 0 0 1 0 . = 1
1
0 1 1 0 0 1 1 1
1
1
Since 𝐻. 𝑒 𝑤 = 1 , the syndrome is not identical with any column of 𝐻, the received
𝑇
1
word cannot be decoded uniquely.
1 0 0 1 1 1
6. Construct the decoding table for the group code given by the generator matrix 𝐺 ≡ 0 1 0 1 0 1 .
0 0 1 0 1 1
Decode the following received words using the decoding table obtained. Which of the words could not
be decoded uniquely? 101111, 011010, 101110, 111111
Solution:
Since 𝐺 is a 3 × 6 matrix, it corresponds to the encoding function 𝑒: 𝐵3 → 𝐵6
Now, 𝐵3 = {0 0 0, 0 0 1, 0 1 0, 1 0 0, 1 0 1, 0 1 1, 1 1 0, 1 1 1}
1 0 0 1 1 1
𝑒 000 = 0 0 0 0 1 0 1 0 1 = 0 0 0 0 0 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 001 = 0 0 1 0 1 0 1 0 1 = 0 0 1 0 1 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 100 = 1 0 0 0 1 0 1 0 1 = 1 0 0 1 1 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 010 = 0 1 0 0 1 0 1 0 1 = 0 1 0 1 0 1
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 011 = 0 1 1 0 1 0 1 0 1 = 0 1 1 1 1 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 101 = 1 0 1 0 1 0 1 0 1 = 1 0 1 1 0 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 110 = 1 1 0 0 1 0 1 0 1 = 1 1 0 0 1 0
0 0 1 0 1 1
1 0 0 1 1 1
𝑒 111 = 1 1 1 0 1 0 1 0 1 = 1 1 1 0 0 1
0 0 1 0 1 1
We form the encoding table by making these encoded words as the elements of the first
row and the coset leaders as the elements of the first column. The coset leaders with only
one 1 have been taken in a certain order and then those with two 1’s have been taken.
The decoding table is given as
code Word
000000 001011 010101 100111 011110 101100 110010 111001
100000 101011 110101 000111 111110 001100 010010 011001
010000 011011 000101 110111 001110 111100 100010 101001
001000 000111 011101 101111 010110 100100 111010 110001
000100 001111 010001 100011 011010 101000 110110 111101
000010 001001 010111 100101 011100 101110 110000 111011
000001 001010 010100 100110 011111 101101 110011 111000
Coset leader 011000 010011 001101 111111 000110 110100 101010 100001
Decoding the received words
(i) 101 111 appears in the 4th row and 4th column. The coset leader of the 4th row is 001
000, which contains only one 1, since the minimum weight of the code word is 3, at most
one error can be corrected in the received word
The corrected word, the code word transmitted is the top element of the 4th column. It is
100 111 and hence the original message is 100
(ii) 011 010 appears in the 5th row and 5th column. Hence the corresponding word
transmitted is 011 110 and hence the original message is 011
(iii) 101 110 appears in the 6th row and 6th column, Hence the corresponding code word
transmitted is 101 100 and hence the original message is 101
(iv) 111 111 appears in the 8th row, the coset leader of which contains two 1’s, the
received word contains 2 errors. Hence they cannot be corrected and the code word
transmitted cannot be uniquely determined.