# Math Help - Order in two groups

1. ## Order in two groups

I have two groups with n balls marked from 1 to n.

Two groups are randomized ( i.e. for each ball in each group to get any place in new order from 1 to n the probability is 1/n )

What the probability that in new order I won't see right combinations (1-1 or 2-2 , or 3-3 , or 4-4 ...)

Simple example :

Initial order
Group 1 Group 2

1 3
2 2
3 1

Final order

1 1
2 3
3 2

Final order isn't good I don't want to see (1-1) .

2. Do you know what a derangement of a queue of n objects is?
Derangements are permutations in which each member is active.
2143 is a derangement of 1234 whereas 2431 is not because the 3 is inactive.
If D(n) is the number of derangements on a queue of n objects;
then $D(n) = n!\sum\limits_{k = 0}^n {\frac{{\left( { - 1} \right)^k }}
{{k!}}} \approx \frac{{n!}}{e}$
.
Given any queue of the n balls from the first group, there are D(n) queues of the other group of balls that do not have any matching positions with the given queue.
Thus the answer to your question is $\frac{{D(n)}}{{n!}} \approx \frac{1}{e},\;\;\;n\ge 3$.

3. Thank you very much fro your answer , Plato .

Let me to complicate my question .

I need to random the data such way that the probability that some will guess the right combination will be at most 1/k . Where k is number of similar values ( I have n/k groups).

Example (right combination) :

n=4 , k=2

a a
a a
b b
b b

The someone need to discover this order. Between first a-a and second a-a there is no difference (similar to b-b).

How I can random it ?

4. I am very sorry to say that I have no idea what you new question means!

5. Ok .

Assume the right order is :

a a
a a
b b
b b

I give somebody these data :

a b
a b
b a
b a

What the probability that this somebody try any row ( assume first row a-b) and guess that it must be a-a . it seems 1/2 or 1/(n/k) in general ?