SOLUTION: 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

Algebra.Com
Question 984212: 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(sigma symbol) {1, 2, ... , n}
do
for
j(sigma symbol) {1, 2, ... , n}
do
for
k (sigma symbol) {1, 2, ... , n}
do
print
bi, bj, bk
The algorithm prints out all the possible ways to draw_______ balls in sequence, _______________ replacement. **Second blank answer choices are (with) or (without). Please indicate which. It prints __________ lines.

Answer by jim_thompson5910(35256)   (Show Source): You can put this solution on YOUR website!
Each iteration has n choices since the set used for each level is {1, 2, ..., n}. That set doesn't change. So the balls are being drawn WITH replacement. There are 3 iterations so 3 balls are drawn. This program lists all of the ways to draw 3 balls from a set of n balls {b1, b2, ..., bn}

There are n*n*n = n^3 ways to draw the 3 balls (from the pool of n balls).

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

Extra Side Note: If NO replacement was done, then the first set would be {1, 2, ... , n} and the second set would be {1, 2, ... , n-1} and the third set would be {1, 2, ... , n-2}. Each time we have 1 less ball to choose from the overall pool.

RELATED QUESTIONS

Let b0, b1, b2, be the sequence defined by the explicit formula bn = C ยท 5^n +... (answered by Resolver123)
An urn B1 contains 2 white and 3 black balls and another urn B2 contains 3 white and 4... (answered by greenestamps)
Construct the probability distribution for the random variables described in each of the... (answered by math_tutor2020)
when playing bingo, 75 balls are placed in a bin and balls are selected at random. each... (answered by stanbon)
You are given two urns, each containing a collection of coloured balls. Urn 1 contains... (answered by ikleyn)
An urn contains two blue balls (denoted B1 and B2) and three white balls (denoted W1, W2, (answered by CPhill)
Can someone please help me with this problem. Please, please. When playing bingo, 75... (answered by sudhanshu_kmr)
Construct the probability distribution for the random vanables described in each of the... (answered by math_tutor2020,ikleyn)
Do what is indicated. 2. Two balls are drawn in succession without replacement from an (answered by Boreal)