How many ways are there to put two slashes between letters ?One-to-one correspondence. 
A dog trainer wants to buy $8$ dogs all of which are either cocker
  spaniels,Irish setters,or Russian wolfhounds.In how many ways can she
  make the choice ?

The answer is given as $ { 10 \choose 2 } =45 $ but I am not really understanding the undergoing logic.
Let me explain. When I think about the problem I see how it's a matter of choosing how many sequences of the type ddd/dd/ddd (where the number of d's before the first / is the number of Irish,the number of d's in the middle represents the number of setters,and the number after the second / the number of wolfhounds ) we can have.
I understand the one-to-one correspondence the author is talking about,as for every sequence we have exactly one choice of dogs.But when he explains his answer ${ 10 \choose 2}$ he says that this is because we have $10$ positions (because we have $8$ d's and $2$ /'s ),and we need to count the number of ways to choose 2 positions  for the two slashes out of 10. 
But I don't understand why he counts $10$ positions ,because we can put a / only between the d's and there are exactly $7$ places for that,and after I've placed the first / I have $6$ other places to put the second / ,also we have symmetrical cases such as $ddd\color{red}{/}dd \color{blue}{/} dd $ and $ddd\color{blue}{/}dd \color{red}{/} dd $,these sequences counts the same number of dogs per category twice ,and  we get such symmetrical case  for every arrangements of /'s,so we have $\cfrac {7 \cdot 6}{2}=21 $ ways to have a distinct sequence ,but that's the wrong answer. What am I thinking wrong ?
 A: Firstly, you stated that there are 7 positions to put the first slash. This is wrong as the arrangement /dddd/dddd is possible, which means that the dog trainer did not buy a certain breed of dogs.
Hence, the first slash can be placed at 9 positions, which includes the start and the end of the sequence.
Here are the 9 ways to add the first slash, for clarity:


*

*/dddddddd

*d/ddddddd

*dd/dddddd

*ddd/ddddd

*dddd/dddd

*ddddd/ddd

*dddddd/dd

*ddddddd/d

*dddddddd/
If you look at the other slash, there are now 10 places to put it, including putting it directly in front and behind the first slash. //dddddddd means that the dog trainer bought only one breed of dogs.
As this double counts the ways which you can permute the slashes, your intuition of having to divide by 2 is still correct.
Hence, there are $\frac{10\times9}{2}=45$ different ways to buy breeds of dogs.
A: The author is correct as the first '/' can be before 1st dog and second'/' after last dog so the total things are 10 and from that we have to select 2 hence total ways are $\begin{pmatrix}10\\2\end{pmatrix}$
=45=
$\begin{pmatrix}10\\8\end{pmatrix}$
 as we want to select 8 dogs.
