in Combinatory
385 views
0 votes
0 votes
How many function are there from the set{1,2,3,........n} where n is positive integer ,to the set {0,1}.

a) that assigns 0 to both 1 and n?

b)that assign 1 to exactly one of positive integer less than n?
in Combinatory
by
385 views

1 Answer

1 vote
1 vote
Best answer

a) 0 is mapped to both 1 & n. Hence for remaining  (n-2) elements, we have two choices  {0,1} for mapping of each element.

Hence no of function possible  = 2*2*2*..........(n-2)terms =  2(n-2)

b) Here in this case, '1' is assigned to  exactly one integer  less than 'n' i.e  any one of '1' to 'n-1'. So for remaining (n-1)  element ,we have only one choice of mapping all of them to '0'

 Hence no of functions = n-1C1*(1*1*1 ...........n-1 times) = (n-1)

selected by

3 Comments

b)that assign 1 to exactly one of positive integer less than n. So here we have two choices for nth integer.  
 

0
0
For nth integer,there is only one choice i.e. assigning it '0'.If we assign '1' to nth element,it violates the constraint that only one integer from '1' to 'n-1' can be assigned '1'.So nth integer left with only one choice of assigning '0' to it.
0
0

for b part ans should be n-1c1*2= 2(n-1)

https://gateoverflow.in/13128/number-of-function

pls correct the ans

0
0

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true