52.6k views
4 votes
an urn containing n balls can be represented by the set u = {b1, b2, ... , bn}. interpret the following algorithm in the context of urn problems. does it represent drawing with or without replacement? how many lines does it print? for i is in {1, 2, ... , n} do for j is in {1, 2, ... , n} do for k is in {1, 2, ... , n} do print bi, bj, bk

User Alejita
by
6.8k points

1 Answer

4 votes
The algorithm prints out all the possible ways to draw 3 balls in sequence, ---Select--- with replacement. It prints lines.
User Xiaowoo
by
6.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.