兩臺處理機A 和B處理n個作業。設第i個作業交給機器
A 處理時需要時間ai,若由機器B 來處理,則需要時間bi。由于各作
業的特點和機器的性能關系,很可能對于某些i,有ai >=bi,而對于
某些j,j!=i,有aj<bj。既不能將一個作業分開由兩臺機器處理,也沒
有一臺機器能同時處理2 個作業。設計一個動態規劃算法,使得這兩
臺機器處理完成這n 個作業的時間最短(從任何一臺機器開工到最后
一臺機器停工的總時間)。研究一個實例:(a1,a2,a3,a4,a5,a6)=
(2,5,7,10,5,2);(b1,b2,b3,b4,b5,b6)=(3,8,4,11,3,4)
標簽:
處理機
機器
上傳時間:
2014-01-14
上傳用戶:獨孤求源
prolog 找路例子程序:
=== === === === === ===
Part 1-Adding connections
Part 2-Simple Path
example
| ?- path1(a,b,P,T).
will produce the response:
T = 15
P = [a,b] ?
Part 3 - Non-repeating path
As an example, the query:
?- path2(a,h,P,T).
will succeed and may produce the bindings:
P = [a,depot,b,d,e,f,h]
T = 155
Part 4 - Generating a path below a cost threshold
As an example, the query:
?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300).
returns:
RS = [a,b,depot,c,d,e,g,f,h] ?
RS = [a,c,depot,b,d,e,g,f,h] ?
no
==================================
標簽:
Part
connections
example
prolog
上傳時間:
2015-04-24
上傳用戶:ljt101007