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
Give the given linear program in following:
Identify the decision variables, Objective function, Set of Constraints, and Parameters.
For the Graphical Solutions: Graph the Constraints, Obtain the Corner-Points of the Feasible Solution and Get the Optimal Solution.
Inside the store there are two types of products
One is in a variety of products and the other is bakery supplies. Of course in a store, in order to make a profit, a budget is needed for the products to be sold: For variety they spend up to Php 6,000 in a week and for bakery supplies, they no longer have problems because consignment is in their agreement to be able to sell.
For bakery supplies, My parents sell Php 315,000 and they earn Php 31,500 in 3 months. And in the main variety product; They sell Php 48,000 they earn Php 18,000 in 4 months. For other equipment such as Plastic Bags, Water and Electricity they spend Php 3,230 in a month which reduces the income. On the day of December 19, the store will be temporarily…
The Optimal solution is : *
a path from the initial state to a state satisfying the goal test
This process of looking for the best sequence is called
the solution with lowest path cost among all solutions
none
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.
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
- Question 2: Consider the 0/1 knapsack problem. Given Nobjects where each object is specified by a weight and a profit, you are to put the objects in a bag of capacity C such that the sum of weights of the items in the bag does not exceed Cand the profits of the items is maximized. Note that you cannot use an item type more than once. a. Using dynamic programming, write an algorithm that finds the maximum total value according to the above constraints. b. What is the complexity of your algorithm? c. Show the dynamic programming table for the following data: W= { 2 ,7 , 1} , P={ 3 ,15 , 2 } and C=8.arrow_forwardThe monotone restriction (MR) on the heuristic function is defined as h (nj ) 2 h (ni ) - c (ni , nj ). Please prove the following: 1. If h(n)arrow_forward8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonable time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? A. Unreasonable algorithms may sometimes also be undecidable B. Heuristics can be used to solve some problems for which no reasonable algorithm exists C. Two algorithms that solve the same problem must also have the same efficiency D. Approximate solutions are often identical to optimal solutions 0000arrow_forwardConsider a maximization problem that is being solved by Simulated Annealing. Let the objective function value of the current state, s, be 1000. Let this state have 5 successors/neighbors: s1(950), s2(975), s3(1000), s4(1000), and s5(1050). The numbers in parentheses represent the corresponding objective function values. The current temperature is 100. The probability that the next state is: 1. s1 = [Select] 2. s2 = [Select] 3. s3 [Select] = 4. s4= [Select] [Select] 5. s5 0.778 0.121 0.156 0.2 0.606arrow_forwardCalculate the optimal value of the decision parameter p in the Bresenham's circle drawing algorithm. The stepwise procedure for implementing Bresenham's algorithm for circle drawing is delineated.arrow_forwardIn an optimal A* search, a- describe the problem of a heuristic function that overestimates the cost. How does it effect the solution? Give an example. b-is a heuristic method that underestimates the cost admissible? How does it effect the solution? Give an examplearrow_forwardDevelop 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_forward8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonablo time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? O A Unreasonable algorithms may sometimes also be undecidable O B. Heuristics can be used to solve some problems for which no reasonable algorithm exsts O C. efficiency Two algorithms that solve the same problem must also have the same O B. Approximate solutions are often identical to optimal solutionsarrow_forwardThe utility function U(x, y) = x + y can be used to describe perfect substitutes preferences. For perfect substitutes, the demand for good x depends on its own price and on the price of y. If px > Py, the consumer only buys good y. If the px < py the consumer will specialize in good x, the demand will be the income divided by the price of x. If the prices are equal, the consumer is indifferent between buying x or y. Given this information: 1. Write a Python function which returns the demands of goods x, and y. The function should accommodate the income level, and the prices. 2. Plot the inverse demand curve for good x. Assume, py = 20, I = 100, and px is between 5 and 30.arrow_forwardConsider 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 False The rational agent always perform the optimal action Select one: True False Fuzzy logic is useful for both commercial and practical purposes. Select one: True Falsearrow_forwardSuppose 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.arrow_forwardQUESTION 9 What is one advantage of AABB over Bounding Spheres? Computing the optimal AABB for a set of points is easy to program and can be run in linear time. Computing the optimal bounding sphere is a much more difficult problem. The volume of AABB can be an integer, while the volume of a Bounding Sphere is always irrational. An AABB can surround a Bounding Sphere, while a Bounding Sphere cannot surround an AABB. To draw a Bounding Ball you need calculus knowledge.arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_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