Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 P as follows:
let the user specify how the source probabilities as a vector
:;
cusumPsumP;
The output of the histogram is supposed to have the original random vector and another vectore almost identical, but i dont know how that works.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started