Pantip.com Pantip-TechExchange | Pantip-Cafe | PantipMarket.com | Chat | PanTown.com | BlogGang.com| Torakhong.org| GameRoom
 




ช่วยหาค่ารันไทม์หน่อยครับ......ได้โปรดด

นี่คือ โจทย์ครับ
fibel(n)
compute n in binary, say n = b[k]b[k-1]…b[1], where each b[i] E {0,1}
3. You may assume that the time it takes to compute n in binary is lg(n)  .what is the runtime of fibel(n) ?

F=|0  1|
   |1  1|

นีคือที่ผมทำครับ ถ้าไม่ถูกช่วยแก้ไขด้วยน่ะครับ




if b[1] = 1 then total := F...c1
else total := I (identical maxtrix)  
for i := 2 to k do........c2  

F := F*F...c3  
if b[i] = 1 then total * F....c4  
return lower left entry of total....c5                              



T(n) = c1 + c2 *lg(n-1) + c3+ c4*lg(n-1) + c5




แก้ไขเมื่อ 18 ก.ย. 50 15:36:35

แก้ไขเมื่อ 18 ก.ย. 50 15:35:46

แก้ไขเมื่อ 18 ก.ย. 50 15:31:56

แก้ไขเมื่อ 18 ก.ย. 50 15:30:14

แก้ไขเมื่อ 18 ก.ย. 50 15:27:53

จากคุณ : noppa4152 -[ 18 ก.ย. 50 - 15:26:42 ]




ข้อความหรือรูปภาพที่ปรากฏในกระทู้ที่ท่านเห็นอยู่นี้ เกิดจากการตั้งกระทู้และถูกส่งขึ้นกระดานข่าวโดยอัตโนมัติจากบุคคลทั่วไป ซึ่ง PANTIP.COM มิได้มีส่วนร่วมรู้เห็น ตรวจสอบ หรือพิสูจน์ข้อเท็จจริงใดๆ ทั้งสิ้น หากท่านพบเห็นข้อความ หรือรูปภาพในกระทู้ที่ไม่เหมาะสม กรุณาแจ้งทีมงานทราบ เพื่อดำเนินการต่อไป
Considering the real-time nature of this webboard, it is impossible for us to review all messages/post. Please remember that we do not actively monitor the contents of and are not responsible for any messages posted. Anyone who feels that a posted message is inappropriate, Please encouraged to contact us immediately by email at kratoo@pantip.com , and We will remove objectionable messages within a reasonable time frame.



Pantip-Cafe | Pantip-TechExchange | PantipMarket.com | PanTown.com | BlogGang.com