Probabilistic Algorithms
This quiz covers fundamental concepts and applications of probabilistic algorithms.
Questions
Question 1 Multiple Choice (Single Answer)
What is the primary characteristic of a probabilistic algorithm?
- It always produces the same output for a given input.
- It relies on randomness to make decisions during its execution.
- It guarantees an optimal solution to a problem.
- It has a fixed running time regardless of the input.
Question 2 Multiple Choice (Single Answer)
Which of these algorithms is an example of a probabilistic algorithm?
- Dijkstra's algorithm for finding the shortest path in a graph
- Bubble sort for sorting an array of numbers
- Monte Carlo simulation for estimating the value of an integral
- Binary search for finding an element in a sorted array
Question 3 Multiple Choice (Single Answer)
What is the main advantage of using probabilistic algorithms?
- They always produce the correct answer.
- They are more efficient than deterministic algorithms.
- They can solve problems that deterministic algorithms cannot.
- They are easier to implement than deterministic algorithms.
Question 4 Multiple Choice (Single Answer)
What is the main disadvantage of using probabilistic algorithms?
- They are always less efficient than deterministic algorithms.
- They can produce incorrect answers.
- They are difficult to implement.
- They require a lot of memory.
Question 5 Multiple Choice (Single Answer)
What is the Las Vegas algorithm?
- An algorithm that always produces the correct answer.
- An algorithm that always runs in polynomial time.
- An algorithm that can produce incorrect answers but always terminates.
- An algorithm that can run in exponential time.
Question 6 Multiple Choice (Single Answer)
What is the Monte Carlo algorithm?
- An algorithm that always produces the correct answer.
- An algorithm that always runs in polynomial time.
- An algorithm that can produce incorrect answers but always terminates.
- An algorithm that can run in exponential time.
Question 7 Multiple Choice (Single Answer)
What is the difference between a Las Vegas algorithm and a Monte Carlo algorithm?
- Las Vegas algorithms always produce the correct answer, while Monte Carlo algorithms can produce incorrect answers.
- Las Vegas algorithms always run in polynomial time, while Monte Carlo algorithms can run in exponential time.
- Las Vegas algorithms can produce incorrect answers, while Monte Carlo algorithms always produce the correct answer.
- Las Vegas algorithms can run in exponential time, while Monte Carlo algorithms always run in polynomial time.
Question 8 Multiple Choice (Single Answer)
What is the birthday paradox?
- The probability that two people in a group of 23 or more people have the same birthday is greater than 50%.
- The probability that two people in a group of 23 or more people have the same birthday is less than 50%.
- The probability that two people in a group of 23 or more people have the same birthday is exactly 50%.
- The probability that two people in a group of 23 or more people have the same birthday is unknown.
Question 9 Multiple Choice (Single Answer)
What is the gambler's ruin problem?
- The problem of determining the probability that a gambler will eventually lose all of their money.
- The problem of determining the probability that a gambler will eventually win all of their money.
- The problem of determining the probability that a gambler will break even.
- The problem of determining the probability that a gambler will win more money than they lose.
Question 10 Multiple Choice (Single Answer)
What is the coupon collector's problem?
- The problem of determining the expected number of coupons that a collector needs to collect in order to obtain a complete set.
- The problem of determining the probability that a collector will obtain a complete set of coupons after collecting a certain number of coupons.
- The problem of determining the probability that a collector will obtain a complete set of coupons before collecting a certain number of coupons.
- The problem of determining the probability that a collector will never obtain a complete set of coupons.