Home / The science / Mathematics / How to solve problems with an algorithm

How to solve problems with an algorithm

/
75 Views

</a>

The algorithm represents a sequence of precisely defined operations describing the necessary order of actions for solving the task. Any problem can be solved using an algorithm.

Before compiling the instruction, variables are introduced into the algorithm, taking into account the condition of the problem. The simplest types of algorithm are linear, cyclic, and branching algorithms.

Each of them, by a finite number of operations, performs a transition from the input data to the result sought in the task.

Instructions

1

Carefully read the condition of the original tasks. Think over its decision: whether there is a cyclicity in the task. It is possible that operations are specified, the fulfillment of which is conditioned by the satisfaction of different conditions. Write out all known data and the quantities you are looking for.

2

Any algorithm requires a formalized record. If you need to draw up a flowchart, use special elements to indicate each operation of the created statement. As a rule, these are blocks of rectangular and rhombic figures connected to a common tree.

3

Make a general algorithm for solving tasks. In the first step, enter the variables in the algorithm that denote known data and the resulting values. Assign variables known from condition tasks Values.

4

Details the algorithm. Detail the condition tasks. Each step of the instruction must be written on a separate line. If necessary, specify the cycles or branching algorithm.

5

Perform all actions in the steps of the instruction with the given variables. If you need to enter auxiliary variables, include them additionally at the very beginning of the algorithm.

6

Often from the meaning of the original tasks In the process of solving the conditions, whenSatisfaction of which is carried out by one action on the data, and without satisfaction - another. In this case, we are talking about the branching of the algorithm. Draw it with two branches of the instruction tree.

7

If the branching algorithm after passingConditions one of the branches must be returned back along the body of the algorithm, then a cyclic algorithm is formed. Make sure that the loop inside the statement is not infinite and has a finite number of iterations.

8

Any sequence of actions must lead to the final result specified in condition tasks. After obtaining the desired value, complete the algorithm body and write down the received answer.

How to solve problems with an algorithm Was last modified: May 23rd, 2017 By
It is main inner container footer text