This homework is not graded. It is practice for the 25 September quiz.
Give the simplest big-Θ for the following functions:
Give the simplest big-Θ in terms of
n
for the following nested loops:
for (i=0; i<=n; ++i)
for (j=0; j<10000; ++j)
++sum ;
for (i=0; i<=n; ++i)
for (j=0; j<n-10000; ++j)
++sum ;
for (i=0; i<=n; i=i+3)
++sum ;
for (i=0; i<=n; i=i+(n/10000)+1)
++sum ;
for (i=0; i<=n; i=3*i+1)
++sum ;
for (i=0; i<=n; i=10*i)
++sum ;
for (i=0; i*i<=n; ++i)
++sum ;