Starting from her house to get to school, Júlia must walk eight blocks to the right and five blocks up, as indicated in the given figure.

![](https://cdn.mathpix.com/cropped/2024_05_01_30c9a294a58a6e4b8190g-029.jpg?height=371&width=534&top_left_y=780&top_left_x=795)

She knows that there are many different ways to make the trip from home to school, always following the shortest path. As she is a very curious girl, she would like to always take different routes. How many of these routes exist from Júlia's house to the school?
Regardless of the route Júlia takes from her house to school, if she wishes to follow a shorter path, she must travel exactly eight blocks to the right and five blocks up. A shorter path connecting her house to the school is, then, a sequence of "block crossings," with eight of them in the horizontal direction (to the right) and five in the vertical direction (up). Thus, to define a shorter path, she only needs to decide the order in which she will make these thirteen crossings.

For this, imagine eight cards printed with the letter $\mathrm{D}$ and five cards printed with the letter C. Any permutation of these cards can be interpreted as a shorter path to be taken by Júlia. For example, the sequence of cards DDCDCCDDDDCDC defines the path indicated in the given figure.

![](https://cdn.mathpix.com/cropped/2024_05_01_30c9a294a58a6e4b8190g-101.jpg?height=463&width=720&top_left_y=2233&top_left_x=748)

To determine the number of ways in which these cards can be ordered, we need to count the number of different ways to place five cards with the letter C in a row with thirteen empty spaces, with the remaining eight spaces in the row occupied by the cards with the letter D.

Initially, we must choose one of the thirteen empty spaces to place a letter C. Once this letter is placed, there are twelve empty spaces left for the second letter C. Once this letter is placed, there are eleven empty spaces left for the third letter, ten spaces for the fourth letter, and finally, nine spaces for the fifth letter C. Now, once the five letters C are placed, any permutation of these letters among themselves does not change the distribution of the letters in the row. Since the number of permutations of five objects is $5!=120$, by the multiplication principle, the number of ways to order the thirteen cards is given by

$$
\frac{13 \times 12 \times 11 \times 10 \times 9}{120}=1287
$$

so there are 1287 different shorter paths from Júlia's house to the school.