Results 1 to 3 of 3
Thread: Bigoh expression help!
 01242011, 05:36 AM #1Member
 Join Date
 Jan 2011
 Posts
 1
 Rep Power
 0
Bigoh expression help!
I have two questions about bigoh expression.
The first one is:
for(i=1;i<n;++i)
for(j=1;j<floor(i/2);j++)
{
...statements that require exactly j operations...
};
For this one, i think that the number of operations written by bigoh operations is O(n^2)
for (i=1;i<n;++i)
{
...statements that require at most 10^9 /i operations
}
For this one, i do not understand the meaning of "at most 10^9 /i operations". Hope someone give me some suggestions. Thx.
 01242011, 05:12 PM #2
If you are calculating for the worst case, then you assume the inner statement uses 10^9/i operations. It depends on wether you are calculating for best, average or worst case performance  generally you consider worst case since in some algorithms, its a deal breaker even if unlikely.
 01242011, 05:20 PM #3
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,188
 Blog Entries
 7
 Rep Power
 24
Similar Threads

Help with postfix expression
By javajavajava in forum New To JavaReplies: 3Last Post: 11122010, 12:11 PM 
Help with regular expression
By mr.ab18 in forum New To JavaReplies: 2Last Post: 08062010, 10:01 PM 
JSF expression inside another JSF expression
By barbarabxl in forum JavaServer Faces (JSF)Replies: 2Last Post: 05212010, 03:03 PM 
regular expression
By ras_pari in forum Advanced JavaReplies: 27Last Post: 10072009, 12:25 PM 
Quick reg. expression help
By RR_QQ in forum New To JavaReplies: 4Last Post: 02102009, 08:51 PM
Bookmarks