in Algorithms edited by
530 views
1 vote
1 vote
Find theta bound for

f(n)=$n^2/2 -n/2$
in Algorithms edited by
530 views

3 Comments

please use latex

not able to understand
0
0
yeah. :)
0
0
edited by

Devshree  do you think that we can subtract work done by two Subalgorithm? i haven't seen any examples but if we can compute then it should be $\Theta (n^{2})$ 

0
0

2 Answers

1 vote
1 vote
As we consider leading term in asymptotic notations, in above question we have n$^{2}$ so answer is $\Theta \left ( n^{2} \right )$
0 votes
0 votes

Considering the Standard (General) Precedence order of Operators, the Theta Bound for this function will be $\Theta $(n2)


Note : "Asymptotic Notations" is a General Concept of "Mathematics" used for Comparison of "Growth of Functions".  

So, When asked for Normal Functions of Mathematics, Do not always confuse them with "Time" of some Algorithm.

(They (Asymptotic Notations) are frequently "used in Computer science" for measuring Time/Space Complexities of Algorithms. Because In Algorithms, Time Complexity of an Algorithm is informally defined as Growth of function in terms of Input size. )


Check this Question (asked in GATE 2017) regarding Asymptotic Notations of Various Functions..

https://gateoverflow.in/118703/gate2017-1-04

Now, If You consider the given Asymptotic complexities in the above question as "Time Complexities of Some Algorithms", then 100/n can never be the time complexity of any algorithm since Any(Every) Algorithm will at least take constant time i.e. $\Theta$(1) and It(Time) can never decrease with increment in n(input size).

edited by