The numbers are randomly chosen such that they satisfy and for . Let be the probability such that there exist two integers such that and .
If can be expressed as , where and are coprime positive integers, find .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are 4 5 functions f : { 1 , 2 , 3 , 4 , 5 } → { 1 , 2 , 3 , 4 , 5 } such that f ( n ) = n for 1 ≤ n ≤ 5 . Let us count the number of functions f such that f ( n ) = n for all n and such that no "swap pair" of numbers exists.
Let f be a "no swap pair" function of this type. Then f ( 1 ) = 1 , so we can find a = 1 such that f ( 1 ) = a . Then f ( a ) = 1 and f ( a ) = a , so we can find a third number b such that f ( a ) = b .
If f ( b ) = 1 , let c , d be numbers such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } . Then any choice of f ( c ) , f ( d ) is possible except f ( c ) = d and f ( d ) = c . There are 4 choices for a , 3 choices for b , and then 4 2 − 1 = 1 5 choices for the values of f ( c ) , f ( d ) . Thus there are 4 × 3 × 1 5 = 1 8 0 "no swap pair" functions of this type.
If f ( b ) = 1 , then f ( b ) = a and f ( b ) = b as well, so we can find a find a new number c such that f ( b ) = c . Now find the number d such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } . Note that f ( c ) cannot be either b or c .
If f ( c ) = 1 or f ( c ) = a , then any choice of f ( d ) will work. There are 4 choices for a , 3 choices for b , 2 choices for c , and 4 choices for d . Thus there are 2 × 4 × 3 × 2 × 4 = 1 9 2 "no swap pair" functions of this type.
If f ( c ) is neither 1 nor a , then d = f ( c ) is such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } . In this case f ( d ) can be any one of 1 , a , b . Thus there are 3 × 4 × 3 × 2 × 1 = 7 2 "no swap pair" functions of this type.
This means that there are 1 8 0 + 1 9 2 + 7 2 = 4 4 4 "no swap pair" functions, and hence there are 4 5 − 4 4 4 = 5 8 0 functions that contain a "swap pair". Thus we deduce that P = 4 5 5 8 0 = 2 5 6 1 4 5 and hence the answer is 1 4 5 + 2 0 6 = 4 0 1 .