I'm self studying discrete math from a books which states the formula for No of ways of selecting r objects from n distinct objects, allowing repeated selections as $C(n+r-1, r)$. I couldn't understand completely how they derived this formula. Could someone please explain this to me?
Kindly also do give some examples to help me understand how to use this formula. The book is elements of discrete mathematics by KC liu and DP mohapatra