Question: Implement a function computeApproximateSolution with inputs n: number of variables. m: number of inequalities c _ matrix: a list of list of coefficients of the

Implement a function computeApproximateSolution with inputs
n: number of variables.
m: number of inequalities
c_matrix: a list of list of coefficients of the LHS of inequalities
[11,...,1],[21,...,2],[1,...,][[c11,...,c1n],[c21,...,c2n],[cm1,...,cmn]]
Please note python indexes starting from 0.
d_values: a list of RHS coefficients: [1,...,][d1,...,dm]
Your function should return a pair: (,[1,...,])(k,[x1,...,xn])
The number of inequalities satisfied by your optimal solution (k)A list denoting the values of 1,...,x1,...,xn that satisfy the k inequalities.
Also for this problem, we require 2km2.
Note: The test cases below will run for large values of ,n,m. If your implementation uses an integer linear programming solver, it may not finish within the time budget of 2 minutes allocated for grading the notebook.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!