查看完整版本: 幾個複雜度的問題
頁: [1]

allan222 發表於 2017-3-24 08:28 AM

幾個複雜度的問題

有幾個複雜度的問題想請問各位大大

1.What is the time complexity and space complexity of Fibanacci implementation usingrecurrence (i.e., F(n)=F(n-1)+F(n-2))

這個我知道
Time Complexity:O(2^n)
Space Complexity: O(n)


可是我不知道做法該如何呈現
因為大部分都是用圖
題目要我們給算式


2.What is the time complexity of Fibanacci implementation using Binet’s formula.


我想這題的答案是O(n)


但是做法不知道怎麼寫


3.Give an example of single CPU instruction for computing power function (reference required).

這題完全不懂了  希望大大們可以幫忙解答

4.How many CPU cycles are required for executing the instruction in 3(reference required)

接第三題 也是看不太懂 希望大大們可以幫忙
...<div class='locked'><em>瀏覽完整內容,請先 <a href='member.php?mod=register'>註冊</a> 或 <a href='javascript:;' onclick="lsSubmit()">登入會員</a></em></div><div></div>

CoNsTaRwU 發表於 2017-4-1 02:58 PM

這問題... 到底是在修演算法還是計算機組織啊 orz...
3 和 4 根本沒有標準答案吧

o_g349 發表於 2017-9-13 12:25 PM

第三題問的是請你給一個用單一 cpu 指令去計算指數函數的例子,第四題問的是執行第3點裏面的 cpu 指令需要多少個 cpu cycle 來完成,這兩台都是計算機組織這門課的問題,你要學過才會回答
頁: [1]