一:需求分析 1. 問題描述 魔王總是使用自己的一種非常精練而抽象的語言講話,沒人能聽懂,但他的語言是可逐步解釋成人能聽懂的語言,因為他的語言是由以下兩種形式的規則由人的語言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在這兩種形式中,從左到右均表示解釋.試寫一個魔王語言的解釋系統,把 他的話解釋成人能聽得懂的話. 2. 基本要求: 用下述兩條具體規則和上述規則形式(2)實現.設大寫字母表示魔王語言的詞匯 小寫字母表示人的語言的詞匯 希臘字母表示可以用大寫字母或小寫字母代換的變量.魔王語言可含人的詞匯. (1) B --> tAdA (2) A --> sae 3. 測試數據: B(ehnxgz)B 解釋成 tsaedsaeezegexenehetsaedsae若將小寫字母與漢字建立下表所示的對應關系,則魔王說的話是:"天上一只鵝地上一只鵝鵝追鵝趕鵝下鵝蛋鵝恨鵝天上一只鵝地上一只鵝". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鵝 | 追 | 趕 | 下 | 蛋 | 恨 |
上傳時間: 2014-12-02
上傳用戶:jkhjkh1982
使用md5校驗和算法保護文件 通俗的說,就是為保證數據的完整性,用一種指定的算法對原始數據計算出的一個校驗值。接收方用同樣的算法計算一次校驗值,如果和隨數據提供的校驗值一樣,就說明數據是完整的。
上傳時間: 2015-11-21
上傳用戶:q123321
小弟撰寫的類神經pca對圖片的壓縮與解壓縮,對來源圖片training過後,可使用該張圖像的特性(eigenvalue和eigenvetex)來對別張圖解壓縮,非常有趣的方式,再設定threashold時注意時值不要過大,因為這牽涉inverse matrex的計算.
標簽: eigenvalue eigenvetex threashol training
上傳時間: 2015-12-02
上傳用戶:wpwpwlxwlx
Borland C++ Builder開發的Quick_sort演算法實作,並加入timecounter計算使用的秒數。
標簽: Quick_sort Borland Builder 算法
上傳時間: 2015-12-14
上傳用戶:sk5201314
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
標簽: represented integers group items
上傳時間: 2016-01-17
上傳用戶:jeffery
一個MATLAB範例,可以用來計算分形盒維度
標簽: MATLAB
上傳時間: 2016-03-16
上傳用戶:星仔
目前網路流行的網頁遊戲(travian),配合firefox排程外掛,可以協助玩家計算建築物排程,本程式為javascript+xml方式,適合ajax初學者使用學習,請務必掛於伺服器中才能穩定執行
上傳時間: 2016-08-05
上傳用戶:ls530720646
使用C#程式語言開發,並執行於.NET Framework下;是研習「蟻拓尋優法」不可或缺的軟體工具。系統使用ACO (Ant Colony Optimization)演算公式模擬螞蟻的覓食行徑抉擇。使用者可以設定費洛蒙和食物氣味強度等相關參數以及動態設定障礙物的位置和形狀,研習螞蟻覓食的最短路徑形成過程。研習各種參數設定對螞蟻覓食行為的影響,了解費落蒙機制對蟻拓尋優化法的影響。本系統可支援柔性計算教學,研習蟻拓優化法中人工螞蟻的隨機搜尋模式和啟發式法則設計原理。
標簽: 程式
上傳時間: 2013-12-24
上傳用戶:anng
這是一個求數獨遊戲的m-file 在matlab的命令窗口 鍵入>> sudo7 或者run sudo7 的m-file 之後在 9x9 的方格內 填入 數獨的問題 按下 "計算是否有解" 的功能鍵 若不是存在多組的解,則可以 按下 "顯示結果" 的功能鍵, 也可以載入作者測試的"date1"或"date2" 但不可載入及修改"condition"
上傳時間: 2016-11-18
上傳用戶:waizhang
漢諾塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C
標簽: the animation Simulate movement
上傳時間: 2017-02-11
上傳用戶:waizhang