📜  谜题 31 | (最小切割拼图)

📅  最后修改于: 2022-05-13 01:57:26.020000             🧑  作者: Mango

谜题 31 | (最小切割拼图)

谜题你有人为你工作了五天,还有一块金条作为报酬。你必须在每天结束时给他们一块金子。能让你每天支付给他 1/5 的金条的最少削减次数是多少?



答案 2 刀。

解决方案

说明一:

两次切割后有[1个单元和两个2个单元]或[两个1个单元和一个3个单元]的三块。现在执行以下事务。

[1个单元和两个2个单元]

DaysGold Bars(Vendor)Gold Bars(Worker)Comments
Day 0[1, 2, 2][]Initially Worker have 0 Gold Bars unit.
Day 1[2, 2][1]Pay the worker Gold Bar with 1 unit.
Day 2[1, 2][2]Pay the worker Gold with 2 units and take back the gold bar with 1 unit.
Day 3[2][1, 2]Pay the worker Gold Bar with 1 unit.
Day 4[1][2, 2]Pay the worker Gold with 2 units and take back the gold bar with 1 unit.
Day 5[][1, 2, 2]Pay the worker with only left Gold Bar with 1 unit.

【两个1单元和一个3单元】

DaysGold Bars(Vendor)Gold Bars(Worker)Comments
Day 0[1, 1, 3][]Initially Worker have 0 Gold Bars unit.
Day 1[1, 3][1]Pay the worker Gold Bar with 1 unit.
Day 2[3][1,1]Pay the worker Gold with other 1 units.
Day 3[1,1][3]Pay the worker Gold Bar with 3 unit and take back all the gold bar with 1 unit.
Day 4[1][1, 3]Pay the worker Gold with 1 unit.
Day 5[][1, 1, 3]Pay the worker with only left Gold Bar with 1 unit.

类似的谜题:使用 7 单位的金棒支付员工工资?