0 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 1.3k views answer comment Share Follow Print See all 10 Comments 10 10 Comments reply sakharam commented Sep 17, 2018 reply Follow flag 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 0 replyShare aditi19 commented Sep 17, 2018 reply Follow flag ans is 2(n-1) 0 0 replyShare sakharam commented Sep 17, 2018 reply Follow flag 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 0 replyShare aditi19 commented Sep 17, 2018 reply Follow flag how can u say the remaining elements are mapped to 0? they can be or cannot be mapped to 0 0 0 replyShare sakharam commented Sep 17, 2018 reply Follow flag Thats because in a function we have to map to the other set that too exactly one. 0 0 replyShare sakharam commented Sep 17, 2018 reply Follow flag 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 0 replyShare Magma commented Sep 17, 2018 reply Follow flag hey I got 2n-1 0 0 replyShare srestha commented Sep 17, 2018 reply Follow flag @Magma how?? Only 1 fix it's position among (n-1) elements right? how others ?? 0 0 replyShare srestha commented Sep 17, 2018 reply Follow flag https://gateoverflow.in/13128/number-of-function 2 2 replyShare Magma commented Sep 17, 2018 reply Follow flag srestha mam thanks 0 0 replyShare Please log in or register to add a comment.