Invariance groups of finite functions and orbit equivalence of permutation groups

Which subgroups of the symmetric group S_n arise as invariance groups of n-variable functions defined on a k-element domain? It appears that the higher the difference n-k, the more difficult it is to answer this question. For k>=n, the answer is easy: all subgroups of S_n are invariance groups. We give a complete answer in the cases k=n-1 and k=n-2, and we also give a partial answer in the general case: we describe invariance groups when n is much larger than n-k. The proof utilizes Galois connections and the corresponding closure operators on S_n, which turn out to provide a generalization of orbit equivalence of permutation groups. We also present some computational results, which show that all primitive groups except for the alternating groups arise as invariance groups of functions defined on a three-element domain.

group of a pseudo-Boolean function (i.e., a function f W f0; 1g n ! R, cf. [3,Chapter 13]). Invariance groups of (pseudo-)Boolean functions are important objects of study in computer science (see [2] and the references therein); however, our main motivation comes from the algebraic investigations of A. Kisielewicz [7]. Kisielewicz defines a group G to be m-representable if there is a function f W f0; 1g n ! m whose invariance group is G (equivalently, G is .2; m/-representable), and G is defined to be representable if it is m-representable for some positive integer m (equivalently, G is .2; 1/-representable). It is easy to see that a group is representable if and only if it is the intersection of 2-representable groups (i.e., invariance groups of Boolean functions). It was stated in [2] that every representable group is 2-representable; however, this is not true: as shown by Kisielewicz [7], the Klein four-group is 3-representable but not 2-representable. Moreover, it is also discussed in [7] that it is probably very difficult to find another such example by known constructions for permutation groups.
In this paper we focus on .k; 1/-representability of groups for arbitrary k 2. It is straightforward to verify that a group is .k; 1/-representable if and only if it is the intersection of invariance groups of operations f W k n ! k (cf. Fact 2.2). We introduce a Galois connection between operations on k and permutations on n, such that the Galois closed subsets of S n are exactly the groups that are representable in this way. Our main goal is to characterize the Galois closed groups; as it turns out, the difficulty of the problem depends on the gap d WD n k between the number of variables and the size of the domain. The easiest case is d Ä 0, where all groups are closed (see Proposition 2.5); for d D 1 the only non-closed groups are the alternating groups (see Proposition 2.7). The case d D 2 is considerably more difficult (see Proposition 4.1), and the general case, which includes representability by invariance groups of Boolean functions, seems to be beyond reach. However, we provide a characterization of Galois closed groups for arbitrary d provided that n is much larger than d (more precisely, n > max 2 d ; d 2 C d ; see Theorem 3.1.) Clote and Kranakis [2] define a group G Ä S n to be weakly representable, if there exist positive integers k; m with 2 Ä k < n and 2 Ä m such that G is the invariance group of some function f W k n ! m (equivalently, G is .k; 1/-representable for some k < n). In Corollary 2.8 we provide a complete description of weakly representable groups.
Let us mention that our approach is also related to orbit equivalence of groups (see subsection 2.2). In the case k D 2, two groups have the same Galois closure if and only if they are orbit equivalent, whereas the cases k > 2 correspond to finer equivalence relations on the set of subgroups of S n . Thus our Galois connection provides a parameterized version of orbit equivalence that could be interesting from the viewpoint of the theory of permutation groups.
The paper is organized as follows. In Section 2 we formalize the Galois connection and we make some general observations about Galois closures, orbit equivalence and direct and subdirect products of permutation groups. We state and prove our main result (Theorem 3.1) in Section 3, and in Section 4 we present results of some computer experiments, which, together with Theorem 3.1, settle the case d D 2. Finally, in Section 5 we relate our approach to relational definability of permutation groups (cf. [17]) and we formulate some open problems.

Definitions and general observations
In this section we define a Galois connection that describes representable groups (subsection 2.1), and we present some auxiliary results that will be needed for the proof of the main result in Section 3. We establish a relationship between Galois closure and orbit closure (subsection 2.2), which allows us to characterize .k; 1/-representable subgroups of S n in the case k D n 1 (subsection 2.3), and we determine closures of direct products and some special subdirect products of groups (subsection 2.4).

A Galois connection for invariance groups
We study invariance groups of functions by means of a Galois connection between permutations of n and n-ary operations on k. Let O .n/ k D ff j f W k n ! kg denote the set of all n-ary operations on k. For f 2 O k and 2 S n , As for every Galois connection, the assignment G 7 ! G .k/ is a closure operator on S n , and it is easy to see that G .k/ is a subgroup of S n for every subset G Â S n (even if G is not a group). For G Ä S n , we call G .k/ the Galois closure of G over k, and we say that G is Galois closed over k if G .k/ D G. Sometimes, when there is no risk of ambiguity, we will omit the reference to k, and speak simply about (Galois) closed groups and (Galois) closures. Similarly, we have a closure operator on O .n/ k ; the study of this closure operator constitutes a topic of current research of the authors. However, in this paper we focus on the "group side" of the Galois connection; more precisely, we address the following problem.
Problem 2.1. For arbitrary k; n 2, characterize those subgroups of S n that are Galois closed over k.
As we shall see, this problem is easy if k n, and it is very hard if n is much larger than k. Our main result is a solution in the intermediate case, when d D n k > 0 is relatively small compared to n. Complementing this result with a computer search for small values of n, we obtain an explicit description of Galois closed groups for n D k 1 and n D k 2 for all n. Observe that if k 1 k 2 , then G .k 1 / Ä G .k 2 / , hence if G is Galois closed over k 2 , then it is also Galois closed over k 1 . Thus we have the most non-closed groups in the Boolean case (i.e., in the case k D 2), whereas for k n every subgroup of S n is Galois closed (see Proposition 2.5).
The following fact appears in [2] for k D 2, and it remains valid for arbitrary k. We omit the proof, as it is a straightforward generalization of the proof of the equivalence of conditions (1) and (2) in Theorem 12 of [2].

Orbits and closures
The symmetric group S n acts naturally on k n : for a D .a 1 ; : : : ; a n / 2 k n and 2 S n , let a D .a 1 ; : : : ; a n / be the action of on a. We denote the orbit of a 2 k n under the action of the group G Ä S n by a G , and we use the notation Orb .k/ .G/ for the set of orbits of G Ä S n acting on k n : Clearly, `f holds for a given 2 S n and f 2 O .n/ k if and only if f is constant on the orbits of (the group generated by) . Therefore, for any G; H Ä S n , we have G`D H`if and only if Orb .k/ .G/ D Orb .k/ .H /. On the other hand, from the identity G```D G`(which is valid in any Galois connection), it follows that G`D Hì s equivalent to G for all subgroups G; H of S n . Two groups G; H Ä S n are orbit equivalent, if G and H have the same orbits on the power set of n (which can be identified naturally with 2 n ), i.e., if Orb .2/ .G/ D Orb .2/ .H / holds [6,15]. One can define a similar equivalence relation on the set of subgroups of S n for any k 2 by (1), and each class of this equivalence relation contains a greatest group, which is the common closure of all groups in the same equivalence class. In other words, a group is Galois closed over k if and only if it is the greatest group among those having the same orbits on k n (cf. Theorem 2.2 of [7] in the Boolean case). Therefore, the Galois closure of G over k can be described as follows: From (2) we can derive the following useful formula for the Galois closure of a group, which has been discovered independently by K. Kearnes [9]. Here .S n / a denotes the stabilizer of a 2 k n under the action of S n , i.e., the group of all permutations fixing a: .S n / a D˚ 2 S n j a D a « : Note that this stabilizer is the direct product of symmetric groups on the sets fi 2 n j a i D j g, j 2 k.
Proof. We reformulate the condition a 2 a G of (2) for a 2 k n ; 2 S n as follows: Now from (2) it follows that 2 G .k/ if and only if 2 .S n / a G holds for all a 2 k n .
Orbit equivalence of groups has been studied by several authors; let us just mention here a result of Seress [13] that explicitly describes orbit equivalence of primitive groups (see [14] for a more general result). For the definitions of the linear groups appearing in the theorem, we refer the reader to [4]. In our terminology, Theorem 2.4 states that for n 11 every primitive subgroup of S n except A n is Galois closed over 2, whereas for n Ä 10 the only primitive subgroups of S n that are not Galois closed over 2 are the ones listed above (omitting the last group from each block, which is the closure of the other groups in the same block).

The case k D n 1
With the help of Proposition 2.3, we can prove that all subgroups of S n are Galois closed over k if and only if k n.
Proposition 2.5. If k n 2, then each subgroup G Ä S n is Galois closed over k; if 2 Ä k < n, then A n is not Galois closed over k.
Proof. Clearly, if k n then there exists a tuple a 2 k n whose components are pairwise different. Consequently, .S n / a is trivial and therefore G .k/ Â .S n / a G D G for all G Ä S n by Proposition 2.3. On the other hand, if k < n then there is a repetition in every tuple a 2 k n , hence .S n / a contains a transposition. Therefore .S n / a A n D S n for all a 2 k n , thus A n .k/ D S n by Proposition 2.3. Remark 2.6. From Proposition 2.5 it follows that the Galois closures of a group G Ä S n over k for k D 2; 3; : : : form a nonincreasing sequence, eventually stabilizing at G itself: Now we can solve Problem 2.1 in the case k D n 1, which is the simplest nontrivial case. The proof of the following proposition already contains the key steps of the proof of Theorem 3.1.
Proposition 2.7. For k D n 1 2, each subgroup of S n except A n is Galois closed over k.
Proof. If G Ä S n is not Galois closed over k, then Proposition 2.3 shows that for all 2 G .k/ n G and for all a 2 k n , we have 2 .S n / a G, hence D for some 2 .S n / a and 2 G. Therefore, D moreover, ¤ id follows from … G. Thus we see that G .k/ contains at least one non-identity permutation from every stabilizer: Now fix i; j 2 n, i ¤ j , and let a D .a 1 ; : : : ; a n / 2 k n be a tuple such that a r D a s " fr; sg D fi; j g or r D s. Then .S n / a D fid; .ij /g, where .ij / 2 S n denotes the transposition of i and j . Applying (4), we see that S n D .S n / a G for every a 2 k n . Choosing a as above, we have S n D fid; .ij /g G, hence G is of index at most 2 in S n . Therefore, we have either G D A n or G D S n ; the latter is obviously Galois closed, whereas A n is not Galois closed over k by Proposition 2.5.
From Proposition 2.7 we can derive the following complete description of weakly representable groups.
Corollary 2.8. All subgroups of G Ä S n except for A n are weakly representable.
Proof. According to Fact 2.2, a subgroup of S n is weakly representable if and only if it is Galois closed over k for some k < n. By Remark 2.6, this is equivalent to G being Galois closed over n 1. From Proposition 2.7 it follows that all subgroups of S n are Galois closed over n 1 except for A n .

Closures of direct and subdirect products
In the sequel, B and D always denote disjoint subsets of n such that n D B [ D, and G H stands for the direct product of G Ä S B and H Ä S D . In this paper we only consider direct products with the intransitive action, i.e., the two groups act independently on disjoint sets. Given permutationsˇ2 S B and ı 2 S D , we writeˇ ı for the corresponding element of S B S D . Let 1 and 2 denote the first and second projections on the direct product The following proposition describes closures of direct products, and, as a corollary, we obtain a generalization of [7, Theorem 3.1].
Proof. For notational convenience, let us assume that B D f1; : : : ; t g and D D ft C 1; : : : ; ng. If a D .1; : : : ; 1; 2; : : : ; 2/ 2 k n with t ones followed by n t twos, then the stabilizer of a in S n is S B S D . Hence from of the formˇ ı for someˇ2 S B ; ı 2 S D . For arbitrary a D .a 1 ; : : : ; a n / 2 k n , let a B D .a 1 ; : : : ; a t / 2 k t and a D D .a t C1 ; : : : ; a n / 2 k n t . It is straightforward to verify that aˇ ı 2 a G H if and only if aB 2 a G B and a ı D 2 a H D . Thus applying (2), we have Remark 2.11. If n < m, then any subgroup G of S n can be naturally embedded into S m as the subgroup , there is no danger of ambiguity in not specifying whether we regard G as a subgroup of S n or as a subgroup of S m .
Next we determine the closures of some special subdirect products involving symmetric and alternating groups that we will need in the proof of our main result. Recall that a subdirect product is a subgroup of a direct product such that the projection to each coordinate is surjective. Hence, if G Ä S B S D and G 1 D 1 .G/, G 2 D 2 .G/, then G is a subdirect product of G 1 and G 2 . We denote this fact by G Ä sd G 1 G 2 , and by G < sd G 1 G 2 we mean a proper subdirect subgroup of G 1 G 2 . According to Remak [12], the following description of subdirect products of groups is due to Klein [8]. (Of course, the theorem is valid for abstract groups, not just for permutation groups. For an English reference, see Theorem 5.5.1 of [5].) Theorem 2.13 ( [8,12]). If G Ä sd G 1 G 2 , then there exists a group K and surjective homomorphisms Note that in the above theorem we have G D G 1 G 2 if and only if K is the trivial (one-element) group.
Proof. Suppose that G Ä sd A B L, and let K and ' 1 ; ' 2 be as in Theorem 2.13 (for G 1 D A B and G 2 D L).
Since A B is simple, the kernel of ' 1 is either fid B g or A B . In the first case, K is isomorphic to A B ; however, this cannot be a homomorphic image of L, as jLj Ä jS D j < jA B j. In the second case, K is trivial and G D A B L. If G Ä sd S B L, then there are three possibilities for the kernel of ' 1 , namely fid B g, A B and S B . Just as above, the first case is impossible, while in the third case we have G D S B L. In the second case, K is a two-element group, hence by letting L 0 be the kernel of ' 2 , we obtain (5).
Proposition 2.15. Let jDj < d Ä n d and let G be any one of the subdirect products considered in Proposition 2.14. Then G  (5).
Moreover, G .k/ contains .S B n A B / .L n L 0 /, and this shows that the first containment in (6) is strict. However,

The main result
Our main result is the following partial solution of Problem 2.1 for the case when n is "much larger" than d D n k. Note that the set D in the theorem above is much smaller than B, thus B is a "big" subset of n, and L Ä S D is a "little group", hence the notation. The subdirect product G < sd S B L is not determined by B and L, but in Proposition 2.14 we gave a fairly concrete description of these groups. Proposition 2.15 shows that the groups given in Theorem 3.1 are indeed not Galois closed over k (and that their Galois closure is S B L). Therefore, it only remains to verify that these are the only non-closed groups, and we will achieve this by an argument that is based on the same idea as the proof of Proposition 2.7: 1) first we use (4) with specific tuples a to show that G .k/ must be a "large" group (see subsection 3.1 below), and then 2) we prove that G is of "small" index in G .k/ (see subsection 3.2 below).
For the first step, we will need to apply (4) for several groups acting on different sets, hence, for easier reference, we give a name to this property.

Definition 3.2. Let
Â n be a nonempty set, and let us consider the natural action of S on k for a positive integer k 2. We say that H Ä S is k-thick, if 8a 2 k 9 2 .S / a n fid g W 2 H: We will use thickness with two types of tuples a 2 k . First, let a contain only one repeated value, which is repeated exactly d C 1 times, say at the coordinates i 1 ; : : : ; i d C1 2 (note that such a tuple exists only if j j d C 1). Then the stabilizer of a is the full symmetric group on fi 1 ; : : : ; i d C1 g, therefore k-thickness of H implies that 9 2 S fi1;:::;idC1g n fidg W 2 H: Next, let d values be repeated in a, each of them repeated exactly two times, say at the coordinates i 1 ; j 1 I i 2 ; j 2 I : : : I i d ; j d (here we need j j 2d ). Then the stabilizer of a is the group generated by the transpositions .i 1 j 1 / ; .i 2 j 2 / ; : : : ; .i d j d /. Thus k-thickness of H implies that 9 2 h.i 1 j 1 / ; .i 2 j 2 / ; : : : ; .i d j d /i n fidg W 2 H: The first paragraph of the proof of Proposition 2.7 can be reformulated as follows: Fact 3.3. If G Ä S n is not Galois closed over k, then G .k/ is k-thick.

The closures of non-closed groups
The goal of this subsection is to prove the following description of the closures of non-closed groups.
Proposition 3.4. Let n > d 2 C d . If G Ä S n is not Galois closed over k, then G .k/ is of the form S B L, where B Â n is such that D WD n n B has less than d elements, and L is a permutation group on D.
Throughout this subsection we will always assume that G < G .k/ Ä S n with n > d 2 C d , where d D n k 1. We consider the action of G .k/ on n (not on k n ), and we separate two cases upon the transitivity of this action.
First we deal with the transitive case, for which we will make use of the following theorem of Bochert [1] (see also [4,16]).

Theorem 3.5 ([1]).
If G is a primitive subgroup of S not containing A , then there exists a subset I Â with jI j Ä j j 2 such that the pointwise stabilizer of I in G is trivial.
Proof. Assume for contradiction that H satisfies the assumptions of the lemma, but H does not contain A . If H is primitive, then let us consider the set I given in Theorem 3.5. Since j n I j j j 2 > d , we can find d C 1 elements i 1 ; : : : ; i d C1 in n I . Since H is k-thick and j j d C 1, we can apply (7) for i 1 ; : : : ; i d C1 , and we obtain a permutation ¤ id in the pointwise stabilizer of I in H , which is a contradiction.
Thus H cannot be primitive. Since it is transitive, there exists a nontrivial partition with jB 1 j D D jB r j D s and r; s 2 such that every element of H preserves this partition. We will prove by contradiction that r Ä d and s Ä d . First let us assume that r > d ; let B 1 D fi 1 ; j 1 ; : : :g ; : : : ; B d C1 D fi d C1 ; j d C1 ; : : :g, and let be the permutation provided by (7). Since ¤ id, there exist p; q 2 f1; : : : ; d C 1g ; p ¤ q such that i p D i q . On the other hand, we have j p D j p , and this means that does not preserve the partition (9). Next let us assume that s > d ; let B 1 D fi 1 ; : : : ; i d C1 ; : : :g ; B 2 D fj 1 ; : : : ; j d C1 ; : : :g, and let be the permutation provided by (8). Since ¤ id, there exists p 2 f1; : : : ; d g such that i p D j p . On the other hand, we have i d C1 D i d C1 , and this means that does not preserve the partition (9). We can conclude that r; s Ä d , hence we have j j D rs Ä d 2 < j j, a contradiction.
Proof. Since n > d 2 C d , we have n > max 2d; d 2 . Thus from Fact 3.3 and Lemma 3.6 it follows that either However, A n is not Galois closed over k by Proposition 2.5, because n > k. Now let us consider the intransitive case. The first step is to prove that in this case there is a unique "big" orbit.
Lemma 3.8. If G .k/ is not transitive, then it has an orbit B such that D D n n B has less than d elements.
Proof. We claim that G .k/ has at most d orbits. Suppose to the contrary, that there exists d C 1 elements i 1 ; : : : ; i d C1 2 n, each belonging to a different orbit. If 2 G .k/ is the permutation given by (7), then there exist p; q 2 f1; : : : ; d C 1g, p ¤ q such that i p D i q , and this contradicts the fact that i p and i q belong to different orbits of G .k/ . Now, the average orbit size is at least n d > d , therefore there exists an orbit B D fi 1 ; : : : ; i d ; : : :g of size at least d . We will show that the complement of B has at most d 1 elements. Suppose this is not true, i.e., there are at least d elements j 1 ; : : : ; j d outside B. With the help of (8) we obtain a permutation 2 G .k/ for which there exists p 2 f1; : : : ; d g such that i p D j p . This is clearly a contradiction, since i p belongs to the orbit B, whereas j p belongs to some other orbit.
At this point we know that G .k/ Ä S B S D . Using the the notation G 1 D 1 G .k/ and L D 2 G .k/ for the Lemma 3.9. If G .k/ is not transitive and B is the big orbit given in Lemma 3.8, then G Proof. First we show that G 1 inherits k-thickness from G .k/ . Let b 2 k B , and extend b to a tuple a 2 k n such that the components a i .i 2 D/ are pairwise different (this is possible, since jDj < k). The k-thickness of G .k/ implies that there exists a permutation 2 .S n / a \ G .k/ n fidg, and from G .k/ Ä sd G 1 L it follows that Dˇ ı for someˇ2 G 1 ; ı 2 L. The construction of the tuple a ensures that ı D id D , hence we have id B ¤ˇ2 .S B / b \ G 1 , and this proves that G 1 is a k-thick subgroup of S B .
Since B is an orbit of G .k/ , the action of G 1 on B is transitive. From n > d 2 Cd it follows that jBj D n jDj > n d max 2d; d 2 , hence applying Lemma 3.6 with H D G 1 and D B, we obtain that G 1 A B . This means

The non-closed groups
In this subsection we prove the following Proposition 3.10. It describes the groups G with G .k/ D S B L and therefore completes also the proof of Theorem 3.1.
Proposition 3.10. Let n > max 2 d ; d 2 C d , let B Â n and D D n n B such that jDj < d , and let L Ä S D . If G Ä S n is a group whose Galois closure over k is S B L, then G Ä sd A B L or G Ä sd S B L.
Throughout this subsection we will assume that n > max 2 d ; d 2 C d , where d D n k 1, and G .k/ D S B L, where B and L are as in the proposition above. Let G 1 D 1 .G/ Ä S B and G 2 D 2 .G/ Ä S D ; then we have G Ä sd G 1 G 2 . As in subsection 3.1, we begin with the transitive case (i.e., D D ;), and we will use the following well-known result (see, e.g., [16,Exercise 14.3

]).
Proposition 3.11. If n > 4 and H is a proper subgroup of S n different from A n , then the index of H is at least n. Proof. Let a 2 k n be the tuple which was used to obtain (8); then we have .S n / a D h.i 1 j 1 / ; .i 2 j 2 / ; : : : ; .i d j d /i. From Proposition 2.3 we obtain S n D G .k/ Â .S n / a G; hence we have .S n / a G D S n . Since j.S n / a j D 2 d , the index of G in S n is at most 2 d < n, and therefore Proposition 3.11 implies that G A n if n > 4. If n Ä 4, then d D 1, thus we can apply Proposition 2.7. Proof. Clearly, k/ by Proposition 2.9. This implies that G .k/ 1 D S B . Now we would like to apply Lemma 3.12 for the group G 1 . Note that we assume throughout this section (in particular, also in Lemma 3.12) that n > max 2 d ; d 2 C d , therefore we need to verify first that this inequality holds for G 1 . Since G 1 acts on B, we must replace n by jBj and d by jBj k, hence we have to prove that jBj > max 2 jBj k ; .jBj k/ 2 C jBj k Á : Observe that jBj D n jDj > n d , as jDj < d ; furthermore, jBj k D n k jDj D d jDj. First let us show that jBj > 2 jBj k : Next we prove that jBj > .jBj k/ 2 C .jBj k/: Thus Lemma 3.12 indeed applies to G 1 , and it yields G 1 A B . On the other hand, k > jDj implies that G 2 .k/ D G 2 by Proposition 2.5, hence Applying 2 to these inequalities, we obtain G 2 Ä L Ä G 2 , and this proves G 2 D L.

Computational results
We computed the Galois closures of all subgroups of S n for 2 Ä k Ä n Ä 6 by computer, and we found that for most of these groups the chain of closures (3) contains only G (i.e., G is Galois closed over 2), and for all other groups (3) consists only of two different groups (namely G .2/ and G). Table 1 shows the list of groups corresponding to the latter case, up to conjugacy. For each group, the first column gives the smallest n for which G can be embedded into S n (here we mean an embedding as a permutation group, not as an abstract group; cf. Remark 2.11). We also give the largest k such that G  Table 1 may need some explanation. Using the notation of Theorem 2.13, each subdirect product in the table corresponds to a two-element quotient group K: for symmetric groups S n we take the homomorphism 'W S n ! K with kernel A n (cf. Proposition 2.14), whereas for the dihedral group D 4 we take the homomorphism 'W D 4 ! K whose kernel is the group of rotations in D 4 . The group S 3 o S 2 is the wreath product of S 3 and S 2 (with the imprimitive action); equivalently, it is the semidirect product .S 3 S 3 / Ì S 2 (with S 2 acting on the direct product by permuting the two components). By S 3 o sd S 2 we mean the "subdirect wreath product" .S 3 sd S 3 / Ì S 2 . Finally, the groups S . / and R . / denote the group of all symmetries and the group of all rotations (orientation-preserving symmetries) of the cube, acting on the six faces of the cube.
Combining these computational results with Theorem 3.1, we get the solution of Problem 2.1 for the case d D 2.
Proposition 4.1. For k D n 2 2, each subgroup of S n except A n and A n 1 (for n 4) and C 4 (for n D 4) is Galois closed over k.
Proof. If n > 6, then we can apply Theorem 3.1, and we obtain the exceptional groups A n and A n 1 from the direct product A B L with jDj D 0 and jDj D 1, respectively. If n Ä 6, then the non-closed groups can be read from Table 1.
We have also examined the linear groups appearing in Theorem 2.4 by computer, and we have found that all of them are Galois closed over 3. Thus we have the following result for primitive groups.
Proposition 4.2. Every primitive permutation group except for A n .n 4/ is Galois closed over 3.

Concluding remarks and open problems
We have introduced a Galois connection to study invariance groups of n-variable functions defined on a k-element domain, and we have studied the corresponding closure operator. Our main result is that if the difference d D n k is relatively small compared to n, then "most groups" are Galois closed, and we have explicitly described the nonclosed groups. The bound max 2 d ; d 2 C d of Theorem 3.1 is probably not the best possible; it remains an open problem to improve it.
It is natural to ask if there exist groups with long chains of closures that are not direct products of groups acting on smaller sets. As Proposition 4.2 shows, we cannot find such groups among primitive groups. The closure operator defined in subsection 2.1 concerns the Galois closure with respect to the Galois connection induced by the relation`Â S n O .n/ k , based on a natural action of S n on k n . In permutation group theory also another closure operator, called k-closure is used, which was introduced by H. Wielandt ([17,Definition 5.3]). This notion describes Galois closures with respect to a Galois connection between permutations of n and k-tuples in n k . Let 2 S n act on r D .r 1 ; : : : ; r k / 2 n k according to r WD .r 1 ; : : : ; r k /, and, for a k-ary relation % Â n k , let us write F % if and only if preserves %, i.e., r 2 % for all r 2 %. For G Â S n , the Galois closure .G F / F is defined analogously to .G`/`(see subsection 2.1). The group .G F / F is called the k-closure of G, and it is denoted by Aut Inv .k/ G in [11] and by G .k/ D gp.k-rel G/ in [17]. A group G Ä S n is k-closed if and only if it can be defined by k-ary relations, i.e., if there exists a set R of k-ary relations on n such that G consists of the permutations that preserve every member of R. The following proposition establishes a connection between the two notions of closure.
Proposition 5.4. For every G Ä S n and k 1, the Galois closure G .kC1/ is contained in the k-closure of G. In particular, every k-closed group is Galois closed over k C 1.
Proof. The proof is based on a suitable correspondence between n k and .k C 1/ n . Let r D .r 1 ; : : : ; r k / 2 n k be a k-tuple whose components are pairwise different. We define~.r/ D .a 1 ; : : : ; a n / 2 .k C 1/ n as follows: k C 1; if i … fr 1 ; : : : ; r k g : Thus~is a partial map from n k to .k C 1/ n , and it is straightforward to verify that~is injective, and~.r/ 1 D .r / holds for all 2 S n and r 2 n k with mutually different components. (Here~.r/ 1 refers to the action of S n on .k C 1/ n by permuting the components of n-tuples, while r refers to the action of S n on n k by mapping k-tuples componentwise.) Now let G Ä S n and 2 G .kC1/ ; we need to show that r 2 r G for every r 2 n k . We may assume that the components of r are pairwise distinct (otherwise we can remove the repetitions and work with a smaller k). From 2 G .kC1/ it follows that~.r/ 1 2~.r/ G . Therefore, we have~.r / D~.r/ 1 2~.r/ G D~ r G , and then the injectivity of~gives that r 2 r G .
Note that the proposition above implies that each group that is not Galois closed over k (such as the ones in Theorem 3.1) is also an example of a permutation group that cannot be characterized by .k 1/-ary relations.
The connection between the two notions of closure in the other direction is much weaker. For example, the Mathieu group M 12 is Galois closed over 2 (since it is the automorphism group of a hypergraph), but it is not 5closed (since it is 5-transitive, and this implies that the 5-closure of M 12 is the full symmetric group S 12 ). In some sense, this is a worst possible case, as it is not difficult to prove that if a subgroup of S n is Galois closed over 2, then it is b n 2 c-closed (in particular, M 12 is 6-closed).
Problem 5.5. Determine the smallest number w .n; k/ such that every subgroup of S n that is Galois closed over k is also w .n; k/-closed.