An urn containing n balls can be represented by the set U = {b1,
b2, …, bn}, with n ≥ 3. Interpret the following algorithm in the
context of urn problems.
for i in {1, 2, …, n} do
[ for j in { i+1, i+2, …, n}
do
[ for k
in { j+1, j+2, …, n} do
print bi, bj, bk
]
]
Does it represent drawing an ordered or unordered
set of three balls?
Does it represent drawing with or without
replacement?
How many lines does it print? What is the big-Θ
estimate of the algorithm?
An urn containing n balls can be represented by the set U = {b1, b2, …, bn}, with n ≥ 3. Interpret the following algorit
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am