Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter 29.5, Problem 9E
Program Plan Intro
To state for which values of r, s and t you can assert that
- Both P and D have optimal solutions with finite objective value.
- P is feasible, but D is infeasible.
- D is feasible, but P is infeasible.
- Neither P nor D is feasible.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Let pn(x) be the probability of selling the house to the highest bidder when there are n people, and you adopt the Look-Then-Leap algorithm by rejecting the first x people. For all positive integers x and n with x < n, the probability is equal to p(n(x))= x/n (1/x + 1/(x+1) + 1/(x+2) + … + 1/(n-1))
If n = 100, use the formula above to determine the integer x that maximizes the probability n = 100 that p100(x). For this optimal value of x, calculate the probability p100(x).
Briefly discuss the significance of this result, explaining why the Optimal Stopping algorithm produces a result whose probability is far more than 1/n = 1/100 = 1%.
Which of the following statements are true given A* (admissibility and consistency of heuristics ] ?
The heuristic function h[n] is called admissible if h[n] is never larger than h*[n], namely h[n] is always less or equal to true cheapest cost from n to the goal.
If the heuristic function, h always underestimates the true cost [h[n] is smaller than h*[n]), then A* is guaranteed to find an optimal solution.
When h is inconsistent, it can not be admissible.
If h is consistent and h[goal)=0 then h is admissible
A* is complete and optimal
Suppose we have a heuristic h that over-estimates h* by at most epsilon (i.e., for all n, 0<= h(n) <= h*(n)+epsilon). Show that A* search using h will get a goal whose cost is guaranteed to be at most epsilon more than that of the optimal goal.
Chapter 29 Solutions
Introduction to Algorithms
Ch. 29.1 - Prob. 1ECh. 29.1 - Prob. 2ECh. 29.1 - Prob. 3ECh. 29.1 - Prob. 4ECh. 29.1 - Prob. 5ECh. 29.1 - Prob. 6ECh. 29.1 - Prob. 7ECh. 29.1 - Prob. 8ECh. 29.1 - Prob. 9ECh. 29.2 - Prob. 1E
Ch. 29.2 - Prob. 2ECh. 29.2 - Prob. 3ECh. 29.2 - Prob. 4ECh. 29.2 - Prob. 5ECh. 29.2 - Prob. 6ECh. 29.2 - Prob. 7ECh. 29.3 - Prob. 1ECh. 29.3 - Prob. 2ECh. 29.3 - Prob. 3ECh. 29.3 - Prob. 4ECh. 29.3 - Prob. 5ECh. 29.3 - Prob. 6ECh. 29.3 - Prob. 7ECh. 29.3 - Prob. 8ECh. 29.4 - Prob. 1ECh. 29.4 - Prob. 2ECh. 29.4 - Prob. 3ECh. 29.4 - Prob. 4ECh. 29.4 - Prob. 5ECh. 29.4 - Prob. 6ECh. 29.5 - Prob. 1ECh. 29.5 - Prob. 2ECh. 29.5 - Prob. 3ECh. 29.5 - Prob. 4ECh. 29.5 - Prob. 5ECh. 29.5 - Prob. 6ECh. 29.5 - Prob. 7ECh. 29.5 - Prob. 8ECh. 29.5 - Prob. 9ECh. 29 - Prob. 1PCh. 29 - Prob. 2PCh. 29 - Prob. 3PCh. 29 - Prob. 4PCh. 29 - Prob. 5P
Knowledge Booster
Similar questions
- Develop a dynamic programming algorithm for the knapsack problem: given n items of know weights w1, . . . , wn and values v1, . . . ,vn and a knapsack of capacity W, find the most valuable subset of the items that fit into the knapsack. We assume that all the weights and the knapsack’s capacity are positive integers, while the item values are positive real numbers. (This is the 0-1 knapsack problem). Analyze the structure of an optimal solution. Give the recursive solution. Give a solution to this problem by writing pseudo code procedures. Analyze the running time for your algorithms.arrow_forwardIf it is possible to create an optimal solution for a problem by constructing optimal solutions for its subproblems, then the problem possesses the corresponding property. a) Subproblems which overlap b) Optimal substructure c) Memorization d) Greedyarrow_forwardIf it is possible to construct an optimal solution for a problem by constructing optimal solutions for its subproblems, then the problem possesses the specified property. a) Overlapping subproblems; b) optimal substructure; c) memorization; d) greedyarrow_forward
- a. Given n items, where each item has a weight and a value, and a knapsack that can carry at most W You are expected to fill in the knapsack with a subset of items in order to maximize the total value without exceeding the weight limit. For instance, if n = 6 and items = {(A, 10, 40), (B, 50, 30), (C, 40, 80), (D, 20, 60), (E, 40, 10), (F, 10, 60)} where each entry is represented as (itemIdi, weighti, valuei). Use greedy algorithm to solve the fractional knapsack problem. b. Given an array of n numbers, write a java or python program to find the k largest numbers using a comparison-based algorithm. We are not interested in the relative order of the k numbers and assuming that (i) k is a small constant (e.g., k = 5) independent of n, and (ii) k is a constant fraction of n (e.g., k = n/4). Provide the Big-Oh characterization of your algorithm.arrow_forwardSolve the following optimization problems using Gurobi and clearly present the optimal objective function value and decision variable values at optimality. (Java Programming) maximize 3x + 4y − 2z + 10 subject to 2x + 3y − z ≤ 50 x + y + 3z ≥ 30 x unrestricted, y ≥ 0, z ≥ 0, and integerarrow_forwardA mathematical model that solely gives a representation of the real problem is the only one for which an optimal solution is optimal. True False: Oarrow_forward
- Using the image provided, please answer the following questions. (a). Find a path from a to g in the graph G using the search strategy of depth-first search. Is the returned solution path an optimal one? Give your explanation and remarks on "why-optimal" or "why-non-optimal". (b). Find a path from a to g in the graph G using the search strategy of breadth-first search. Is the returned solution path an optimal one? Give your explanation and remarks on "why-optimal" or "why-non-optimal".(c). Find a path from a to g in the graph G using the search strategy of least-cost first search. Is the returned solution path an optimal one? Give your explanation and remarks on "why-optimal" or "why-non-optimal". (d). Find a path from a to g in the graph G using the search strategy of best-first search. The heuristics for these nodes are: h(a,25); h(b, 43); h(c,5); h(d, 64); h(g, 0). Is the returned solution path an optimal one? Give your explanation and remarks on "why-optimal or "why-non-optimal".…arrow_forwardLet S = {a, b, c, d, e, f, g} be a collection of objects with benefit-weight values, a: (12, 4), b: (10, 6), c: (8, 5), d: (11, 7), e: (14, 3), f : (7, 1), g: (9, 6). What is an optimal solution to the fractional knapsack problem for S assuming we have a sack that can hold objects with total weight 18? Show your work.arrow_forwardSubject : Artificial Intelligence Consider a best first search (BFS) algorithm that tries to find the optimal goal state with minimal cost. Consider heuristics h1, h2 with h1(n) > h2(n) for all states n. BFS with h1 is guaranteed to expand fewer nodes or an equal number of nodes to arrive at the optimal goal state than BFS with h2 Select one: True Falsearrow_forward
- Consider the problem of providing change for an amount of n-bahts while using the smallest possible quantity of coins. You may assume that each coin’s value is integer. Assume that the coins available for use have values that can be expressed as powers of c. To clarify, the denominations of the coins can be written as c0,c1,..., ck , where c is an integer greater than 1, and k is a positive integer. Prove that the greedy algorithm always yields an optimal solution.arrow_forwardPractice Test Questions: Prove each of the following statements, or give a counterexample: Best-first search is optimal in the case where we have a perfect heuristic (i.e., h(n) = h∗(n), the true cost to the closest goal state). Suppose there is a unique optimal solution. Then, A* search with a perfect heuristic will never expand nodes that are not in the path of the optimal solution. A* search with a heuristic which is admissible but not consistent is complete.arrow_forwardConsider the challenge of determining whether a witness questioned by a law enforcement agency is telling the truth. An innovative questioning system pegs two individuals against each other. A reliable witness can determine whether the other individual is telling the truth. However, an unreliable witness's testimony is questionable. Given all the possible outcomes from the given scenarios, we obtain the table below. This pairwise approach could then be applied to a larger pool of witnesses. Answer the following: 1) If at least half of the K witnesses are reliable, the number of pairwise tests needed is Θ(n). Show the recurrence relation that models the problem. Provide a solution using your favorite programming language, that solves the recurrence, using initial values entered by the user.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole