0% found this document useful (0 votes)
32 views

Alphabets and Words

This document defines alphabets, words, permutations, and bit permutations. An alphabet is a finite set of symbols used to write texts. A word is a finite sequence of symbols from an alphabet. Permutations are bijective maps of a set to itself, and the set of all permutations of a set forms a group. Bit permutations permute the positions of bits in a bitstring, and can be represented by permutations in the symmetric group. There are n! bit permutations of bitstrings of length n.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Alphabets and Words

This document defines alphabets, words, permutations, and bit permutations. An alphabet is a finite set of symbols used to write texts. A word is a finite sequence of symbols from an alphabet. Permutations are bijective maps of a set to itself, and the set of all permutations of a set forms a group. Bit permutations permute the positions of bits in a bitstring, and can be represented by permutations in the symmetric group. There are n! bit permutations of bitstrings of length n.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Chapter 1

Alphabets and Words

To write texts,Pwe need symbolsPfrom an alphabet. By an alphabet


P we mean a finite
P
nonempty set . The length of is the number of elements in . The elements of
are called symbols or letters.

Example 1.0.1 A common alphabet is


= {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P 0 QR, S, T, U, V, W, X, Y, Z} . It has
P
length 26.

Example 1.0.2 In computing, we use the alphabet {0, 1}. It has length 2.

Example 1.0.3 A frequently used alphabet is the set of ASCII symbols. This set, in-
cluding its encoding by the numbers between 0 and 127, can be found in Table 1.1

Figure 1.1: The ASCII symbols

1
2

Because alphabets are finite sets, their symbols can be identified with nonnegative
integers. If an alphabet has length m, then its symbols are identified with the numbers
in Zm = {0, 1, ..., m − 1}. In the following definition, we need finite sequences, which we
briefly recall. An example of a finite sequence is (2,3, 1,2,3). It has five components. The
first component is 2, the second is 3, etc. We also write this sequence as 23123. For formal
reasons, we also need the empty sequence ( ). It has zero components.
P
Definition 1.0.4 Let be an
Palphabet. P
1. A word or string over is a finite sequence of symbols from 2 including the
empty sequence, which is denoted byPε and is called the empty string.
2. The length of a word w over is the number of its components. It is denoted by
|w|. The empty word has lengthP 0. P
3. The set ofP all words over including the empty string is denoted by ∗.
4. If v, w ∈ ∗, then vw = vow is the string that is obtained by concatenating v and
w. It is called the concatenation of v andP w. In particular, we have voε = εov = v. P
5. If n is a nonnegative integer, then n is the set of all words of length n over .

Example
P 1.0.5 A word over the alphabet is COLA. It has length four. Another word
over is COCA. The concatenation of COCA and COLA is COCACOLA.

1.1 Permutations
To characterize block ciphers, a very general class of encryption schemes, we need the
notion of a permutation.

Definition 1.1.1 Let X be a set. A permutation of X is a bijective map f : X → X.


The set of all permutations of X is denoted by S(X).

Example 1.1.2 Let X = {0, 1, ..., 5}. We obtain a permutation of X if we map an


element of X in the
 first row of the following
 matrix to the number below that element in
0 1 2 3 4 5
the second row: . Using this method, permutations can always be
1 2 3 4 5 0
represented. The set S(X) of all permutations of X together with composition is a group
that, in general, is not commutative. If n is a positive integer, then Sn denotes the group
of permutations of the set {1, 2, ..., n}.
   
1 2 1 2
Example 1.1.3 The group S2 has the elements and .
1 2 2 1

Theorem 1.1.4 The group Sn has order n! = ∗2 ∗ 3 ∗ ... ∗ n.

Proof. We prove the assertion by induction on n. Clearly, S1 has order 1. Suppose Sn−1
has order (n − 1)!. Consider the permutations of the set {1, ..., n}. We count the number
of permutations that send 1 to a fixed number x. In such permutations, the numbers 2, ,
n are bijectively mapped to the numbers 1, 2, . . . , x − 1, x + 1, ..., n. By the induction
hypothesis, there are (n − 1)! such bijections. But since there are n possibilities to map 1
to a number, the order of Sn is (n − 1)! = n!. 
3

Let X = {0, l}” be the set of all bitstrings of length n. A permutation of X in which just
the positions of the bits are permuted is called a bit permutation. To formally describe such
a bit permutation, we choose it π ∈ Sn . Then f : {0, 1}n → {0, 1}n , b1 , ...bn → bπ(1) ...bπ(n)
is fact a bit permutation, and every bit permutation can be uniquely written in this way.
Therefore, there are n! bit permutations of bitstrings of length n. Special bit permutations
are circular left- or right-shifts . A circular left-shift of i positions maps the bitstring
(bo , b1 , ..., bn−1 ) to (bimodn , b(i+1)modn , ..., b(i+n−1)modn ). Circular right-shifts are defined
analogously.

You might also like