The paper contains proofs of the following results. For all sufficiently large odd integers n, there exists a set of 2 n−1 permutations that pairwise generate the symmetric group S n . There is no set of 2 n−1 + 1 permutations having this property. For all sufficiently large integers n with n ≡ 2 mod 4, there exists a set of 2 n−2 even permutations that pairwise generate the alternating group A n . There is no set of 2 n−2 + 1 permutations having this property.