Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > University Math Help > Discrete Mathematics, Set Theory and Logic
Reply
 
Thread Tools Display Modes
  #1  
Old January 14th, 2007, 06:55 AM
Member
 
Join Date: Nov 2006
Posts: 121
Country:
Thanks: 61
Thanked 7 Times in 7 Posts
anthmoo is on a distinguished road
Default The order of a particular algorithm...Please help!

The order of a particular algorithm is a cubic function of the number of input values. It takes 4 seconds for the algorithm to process 100 input values. Approximately how many seconds will it take the algorithm to process 500 input values?

thanks guys!
Reply With Quote
Advertisement
 
  #2  
Old January 14th, 2007, 07:42 AM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 12,196
Country:
Thanks: 770
Thanked 3,954 Times in 3,192 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by anthmoo View Post
The order of a particular algorithm is a cubic function of the number of input values. It takes 4 seconds for the algorithm to process 100 input values. Approximately how many seconds will it take the algorithm to process 500 input values?

thanks guys!
T(n)=O(n^3)

So there exists a k such that; if n is large enough:

T(n)\approx k\,n^3

so if T(100)= 4\ s, k\approx 4/10^6 and:

T(500)\approx (4/10^6) 5^3 10^6=500\ s

RonL
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote
The following users thank CaptainBlack for this useful post:
Donate to MHF
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 11:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.