![]() |
VOOZH | about |
Solving of tasks on a computer - one of types of creative tasks on classes, offsets, examinations and the Olympic Games in information science and programming.
Content |
The main stages of solving of tasks on a computer:
Problem definition - exact and accurate determination of required results and original conditions in tasks.
Results are correct if they meet the requirements of assigned tasks.
Results are wrong if they contradict the delivered requirements.
Tasks can be private (specific) and generalized (mass).
The method of the solution is the general method of the solution of some class of tasks.
Solution method - correct if it yields the correct results.
Solution method - wrong if it yields the wrong results.
Method - the sequence of actions leading to obtaining results.
Solution method - correct if it yields the correct results for any initial data of an assigned task.
Algorithmization is a drawing up algorithms for solving of tasks on a computer. For solving of tasks on a computer exact problem definition with accurate selection required and initial is initial.
The algorithm is productive if its accomplishment leads to obtaining results.
The algorithm is correct if it yields the correct results for any legal initial data.
The algorithm contains errors if for it yields the wrong results or does not yield results in general for some legal initial data.
Programming - writing of the computer programs can is made by three methods:
The program contains errors if its accomplishment on a computer leads to receiving failures, failures or obtaining not the correct results.
Errors in algorithms programs - one of the most serious problems in information science and professional programming.
Debugging of programs - search and error correction in programs on a computer. As the number of errors is unknown, also duration of debugging of programs on a computer is unknown.
The lack of errors in programs is checked by their testing for a computer. Testing can reveal errors, but cannot guarantee lack of errors in programs. (Dijkstra)
Testing of programs is a verification process of programs on a computer by tests. Tests are sets of test initial data with the list correct to results.
Obtaining the wrong results, failures or failures speaks about existence of errors in programs. Testing can show existence of errors in programs on a computer
The test set is structurally complete if on this test set each alternative, each sequence and each cycle one or several times is executed.
Testing cannot guarantee lack of errors in programs. Only the exhaustive analysis of correctness of algorithms and programs can give guarantees of lack of errors.
The analysis and correctness proofs of algorithms and programs it is possible and it is necessary to carry out after structurally complete testing of programs for a computer.
Examples of the analysis of correctness of algorithms and programs in the BASIC and Pascal languages are given in books by Dijkstra and textbooks by information science of Kaiming.
All examples are given with problem definitions, algorithms, specifications, texts of programs on the BASIC and correctness proofs of programs.
| 👁 Шестерня | The site content is translated by machine translation software powered by PROMT. The machine-translated articles are not always perfect and may contain errors in vocabulary, syntax or grammar. Read original article If you find inaccuracies or errors in the results of machine translation, please write to editor@tadviser.ru. We will make every effort to correct them as soon as possible. |