S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Thu, 23 May 2013 09:08:14 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Running Times
PostPosted: Thu, 10 Mar 2011 14:15:50 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Thu, 11 May 2006 11:24:10 UTC
Posts: 332
Hi all.

I'm a bit stuck on this question.

So an algorithm A has a running time in O(n^2) and in \Omega (n log_2 n).

State whether and why it is consistent or inconsistent with the claim mentioned above for the following statements.

a) in O(n^{\frac{3}{2}})
b) in O(n)
c) in \Theta(n^2)
d) in \Theta(n^3)

my answers were...
a) no. because in O(n^{\frac{3}{2}}), O(n^2) grows faster
b) no. same as above.
c) yes. does grow at the same rate as O(n^2), and is faster than \Omega (n log_2 n).
d) no. does not grow at \Theta(n^3). it is faster.

and i on the right track?

Thanks.


Top
 Profile  
 
 Post subject: Re: Running Times
PostPosted: Thu, 10 Mar 2011 14:28:34 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
Location: Austin, TX
asa.hoshi wrote:
Hi all.

I'm a bit stuck on this question.

So an algorithm A has a running time in O(n^2) and in \Omega (n log_2 n).

State whether and why it is consistent or inconsistent with the claim mentioned above for the following statements.

a) in O(n^{\frac{3}{2}})
b) in O(n)
c) in \Theta(n^2)
d) in \Theta(n^3)

my answers were...
a) no. because in O(n^{\frac{3}{2}}), O(n^2) grows faster
b) no. same as above.
c) yes. does grow at the same rate as O(n^2), and is faster than \Omega (n log_2 n).
d) no. does not grow at \Theta(n^3). it is faster.

and i on the right track?

Thanks.

For the last one, what is "it"? If you mean the algorithm, then no, you're wrong, the algorithm does not grow faster it IS faster, which means the complexity is slower, i.e. shorter run-time. Be careful with how you use "faster" when talking about asymptotics.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 10 Mar 2011 22:01:12 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Thu, 11 May 2006 11:24:10 UTC
Posts: 332
i think i meant to say that n^3 grows faster then n^2 for q.d). And Cos they dont grow at the same speed, ans is no. Then is that right?


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 10 Mar 2011 22:19:37 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
Location: Austin, TX
asa.hoshi wrote:
i think i meant to say that n^3 grows faster then n^2 for q.d). And Cos they dont grow at the same speed, ans is no. Then is that right?


In particular it's because n^3 isn't between the two bounds (it's not O(n^2))

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 14 Mar 2011 10:39:29 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Thu, 11 May 2006 11:24:10 UTC
Posts: 332
Shadow wrote:
asa.hoshi wrote:
i think i meant to say that n^3 grows faster then n^2 for q.d). And Cos they dont grow at the same speed, ans is no. Then is that right?


In particular it's because n^3 isn't between the two bounds (it's not O(n^2))
i think im confusing myself here.

but for a) in O(n^{\frac{3}{2}}).

Okay, so i know that comparing n^{\frac{3}{2}} and n^2. Obviously, n^2 grows faster. And n^{\frac{3}{2}} is faster than nlog_2(n).

So, having said that is it consistent with the fact that the alrogithm whose running time is in O(n^2) and \Omega (n log_2 n)? Because it is within the bounds of both running times. Does that make sense?

Or... is it because, the question says, no faster than n^{\frac{3}{2}}, but the algorithm can run faster than n^{\frac{3}{2}} and up to n^2? So answer is inconsistent.


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 14 Mar 2011 17:47:11 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
Location: Austin, TX
asa.hoshi wrote:
Shadow wrote:
asa.hoshi wrote:
i think i meant to say that n^3 grows faster then n^2 for q.d). And Cos they dont grow at the same speed, ans is no. Then is that right?


In particular it's because n^3 isn't between the two bounds (it's not O(n^2))
i think im confusing myself here.

but for a) in O(n^{\frac{3}{2}}).

Okay, so i know that comparing n^{\frac{3}{2}} and n^2. Obviously, n^2 grows faster. And n^{\frac{3}{2}} is faster than nlog_2(n).

So, having said that is it consistent with the fact that the alrogithm whose running time is in O(n^2) and \Omega (n log_2 n)? Because it is within the bounds of both running times. Does that make sense?

Or... is it because, the question says, no faster than n^{\frac{3}{2}}, but the algorithm can run faster than n^{\frac{3}{2}} and up to n^2? So answer is inconsistent.


The first conclusion is correct. You should recall that the big O means something akin to \le and \Omega means something akin to \ge

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA