Algorithms Types of algorithms Properties of algorithms Erkinova Malika 131 GM
Contents: History of algorithms The term "algorithm“ Implementer of algorithm Properties of algorithm Methods of recording algorithms Flowchart Types of algorithms
History The word "algorithm" is derived from the name of the great Central Asian scholar 8-9 centuries. Al-Khwarizmi. From the mathematical work of al-Khwarizmi reached us only two - algebraic and arithmetic. The second book was considered lost for a long time, but in 1857 in the library of the University of Cambridge found it was translated into Latin. It describes the four rules of arithmetic operations, virtually the same as those used today. The first lines of the book have been translated as follows: "Said algorithm. Let us give due praise to God, our leader and protector. " So the name of Al-Khwarizmi turned into "algorithm", from which came the word "algorithm".
Definition: Algorithm - a clear and precise prescription perpetrator a sequence of actions to achieve this goal in a finite number of steps. The algorithms can be applied to different objects, but the most common and are familiar with the values of algorithms - numeric, character, logical, etc.
Implementer of algorithm - a system that can perform the actions prescribed by the algorithm. The central object of the scheme is implementer - is the object (or subject) to control that make up the algorithm. Features implementer: ENVIRONMENTS - a "dwelling place" implementer. The command system - a strictly defined list of commands. After calling the command executor sovepshaet elementapnoe appropriate action. Executive Failures occur if the command is invoked DURING inappropriate for her condition ENVIRONMENTS.
The properties of the algorithm: Clarity - Executive algorithm needs to know how to implement it. Diskpetnost - an algorithm must ppedstavlyaet ppotsess solving the problems as the consistent implementation pposto steps. At a defined - each an algorithm The rule should be clear and unambiguous. Pezultativnost - an algorithm must drive operator Solutions to the problem in a finite number of steps. Grassroots - pazpabatyvaetsya algorithm for solving the problems in a general way, ie it has to be SOME ppimenim for a class of problems pazlichayuschihsya only the original data.
Methods of recording algorithms: verbal (writing in natural language); graphics (images of graphic characters); program (text in programming languages).
Flowchart Flowchart - a graphical representation algorithm in a specific way interconnected several types of blocks. Block types: block the start (end) input unit (O) block action flow conditions
Types of algorithms There are three main types of algorithms, which are the base for writing programs.
Linear algorithm - an algorithm in which all actions are carried out in strict order, sequentially, one after the other. The first type of algorithms For example, the switch on of a personal computer
The algorithm, in which the choice of actions, depending on some conditions, called branching The second type od algorithms начао
Are you good? Call to friend Walk Yes No Beginning The End An example of branching algorithm
The third type of algorithm Cyclic algorithm - an algorithm containing repetitive actions with any changes the value (parameter)
Repeating the sequence of actions is called a cycle, and these actions - cyclical.