Checking the correctness of an algorithm

Ways to express solution algorithm
There are numerous ways to express the algorithm which provides a solution to given problem; it can be expressed as flowchart, pseudo code, natural language, programming language or drakon-chart. Natural language is used to make an algorithm easy to understand but while solving complex problems it may create ambiguity and becomes a lengthy procedure. Programmers usually recommend flowcharts, pseudo codes or drakon-charts to express algorithm as these methods provide structured way and high-level description. Every solution algorithm must provide detailed implementation description that includes problem statement, list of entities used, logic and other resources to be used.

Checking the correctness of an algorithm
Solution algorithm is declared to be correct based on functional and specification correctness; functional correctness identifies the working of input and the expected output. Specification based correctness checks the overall behavior of the algorithm based on the system in which it is going to be implemented. Algorithm must be checked for total correctness that means it produces the correct results for the given inputs and it gets terminated precisely. Checking of solution algorithm depends on the correctness of statements to be proven, the assumptions and the reasoning logic. The expected output of any algorithm is based on the series of instructions, the given inputs and the state or behavior of variables used in the algorithm. Usually most of the computations are based on mathematical expressions while solving a problem so induction method can be used as an efficient tool to prove the correctness of solution algorithm. Mathematical induction works well where loops, iterations or recursions are used to solve a problem

Don't use plagiarized sources. Get Your Custom Essay on
Checking the correctness of an algorithm
Just from $13/Page
Order Essay

Generic or specific solution
Algorithm must be checked whether it provides a generic solution or a specific solution; that means the solution algorithm can give exact specific solution to the given problem or it results in simple general solution. For example, an algorithm is written for calculating the area of circle by giving radius values; it is then identified that the algorithm can calculate the area of circle by giving all range of radius values as input or just particular values. If the solution algorithm provides exact results for all range of values, it means it is correct otherwise it is reviewed. Formal semantics and set of rules defined are also identified while checking the correctness of solution algorithm. Semantics defines the meaning of technical specifications and the inference rules represents that the logic of the algorithm works correctly. Validation of semantics is being carried out in this stage to determine the feasibility of the solution algorithm with programming language code.

 

How it works

Fill in the
order form

01

Provide your
payment details

02

YOUR WRITER
IS WORKING
ON YOUR CUSTOM PAPERS

03

Get
your completed work!

04

Try our service with

15% OFF

your first order

Why us

US-BASED COMPANY

with certified writers

ALL SUBJECTS

and academic levels

premium quality

24/7 SUPPORT

Activity

1141
Preparing orders
424
Completed orders
782
Active writers
94.2%
Satisfied customers

Try Custom Paper Writing Service Today

Order Essay Papers Now!

Checking the correctness of an algorithm

Solution algorithm is declared to be correct based on functional and specification correctness; functional correctness identifies the working of input and the expected output. Specification based correctness checks the overall behavior of the algorithm based on the system in which it is going to be implemented. Algorithm must be checked for total correctness that means it produces the correct results for the given inputs and it gets terminated precisely. Checking of solution algorithm depends on the correctness of statements to be proven, the assumptions and the reasoning logic. The expected output of any algorithm is based on the series of instructions, the given inputs and the state or behavior of variables used in the algorithm. Usually most of the computations are based on mathematical expressions while solving a problem so induction method can be used as an efficient tool to prove the correctness of solution algorithm.

Generic or specific solution
Algorithm must be checked whether it provides a generic solution or a specific solution; that means the solution algorithm can give exact specific solution to the given problem or it results in simple general solution. For example, an algorithm is written for calculating the area of circle by giving radius values; it is then identified that the algorithm can calculate the area of circle by giving all range of radius values as input or just particular values. If the solution algorithm provides exact results for all range of values, it means it is correct otherwise it is reviewed. Formal semantics and set of rules defined are also identified while checking the correctness of solution algorithm. Semantics defines the meaning of technical specifications and the inference rules represents that the logic of the algorithm works correctly. Validation of semantics is being carried out in this stage to determine the feasibility of the solution algorithm with programming language code.

Don't use plagiarized sources. Get Your Custom Essay on
Checking the correctness of an algorithm
Just from $13/Page
Order Essay

How it works

Fill in the
order form

01

Provide your
payment details

02

YOUR WRITER
IS WORKING
ON YOUR CUSTOM PAPERS

03

Get
your completed work!

04

Try our service with

15% OFF

your first order

Why us

US-BASED COMPANY

with certified writers

ALL SUBJECTS

and academic levels

premium quality

24/7 SUPPORT

Activity

1141
Preparing orders
424
Completed orders
782
Active writers
94.2%
Satisfied customers

Try Custom Paper Writing Service Today

Order Essay Papers Now!
error: Content is protected !!
Open chat
1
Need assignment help? You can contact our live agent via WhatsApp using +1 718 717 2861

Feel free to ask questions, clarifications, or discounts available when placing an order.