Question: Consider the following card shuffling algorithm. There are three cards in the deck and they are each represented by an element in [a, b,c. Algorithm

Consider the following card shuffling algorithm. There are three cards in the deck and they are each represented by an element in [a, b,c. Algorithm Shuffle deck CX,y,z for i from 0 to 2 do j RANDOM (i) avap values of deck[i] and deck[j] end for return deck For each of the following definitions of RANDOM(i), compute the probability distribution of all six a) RANDOMCk) returns an integer chosen uniformly at randomn from the set [0, 1,2. Here, any b) RANDOMCk) returns an integer chosen uniformly at random from k to 2 (inclusive Here, c) RANDOMCk) returns an integer chosen uniformly at random from the set 0,1,2 Here, Your answer should give the probability of each possible hand. Briefly comment about the results valid hands, [X, Y, Z], [X, Z, Y], [Z, X, Y], etc, at the end of the algorithm. Show your work. of the three possibilities are equally returned values less than k are not returned the value ofk is never returned of the three algorithms Consider the following card shuffling algorithm. There are three cards in the deck and they are each represented by an element in [a, b,c. Algorithm Shuffle deck CX,y,z for i from 0 to 2 do j RANDOM (i) avap values of deck[i] and deck[j] end for return deck For each of the following definitions of RANDOM(i), compute the probability distribution of all six a) RANDOMCk) returns an integer chosen uniformly at randomn from the set [0, 1,2. Here, any b) RANDOMCk) returns an integer chosen uniformly at random from k to 2 (inclusive Here, c) RANDOMCk) returns an integer chosen uniformly at random from the set 0,1,2 Here, Your answer should give the probability of each possible hand. Briefly comment about the results valid hands, [X, Y, Z], [X, Z, Y], [Z, X, Y], etc, at the end of the algorithm. Show your work. of the three possibilities are equally returned values less than k are not returned the value ofk is never returned of the three algorithms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
