0 votes 0 votes How many functions are there from set {1,2,3.....n}, where n is a positive integer, to set {0,1} that assigns 1 to exactly one of the positive integers less than n? Combinatory discrete-mathematics + – aditi19 asked Sep 17, 2018 aditi19 425 views answer comment Share Follow See all 10 Comments See all 10 10 Comments reply sakharam commented Sep 17, 2018 reply Follow Share Answer: n-1 Given: Function from set {1,2,3.....n}, where n is a positive integer, to set {0,1} 1 assigned to exactly one of the positive integers less than n which means out of 1 to n-1 only one of them is mapped to 1. Since its a function all from 1 to n needs to get a value so rest of the n-1 values are mapped to 0. Number of ways to choose 1 out of n-1 numbers: n-1 Rest map to 0. 0 votes 0 votes aditi19 commented Sep 17, 2018 reply Follow Share ans is 2(n-1) 0 votes 0 votes sakharam commented Sep 17, 2018 reply Follow Share I got it, Since its specified exactly one of 1 to n-1 will be mapped be mapped to 1, we get n-1 permutations to select one from the n-1 integers and other remaining n-2 numbers out of n-1 numbers are mapped to 0. Now, they didnt said anything about n, so it can be mapped to either 0 or 1, hence 2*(n-1) 0 votes 0 votes aditi19 commented Sep 17, 2018 reply Follow Share how can u say the remaining elements are mapped to 0? they can be or cannot be mapped to 0 0 votes 0 votes sakharam commented Sep 17, 2018 reply Follow Share Thats because in a function we have to map to the other set that too exactly one. 0 votes 0 votes sakharam commented Sep 17, 2018 reply Follow Share http://www.doc.ic.ac.uk/~pg/Discrete/Slides/Functions/functions.pdf and https://www.youtube.com/watch?v=7cTWea9YAJE&index=24&list=PL0862D1A947252D20 You may refer to these 0 votes 0 votes Magma commented Sep 17, 2018 reply Follow Share hey I got 2n-1 0 votes 0 votes srestha commented Sep 17, 2018 reply Follow Share @Magma how?? Only 1 fix it's position among (n-1) elements right? how others ?? 0 votes 0 votes srestha commented Sep 17, 2018 reply Follow Share https://gateoverflow.in/13128/number-of-function 2 votes 2 votes Magma commented Sep 17, 2018 reply Follow Share srestha mam thanks 0 votes 0 votes Please log in or register to add a comment.