Complexity time of n upon algorithms ..

Thread Starter

Ryan$

Joined Dec 14, 2018
178
Hi guys, I'm wondering why we are solving the time complexity T(n) for every "n" and not for specific n? in other words we are dealing always to solve the problem in algorithmic way for every "n" generally .. why we are not solving it on specific case?! is there any purpose to solve the problem in general way? I'm not algorithmican so I don't know why we actually need to solve any problem for every "n" ! ... any help? thanks!
 

WBahn

Joined Mar 31, 2012
32,755
How many items are going to be in the next list of items you need to sort? What about the time after that?

What? You don't know?

If you want to download a sorting algorithm from the Internet, do you expect the person that wrote it to have predicted the specific case of how many items are in the list you want to use it for?

If you design an algorithm to do the route planning for Union Pacific or FedEx or Yellow Cab, what specific number of stops are you going to use to?

What? You don't know?

Also, keep in mind that we almost never determine T(n) so that we can plug a value of n into it and it actually gives us the amount of time needed to solve the problem for that size of n. We are wanting to know, in broad terms, how the time that it takes grows as the size of the problem grows. If it took 100 seconds to sort a list of 100,000 items and now we have a list of 10,000,000 items, do we expect it to take closer to 10,000 seconds, 100,000 seconds, or 10,000,000 seconds?
 

Thread Starter

Ryan$

Joined Dec 14, 2018
178
How many items are going to be in the next list of items you need to sort? What about the time after that?

What? You don't know?

If you want to download a sorting algorithm from the Internet, do you expect the person that wrote it to have predicted the specific case of how many items are in the list you want to use it for?

If you design an algorithm to do the route planning for Union Pacific or FedEx or Yellow Cab, what specific number of stops are you going to use to?

What? You don't know?

Also, keep in mind that we almost never determine T(n) so that we can plug a value of n into it and it actually gives us the amount of time needed to solve the problem for that size of n. We are wanting to know, in broad terms, how the time that it takes grows as the size of the problem grows. If it took 100 seconds to sort a list of 100,000 items and now we have a list of 10,000,000 items, do we expect it to take closer to 10,000 seconds, 100,000 seconds, or 10,000,000 seconds?
in brief, thank you !
the algorithm that we make it could also be used in a games stuff .. so it must be in a generally way !
 
Top