Numbers Choosing Each Other

The numbers a 1 , a 2 , a 3 , a 4 , a 5 a_1, a_2, a_3, a_4, a_5 are randomly chosen such that they satisfy a 1 , a 2 , a 3 , a 4 , a 5 { 1 , 2 , 3 , 4 , 5 } a_1,a_2,a_3,a_4,a_5\in \{1,2,3,4,5\} and a n n a_n\neq n for n { 1 , 2 , 3 , 4 , 5 } n \in \{1,2,3,4,5\} . Let P P be the probability such that there exist two integers 1 m , n 5 1\leq m,n\leq 5 such that a m = n a_m=n and a n = m a_n=m .

If P P can be expressed as r s \dfrac{r}{s} , where r r and s s are coprime positive integers, find r + s r+s .


The answer is 401.

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.

1 solution

Mark Hennings
Nov 13, 2018

There are 4 5 4^5 functions f : { 1 , 2 , 3 , 4 , 5 } { 1 , 2 , 3 , 4 , 5 } f \,:\,\{1,2,3,4,5\} \to \{1,2,3,4,5\} such that f ( n ) n f(n) \neq n for 1 n 5 1 \le n \le 5 . Let us count the number of functions f f such that f ( n ) n f(n) \neq n for all n n and such that no "swap pair" of numbers exists.

Let f f be a "no swap pair" function of this type. Then f ( 1 ) 1 f(1) \neq 1 , so we can find a 1 a \neq 1 such that f ( 1 ) = a f(1) = a . Then f ( a ) 1 f(a) \neq 1 and f ( a ) a f(a) \neq a , so we can find a third number b b such that f ( a ) = b f(a) = b .

If f ( b ) = 1 f(b) = 1 , let c , d c,d be numbers such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } \{1,a,b,c,d\} = \{1,2,3,4,5\} . Then any choice of f ( c ) , f ( d ) f(c), f(d) is possible except f ( c ) = d f(c) = d and f ( d ) = c f(d) = c . There are 4 4 choices for a a , 3 3 choices for b b , and then 4 2 1 = 15 4^2-1 =15 choices for the values of f ( c ) , f ( d ) f(c),f(d) . Thus there are 4 × 3 × 15 = 180 4\times3\times15 = 180 "no swap pair" functions of this type.

If f ( b ) 1 f(b) \neq 1 , then f ( b ) a f(b) \neq a and f ( b ) b f(b) \neq b as well, so we can find a find a new number c c such that f ( b ) = c f(b) = c . Now find the number d d such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } \{1,a,b,c,d\} = \{1,2,3,4,5\} . Note that f ( c ) f(c) cannot be either b b or c c .

If f ( c ) = 1 f(c) = 1 or f ( c ) = a f(c) = a , then any choice of f ( d ) f(d) will work. There are 4 4 choices for a a , 3 3 choices for b b , 2 2 choices for c c , and 4 4 choices for d d . Thus there are 2 × 4 × 3 × 2 × 4 = 192 2 \times 4 \times 3 \times 2 \times 4 = 192 "no swap pair" functions of this type.

If f ( c ) f(c) is neither 1 1 nor a a , then d = f ( c ) d = f(c) is such that { 1 , a , b , c , d } = { 1 , 2 , 3 , 4 , 5 } \{1,a,b,c,d\} = \{1,2,3,4,5\} . In this case f ( d ) f(d) can be any one of 1 , a , b 1,a,b . Thus there are 3 × 4 × 3 × 2 × 1 = 72 3 \times 4 \times 3 \times 2 \times 1 = 72 "no swap pair" functions of this type.

This means that there are 180 + 192 + 72 = 444 180 + 192 + 72 = 444 "no swap pair" functions, and hence there are 4 5 444 = 580 4^5 - 444 = 580 functions that contain a "swap pair". Thus we deduce that P = 580 4 5 = 145 256 P \; = \; \tfrac{580}{4^5} \; = \; \tfrac{145}{256} and hence the answer is 145 + 206 = 401 145 + 206 = \boxed{401} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...