Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
bartleby

Concept explainers

Question
Book Icon
Chapter 29, Problem 1P

(a)

Program Plan Intro

To Show if there is an algorithm for linear programming, then it can used to solve a linear-inequality feasibility problem. The number of variables and constraints that are in the linear-programming problem should be polynomial in n and m .

(a)

Expert Solution
Check Mark

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)

Program Plan Intro

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)

Expert Solution
Check Mark

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

  j=1ncjxj subject to Ax <=b -(1)

such that all entries of x vector are non-negative. Consider the dual program, in order to minimize the equation below:

  i=1mbiyi -(2)

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:

  xk=1ck(i=1mbiyij=1ncjxj)

-(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

  xk1ck(i=1mbiyij=1ncjxj)

  xk1ck(i=1mbiyij=1ncjxj)

  x1,x2,x3,.........., xn,y1,y2,.............,ym0 .

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?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
USING PYTHON A tridiagonal matrix is one where the only nonzero elements are the ones on the main diagonal (i.e., ai,j where j = i) and the ones immediately above and belowit(i.e.,ai,j wherej=i+1orj=i−1). Write a function that solves a linear system whose coefficient matrix is tridiag- onal. In this case, Gauss elimination can be made much more efficient because most elements are already zero and don’t need to be modified or added. Please show steps and explain.
Problem 3: A day at the beach. A group of n people are lying on the beach. The beach is represented by the real line R and the location of the i-th person is some integer r; e Z. Your task is to prevent people from getting sunburned by covering them with umbrellas. Each umbrella corresponds to a closed interval I = [a, a + L] of length L e N, and the i-th person is covered by that umbrella if æ¡ € I. Design a greedy algorithm for covering all people with the minimum number of umbrellas. The input consists of the integers x1,..., En, and L. The output of your algorithm should be the positions of umbrellas. For example, if the input is r1 = 1, x2 = 3, r3 = 5, and L = 2, then an optimum solution is the set of two umbrellas placed at positions 2 and 5, covering intervals [1,3] and [4,6]. 1 2 3 4 5 6 Prove that your algorithm is correct and that it runs in time polynomial in n.
Problem 4: Let S = {s1, s2, . . . , sn} and T = {t1, t2, . . . , tm}, n ≤ m, be two sets of integers. (i) Describe a deterministic algorithm that checks whether S is a subset of T. What is the running time of your algorithm?
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole