anonymous
  • anonymous
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 The algorithm prints out all the possible ways to draw balls in sequence,
Mathematics
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
reemii
  • reemii
What would be the first (bi,bj,bk) to be printed?
anonymous
  • anonymous
im not sure.. bi?

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

reemii
  • reemii
On the fourth line, you have "pritn bi,bj,bk". You print three numbers on the same line. What are they?
reemii
  • reemii
the outer loop: i starts with value 1, then we start the 2nd loop. -> j takes first value 1, and for j=1, we go to the third loop, where k=1,2,...,n. When k=1 for the first time, we have i=1 and j=1. Therefore the first line printed is (b1,b1,b1). This is a drawing from an experience WITH replacement.
anonymous
  • anonymous
ok so for the second its bj,bj,bj and third b1,b1,b1?
reemii
  • reemii
no. these are nested loops. That means, when i=1, and j=1. you will go through all values of k. Review this topic carefully.
anonymous
  • anonymous
@e.mccormick
anonymous
  • anonymous
what is the answer?!?

Looking for something else?

Not the answer you are looking for? Search for more explanations.