銀行家算法 銀行家算法 銀行家可以把一定數(shù)量的資金供多個用戶周轉(zhuǎn)使用,為保證資金的安全銀行家規(guī)定: 1.當(dāng)一個用戶對資金的最大需求量不超過銀行家現(xiàn)有的資金就要接納該用戶 2.用戶可以分期貸款,但垡的總數(shù)不能超過最大需求量 3.當(dāng)銀行家現(xiàn)有的資金不能滿足用戶的沿需垡數(shù)時(shí),對用戶的貸款可推遲支付,但總能使用戶在有限的時(shí)間里得到貸款 4當(dāng)用戶得到所需的全部資金后,一定能在有限的時(shí)間里歸還所有的資金. 假設(shè)共有3類資源A B C,分別為10,5,7個 進(jìn)程列表存在文件中,格式為 進(jìn)程名 對A類資源需求數(shù)量 對B類資源需求數(shù)量 對c資源需求數(shù)量 輸出每個進(jìn)程的處理結(jié)果
上傳時(shí)間: 2014-01-23
上傳用戶:liuchee
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 ==================================
標(biāo)簽: Part connections example prolog
上傳時(shí)間: 2015-04-24
上傳用戶:ljt101007
網(wǎng)關(guān)模擬實(shí)驗(yàn),輸入ip,判斷何a.b.c類網(wǎng)關(guān)。并加以修改。
標(biāo)簽: 網(wǎng)關(guān) 模擬實(shí)驗(yàn)
上傳時(shí)間: 2013-12-17
上傳用戶:thuyenvinh
Easy_Buy是一個在線銷售系統(tǒng),是一個B-C模式的電子商務(wù)系統(tǒng),由前臺的B/S模式購物系統(tǒng)和后臺的C/S模式的管理系統(tǒng)兩部分組成。該電子商務(wù)系統(tǒng)可以實(shí)現(xiàn)會員注冊、瀏覽商品、查看商品詳細(xì)信息、選購商品、取消訂單和查看訂單等功能。
上傳時(shí)間: 2015-04-28
上傳用戶:luke5347
多對象的旋轉(zhuǎn),實(shí)現(xiàn)用戶自定義輸入各個點(diǎn)的位置,并可以自己修改運(yùn)動速度,軌跡A,B,C的徑長。
上傳時(shí)間: 2015-05-14
上傳用戶:Pzj
大整數(shù)乘法例子代碼 /* 遞歸邊界,如果是1位二進(jìn)制數(shù)與1位二進(jìn)制數(shù)相乘,則可以直接計(jì)算 */ /*累計(jì)做1位二進(jìn)制乘法運(yùn)算的次數(shù)*/ /* return (X*Y) */ /* 計(jì)算n的值 */ /* 把X和Y拆分開來,令X=A*2^(n/2)+B, 左移位運(yùn)算,mod = 1<<(n/2) */ /* 計(jì)算XY=AC*2^n+(AD+CB)*2^(n/2)+BD */ /* 計(jì)算A*C,再向左移n位 */ /* 遞歸計(jì)算A*D */ /* 遞歸計(jì)算C*B */ /* 計(jì)算a21+a22,再向左移n/2位 */ /* 遞歸計(jì)算B*D */ /* XY=a1+a2+a3 */
上傳時(shí)間: 2015-05-19
上傳用戶:gyq
程序用JAVA語言編寫, 綜合利用圖結(jié)構(gòu)和堆棧結(jié)構(gòu)進(jìn)行數(shù)據(jù)組織和處理. 可以進(jìn)行正則表達(dá)式到NFA的轉(zhuǎn)化, 并能用圖形直觀的表示. 對正則表達(dá)式有一些約定, 就是可以用單個字符表示輸入, 也可以用 ‘ ‘ 連接起來的一串字符進(jìn)行輸入. 有基本的表達(dá)式以及由基本表達(dá)式構(gòu)成的并置, 選擇和重復(fù)的操作. 例: A|b*c ‘letter’*’digit’ 等都是合法輸入. 還帶有括號功能, 優(yōu)先級
上傳時(shí)間: 2015-05-26
上傳用戶:金宜
源代碼\用動態(tài)規(guī)劃算法計(jì)算序列關(guān)系個數(shù) 用關(guān)系"<"和"="將3個數(shù)a,b,c依次序排列時(shí),有13種不同的序列關(guān)系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要將n個數(shù)依序列,設(shè)計(jì)一個動態(tài)規(guī)劃算法,計(jì)算出有多少種不同的序列關(guān)系, 要求算法只占用O(n),只耗時(shí)O(n*n).
標(biāo)簽: lt 源代碼 動態(tài)規(guī)劃 序列
上傳時(shí)間: 2013-12-26
上傳用戶:siguazgb
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標(biāo)簽: government streamline important alphabet
上傳時(shí)間: 2015-06-09
上傳用戶:weixiao99
光學(xué)設(shè)計(jì)軟件zemax源碼: This DLL models an nular aspheric surface as described in: "Annular surfaces in annular field systems" By Jose M. Sasian Opt. eng. 36 (12) P 3401-3401 December 1997 This surface is essentially an odd aspheric surface with an offset in the aspheric terms. The sag is given by: Z = (c*r*r) / (1+(1-((1+k)*c*c*r*r))^ 1/2 ) + a*(r-q)^2 + b*(r-q)^3 + c*(r-q)^4 + ... Note the terms a, b, c, ... have units of length to the -1, -2, -3, ... power.
標(biāo)簽: described aspheric surfaces Annular
上傳時(shí)間: 2014-01-08
上傳用戶:yyyyyyyyyy
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1