Concept explainers
(a)
To Show if there is an
(a)
Explanation of Solution
The linear inequalities that are required to satisfy be the set of constraints in the linear program. Let the function to be maximized, be a constant. Linear programs solver will fail to detect the feasible solution if the linear constraints are not feasible. Suppose linear programming solver returns the solution, thenthose linear constraints are feasible.
(b)
To Show if there is an algorithm for the linear-inequality feasibility problem, then it can be used to solve a linear-programming problem. The number of variables, linearinequalities, variable and constraint used in linear-inequality feasibility problem must be polynomial in n and m .
(b)
Explanation of Solution
To solve the linear program in standard form with some particulars such as A, b, c. That is, to maximize the equation
such that all entries of x
SubjecttoATY = T such that all entries in the y vector are nonzero. By Corollary 29.9 mentioned in the question, if x and y are feasible solutions to their respective problems, and if their objective functions are equal, then, the x and y optimal solutions and their objective functions should be equal. This can be achieved as, let ck be some nonzero entry in thec vector. If there are no nonzero entries, then the function to optimize is just the zero function, and it is exactly a feasibility question. Then, add the two linear inequalities (1) and (2) to get the equation below:
-(3)
The values the variables take, their objective functions will be equal. Lastly use these with the inequalities that are already present. Therefore, the constraints will be as follows:
Ax = b
ATy = c
The number of variables equal to n + m and a number of constraints equal to 2 + 2n + 2m , both are polynomial in n and m . So any assignment of variables that satisfy all of constraints will be a feasible solution to the problem and its dual and the respective objective functions take the same value therefore it is an optimal solution the original problem and its dual So the linear inequality feasibility solver returns a satisfying assignment.
If there is optimal solution x , an optimal solution for the dual can be obtained such that it makes the objective functions equal by theorem 29.10 mentioned in the above question. This guarantees that the two constraints added such that that the objectives of the original problem and the dual problem should be equal do not cause to change the optimal solution to the linear program.
Want to see more full solutions like this?
Chapter 29 Solutions
Introduction to Algorithms
- Any linear program L, given in standard form, either1. has an optimal solution with a finite objective value,2. is infeasible, or3. is unbounded.If L is infeasible, SIMPLEX returns “infeasible.” If L is unbounded, SIMPLEXreturns “unbounded.” Otherwise, SIMPLEX returns an optimal solution with a finiteobjective value.arrow_forwardQ2:Identify if the following statement is true or false, explain your reasoning. For any NP-Optimization problem there exist polynomial-time approximation algorithms for that problem that have worst-case approximation ratios arbitrarily close to 1.arrow_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_forward
- Given two sequences X[1, . . . , m] and Y[1, . . . , n], find a shortest com-mon supersequence (SCS). For example, assume that X = ABCBDAB and Y = DBCABA. One of their SCS is ABCBDCABA with length 9. Precisely define the subproblem.Provide the recurrence equation.Describe the algorithm in pseudocode to compute the optimal value.Describe the algorithm in pseudocode to print out an optimal solution.arrow_forwardConsider the algorithm SeldeLP. Construct an example to show that the optimum of the linear program defined by the constraints in B(H\h) u {h} may be different from the optimum of the linear program defined by H. Thus, if the test in Step 2.1 fails and we proceed to Step 2.2, it does not suffice to consider the constraints in B(H\h) u {h} alone.arrow_forwardSolve the following exercise using jupyter notebook for Python, to find the objective function, variables, constraint matrix and print the graph with the optimal solution. A farm specializes in the production of a special cattle feed, which is a mixture of corn and soybeans. The nutritional composition of these ingredients and their costs are as follows: - Corn contains 0.09 g of protein and 0.02 g of fiber per gram, with a cost of.$0.30 per gram.- Soybeans contain 0.60 g of protein and 0.06 g of fiber per gram, at a cost of $0.90 per gram.0.90 per gram. The dietary needs of the specialty food require a minimum of 30% protein and a maximum of 5% fiber. The farm wishes to determine the optimum ratios of corn and soybeans to produce a feed with minimal costs while maintaining nutritional constraints and ensuring that a minimum of 800 grams of feed is used daily. Restrictions 1. The total amount of feed should be at least 800 grams per day.2. The feed should contain at least 30% protein…arrow_forward
- We are given a 3-CNF formula with n variables and m clauses, where m is even, in the half 3-CNF satisfiability issue. We want to know if there is a true variable assignment where precisely half of the clauses evaluate to 0 and exactly half of the clauses evaluate to 1. prove the NP-completeness of the partial 3-CNF satisfiability issue.arrow_forwardPlease state if the following questions are TRUE or FALSE ? -Suppose problem A reduces to problem B and there is an exponential time algorithm for B. Then there is an exponential time algorithm for A -It has been (mathematically) proven that there is no polynomial time algorithm for any NP-Complete problem. -If we have a polynomial time algorithm for 3SAT, then P = NP. -If problem A reduces to problem B and problem C reduces to problem B, then problem A (always) reduces to problem C. -The total weight of the minimum spanning tree is always the same as total weight of a traveling salesman tour.arrow_forwardProve Theorem:If any NP-complete problem is polynomial-time solvable, then P D NP. Equivalently, if any problem in NP is not polynomial-time solvable, then no NP-complete problem is polynomial-time solvable.arrow_forward
- Constructing an Optimal Solution:algorithm MatrixMultiplicationWithAdvice(Ai, A2, ... , A j, birdAdvice) pre- & post-cond: Same as MatrixMultiplication except with advice.arrow_forwardRounding the solution of a linear programming problem to the nearest integer values provides a(n): a. integer solution that is optimal. b. integer solution that may be neither feasible nor optimal. c. feasible solution that is not necessarily optimal. d. infeasible solution.arrow_forwardShow that the following problem belongs to NP class: we are given a set S of integer numbers and an integer number t. Does S have a subset such that sum of its elements is t? Note: Data Structures and Algorithm problemarrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole