An urn containing n balls can be represented by the set U = {b1, b2, ... , bn}.

Mathematics
Tutor: None Selected Time limit: 1 Day

Jun 15th, 2015

Thank you for the opportunity to help you with your question!

--------------------------------------------------------------------------------------------------------------

It prints the following



This algorithm prints out all the possible ways to draw 3 balls with replacement.(because for first output 

 itself shows that ball  was replaced and drawn again)


Since there are 3 for loops and each loop iterates n times, the number of lines it prints =   

---------------------------------------------------------------------------------------------------------------------------

Please let me know if you need any clarification. I'm always happy to answer your questions.
Jun 15th, 2015

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Jun 15th, 2015
...
Jun 15th, 2015
Dec 5th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer