How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Here are the five books:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

 

Let's use slots like we did with the license plates:

We'll fill each slot -- one at a time...  Then we can use the counting principle!

The first slot:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

We have all 5 books to choose from to fill this slot.

Let's say we put book C there...

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Now, we only have 4 books that can go here...
 

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

How many books are left for this slot?
 

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

 

See it?

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Whoa, dude!  That's 5!

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

So, there are 120 ways to arrange five books on a bookshelf.
(Aren't you glad I didn't make you draw them out?)

Was the answer to our 3-book problem really 3! ?

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Yep!

Will this always work?

TRY IT:

How many ways can eight books be arranged on a bookshelf?  (reason it out with slots)


Page 2

Now, we're going to learn how to count and arrange.  (As if just learning to count wasn't exciting enough!)

How many ways can we arrange three books on a bookshelf?

     Here are the books:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Well, there's one arrangement.

Let's pound out the others:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

That's all of them...  There are 6 ways to arrange three books on a bookshelf.

What about five books?

Dang!  I don't want to have to draw it all out!

Let's FIGURE it out instead.


Page 3

* For this one, order does NOT matter!

We did this problem before:

     If we have 8 books, how many ways can we arrange 3 on a
     bookshelf?

We figured it out with slots:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

 

But, using the formula gave us the same thing:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

Here's a different question for you:

     If we have 8 books and we want to take 3 on vacation with us, how
     many ways can we do it?

What's the difference between these problems?

ORDER DOESN'T MATTER!

In the first problem, we were arranging the 3 books on a shelf...  and in the second problem, we're just tossing the 3 books in a suitcase.

So, if order doesn't matter, we'll just divide it out!

Arranging the 3 books is 3!

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?


Page 4

Grab a calculator!  I'm going to teach you about a new button.

Look for it...  It will either be

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?
or
How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

(It's probably above one of the other buttons.)

Find it?

It's called a factorial.

Here's an example:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

(No, this isn't just an excited 5.)

Here's what it means:

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

 

Check it by multiplying it out the long way, then try the button.

Here are some others:

                                            

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

                                            

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

                                            

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

                                             

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?

                                                

How many ways can 5 different books be arranged on a shelf if two specified books must not be side by side?


Page 5

$\begingroup$

How many ways can $5$ books be arranged on a shelf if $2$ of the books must remain together?

I have $5$ books $A,B,C,D,E $ and spots as $$\underline{A} \ \underline{B} \ \underline{C} \ \underline{D} \ \underline{E}$$

These can be arranged in $5!$ ways. So suppose that $A,B$ must remain together. Can I treat $AB$ as a single element and consider $$\underline{AB} \ \underline{C} \ \underline{D} \ \underline{E}$$ even though this has $5$ books but $4$ spots? These can be arranged as $$\underline{AB} \ \underline{C} \ \underline{D} \ \underline{E} \\ \underline{C} \ \underline{AB} \ \underline{D} \ \underline{E} \\ \vdots \\ \underline{C} \ \underline{D} \ \underline{E} \ \underline{AB} $$ so I have $4$ different arrangements that can be ordered in $4!$ ways so the total would be $5! - 4\cdot(4!)= 24$?

$\endgroup$