-
98年全國(guó)大學(xué)生數(shù)學(xué)建模競(jìng)賽B題“水災(zāi)巡視問題”,是一個(gè)推銷員問題,本題有53個(gè)點(diǎn),所有可能性大約為exp(53),目前沒有好方法求出精確解,既然求不出精確解,我們使用模擬退火法求出一個(gè)較優(yōu)解,將所有結(jié)點(diǎn)編號(hào)為1到53,1到53的排列就是系統(tǒng)的結(jié)構(gòu),結(jié)構(gòu)的變化規(guī)則是:從1到53的排列中隨機(jī)選取一個(gè)子排列,將其反轉(zhuǎn)或?qū)⑵湟浦亮硪惶?能量E自然是路徑總長(zhǎng)度。具體算法描述如下:步1: 設(shè)定初始溫度T,給定一個(gè)初始的巡視路線。步2 :步3 --8循環(huán)K次步3:步 4--7循環(huán)M次步4:隨機(jī)選擇路線的一段步5:隨機(jī)確定將選定的路線反轉(zhuǎn)或移動(dòng),即兩種調(diào)整方式:反轉(zhuǎn)、移動(dòng)。步6:計(jì)算代價(jià)D,即調(diào)整前后的總路程的長(zhǎng)度之差步7:按照如下規(guī)則確定是否做調(diào)整:如果D0,則按照EXP(-D/T)的概率進(jìn)行調(diào)整步8:T*0.9-->T,降溫
標(biāo)簽:
大學(xué)生
數(shù)學(xué)建模
巡視
競(jìng)賽
上傳時(shí)間:
2015-03-14
上傳用戶:himbly
-
This project attempts to implement a Database using B+Tree. The project has developed a DATABASE SYSTEM with lesser memory consumption. Its API includes simple SQL Statements and the output is displayed on the screen. Certain applications for which several features of existing databases like concurrency control, transaction management, security features are not enabled. B+Trees can be used as an index for factor access to the data. Help facility is provided to know the syntax of SQL Statements.
標(biāo)簽:
project
implement
developed
Database
上傳時(shí)間:
2013-12-25
上傳用戶:semi1981
-
If we have two individually sorted vectors "a" and "b" but they are not sorted with respect to each other and we want to merge them into vector "c" such that "c" is also a sorted vector. Then c=mergesorted(a,b) can be used.
標(biāo)簽:
sorted
individually
respect
vectors
上傳時(shí)間:
2015-09-23
上傳用戶:comua
-
C# BigInteger class. BigInteger.cs is a csharp program. It is the BIgInteger class. It has methods: abs() , FermatLittleTest(int confidence) ,gcd(BigInteger bi) , genCoPrime(int bits, Random rand) , genPseudoPrime(int bits, int confidence, Random rand) , genRandomBits(int bits, Random rand) , isProbablePrime(int confidence) , isProbablePrime() , Jacobi(BigInteger a, BigInteger b) , LucasSequence(BigInteger P, BigInteger Q, BigInteger k, BigInteger n) ,max(BigInteger bi) , min(BigInteger bi) , modInverse(BigInteger modulus) , RabinMillerTest(int confidence) ,
標(biāo)簽:
BigInteger
class
BIgInteger
program
上傳時(shí)間:
2013-12-23
上傳用戶:ynzfm
-
設(shè)B是一個(gè)n×n棋盤,n=2k,(k=1,2,3,…)。用分治法設(shè)計(jì)一個(gè)算法,使得:用若干個(gè)L型條塊可以覆蓋住B的除一個(gè)特殊方格外的所有方格。其中,一個(gè)L型條塊可以覆蓋3個(gè)方格。且任意兩個(gè)L型條塊不能重疊覆蓋棋盤
標(biāo)簽:
上傳時(shí)間:
2013-12-16
上傳用戶:腳趾頭
-
design LP,HP,B S digital Butterworth and Chebyshev
filter. All array has been specified internally,so user only need to
input f1,f2,f3,f4,fs(in hz), alpha1,alpha2(in db) and iband (to specify
the type of to design). This program output hk(z)=bk(z)/ak(z),k=1,2,...,
ksection and the freq.
標(biāo)簽:
Butterworth
internally
Chebyshev
specified
上傳時(shí)間:
2015-11-08
上傳用戶:253189838
-
問題描述
序列Z=<B,C,D,B>是序列X=<A,B,C,B,D,A,B>的子序列,相應(yīng)的遞增下標(biāo)序列為<2,3,5,7>。
一般地,給定一個(gè)序列X=<x1,x2,…,xm>,則另一個(gè)序列Z=<z1,z2,…,zk>是X的子序列,是指存在一個(gè)嚴(yán)格遞增的下標(biāo)序列〈i1,i2,…,ik〉使得對(duì)于所有j=1,2,…,k使Z中第j個(gè)元素zj與X中第ij個(gè)元素相同。
給定2個(gè)序列X和Y,當(dāng)另一序列Z既是X的子序列又是Y的子序列時(shí),稱Z是序列X和Y的公共子序列。
你的任務(wù)是:給定2個(gè)序列X、Y,求X和Y的最長(zhǎng)公共子序列Z。
標(biāo)簽:
lt
序列
上傳時(shí)間:
2014-01-25
上傳用戶:netwolf
-
二分法求一個(gè)未知數(shù)方程的根f(x)=0,x屬于[a,b],除了顯示每次計(jì)算的小區(qū)間外,還根據(jù)給定的精度計(jì)算了所需的次數(shù)k
標(biāo)簽:
分
方程
計(jì)算
上傳時(shí)間:
2016-02-05
上傳用戶:fredguo
-
Floyd-Warshall算法描述
1)適用范圍:
a)APSP(All Pairs Shortest Paths)
b)稠密圖效果最佳
c)邊權(quán)可正可負(fù)
2)算法描述:
a)初始化:dis[u,v]=w[u,v]
b)For k:=1 to n
For i:=1 to n
For j:=1 to n
If dis[i,j]>dis[i,k]+dis[k,j] Then
Dis[I,j]:=dis[I,k]+dis[k,j]
c)算法結(jié)束:dis即為所有點(diǎn)對(duì)的最短路徑矩陣
3)算法小結(jié):此算法簡(jiǎn)單有效,由于三重循環(huán)結(jié)構(gòu)緊湊,對(duì)于稠密圖,效率要高于執(zhí)行|V|次Dijkstra算法。時(shí)間復(fù)雜度O(n^3)。
考慮下列變形:如(I,j)∈E則dis[I,j]初始為1,else初始為0,這樣的Floyd算法最后的最短路徑矩陣即成為一個(gè)判斷I,j是否有通路的矩陣。更簡(jiǎn)單的,我們可以把dis設(shè)成boolean類型,則每次可以用“dis[I,j]:=dis[I,j]or(dis[I,k]and dis[k,j])”來(lái)代替算法描述中的藍(lán)色部分,可以更直觀地得到I,j的連通情況。
標(biāo)簽:
Floyd-Warshall
Shortest
Pairs
Paths
上傳時(shí)間:
2013-12-01
上傳用戶:dyctj
-
編寫一個(gè)用SOR法解方程組Ax=b的計(jì)算機(jī)程序,其中
要求程序中不存系數(shù)A,分別對(duì)不同的階數(shù)(例如n=15,80)取w=1.7,1.8,1.9,進(jìn)行迭代,記錄近似解 達(dá)到 時(shí)所用迭代次數(shù)k,觀察松弛因子對(duì)收斂速度的影響。
標(biāo)簽:
SOR
Ax
編寫
方程
上傳時(shí)間:
2013-12-25
上傳用戶:wcl168881111111