Probability of placing two books and another two books together on a shelf I have the following problem:
I have a shelf to place 5 books. There are 2 red books, 2 blue books and one green book.
1) What is the probability of both the red books end up together and the blue books end together as well?
2) What is the probability of the green book ending in the middle?
I'm very confused about how to state the problem. I know it's a permutation since the order matters but then I think of a combination because, for example, in 1) you can have the 2 red books, then the 2 blue and then the green one, or (another combination) the green, two blues and two reds, etc.
For 2) is it just like:
Number of non green books = 4
$\Rightarrow 4 \times 3 \times 1$ (this 1 is the green book) $\times 2 \times 1$?
And then, how to get the whole array of possibilities to get the probability?
 A: Assuming that all $5$ books are distinguishable, there are $5!$ ways to order them on the shelf, so that will be the denominator of your probabilities. You are correct about the second problem: there are $4!$ ways to order the $4$ red and blue books, and then just $1$ way to shove the green book into the middle position.
For the first question you can start by listing the ways in which the blue books can be together and the red books can be together: $BBRRG$, $BBGRR$, $GBBRR$, $RRBBG$, $RRGBB$, AND $GRRBB$. Then you can start thinking about how many different possibilities there are for the red and blue books in each of these general arrangements.
Or you can be a bit more analytical and notice that this can only happen when the green book is at one end or in the middle. Thus, there are $3$ possible locations for the green book. Once it has been placed, we have to decide which of the pairs of blue and red books will come first; that can be done in $2$ ways. Finally, we have to decide which of the red books will come first in its pair and which of the blue books will come first in its pair; each of these is a two-way choice. Can you put the pieces together now to finish it off?
