What Are Algorithms

Table of contents:

What Are Algorithms
What Are Algorithms

Video: What Are Algorithms

Video: What Are Algorithms
Video: What's an algorithm? - David J. Malan 2024, May
Anonim

Algorithms are used in any field of human activity, but are mainly associated with computer technology. All computer hardware and software work on the basis of algorithms.

What are algorithms
What are algorithms

Instructions

Step 1

The word "algorithm" has become widely used in connection with the spread of electronic computers. Although the term itself existed long before that as one of the key concepts in mathematics. The name comes from the name of a person who lived in the 9th century. Uzbek mathematician al-Khwarizmi and meant the rules for performing multiplication, division, addition and subtraction. In fact, this is a clearly defined sequence of actions, a kind of plan for how to solve a problem or achieve a set goal. Each next step of the algorithm should be performed when the previous one is completed. Although not all algorithmic calculations have the finiteness property, an example of this is the calculation of the number Pi (3, 14 …).

Step 2

The work of computers and computers is based on algorithms. Computer programs also function on their basis. The computer processes the input with a sequence of instructions and then outputs the result. The operations that the user performs on the site are also possible thanks to the action of algorithms. So, for a site search, a directory scan or an index search is performed. The algorithm allows you to save data entered by users in forms. To compose it, you need to know the rules (syntax).

Step 3

There are different types of algorithms: linear, branching, cyclic. Linear instructions are executed sequentially in the indicated order. The forking instructions are conditional. In a loop, at least one group of instructions must be repeated during execution. In practice, many algorithms combine all three types.

Step 4

The algorithm is entered into the computer memory using special symbols, in the form of a diagram or text. Different algorithms are created to solve different problems. The instructions are called commands. Execution of absolutely all commands must be feasible, otherwise the technique will not be able to solve the problem and get the result: the lack of flexibility distinguishes a computer from a person. Programming is the decomposition of a task into several simple steps. If the algorithm is correct, it will give the correct result. A common way of presenting algorithms is graphical, in the form of a flowchart: different stages are indicated by geometric shapes. Each shape (symbol) implies different data and operations and is connected to other symbols with communication lines.

Recommended: