Explain solution to calculating number of ways of selecting 3 objects from 5 objects (repetitions permitted) The solution is:
Let $Y=\{y_1, y_2, y_3,y_4,y_5\}$
Then, each selection corresponds to a triple $(y_{i_1},y_{i_2},y_{i_3})$ where $i_1 \le i_2 \le i_3$. A bijection from this set of triples to $\mathcal{P}_3(\mathbb{N}_7)$ is given by $(y_{i_1},y_{i_2},y_{i_3}) \mapsto \{i_1,i_2+1,i_3+2\} $. Hence the number of possible selections is ${7 \choose 3}=35$
I want to be able to construct the above solution myself. The part I don't understand is why is it necessary to impose the condition $i_1 \le i_2 \le i_3$ and where did the $\mathbb{N}_7$ in $\mathcal{P}_3(\mathbb{N}_7)$ come from?
 A: It's necessary to impose $i_1 \leq i_2 \leq i_3$ because the mapping is a bijection.  Every element in the "from" set must map to exactly one element in the "to" set, and vice versa.  If you didn't order the elements in non-decreasing order, the mapping would not be unique.
The $\mathbb{N}_7$ comes from your original five choices, plus two that may be repeats.
(I think there's an implicit assumption that all of the $y_i$ are different.  If there are repeats, then the number of combinations is not ${7 \choose 3}$.)
A: Provided order does not matter, $(y_1,y_2,y_2)$ (for example) represents the same selection as $(y_2,y_1,y_2)$, so requiring $i_1 \leq i_2 \leq i_3$ ensures every selection is only represented once.
For the second part, you can use the "stars and bars" method: use 5 + 1 bars to indicate the 5 different $y_i$'s:     
 y_1 y_2 y_3 y_4 y_5
|   |   |   |   |   |

Now, you get to place three stars between the bars to indicate which $y_i$'s are chosen. For instance, $(y_1,y_2,y_2)$ is:
 y_1 y_2 y_3 y_4 y_5
|*  |** |   |   |   |

Now, the first and last bar are "fixed" in the sense that we can't allow a star to come before the first bar, nor after the last, so we'll ignore them. But the order of the remaining $5-1$ bars and $3$ stars is variable: so we have $7$ free positions to assign to the stars and bars. 
Further, once we have decided where to place the stars, the position of the bars is determined. For instance, the above configuration is explicitly and uniquely described as "stars in positions $1, 3, 4$" (again, we're ignoring the first bar, since its position is fixed).
See if you can now phrase this problem in terms of a more familiar combinatorial situation, spoiler below.

 You basically have 3 things to choose (the locations of the stars), from a total of 7, so this is the same as $7$ choose $3$.

A: The restriction on the ordering of the indices prevents multiple counting of the same set of three distinct elements, e.g. {y1,y4,y5} = {y4,y1,y5} as sets (these are not 3-tupples)
