17. As a result of a recently passed bill, a congressman\'s district has been al
ID: 3913646 • Letter: 1
Question
17. As a result of a recently passed bill, a congressman's district has been allocated $4 million for| programs and projects. It is up to the congressman to decide how to distribute the money. The con gressman has deci ded to allocate the money to four ongoing programs because of their importance training program, a parks project, a sanitation project, and a mobile library However, the congressman wants to distribute the money in a manner that will please the most voters, or, in other words, gain him the most votes in the upcoming election. His staff's estimates of the number of votes gained per dollar spent for the various programs are as follows Program Votes/Dollar Job training Parks Sanitation Mobile library 0.02 0.09 0.06 0.04 In order also to satisfy several local influential citizens who financed his election, he is obligated to observe the following guidelines: None of the programs can receive more than 40% of the total allocation. . The amount allocated to parks cannot exceed the total allocated to both the sanitation project and the mobile library The amount allocated to job training must at least equal the amount spent on the sanitation project.Explanation / Answer
Le the amount distributed over 4 nodes is:
Job training = j | parks = p | sanitation = s | mobile library = m
hence the total votes gathered will be: Objective (Vote Count) = 0.02j + 0.09p + 0.06s + 0.04m
This has to be maximized or -(0.02j + 0.09p + 0.06s + 0.04) has to be minimized with reference to the following constraints:
1) fundamental: j>=0 , p>=0 , s>=0 , m>=0 | j+p+s+m<=4
2) As the congressman wants to use all the funds and each node can be allocated a maximum of 40% of total allocation hence: j<=0.4 x 4 ---> j<1.6 the unit here is in millions | p<=1.6 | s<=1.6 | m<=1.6
3) p <= s+m
4) j>=s
We utilize MATLAB's linear programming function (linprog) to solve the system. The script is as the following:
%==================================================
% Formulating obejctive function
% for objective = -(0.02j + 0.09p + 0.06s + 0.04m) As we minimize the
% negative of the desired objective to match the standard implementation of
% linear programing function in MATLAB
f = [-0.02 -0.09 -0.06 -0.04];
% ==== Fundamental constraints ====
% lower bound:
lb = [0 0 0 0]; % As -ve amounts can't be allocated to any scheme
ub = [1.6 1.6 1.6 1.6]; % Maximum allowed allocation is 40%
% Main constraints in the form of coefficient matrices A and b such that
% A x [j;p;s;m] <= b
%
A=[1 1 1 1; % For j+p+s+m<=4
0 1 -1 -1; % For p <= s+m or p - s - m <=0
-1 0 1 0]; % j>=s or -j + s <=0
b = [4;0;0];
[x,fval,exitflag]=linprog(f,A,b,[],[],lb,ub);
% To achieve the maximum vote count achievable we multiply the resulting
% distribution of parameters gathered in x with the negative of objective
% function f as: Max(Votes) = -f * x;
max_votes = -f*x;
fprintf(' ====== The Optimal Amount Distribution ====== Job Training: $%.2f million Parks: $%.2f million Sanitation: $%.2f million Mobile Library: $%.2f million',x(1),x(2),x(3),x(4));
fprintf(' The total maximum achievable votes are: %.2f million ',max_votes);
%==================================================
Output:
====== The Optimal Amount Distribution ======
Job Training: $0.72 million
Parks: $1.60 million
Sanitation: $0.72 million
Mobile Library: $0.95 million
The total maximum achievable votes are: 0.24 million
Hope this helps! If it works, please thumbs up!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.