Hi - I have another counting functions question! My solution is as follows, but I am not 100% sure if I am correct.
Q: I have a function f which maps from {1,2,3,4,5,6} to {1,2,3}. I want to count how many functions f such that for all i,j belonging to {1,2,3,4,5,6} if i is less than or equal to j, then f(i) is less than or equal to f(j)
My solution:
There are 3 cases:
Case 1: The case that f(6) is 3.
Then there are 3 options (namely 1,2 or 3) each for f(5), f(4), ... f(1) so in total 3^5 = 243
Case 2: The case that f(6) is 2. Then there are 2 options (namely 2 or 1) for f(5), f(4), ... f(1) so then in total 2^5 = 32
Case 3 : The case that f(6) is 1. Then f(5), f(4), ... f(1) have 1 choice ( namely 1 ) so 1 such function.
So in total we have 276 such functions.
Am I correct - I have an exam tomorrow so would be very much appreciated if someone could answer
Q: I have a function f which maps from {1,2,3,4,5,6} to {1,2,3}. I want to count how many functions f such that for all i,j belonging to {1,2,3,4,5,6} if i is less than or equal to j, then f(i) is less than or equal to f(j)
My solution:
There are 3 cases:
Case 1: The case that f(6) is 3.
Then there are 3 options (namely 1,2 or 3) each for f(5), f(4), ... f(1) so in total 3^5 = 243
Case 2: The case that f(6) is 2. Then there are 2 options (namely 2 or 1) for f(5), f(4), ... f(1) so then in total 2^5 = 32
Case 3 : The case that f(6) is 1. Then f(5), f(4), ... f(1) have 1 choice ( namely 1 ) so 1 such function.
So in total we have 276 such functions.
Am I correct - I have an exam tomorrow so would be very much appreciated if someone could answer