Big-O notation finding c and n0

前端 未结 4 1315
一生所求
一生所求 2021-02-13 10:21

I\'ve just been introduced to Big-O notation and I\'ve been given some questions. However I\'m confused as to how to determine the value of n0. I have to show that

4条回答
  •  孤街浪徒
    2021-02-13 11:13

    3n^3 + 20n^2 + 5 <= cn^3
    
    5 + 20n^2 <= n^3(c - 3)
    
    5/n^3 + 20/n <= c - 3
    
    For n0 = 20, c >= 5, since 5/n^3 + 20/n < 2
    

提交回复
热议问题