EQUIVALENCE CLASSES OF FUNCTIONS ON FINITE SETS

By using Polya's theorem of enumeration and de Bruijn's generalization of Polya's theorem, we obtain the numbers of various weak equivalence classes of functions in RD relative to permutation groups G and H where RD is the set of all functions from a finite set D to a finite set R, G acts on D and H acts on R. We present an algorithm for obtaining the equivalence classes of functions counted in de Bruijn's theorem, i.e., to determine which functions belong to the same equivalence class. We also use our algorithm to construct the family of non-isomorphic fm-graphs relative to a given group.

With the help of Plya's and de BrulJn's theorems, our algorithm enables us to deter- mine the numbers of strong equivalence classes relative to some subgroups of the sym- metric groups.

THEOREMS OF POLYA AND DE BRUIJN.
Let G be a permutation group acting on a set D {1,2 ,m}.Since every permutation can be uniquely written as a product of disjoint cycles, the cycle index of G is defined as the following polynomial in Q[Xl,X 2 x where Q is the m field of rational numbers and xlxj xjxi for i,j 1,2 x m PG ('2' "''') "7 G m where I<I +/-s the order of G and b i is the number of cycles of length i in the disjoint cycle decomposition of u for i 1,2,...,m.
THEOREM i. (Plya [8], [9],[i0]).Let R D be the set of all functions from a finite set D into a finite set R, G be a permutation group acting on D, w be a function from R into R' where R' is a commutative ring with an identity con- R D raining the rational numbers Q, and a relation he defined on such that f g if and only if there exists a G with f(d) g(d) for every d D.
(This relation is an equivalence relation.Consequently, R D is partitioned into disjoint equivalence classes {F}, where each F is called a pattern.)Then the total patterns, denoted by [ W(F), is F WCF) PG( wCr), (w(r))2,..., [ (wCr))k,...) where PG is the cycle index relative to G. If w(r) I for every r e R, then the number of total patterns is IX W(F)l P(IP,.I,IP-I,...,IRI,...) (

2) F
where IRI is the cardlnallty of R. THEOREM 2. (de BrulJn [11], [12]).Let R D be the set of all functions from a finite set D into a finite set R, G be a permutation group action on D, H be R D a permutation group )] (3) If H is the identity group acting on R, then ( 3) is (2) in Plya's theorem.
THEOREM 3. Let D D be the set of all functions from a finite set D whose cardlnallty is m into itself, G be a permutation group acting on D, and a rela- where c. is the number of cycles of lenght i in the disjoint cycle decomposition of o for i 1,2,...,m.I The number of equivalence classes in D D is (number of functions f D D such that fo of) and the number of f e such that m c i fo of is i=lH (j i j cj) For details, see [7].

AN ALGORITHM.
Let G and H be permutation groups acting on D {l,2,...,m} and R {l,2,...,n} respectively.For convenience, we shall call the weak equivalence rela- tion in R D relative to G and H the G-H-relation, i.e f and g in R D are said to be G-H-related if and only if there exists a o e G and a T e H such that -i T f(od) g(d) for every d e D. Clearly, it is an equivalence relation, and R D is partitioned into disjoint classes each of which is called a G-H-class.Let G* be the m m permutation group corresponding to G, i.e., G*--G, H* be the n n permutation group corresponding to H, i.e., H*__ H, and I be the set of all m n (O,l)-matrices A (aij) where each row of A consists of exactly one i and all other entires are zero.Two matrices A and B are said to be G*-H*--I related if and only if there exist a P e G* and a Q e H* such that PAQ B. Clearly preserves the G-H-relation in R D and the G*-H*-relation in I.
(2) Let f and g belong to the same G-H-class, i.e., there exist a and a T e H such that T-Ifo g, (f) A (aij) and n(g) B (bij) with ai,f(i) 1 and bi,g(i I for i 1,2 ,m and all other entries 0. Then b i for i 1,2,...,m and all other entries 0. i, -if(i) Let P (Pij) and Q--(qij) be the permutation matrices corresponding to and respectively.By using the properties of permutation matrices, we have (PAQ-I) ij I -Pisastqjt Piuauvqjv auv aoi,;J (5)   t s for all i 1,2,...,m and j 1,2,...,n with i u and Tj v.But since all aoi,Tj --0 except aGi,f(ol) i for i--1,2,...,m, TJ fCol), i.e., J T-if(ol) and (PAQ-I) i for i 1,2,...,m and all other entries 0. i,m-lf(oi) Hence, PAQ -I B, and A and B belong to the same G*-H*-class.
Conversely, if A and B belong to the same G*-H*-class, then there exist a -i -i P G* and a Q e H* such that PAQ B. Since n is biJective, n exists, -IA -Since by (5) (PAQ-I)ij ai,rJ' say n f and n g.
From our Theorem 4, we know that for each f R D there exists a unique n(f) A (aij) in I with ai, f(i) I for i-1,2,...,m and all other entries 0 (A is called the incidence matrix of f).Now for every o G and every z e H, a i for i 1,2,...,m and all other entries 0 determine a matrix -li, m-lf(i) B in I. Let P--(plj) and Q (Qij) be the permutation matrices corresponding to and respectively.Then PAQ -I B and A and B are G*-H*-related.
From Theorem 4, for each B e I there exists a unique n-l(B) g in R D and f and g are G-H-related.Consequently, we have the following algorithm for obtaining all equivalence classes, i.e., for determining which functions are in the same equi- valence class: Step i. Select any f e R D and write al,f(1) a2,f(2 Ste_.For every e G and every z e H, compute a _ii, -If Each computation determines a function in RD, and the equivalence class containing f consists of these distinct functions.
Select a function in R D which is not a member of the equivalence class obtained in Step 2. Repeat Steps i and 2. Continue the process until every function in R D appears in an equivalence class.

APPLICATIONS.
We consider the weak equivalence classes in R D relative to the groups G and H.The proof is not difficult and hence is omitted.
COROLLARY 5.1.The cardinallty of the right equivalence class containing f in R D relative to the group G is equal to the index of the subgroup C(f) in R D relative to the group H is equal to the index of the subgroup C(f) {me H; m-if f} in H. Hence, II divides INf.
COROLLARY 5.3.The cardinallty of the similar class containing f in R D relative to the group G is equal to the index of the subgroup C(f) {o e G; o-lfo f} in G. Hence, 15] divides GI.
A. The cycle indices for many families of groups are known, e.g., see p. 36 in [9].In particular, the cycle index of the cyclic group C of order q on p q points is q PC (Xl'X2''"'Xq) i q q where #(i) is the Euler's phi-function.EXAMPLE 2. Let G <(123...q)> be the cyclic group generated by (123...q) acting on q+k points.Then PG(Xl,X2,... x ( Xl). (6) q,Xq+I, Xq+ k) Let G be the permutation group acting on D {l,2,...,q,q+l,...,q+k m} and H be the identity group acting on R {l,2,...,n}.Then, by using (3), the number of the right equivalence classes in R D relative to G is: qiqT In particular, if G 1 <(1234)> acts on D {1,2,3,4,5} and H is the iden- tity group acting on R D, then by (.7) the number of right equivalence classes in D D relative to G 1 is 825.
We show the following: (a) There are 25 right equivalence classes each of cardinality 1.By using our algorithm, the function corresponding to ali a2i a3i a4i a5j i is not changed for any o m GI, i 1,2,...,5 and j 1,2,...,5.
(c) Since by Corollary 5.1 there is no right equivalence class of cardinality 3, the number of right equivalence classes of cardinality 4 is 825-25-50 750.Our results in this example with G I <(1234)> coincide with the results on p. 113 in [12].EXAMPLE 3. Let H <(123...q)> be the cyclic group generated by (123...q) acting on q+k points.Then the cycle index of H is the same as ( 6).Let G be the identity group acting on D {l,2,...,m} and H be the group <(12...q)> act- ing on R {l,2,...,q,q+l, q+k n}.Then, by using (3), the number N of the left equivalence classes in R D relative to H is given by N lq [n m + iq @(i)km]. ( i>l In particular, let G be the identity group acting on D {1,2,...,5} and H I be the group <(1234)> acting on R D. Then the number of left equivalence classes in D D relative to H I is 782 by using (12), or hy using (3) and (7).
Then with T (.1234), we have 'J5 All of the functions corresponding to the above matrices are different and therefore, the cardinality of the equivalence class is 4. Hence, there is only one equivalence class of cardinality i and all the others are of cardinality 4, that is, there are 782 i 781 equivalence classes of cardinality 4. Our results in this example thus coincide with the results on p. 353 in [4].

B
A labeled directed graph with m vertices is said to be an f -graph if the m out-degree at every vertex is i.Thus, the incidence matrix of an fro-graph belongs to the set of m x m matrices I. Conversely, every matrix in I determines a uni- que fm-graph.Let G be a permutation group acting on m points Two fm-graphs X I and X 2 are said to be G-isomorphic if and only if there exists a o G such that o maps the vertices of X I onto the vertices of X2, and o preserves the directed edges, i.e., [oa, ob] is a directed edge in X 2 if and only if [a,b] is a directed edge in X I.A G-isomorphism of X I onto itself is said to be an auto- morphlsm of X I. Let A I and A 2 be the incidence matrices of X I and respectively.Then it is well known that X I and X 2 are G-isomorphlc if and only if -I there exists a permutation matrix P corresponding to a u e G such that PAIP Since the set of all functions from m points into itself is in one to one cor- respondence with the set of all fro-graphs, we may use (4) to count the number of non- isomorphic classes of f -graphs relative to G, i.e., the number of nonlsomorphlc where c i is the number of cycles of lenght i in the disjoint cycle decomposition of e for i 1,2 .... ,m.
By applying (4), de BruiJn in [12] obtained the number N of similar equi- are given by N I I, N 2 3, N 3 7, N 4 19, N 5 47, N 6 130. Formula (14)   gives the answer to the problem posed by Cavior in [2, p. 128] concerning the number of similarity classes relative to the symmetric group.
C. On p. 129 in [2], Cavior obtained the number of strong equivalence classes Here, with the help from the theorems of P61ya and de Bruijn, we apply our algorithm to obtain the following theorems.THEOREM 6.Let D {l,2, ,m} where m is an odd integer, R {1,2}, G be any permutation group actin 8 on D and H be the group <(12)> acting on R.
Then every strong equivalence class in R D relative to G and H consists of only one function, i.e., the number of strong equivalence classes is 2m.
PROOF.Let f be any function in R and Af (aij) be the incidence matrix f with a 1 al,i I a2,12 a3,i 3 m,i m and all other entries 0 where i k is either i or 2 for k 1,2,...,m.Then, by using our algorithm, the right equivalence class relative to G containing f con- sists of the functions corresponding to the set of matrices [Af; s e G, and {-lil -I -I entries 0}.Since m is odd, the set ,T i 2 T i m} # {i I i2,...,i for m (12).Hence, the intersection of the left equivalence class relative to G con- taining f and the right equivalence class relative to H containing f is {f}.
Consequently, the number of strong equivalence classes relative to G and H is IRDI IRI IDI 2m.
In [8], Theorem 5.3   Let p be a prime, G be the cyclic group C of order p generated by P (12 p) acting on D {l,2,...,p}, and H be the identity group acting on D. By using (15) and Corollary 5.1 restated for one-to-one functions, it can be shown that there are (p-l)!right equivalence classes in S relative to C each of P P order p.Similarly, the number of left equivalence classes in S relative to H P C is (p-l)!and the cardlnallty of each equivalence class is p.These results P are in agreement with those concerning permutation polynomials over finite fields ob- talned by Mullen in [6].THEOREM 7. Let D {1,2 p} and R {1,2, q} where p is a prime and q is an integer greater than i, C be the cyclic group of order p generated by P (12...p) acting on D, and C be the cyclic group of order q generated by q (12...q) acting on R. (qp-l-l) weak equivalence P q P classes each having cardinality pq, and there is one weak equivalence class having cardlnal+/-ty q.Since PC (Xl,X2,...,Xp) ip (x + (p-l)Xp) and PC (Xl'X2,...,xq) li, P =--I (i)xq i by (3), the number of weak equivalence classes IWI q is qiqT i (P + (p-l)--) l(e q(zl+z2+''') where the function T does not involve z. and z The reason is that every non- P identity permutation in C has no fixed points and p and q are relatively prime.q Hence, ( 17) is equal to I qp I IW[ = + (p-l)q) (qp-I + P I).Not counting the weak equivalence class above, we still have II i weak equivalence classes of non-one-to-one functions in DD.Since there are DDI Sp pP p! non-one-to-one functions and since each weak equivalence class can have its cardinallty at most p2, the cardlnality of each of these II I weak equl- Similar to the proof in (a) with q p, we may conclude that every strong equivalence class of non-one-to-one functions relative to C and C consists of P P only one function.
We know that [DDI pP, Sp[ p! and the cardinallty of the normallzer of C in S is p(p-l) (see 2.3 on p. 12 in [14]).Since the cardlnallty of the P P strong equivalence class containing the normallzer f of C in S is p P P and since every function in is also a normallzer of C in S there are p-i P P strong equivalence classes each of which has cardinallty p.Since every other strong equivalence class has cardlnallty i, the number of strong equivalence classes (pP p!) + (p! p(p-l)) + (p-l) pP (p-l) 2.
there exists a o e G with o f(od) g(d) for every d e D. (This is an equi- valence relation.Consequently, D D is partitioned into disjoint equivalence classes {F}, where each F is called a pattern.)Then the number of total patterns is Let f R D and C(f) {(u,T) e G H; T-Ifu f}.Clearly, C(f) is a subgroup of the product group G x H. THEOREM 5.The cardinality of the weak equivalence class containing f in R D relative to the groups G and H is equal to the index of C(f) in the product group G H. Hence, II divides to' S and S where D {l,2,...,m} and S is the symmetric m m m group on D.
all other entries 0}.The left equivalence class relative to H containing f consists of the set of matrices {ATf; T e H and a - (a) If q is not a multiple of p, then every strong equivalence class in R D relative to C and C consists of only one function, i.e., the number of P If q p (i.e., D R and C C ), then the number of strong equivalace a) We claim that the number of weak equivalence classes relative to to the function fl e corresponding to all-a21 a31 apl i, we have the weak equivalence class fl consisting of the q the weak equivalence class above, we still have [l_l P + p2[(pp-2 + P i) (.(p-l)! + (p-l) 2] p p!.
states: Let S be the set of all one-to-one functions n from a finite set D {l,2,...,n} onto itself, G be a permutation group acting on the domain D, H be a permutation group acting on the range D and an equivalence