Permutation-Group
Permutation-Group
x1 x2 x3 x2 x1 x3 x3 x1 x2 x1 x3 x2 x2 x3 x1 x3 x2 x1
x1 → x1 x1 → x2 x1 → x3 x1 → x1 x1 → x2 x1 → x3
x2 → x2 x2 → x1 x2 → x1 x2 → x3 x2 → x3 x2 → x2
x3 → x3 x3 → x3 x3 → x2 x3 → x2 x3 → x1 x3 → x1
We now extend this idea over an arbitrary set of elements.
1 −→ α(1)
2 −→ α(2)
α : 3 −→ α(3)
...
n −→ α(n)
2
This notation is due to Cauchy and is called the two-row nota-
tion. In the upper row, we list all the elemets of In and in the lower
row under each element i ∈ In, we write the image of the element,
i.e., α(i). It is easy to compute the number of elements of Sn. There
are n choices of α(1). Once α(1) has been chosen, there are n − 1
possibilities for α(2)(since α(1) 6= α(2)). After chossing α(2), there
are exactly n − 2 possibilities for α(3). Continuing this way we see
that Sn must have n(n − 1)(n − 2).....3.2.1 = n! elements. The
two-row notation of permutations is quite convenient while doing
computations, such as determining the composition of permutations.
Let
1 2 ... n 1 2 ... n
α= and β = .
α(1) α(2) . . . α(n) β(1) β(2) . . . β(n)
3
1 2 ... n 1 2 ... n
α◦β = ◦
α(1) α(2) . . . α(n) β(1) β(2) . . . β(n)
1 2 ... n
= .
α β(1) α β(2) . . . α β(n)
i
If α(i) = i, then we drop the column . For example, let α =
α(i)
1 2 3 4
. Here α(1) = 1 and α(3) = 3. So we denote α by
1 4 3 2
2 4 1 3 4
. Hence if we write α = ∈ S5, then we mean the
4 2 4 1 3
1 2 3 4 5
permutation α = .
4 2 1 3 5
5
Definition 5. A permutation σ on In = {1, 2, . . . , n} is called
a k-cycle or cycle of length k if there exist distinct elements
i1 , i2 , . . . , ik in In such that
(1 3 2 5) = (3 2 5 1) = (2 5 1 3) = (5 1 3 2).
or, σ : 1 → 3 → 2 → 5 → 1
6
1 2 3 4
Consider now the permutation α = . For this permu-
3 4 1 2
tation α(1) = 3, α(3) = 1 whereas α(2) = 4, α(4) = 2. Hence α is
not a k-cycle.
Since k-cycles are nothing but special type of permutations, they
can be composed, i.e., multiplied just like any two permutations.
Consider the cycles σ = (243) and δ = (1265). Then
7
Again viewed as permutations in a two-row notation, σ and δ are as
follows:
1 2 3 4 5 6 1 2 3 4 5 6
σ= and δ = .
1 4 2 3 5 6 2 6 3 4 1 5
Now
1 2 3 4 5 6
σδ = σ ◦ δ = .
4 6 2 3 1 5
It is worth noticing that while calculating σδ, we first consider the
image of δ on the elements of I6 and then on that image set, we
δ σ
further consider the image of σ. Hence σ ◦ δ : 1 −→ 2 −→ 4 .
Notice that under σδ,
1 → 4 → 3 → 2 → 6 → 5 → 1
9
Theorem 8. Let α and β be any two disjoint cycles in Sn. Then,
αβ = βα.
Then,
Consequently, α1 α2 α3 = (2 4 3 5).
2 Dihedral group Dn
It is easy to see that any two nth dihedral groups are isomorphic.
Hence there exists only one nth dihedral group . We denote the nth
dihedral group by Dn.
Let us now describe the group D4. This group is generated by two
elements a, b such that
(i)o(a) = 4, o(b) = 2,
(ii) ba = a−1b.
16
four lines. These are the lines along the perpendicular bisectors of the
opposite sides and the lines along the diagonals, it has three rotational
symmetries about the meeting point of the diagonals, through angles
90◦, 180◦ and 270◦ respectively.
As we have done before, here also it can be shown that if ρ90
be taken as ρ and if we denote a reflection by β, then the eight
symmetries of a square can be represented as {i, ρ, ρ2, ρ3, βρ3, βρ2,
βρ, σ} where ρ4 = β 2 = i and βρ = ρ−1β. This group hρ, σi with
eight elements is the group D4. Hence Sym4 = D4.
Proceeding as above we can show that the group Sym5 of all
symmetries of a regular pentagon is D5, where D5 is the set of all
symmetries of a regular pentagon. More precisely, D5 is generated
by two elements: one is the rotation by angle 2π
5 = 72◦, denoted by
ρ; the other is the reflection along a fixed axis, denoted by σ. There
are three relations among ρ and β
ρ5 = i, β 2 = i and βρ = ρ−1β. D5 is a noncommutative group
with 10 elements {i, ρ, ρ2, ρ3, ρ4, βρ4, βρ3, βρ2, βρ, β}.
17
3 Check digit Schemes
18
example, 8901063026162 typed as 8901036026162 . Here the
digits 6 and 3 are transposed and this is a transposition error.
•Twin Error: This error occurs when two consecutive identical
digits are incorrectly typed as two other identical digits. For exam-
ple, 8177564803 typed as 8199564803. Here the digits 77 are
incorrectly typed as 99.
There are other common errors also such as
•jump transpositions errors, such as 132 → 231,
•jump twin errors, such as 131 → 232,
•phonetic errors, such as 60 → 16 (”sixty” to ”sixteen”).
Here we will discuss some schemes which help in decting some of
these common errors.
3.1 ISBN
19
An ISBN is assigned to each edition and variation (except reprint-
ings) of a book. The ISBN is 13 digits long if assigned after January
1, 2007, and 10 digits long if assigned before 2007.
Feluda Samagra
Publisher: Ananda publisher
ISBN-10 81-7756-480-3
ISBN-13 978-81-7756-480-8
Antaheener Antajamee
Publisher: National Book Trust.
ISBN 978-81-237-6664-5
The digits of an ISBN are arranged in four groups (for an ISBN-10) or
five groups (for an ISBN-13), which are sometimes (but not always)
separated by hyphens. At present, an ISBN-13 is always prefixed by
the digits 978 or 979.
20
An ISBN-10 is an expression
8 + 2 + 6 + 0 + 15 + 6 + 7 + 32 + 63 ≡ x10 (mod11).
22
one of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 is determined by the following congru-
ence
1x1 + 3x2 + 1x3 + 3x4 + ...... + 3x12 + 1x13 ≡ 0(mod 10).
Hence x13 ≡ −(1x1 + 3x2 + 1x3 + 3x4 + ...... + 3x12)(mod 10)
For example the ISBN-13 check digit x13 of 978-0-306-40615 is
calculated as follows:
x13 ≡ −(1.9 + 3.7 + 1.8 + 3.0 + 1.3 + 3.0 + 1.6 + 3.4 + 1.0 + 3.6 +
1.1 + 3.5)(mod 10)
≡ −93(mod 10)
≡ 7 (mod 10).Hence x13 = 7.
ISBN-10 is capable of detecting all single digit errors and all trans-
position errors involving adjacent digits. However in ISBN-10 scheme
this success is achieved by introducing X to handle the case where
10 is obtained modulo 11.
3.2 EAN-13
23
Example. EAN of Britannia Cream Cracker is
8 901063 026162
x1x2 · · · x12x13,
24
where xi’s are integers such that 0 ≤ xi < 10. The 13th digit, x13,
is the check digit.
Consider the following EAN-13 for some product
Here the 13th digit, 2, is the check digit. We now explain how this
check digit is obtained.
In an EAN 8 901063 026162 the check digit x13 is an integer such
that 0 ≤ x13 < 10 and it satisfies the congruence:
(1x1 + 3x2 + 1x3 + 3x4 + ....... + 1x11 + 3x12 + 1x13) ≡ 0(mod10)
For this EAN-13, the check digit must satisfy
x13 ≡ −(1 · 8 + 3 · 9 + 1 · 0 + 3 · 1 + 1 · 0 + 3 · 6 + 1 · 3 +
3 · 0 + 1 · 2 + 3 · 6 + 1 · 1 + 3 · 6) = −98(mod10).
This implies that x13 + 98 ≡ 0(mod10) ,where 0 ≤ x13 < 10.
Hence, the check digit is 2.
25
3.3 Luhn algorithm
26
its and the number starts with 51, 52, 53, 54, or 55.
In a Master Card.
1. If the digit in the second place is 1, then the digits from the
2nd place to the 3rd place represents the bank number.
2. If the digit in the second place is 2, then the digits from the
2nd place to the 4th place represents the bank number.
3. If the digit in the second place is 3, then the digits from the
2nd place to the 5th place represents the bank number.
27
4. If the digit in the second place is any digit other than 1, 2 or
3, then the digits from 2nd place to 6th place represents the bank
number.
For example, in the Master Card number
the second digit is 5. Hence, the digits from 2nd place to 6th place
denote the bank number, i.e., the bank number is 54837.
The digits after the bank number up to 15th place are the account
number of the card holder. For the above card the account number
of the card holder is 42 7983 069.
In the case of Visa cards, digits from 2nd place to 6th place denote
the identification number of the bank and digits from 7th place to
12th place or 7th place to 15th place denote the account number,
and the digit in the 13th or 16th place is the check digit.
To determine the check digit for Master Card and Visa etc we use
the following algorithm known as Luhn algorithm.
28
Step 1: Starting from the second digit from the right and moving
towards the left, multiply every alternate digit by 2.
Step 2: Add the individual digits comprising the products ob-
tained in Step 1.
Step 3: Add all of the digits of the card not multiplied with 2 in
Step 1.
Step 4: Add the results obtained in Step 2 and Step 3.
Step 5: If s is the sum obtained in Step 4, then solve the congru-
ence s ≡ 0(mod10) to obtain the check digit ak , where 0 ≤ ak < 10.
We can determine if the check digit of a given credit card is valid
by using Steps 1-5. If the credit card number is valid, then the sum
s obtained in Step 4 must satisfy s ≡ 0(mod10).
Let us explain this algorithm with the help of following example.
Example Consider a card with the following identification num-
ber
5546 1997 2335 5004
0 · 2 = 0, 5 · 2 = 10, 3 · 2 = 6, 2 · 2 = 4, 9 · 2 = 18, 1 · 2 =
2, 4 · 2 = 8, 5 · 2 = 10.
Step 2: Add the individual digits comprising the products ob-
tained in Step 1. (For example, the product 0 · 2 = 0, and so the
sum of the digits of the product 0 is 0. The product 5 · 2 = 10, and
so the sum of the digits of the product 10 is 1 + 0 = 1. Similarly,
the product 9 · 2 = 18 and so the sum of the digits in this product is
1 + 8 = 9.)
0 + 1 + 6 + 4 + 9 + 2 + 8 + 1 = 31
Step 3: Add all of the digits of the card not multiplied with 2 in
Step 1.
0 + 5 + 3 + 7 + 9 + 6 + 5 + x = 35 + x
31 + 35 + x = 66 + x
30
Now 66 + x ≡ 0(mod10) holds for 0 ≤ x < 10 if x = 4. Hence, the
check digit of the identification number of this card is 4.
Example
4386 2496 0156 1102
Step 1: Starting from the second digit from the right and moving
towards the left, multiply every alternate digit by 2. (The digits to
be multiplied with 2 are underlined.
31+27+x=58+x
6220180158000163424
Let us find check digit ( the last digit) of this identification num-
ber. Suppose x denotes the check digit, where 0 ≤ x < 10.
622018015800016342x
Step 1: Starting from the second digit from the right and moving
towards the left, multiply every alternate digit by 2.
32
2 · 2 = 4, 3 · 2 = 6, 1 · 2 = 2, 0 · 2 = 0, 8 · 2 = 16, 1 · 2 =
2, 8 · 2 = 16, 0 · 2 = 0, 2 · 2 = 4.
Step 2: Add the individual digits comprising the products ob-
tained in Step 1. 4 + 0 + (1 + 6) + 2 + (1 + 6) + 0 + 2 + 6 + 4 = 32
Step 3: Add all of the digits of the card not multiplied with 2 in
Step 1. 6 + 2 + 1 + 0 + 5 + 0 + 0 + 6 + 4 + x = 24 + x
Step 4: Add the results from Step 2 and Step 3. 32 + 24 + x
33
3.4 Verhoeff algorithm
We have pointed out that single digit error and transposition error are
the most common errors committed in entering identification num-
ber. The modulus 10 method and the EAN-13 scheme fail to detect
all transposition errors. Although modulus 11 method is successful
in detecting single digit error and transposition error, it has a disad-
vantage. It uses a symbol X to represent 10.The Verhoeff method
not only detects all single digit transcription and transposition errors
but also works for identification number of any length and uses only
decimal digits unlike the modulus 11 method. Unlike the methods
described so far which use ordinary arithmetic, the Verhoeff method
uses permutations and non-commutative dihedral group D5 of or-
der 10 operations to evaluate the check digit. This coding scheme
is being used by ‘AADHAAR’ to give a UID (Unique Identification
Number) to each citizen of India .The basic idea of this scheme is as
follows. First, instead of using standard addition modulo 10 or 11,
as is common in other check digit schemes, the Verhoeff Scheme uses
34
the group D5 of order 10 as represented in the following table.
The table of D5
∗ | ρ 0 ρ1 ρ2 ρ3 ρ4 βρ4 βρ3 βρ2 βρ1 β
− − − − − − − − − − − −
ρ0 | ρ 0 ρ1 ρ2 ρ3 ρ4 βρ4 βρ3 βρ2 βρ1 β
ρ1 | ρ 1 ρ2 ρ3 ρ4 ρ0 βρ3 βρ2 βρ1 β βρ4
2
ρ | ρ 2 ρ3 ρ4 ρ0 ρ βρ2 βρ1 β βρ4 βρ3
3
ρ | ρ3 ρ4 ρ0 ρ1 ρ2 βρ1 β βρ4 βρ3 βρ2
4 4 0
ρ1 ρ2 ρ3 βρ4 βρ3 βρ2 βρ1
ρ
| ρ ρ β
4
βρ | βρ4 β βρ1 βρ2 βρ3 ρ0 ρ4 ρ3 ρ2 ρ1
βρ3 | βρ3 βρ4 β βρ1 βρ2 ρ1 ρ0 ρ4 ρ3 ρ2
βρ2 | βρ2 βρ3 βρ4 β ρ ρ2 ρ1 ρ0 ρ4 ρ3
1
βρ | βρ1 βρ2 βρ3 βρ4 β ρ3 ρ2 ρ1 ρ0 ρ4
β | β βρ1 βρ2 βρ3 βρ4 ρ4 ρ3 ρ2 ρ1 ρ0
35
βρ3 → 6, βρ2 → 7, βρ1 → 8, β → 9.
∗ | 0 1 2 3 4 5 6 7 8 9
− − − − − − − − − − −
0 | 0 1 2 3 4 5 6 7 8 9
1 | 1 2 3 4 0 6 7 8 9 5
2 | 2 3 4 0 1 7 8 9 5 6
3 | 3 4 0 1 2 8 9 5 6 7
4 | 4 0 1 2 8 9 5 6 7 8
5 | 5 9 8 7 6 0 4 3 2 1
6 | 6 5 9 8 7 1 0 4 3 2
7 | 7 6 5 9 8 2 1 0 4 3
8 | 8 7 6 5 9 3 2 1 0 4
9 | 9 8 7 6 5 4 3 2 1 0
36
Part 1: Assigning check digit. Let the number to which the check
digit is to be assigned be anan−1an−2.....a2,where 0 ≤ ai ≤ 9, 2 ≤
i ≤ n . Consider the permutation σ which will be used in the Verho-
eff scheme. Evaluate σ n−1(an) ∗ σ n−2(an−1) ?σ n−3(an−2) ∗ ..... ∗ σ(a2)
using the binary operation ∗ given in the group table of D5 and the
permutation σ = (15894270)(36) ( or any other suitable permutation
such as (0)(14)(23)(58697)). Let the result obtained be m (it is a sin-
gle digit number). Then calculate the inverse of m , i.e., the number
a1 for which a1 ∗ m = 0. The inverse of m is the check digit a1 which
is to be appended to the end of the number anan−1an−2.....a2.
Part 2: Checking if the identification number anan−1an−2.....a2a1 has
been interpreted correctly. For this calculate σ n−1(an) ∗ σ n−2(an−1) ∗
σ n−3(an−2) ∗ ..... ∗ σ(a2) ∗ a1. If the result is zero, then the number
is correct. If not, there is an error.
37
Example 21. Let the number which is to be assigned the check
digit be 53660508771 and the permutation σ = (15894270)(36)
0 1 2 3 4 5 6 7 8 9
σ= .
1 5 7 6 2 8 3 0 9 4
To find the check digit a1,we first calculate σ 11(5) ∗ σ 10(3) ∗
σ 9(6) ∗ σ 8(6) ∗ σ 7(0) ∗ σ 6(5) ∗ σ 5(0) ∗ σ 4(8) ∗ σ 3(7) ∗ σ 2(7) ∗ σ 1(1).
Now σ 11(5) ∗ σ 10(3) ∗ σ 9(6) ∗ σ 8(6) ∗ σ 7(0) ∗ σ 6(5) ∗ σ 5(0) ∗ σ 4(8) ∗
σ 3(7) ∗ σ 2(7) ∗ σ 1(1)
=4∗3∗3∗6∗7∗0∗4∗7∗5∗1∗5
=2∗0∗6∗4∗4∗3∗5∗0∗1∗6
= 6[Here ∗ is the group operation defined in the group table D5]
From the group table we find that 6 ∗ a1 = 0 holds for a1 = 6.
Hence the check digit for the given number is 6 and hence the
correct identification number in this scheme is 536605087716
We can show that the Verhoeff scheme detects all single digit errors
and this does not depend on the permutation used in the scheme.
To see this ,we observe that a correct identification number
anan−1an−2..ai...a2a1,where a1 is the check digit satisfies
σ n−1(an) ∗ σ n−2(an−1) ∗ σ n−3(an−2) ∗ .. ∗ σ i−1(ai) ∗ ... ∗ σ(a2) ∗ a1 = 0
38
If ai is replaced by b and the resulting string
anan−1an−2..b...a2a1
is a correct identification number, then
σ n−1(an) ∗ σ n−2(an−1) ∗ σ n−3(an−2) ∗ .. ∗ σ i−1(b) ∗ ... ∗ σ(a2) ∗ a1 = 0
Then we find that σ i−1(ai) = σ i−1(b). Since σ is bijective function
it follows that ai = b. Hence the Verhoeff scheme detects all single
digit errors. We can also show that the above scheme can also detect
all transposition errors of adjacent digits.
The main weakness of the Verhoeff algorithm is its complexity, it
is little more complicated to implement.
A Unique Identification is merely a string assigned to an entity
that identifies the entity uniquely. The plan is to assign a Unique ID
to every person residing in India. Biometric identification system and
checks would be used to ensure that each individual is as-signed one
and only UID and the process of generating a new UID would ensure
that duplicates are not issued as valid UID numbers.The Verhoeff
Scheme is used for this purpose.
References
39
[1] Joseph Kirtland, Identification numbers and check digit schemes,
The Mathematical Society of America, 2001.
40