Arrangement

See also: Arrangement (music) ---- In Mathématiques, when we choose K objects among N discernible objects and that the order in which the objects are selected revêt an importance, we can represent them by a '' K '' - uplet of distinct elements.

Example: With an examination, five candidates draw the ones after the others a subject in a ballot box containing from the different questions all. The first pulling will be done on a whole of 50 possible questions. With each following pulling, the question which has just been drawn is removed ballot box. Thus, if it one made pass 5 pupils, pulling would be done on 50, then out of 49, and so on up to 46 which represents the whole of the remaining questions in the ballot box for last pulling. Arrangement will consist has to add with each modification of this starting whole new probability of picking a given question. The solution for this example is thus an arrangement of 5 (K) to 50 (N). If one again gave the drawn question in the ballot box to each pulling, it would act then of a Combination.

Mathematical definition

Definition:

Are E a finished whole of cardinal N and K a natural entirety. A K - arrangement without repetition of E is an injective mapping of {1, 2,…, K } in E .

Another definition:

Are E a finished whole of cardinal N and K a natural entirety. An K-arrangement of E (or K - arrangement without repetition of E , or arrangement without repetition of N elements taken K with K ) is a K - uplet ( has 1, has 2,…, has k) elements of E such as has i has j qqsoit I, J € with I J . Such a K - uplet is also called K - list distinct from elements of E .

Theorem:

Are E and F two whole finished of respective cardinals N and K . The unit \ mathcal I (F, E) of the injective mappings of F in E is finished and its cardinal is equal to N ( N -1)… ( N - K +1) if K N and 0 if not. This cardinal notes A_n^k and is read “Ank”. It is also said that one has an arrangement of K to N.

Demonstration:

  • If K > N , then there does not exist any injection of F in E and thus A_n^k=0.

  • If K < N , then show the equality by recurrence on the entirety K .
    • If K = 1 then F is a singleton and any application of F in E is injective thus A_n^1 = n.
    • Let us suppose the equality checked for any unit F of cardinal K - 1 (2 ≤ K N ) and show it with the row K :
      Soit F a whole of cardinal K , and X an element of F . Let us pose G = F \ { X }. We have card ( G ) = K -1.
      Considérons the relation which connects two injections of F in E when they have even restriction on G . The classes of equivalence partitionnent \ mathcal I (F, E) very in classes having as cardinal N - ( K -1). Indeed, there are as many ways of prolonging an injection of G in E in an injection of F in E than of choice of the image of X among N - K +1 images possible. Moreover the number of classes of equivalence is equal to the number of restrictions different of applications from \ mathcal I (F, E) to G ; there is of it thus \ rm {card} \ left (\ mathcal I (G, E) \ right) (the restriction of an injection on a part being injective). According to the Lemma of the shepherds:
      A_n^k = (N - K + 1). A_n^ {k-1} = N (N - 1) \ ldots (n-k+2) (N k+1) .
  • If K =0, we will pose by convention for entire naturalness N A_n^0=1, since there exists only one application which goes from the empty set ∅ in an unspecified unit E which moreover is injective!

Demonstration (elementary):

If 1 ≤ K N then suppose that F = { X 1, X 2,…, X k}. To build an injective mapping of F in E , we must

  • choose the image of X 1 and there is possible N images,
  • to choose the image of X 2 and there remain possible N -1 images,
  • to choose the image of X k, he remains as a whole E N - ( K -1) elements unfulfilled thus N - ( K -1) possible images.
On the whole, we built N . ( N -1) ..... ( N - K + 1) different injective mappings.

Corollary:

A_n^k is also the number of K - arrangements without repetition of a unit E of cardinal N and we have \ forall N, K \ in \ mathbb {NR}, A_n^k= \ left \ {\ begin {matrix} 0 & \ rm {\, if \,} & k>n \ \ \ frac {N!}{(n-k)!} & \ rm {\, if \,} & K \ Leq N \ \ \ end {matrix} \ right.

Demonstration:

Let us suppose F = { X 1, X 2,…, X k}. An injection F of F in E is identified with the K - uplet of distinct elements ( F ( X 1), F ( X 2),…, F ( X k)). There is thus a bijection between the whole of the injective mappings of F in E and the whole of the K - uplets of elements distinct from E .

Note:

To build an arrangement amounts placing the ones after the others, K discernible objects taken among N , in K numbered boxes and thus a Permutation of N elements is a N - arrangement of N elements. The concept of arrangement thus generalizes that of permutation.

Calculation algorithm

In pseudo code

Fonction Arrangements (N, K)

Ank = 1
// Test in extreme cases
If K < 0 or K > N then
Retourner 0
Fin If
// Calculation of Ank (of I = K with n-1 buckles)

K

As long as I < N
Ank = Ank * I

I + 1

Fine as long as
To turn over Ank
Fine function

In Java

int arrangements (final int N, final int K)
{
int Ank = 1;
// Test in extreme cases
yew (K < 0 || K > N)
{
return 0;
}

// Calculation of Ank (of I = n-k with N buckles)

for (int I = N - K + 1; I <= N; i++)
{
Ank *= I;
}

return Ank;

}

See too

Internal bonds

Random links:Hameçonnage | Bagaudes | List episodes of Frasier | History of Gôjû Ryû | Pierre Bérégovoy | Comté_de_DeSoto,_la_Floride