1 out of 5 italians speak english. 1 out of 5 people in italy are tourists. 1 out 2 tourists speaks english.
You meet a english-speaking person in italy, what is the probability that this person is italian.
The way I see the "population":
P(I) = \frac{2}{10} are italians who speaks english...
I have maybe explained this poorly, but let me try one last time.
Say you have a set:
A = {1 .. 10}
The cryptographic function has A as it's domain and codomain.
Now, to create these pairings we have to take elements 'out' of the set.
So, if our first pair is: (1, 2), then we are left...
Ah, yes :)
\frac{n!}{(n-r)!}
Is to big. But if you take away a factor of r!, you take away all permutations of elements. So, I need to take away (\frac{r}{2})! to take away all permutations of "pairs".
So the answer is:
\frac{n!}{ (\frac{r}{2})! (n-r)!}
?
Ah, this may have caused some confusion. I haven't given you the full information.
I'll give a third example, that should have all the information:
Consider you have 9 numbers(1, 2, 3, 4, 5, 6, 7, 8, 9).
You have some sort of crypto-system that can hold 4 pairs of numbers. The...
Let's make it simpler.
|A| = 5
The total number of combinations of 2 groups of size 2 is:
\frac{5!}{(5-2)!}
This should basically be any permutation of 4 elements(2 ordered pairs) where order does matter. But, here the order of the ordered pairs themselves doesn't matter. So, this number...
Ok, given a set: A
How many distinct x tuples can be created using a subset of A?
Example:
|A| = 20
I want to know how many combinations of 7 tuples can be made from that set.
Example:
If A = {1 .. 20} three such combinations could be:
{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}...
I'll go out on a limb and recommend Lisp.
I'll also add that if you allready know C++, continuing with Java doesn't make sense to me. They are to similar, and will not really widen your horizon. Learning Java will mostly just teach you new syntax.
Guess it depends on what your goals are...