How many ways can 9 books be arranged on a shelf so that 5 of the books are always together?

As Robert Shore mentions in his comment, books of a particular type (calculus/DM) are probably being considered as indistinguishable.

The relevant calculation here is instead $${12\choose3}-{10\choose1}=220-10=210$$

where we choose $3$ of $12$ positions to belong to DM books for the total case and subtract $10\choose1$ for the case where they all are together (choose $1$ out of $10$ positions for the 3 DM books to be placed together).

Part (b) can be solved by considering that we can place $x$ calculus books between the first and middle DM book and $(9-x)$ calculus books between the middle and last DM book. $x$ can take the values $0,1,2...9$ ($10$ different values) and thus the answer here is $10$ different arrangements.

Uh-Oh! That’s all you get for now.

We would love to personalise your learning journey. Sign Up to explore more.

Sign Up or Login

Skip for now

Uh-Oh! That’s all you get for now.

We would love to personalise your learning journey. Sign Up to explore more.

Sign Up or Login

Skip for now

There are only 5 places on the shelf. You have 7 books to choose from. We will ignore the order of the books on the shelf. The first place can be filled from a choice of 7 books, the next place from 6, the next place from 5, the next from 4, and the last of the 5 places from 3 books. So the number of ways of choosing the 5 is found from 7 * 6 * 5 * 4 * 3 = 2520

Part (a) We have 9 books which I'll call book a, book b, book c, ..., book h, book i Let's say we want books a through c to always stick together in any particular order. We can pull books a,b,c out of the group on a temporary basis for now. Replace them with book j. The position of book j will represent books a,b,c in any order. The 9 books drop to 9-3 = 6 after taking books a,b,c out, but then the count bumps up to 6+1 = 7 after adding book j. Arrange the 7 books and you should find there are 7! = 7*6*5*4*3*2*1 = 5040 permutations. The order matters. You can alternatively use the nPr formula with n = 7 and r = 7. That 5040 describes sequences involving book j. Wherever you see book j, replace it with some permutation of a,b,c. For example, if we had the sequence

j,d,e,f,g,h,i


then it could represent any of the following 6 items
  • a,b,c,d,e,f,g,h,i
  • a,c,b,d,e,f,g,h,i
  • b,a,c,d,e,f,g,h,i
  • b,c,a,d,e,f,g,h,i
  • c,a,b,d,e,f,g,h,i
  • c,b,a,d,e,f,g,h,i
The 6 is due to the fact that 3! = 3*2*1 = 6 There are 6 ways to arrange any group of 3 items where order matters. As another example, the sequence here

g,h,i,j,d,e,f


could represent any of the following
  • g,h,i,a,b,c,d,e,f
  • g,h,i,a,c,b,d,e,f
  • g,h,i,b,a,c,d,e,f
  • g,h,i,b,c,a,d,e,f
  • g,h,i,c,a,b,d,e,f
  • g,h,i,c,b,a,d,e,f
Overall, there are 6*5040 = 30,240 ways to arrange the 9 books such that 3 of them are always together in some fashion.

Answer: 30,240

----------------------------------------------------------- Part (b) There are 9! = 9*8*7*6*5*4*3*2*1 = 362,880 different ways to arrange all of the books regardless if 3 particular books stick together or not. We found earlier there are 30,240 ways to arrange the books so that 3 stick together. Subtract those two values to get

362,880 - 30,240 = 332,640

which represents the number of ways to have the 3 books separated in some fashion. Either they are all isolated from one another, or we only have 2 of them together (but not all 3 together). This works because those 3 books are either always together, or split apart in some way. The two events are complementary of one another.

Answer: 332,640