Chapter 1 Functions of algorithms in computing

Source: Internet
Author: User

An algorithm is a series of computing steps used to convert input data into output results. An input sequence is called an instance of this Sorting Problem ). For a specific application, the following are the main considerations for choosing the Optimal Sorting Algorithm:

  • Consider the number of data items to be sorted;
  • These data items have been sorted;
  • Possible restrictions on data item values;
  • Type of the storage device to be used.

Which types of problems can the algorithm solve:

  • Biological problems, DNA sequencing and analysis;
  • Search engine, massive data management and manipulation;
  • E-commerce, encryption and digital signature technologies;
  • Commercial applications, allocation and scheduling of rare resources;
  • The actual problem lies in the shortest path and the shortest route.
Efficiency is the root cause of different algorithm problems. As the scale of the problem increases, the gap will become insurmountable. Algorithms, like computer hardware, are a technology. The overall system performance depends not only on the selection of fast hardware, but also on the selection of effective algorithms. For each function f (n) and time t in the following table, find the maximum number of n problems that can be solved within the time t. Assume that the algorithm used to solve the problem requires f (n) milliseconds to solve the problem.
  1 second 1 minute 1 hour 1 day 1 month 1 year 1 Century
LgN 2 ^ 1000 Positive infinity Positive infinity Positive infinity Positive infinity Positive infinity Positive infinity
Sqrt (n) 10 ^ 6 4.29E + 9 1.76E + 13 9.01E + 15      
N 10 ^ 3 6E + 4 3.6E + 6 8.64E + 8      
Nlgn 141 4896 204095 3.94E + 6      
N ^ 2 32 245 1898 9296      
N ^ 3 11 40 154 443      
2 ^ n 10 16 22 27      
N! 7 9 10 12      

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.