use principle of inclusion and exclusion
famopusly called as PIE
the number of bijective functions f:A->A,where A={1,2,3} such tht f(1)≠3,f(2)≠1,f(3)≠2
are----??
This is a question of derrangement..
see the thing is that there is nothing special about 3, 1 and 2
we could as well have asked.. no of functions such that f(1)≠1, f(2)≠2 and f(3)≠3 to get the same answer
so teh number of solutions is D(3)=2
If you are not sure of what derangement is read http://en.wikipedia.org/wiki/Derangement