Algorithm and Its Measurement

Source: Internet
Author: User

In practical terms, a goal of Algorithmic Analysis is "to obtain understanding about the relative merits of complicated algorithms to be able to provide useful advice to someone undertaking an actual computation, (1973) [1]. in broader interpretation, however, Algorithmic Analysis Between des the study of all aspects of performance in computational problem solving, from the preliminary fo Rmulation, through the programming stages, to the final task of interpreting the results obtained [2]. we wowould also like to prove lower bounds on the computation time of varous classes of algorithms. in order to show that there is no algorithm to perform a given task in less than a certain amount of time, we need a precise definition of what constitutes an algorithm. first, then, what is an algorithm?
A procedure consisting of a finite set of unambiguous rules which specify a finite sequence of operations that provides the solution to a problem, or to a specific class of problems, is called an algorithm [3].
Several important features of this definition must now be emphasized.
First, each step of an algorithm must be unambiguous and precisely defined. The actions to be carried out must be rigorously specified for each case.
Secondly, an algorithm must always arrive at a problem solution after a finite number of steps. indeed, the general restriction of finiteness is not sufficient in practice, as the number of steps needed to solve a specific problem, although finite, may be too large for practicable computation. A useful algorithm must require not only a finite number of steps, but a reasonable numher.
Thirdly, every meaningful algorithm possesses zero or more inputs and provides one or more outputs. the inputs may he defined as quantities which are given to the algorithm initially, before it is executed, and the outputs as quantities which have a specified relation to the inputs and which are delivered at the completion of its execution.
Fourthly, it is preferable that the algorithm shocould be applicable to any member of a class of problems rather than only to a single problem. this property of generality, though not a necessity, is certainly a desirable attribute of a useful algorithm [4].
Finally, we wowould like to mention that although the concept of an algorithm is a very broad one, in this book we restrict ourselves to algorithms designed to be executed on a computer.
It is relatively easy to invent algorithms. in practice, however, one wants not only algorithms, one wants good algorithms. thus, the objective is to invent good algorithms and prove that they are good. the "Goodness" of an algorithm can be appraised by a variety of criteria. one of the most important is the time taken to execute it.
The performance time of an algorithm is a function of the size of the computational problem to be solved. however, assuming we have a computer program which eventually terminates, solving a special problem requires only sufficint time and sufficient storage. of more general interest are algorithms which can be applied to a collection of problems of a certain type. for these algorithms, the time and storage space required by a program will vary with the particle problem being solved. consider, for example, the following classes of problems, and note the role of the value of the parameter n.
(1) Find the largest in a sequence of N integers.
(2) solve a set of linear algebraic equations Ax = B, where A is an n × n real matrix and B is a real vector of length N.
(3) Let W be a one-dimen1_array of N distinct integers. Sort the entries of W into descending order.
(4) evaluate a polynomial
In each of these problems, the parameter n provides a measure of the size of the problem in
The sense that the time required to solve the problem, or the storage space required, or both, will increase as N increases.

From the perspective of practical application, Algorithm One goal of analysis is to give people a sufficient understanding of the relative value of complex algorithms, so as to provide useful suggestions to people who perform specific calculations. However, in a broader sense, algorithm analysis involves research on all aspects of problem solving computing, from listing the basic formulas firstProgram At the final stage, people want to prove the lower time bound of various algorithms. To show that no algorithm can complete a given task within the specified time, we need to precisely define the composition of the algorithm. So what is an algorithm?
If a process is composed of a finite set of unambiguous rules that specify a finite sequence of operations to solve a specific problem or a specific problem, the process is called an algorithm.
Several important features of this definition must be emphasized here.
First, each step of an algorithm must be unambiguous and precisely defined. In various circumstances, the actions to be performed must be strictly specified.
Second, an algorithm must be able to solve a problem after a finite step. In fact, the limitation in general is not enough in practice, because although the number of execution steps to solve a specific problem is limited, it may be too large for actual calculation. A useful algorithm requires not only limited steps, but also reasonable steps.
Third, each meaningful algorithm has zero or multiple inputs and provides one or more outputs. The input can be defined as the amount specified during initialization before the algorithm is executed. The output refers to the amount generated when the algorithm is executed in a specific relationship with the input.
Fourth, an algorithm is best suited to a certain type of problem, not just one problem. This kind of versatility, although not essential, must be a useful algorithm feature that people expect.
Finally, it should be mentioned that, despite the wide range of concepts of algorithms, this book is limited to the algorithms designed to run on computers.
It is easy to invent algorithms, But what people actually want is not just algorithms, but good algorithms. Therefore, it is the purpose to invent algorithms and prove that they are good algorithms. The superiority of an algorithm can be evaluated by multiple criteria. The most important one is the time spent executing the algorithm.
The execution time of an algorithm is a function that calculates the scale of the problem to be solved. However, assume that there is a computing program that can be terminated. It only takes enough time and storage space to solve specific problems. In general, people are more interested in algorithms that can be used to solve a certain type of problem. The time and storage space required by these algorithms and programs change with the actual problems solved. For example, consider the following issues and pay attention to the value of parameter n.
(1) Find the maximum value in N integer sequences.
(2) solving a set of linear algebra equations Ax = B, where A is an n × n real matrix, and B is a real vector with a length of N.
(3) Assume that W is a one-dimensional array composed of n different integers, and W is sorted in descending order.
(4) Evaluate the polynomial.
In each of the above problems, because the time required to solve the problem or the storage space or the two increase with N, the parameter n is a measure of the problem scale.

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.