[理工] 作业研究 动态规划

楼主: lenux (人生到处知何似)   2014-05-19 16:25:38
两题动态规划问题请教高手
1. Minimize z = max { f1(y1), f2(y2), f3(y3) }
s.t y1+y2+y3 = 17
y1, y2, y3 >= 0
where f1(y1) = 2y1+5, f2(y2) = y2+3, f3(y3) = y3-5
2. A company meed the following number of workers during the next 4 years
Year 1 2 3 4
# of workers 3 6 2 5
At present, the company has 5 workers. Each worker is paid $30,000 per year
At the beginning of each year, workers may be hired or fired. It costs
$10,000 to hire a worker and $25,000 to fire a worker. A newly hired worker
cannot be used to meet worker requirement until the year following the year
in which they are hired (They are paid for the year they are hired).
During each year, 1 worker quits (workers who quit do not incur any firing
cost). The number of workers have to be integer. Use dynamic programming to
determine the optimal hiring and firing schedule to minimize the total cost
incured in meeting the worker requirement in the next 4 years.
作者: darrenmm (mm)   2014-05-20 16:41:00
作业自己写 不懂得点提出来再问= =
楼主: lenux (人生到处知何似)   2014-05-21 09:01:00
这才不是作业 你这样讲请问你会吗
作者: loveann   2014-05-21 16:16:00
你是题目看不懂?还是哪个计算步骤卡住?
楼主: lenux (人生到处知何似)   2014-05-21 22:37:00
同样问问题怎么有人直接贴问题就有人回,看太多不会写的呛人作业自己写了....
作者: Honor1984 (希望愿望成真)   2014-05-22 00:46:00
抱歉 这门非我专业 没能够帮你...
作者: y800122155 (@__@)   2014-05-26 13:28:00
改写成y=af+b代回条件限制式 0.5f1+f2+f3=17.5
作者: y800122155 (@__@)   2014-05-26 13:29:00
接下来就用DP的方式一个stage一个stage这样算下去
作者: y800122155 (@__@)   2014-05-26 13:33:00
y1=1,y2=4,y3=12,Z*=7 但是DP最重要的是"过程"不是答案
楼主: lenux (人生到处知何似)   2014-05-28 20:03:00
谢谢楼上!我会写第一题了 另外也谢谢H大

Links booklink

Contact Us: admin [ a t ] ucptt.com