· · · < ir.The required formula appears after a minor simplification of the terms in the
sum.
Notice that for large n we have dn
n! → e−1 = 0.36787 . . . . So roughly 36.8% of the permutations in Snare derangements.
Example (3.1.6) (The Hat Problem) There are n people attending a party each of
whom brings a different hat. All hats are checked in on arrival. Afterwards everyone picks up a hat at random. What is the probability that no one has the correct hat?
Any distribution of hats corresponds to a permutation of the original order. The permutations that are derangements give the distributions in which everyone has the wrong hat. So the probability asked for is dn
n! or roughly e−1. Exercises (3.1) 1. Let π = 1 2 3 4 5 6 2 4 1 5 3 6 and σ = 1 2 3 4 5 6 6 1 5 3 2 4 . Compute π−1, π σ and π σ π−1.
2. Determine which of the permutations in Exercise (3.1.1) are even and which are odd.
3. Prove that sign(π σ π−1)= sign(σ ) for all π, σ ∈ Sn.
4. Prove that if n > 1, then every element of Snis a product of adjacent transpositions, i.e., transpositions of the form (i i+ 1). [Hint: it is enough to prove the statement for a transposition (ij ) where i < j . Now consider the composite (j j+1)(ij)(j j +1)]. 5. An element π in Sn satisfies π2 = id if and only if π is a product of disjoint transpositions.
6. How many elements π in Snsatisfy π2= id?
7. How many permutations in Sncontain at most one 1-cycle?
8. In the game of Rencontre there are two players. Each one deals a pack of 52 cards. If they both deal the same card, that is a “rencontre”. What is the probability of a rencontre occurring?
3.2
Binary operations: semigroups, monoids
and groups
Most of the structures that occur in algebra consist of a set and a number of rules for combining pairs of elements of the set. We formalize the notion of a “rule of combination” by defining a binary operation on a set S to be a function
So for each ordered pair (a, b) with a, b in S the function α produces a unique element
α((a, b))of S. It is better notation if we write
a∗ b
instead of α((a, b)) and refer to the binary operation as∗.
Of course binary operations abound; one need think no further than addition or multiplication in sets such asZ, Q, R, or composition on the set of all functions on a given set.
The first algebraic structure of interest to us is a semigroup, which is a pair
(S,∗)
consisting of a non-empty set S and a binary operation ∗ on S which satisfies the
associative law:
(i) (a∗ b) ∗ c = a ∗ (b ∗ c) for all a, b, c ∈ S.
If the semigroup has an identity element, i.e., an element e of S such that (ii) a∗ e = a = e ∗ a for all a ∈ S,
then it is called a monoid.
Finally, a monoid is called a group if each element a of S has an inverse, i.e., an element a−1of S such that
(iii) a∗ a−1= e = a−1∗ a.
Also a semigroup is said to be commutative if (iv) ab= ba for all elements a, b.
A commutative group is called an abelian2group.
Thus semigroups, monoids and groups form successively narrower classes of al- gebraic structures. These concepts will now be illustrated by some familiar examples.
Examples of semigroups, monoids and groups. (i) The pairs (Z, +), (Q, +),
(R, +) are groups where + is ordinary addition, 0 is an identity element and an
inverse of x is its negative−x.
(ii) Next consider (Q∗,·), (R∗,·) where the dot denotes ordinary multiplication
andQ∗andR∗are the sets of non-zero rational numbers and real numbers respectively. Here (Q∗,·) and (R∗,·) are groups, the identity element being 1 and the inverse of x
being 1x. On the other hand, (Z∗,·) is only a monoid since the integer 2, for example,
has no inverse inZ∗= Z − {0}.
(iii) (Zm,+) is a group where m is a positive integer. The usual addition of congruence classes is used here.
3.2 Binary operations: semigroups, monoids and groups 41 (iv) (Z∗m,·) is a group where m is a positive integer: here Z∗mis the set of invertible congruence classes[a] modulo m, i.e., such that gcd{a, m} = 1, and multiplication of congruence classes is used. Note that|Z∗m| = φ(m) where φ is Euler’s function.
(v) Let Mn(R) be the set of all n × n matrices with real entries. If the usual rule of addition of matrices is used, we obtain a group.
On the other hand, Mn(R) with matrix multiplication is only a monoid. To obtain a group we must form
GLn(R),
the set of all invertible or non-singular matrices in Mn(R), i.e., those with non-zero determinant. This is called the general linear group of degree n overR.
(vi) For an example of a semigroup that is not a monoid we need look no further than (E,+) where E is the set of all even integers. Clearly there is no identity element here.
(vii) The monoid of functions on a set. Let A be any non-empty set, and write Fun(A) for the set of all functions α on A. Then
(Fun(A),)
is a monoid where is functional composition; indeed this binary operation is asso- ciative by (1.2.3). The identity element is the identity function on A.
If we restrict attention to the bijective functions on A, i.e., to those which have inverses, we obtain the symmetric group on A
(Sym(A),),
consisting of all the permutations of A. This is one of our prime examples of groups. (viii) Monoids of words. For a different type of example we consider words in an alphabet X. Here X is any non-empty set and a word in X is just an n-tuple of elements of X, written for convenience without parentheses as x1x2. . . xn, n≥ 0. The case n= 0 is the empty word ∅. Let W(X) denote the set of all words in X.
There is a natural binary operation on X, namely juxtaposition. Thus if w =
x1. . . xnand z= y1. . . ymare words in X, define wz to be the word x1. . . xnz1. . . zm. If w = ∅, then by convention wz = z = zw. It is clear that this binary operation is associative and∅ is an identity element. So W(X), with the operation specified, is a monoid, the so-called free monoid generated by X.
(ix) Monoids and automata. There is a somewhat unexpected connection between monoids and state output automata – see 1.3. Suppose that A = (I, S, ν) is a state output automaton with input set I , state set S and next state function ν : I × S → S. Then A determines a monoid MAin the following way.
Let i∈ I and s ∈ S; then we define θi : S → S by the rule θi(s)= ν(i, s). Now let MAconsist of the identity function and all composites of finite sequences of θi’s; thus MA⊆ Fun(S). Clearly MAis a monoid with respect to functional composition.
In fact one can go in the opposite direction as well. Suppose we start with a monoid
(M,∗) and define an automaton AM = (M, M, ν) where the next state function
ν : M × M → M is defined by the rule ν(x1, x2) = x1∗ x2. Thus a connection
between monoids and state output automata has been detected.
(x) Symmetry groups. As has already been remarked, groups tend to arise wherever symmetry is of importance. The size of the group can be regarded as a measure of the amount of symmetry present. Since symmetry is at heart a geometric notion, it is not surprising that geometry provides many interesting examples of groups.
A bijective function defined on 3-dimensional space or the plane is called an
isometry if it preserves distances between points. Natural examples of isometries are
translations, rotations and reflections. Now let X be a non-empty set of points in 3-space or the plane – we will refer to X as a geometric configuration. An isometry α which fixes the set X, i.e., such that
X= {α(x) | x ∈ X},
is called a symmetry of X. Note that a symmetry can move the individual points of X. It is easy to see that the symmetries of X form a group with respect to functional composition; this is the symmetry group S(X) of X. Thus S(X) is a subset of Sym(X), usually a proper subset.
The symmetry group of the regularn-gon. As an illustration let us analyze the
symmetries of the regular n-gon: this is a polygon in the plane with n equal edges,
(n ≥ 3). It is convenient to label the vertices of the n-gon 1, 2, . . . , n, so that each
symmetry may be represented by a permutation of{1, 2, . . . , n}, i.e., by an element of Sn.
Each symmetry arises from an axis of symmetry of the figure. Of course, if we expect to obtain a group, we must include the identity symmetry, represented by
(1)(2) . . . (n). There are n− 1 anticlockwise rotations about the line perpendicular to the plane of the figure and through the centroid, through angles i2πn , for i = 1, 2, . . . , n− 1. For example, the rotation through 2πn is represented by the n-cycle
(1 2 3 . . . n); other rotations correspond to powers of this n-cycle.
Then there are n reflections in axes of symmetry in the plane. If n is odd, such axes join a vertex to the midpoint of the opposite edge. For example, (1)(2 n)(3 n− 1) . . . corresponds to one such reflection. However, if n is even, there are two types of reflections, in an axis joining a pair of opposite vertices and in an axis joining midpoints of opposite edges; thus in all there are 12n+12n= n reflections in this case too.
Since all axes of symmetry of the n-gon have now been exhausted, we conclude that the order of its symmetry group is 1+ (n − 1) + n = 2n. This group is called the
dihedral group of order 2n,
Dih(2n).
Notice that Dih(2n) is a proper subset of Snif 2n < n!, i.e., if n ≥ 4. So not every permutation of the vertices arises from a symmetry when n≥ 4.
3.2 Binary operations: semigroups, monoids and groups 43 3 2 1 n n− 1
Elementary consequences of the axioms. We end this section by noting three ele- mentary consequences of the axioms.
(3.2.1) (i) (The Generalized Associative Law) Let x1, x2, . . . , xn be elements of a
semigroup (S,∗). If an element u is constructed by combining the n elements in the given order, using any mode of bracketing, then u= (· · · ((x1∗ x2)∗ x3)∗ · · · ) ∗ xn,
so that u is independent of the positioning of the parentheses.
(ii) Every monoid has a unique identity element. (iii) Every element in a group has a unique inverse.
Proof. (i) We argue by induction on n, which can be assumed to be at least 3. If u is
constructed from x1, x2, . . . , xnin that order, then u = v ∗ w where v is constructed from x1, x2, . . . , xi and w from xi+1, . . . , xn; here 1 ≤ i ≤ n − 1. Then v =
(· · · (x1∗ x2)∗ · · · ∗ xi)by induction on n. If i= n − 1, then w = xnand the result follows at once. Otherwise i+ 1 < n and w = z ∗ xn where z is constructed from
xi+1, . . . , xn−1. Then u= v ∗ w = v ∗ (z ∗ xn)= (v ∗ z) ∗ xnby the associative law. The result is true for v∗ z by induction, so it is true for u.
(ii) Suppose that e and eare two identity elements in a monoid. Then e= e ∗ e since eis an identity; also e∗ e= esince e is an identity. Hence e= e.
(iii) Let g be an element of a group and suppose g has two inverses x and x; we claim that x = x. To see this observe that (x∗ g) ∗ x = e ∗ x = x, while also
(x∗ g) ∗ x= x ∗ (g ∗ x)= x ∗ e = x. Hence x = x. Because of (i) above, we can without ambiguity omit all parentheses from an expression formed from elements x1, x2, . . . , xn of a semigroup – an enormous gain in simplicity. Also (ii) and (iii) show that it is unambiguous to speak of the identity element of a monoid and the inverse of an element of a group.
Exercises (3.2)
1. Let S be the subset of R × R specified below and define (x, y) ∗ (x, y) = (x+ x, y+ y). Say in each case whether (S,∗) is a semigroup, a monoid, a group, or none of these.
(a) S= {(x, y) | x + y ≥ 0}; (b) S= {(x, y) | x + y > 0}; (c) S= {(x, y) | |x + y| ≤ 1}; (d) S= {(x, y) | 2x + 3y = 0}.
2. Do the sets of even or odd permutations in Snform a semigroup when functional composition is used as the binary operation?
3. Show that the set of all 2× 2 real matrices with non-negative entries is a monoid but not a group when matrix addition used.
4. Let A be a non-empty set and define a binary operation∗ on the power set (P (A) by S∗ T = (S ∪ T ) − (S ∩ T ). Prove that (P (A), ∗) is an abelian group.
5. Define powers in a semigroup (S,∗) by the rules x1= x and xn+1= xn∗ x where
x ∈ S and n is a non-negative integer. Prove that xm∗ xn= xm+nand (xm)n= xmn
where m, n > 0.
6. Let G be a monoid such that for each x in G there is a positive integer n such that
xn = e. Prove that G is a group.
7. Let G consist of the permutations (1 2)(3 4), (1 3)(2 4), (1 4)(2 3), together with the identity permutation (1)(2)(3)(4). Show that G is a group with exactly four elements in which each element is its own inverse. (This group is called the Klein34-group). 8. Prove that the group Sn is abelian if and only if n≤ 2.
9. Prove that the group GLn(R) is abelian if and only if n = 1.