Question: Exercise 2 . 3 1 . ( ? ) This question has three parts. ( a ) The subfactorial of a number, namely n ,

Exercise 2.31.(?)
This question has three parts.
(a) The subfactorial of a number, namely n, is the number of permutations of n objects such
that no object appears in its natural spot. For example, take the collection of objects
fa; b; cg. There are 6 possible permutations (because we choose arrangements for three
items, and 3 D 6): fa; b; cg; fa; c; bg; fb; c; ag; fc; b; ag; fc; a; bg; fb; a; cg, but only two
of these are derangements: fb; c; ag and fc; a; bg, because no element is in the same spot
as the original collection. Therefore, we say that 3 D 2. We can describe subfactorial as
!0=1
!1=0
!n =(n-1)*(!(n-1)+!(n-2))
in java with test cases

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!