程序用JAVA語言編寫, 綜合利用圖結構和堆棧結構進行數據組織和處理. 可以進行正則表達式到NFA的轉化, 并能用圖形直觀的表示. 對正則表達式有一些約定, 就是可以用單個字符表示輸入, 也可以用 ‘ ‘ 連接起來的一串字符進行輸入. 有基本的表達式以及由基本表達式構成的并置, 選擇和重復的操作. 例: A|b*c ‘letter’*’digit’ 等都是合法輸入. 還帶有括號功能, 優先級
上傳時間: 2015-05-26
上傳用戶:金宜
源代碼\用動態規劃算法計算序列關系個數 用關系"<"和"="將3個數a,b,c依次序排列時,有13種不同的序列關系: 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個數依序列,設計一個動態規劃算法,計算出有多少種不同的序列關系, 要求算法只占用O(n),只耗時O(n*n).
上傳時間: 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
標簽: government streamline important alphabet
上傳時間: 2015-06-09
上傳用戶:weixiao99
LCS(最長公共子序列)問題可以簡單地描述如下: 一個給定序列的子序列是在該序列中刪去若干元素后得到的序列。給定兩個序列X和Y,當另一序列Z既是X的子序列又是Y的子序列時,稱Z是序列X和Y的公共子序列。例如,若X={A,B,C,B,D,B,A},Y={B,D,C,A,B,A},則序列{B,C,A}是X和Y的一個公共子序列,但它不是X和Y的一個最長公共子序列。序列{B,C,B,A}也是X和Y的一個公共子序列,它的長度為4,而且它是X和Y的一個最長公共子序列,因為X和Y沒有長度大于4的公共子序列。 最長公共子序列問題就是給定兩個序列X={x1,x2,...xm}和Y={y1,y2,...yn},找出X和Y的一個最長公共子序列。對于這個問題比較容易想到的算法是窮舉,對X的所有子序列,檢查它是否也是Y的子序列,從而確定它是否為X和Y的公共子序列,并且在檢查過程中記錄最長的公共子序列。X的所有子序列都檢查過后即可求出X和Y的最長公共子序列。X的每個子序列相應于下標集{1,2,...,m}的一個子集。因此,共有2^m個不同子序列,從而窮舉搜索法需要指數時間。
上傳時間: 2015-06-09
上傳用戶:氣溫達上千萬的
光學設計軟件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.
標簽: described aspheric surfaces Annular
上傳時間: 2014-01-08
上傳用戶:yyyyyyyyyy
該源碼是一個問題的解決方法。問題是給你個長為L的串,串中可以出現n種字符,還給出m個子串,求有多少個長為n的只由這些字串組成的串。輸入例子:4 5 6 ABB BCA BCD CAB CDD DDA 結果為2.而5 4 5 E D C B A的結果為625
標簽: 源碼
上傳時間: 2014-01-12
上傳用戶:水中浮云
/*** *** *** *** *** *** *** *** *** *** *** *** **/ //**此映射表用來映射LED模塊不譯碼時,顯示的字符和必須輸入的數據的關系 //**每段和對應比特位的關系見示意圖 // g // --- --- // b | a |f | | <---顯示0時點亮的段為gfedcb // --- // c | |e | | 那么寫入數據為0x7e // --- --- // d // bit: 7 6 5 4 3 2 1 0 // 段位: g f e d c b a
上傳時間: 2013-11-25
上傳用戶:
求解方程式的根的算法,要求輸入a,b,c 3個數據的值,輸出結果將顯示在方框內
上傳時間: 2015-10-31
上傳用戶:gtf1207
Easy_Buy是一個在線銷售系統,是一個B-C模式的電子商務系統,由前臺的B/S模式購物系統和后臺的C/S模式的管理系統兩部分組成。該電子商務系統可以實現會員注冊、瀏覽商品、查看商品詳細信息、選購商品、取消訂單和查看訂單等功能。-
上傳時間: 2015-11-01
上傳用戶:windwolf2000
電子商務系統Easy_Buy是一個在線銷售系統,是一個B-C模式的電子商務系統,由前臺的B/S模式購物系統和后臺的C/S模式的管理系統兩部分組成。
上傳時間: 2013-12-28
上傳用戶:181992417