Question: Replace the random bit generator in the previous assignment with an integer source that generates numbers from 1 to N where the probability of getting
Replace the random bit generator in the previous assignment with an integer source that generates numbers from to where the probability of getting the outcome is equal to i taken from a vector that is user generated. So in your script, create dots, and use this in your circuit. After you run your circuit, generate a histogram that should match this vector. To test your code, try setting as follows:
let the user specify how the source probabilities as a vector :;
cum sum ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
