Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $X = \{1, 2, 3, \ldots , 25\}$. If a student selects a function randomly from the set of all functions from $X$ onto $X$, then what is the probability that the selected function maps prime numbers to prime numbers?

share|cite|improve this question

marked as duplicate by drhab, 5xum, Norbert, Davide Giraudo, egreg May 23 '14 at 10:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Start by figuring out how many prime numbers there are in your set. Also consider the the set {1,2,3,4,5} and try to to work it out for this small set, then generalize. – Alex R. Apr 27 '12 at 20:59
@ Sam ok I'll try. – Abhishek Pant Apr 27 '12 at 21:01
up vote 3 down vote accepted

Hint: a function from $X$ onto $X$ (where $X$ is a finite set) is a permutation of $X$. If $A$ and $B$ are the sets of primes and non-primes in $X$, a permutation of $X$ that maps $A$ onto $A$ (and therefore $B$ onto $B$) corresponds to an arbitrary permutation of $A$ and an arbitrary permutation of $B$. Now, how many are there?

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.