algorithms
TRANSCRIPT
![Page 1: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/1.jpg)
Lakshmi narain college of Technology
ALGORITHMS
SUBMITTED TO : SUBMITTED
BY :Harish Patidar Sir Pradhan Rishi
Sharma
![Page 2: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/2.jpg)
![Page 3: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/3.jpg)
ALGORITHM
● A process or set of rules to be followed in calculations or other problem-solving operations.
● A finite set of an instruction that specifies a sequence of operation to be carried out in order to solve a specific problem.
● It is a recipe for solving problems.
![Page 4: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/4.jpg)
Methods of Specifying Algorithm
Pseudocode - specifies the steps of algorithm using essentially natural language of superimposed control structure.
Flowchart - a traditional graphical tool with standardized symbols. Show the sequence of steps in an algorithm.
![Page 5: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/5.jpg)
Properties of an Algorithm
Finiteness - there is an exact number of steps to be taken and has an end.
Absence of Ambiguity - means that every instruction is precisely described and clearly specified.
Sequence of Execution - instructions are performed from top to bottom.
Input and Output - defined the unknowns of the problem is specified and with the expected outcome.
Effectiveness - the solution prescribed is guaranteed to give a correct answer and that the specified process is faithfully carried out.
Scope Definition - applies to a specific problem or class of problem.
![Page 6: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/6.jpg)
Steps in Program Development
State the problem clearly- a problem cannot be solved correctly unless it is being understood.
Plan and Write the Logical Order of Instructions - the computer follows the direction exactly at the given sequence.
Code the Program - write the programming statements in the desired language.
Enter the program into the computer - key in or type the statement into the computer.
Run and Debug the program - check if you have the desired output; if not, trace the possible error.
![Page 7: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/7.jpg)
Flowchart Symbols
![Page 8: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/8.jpg)
Psuedocode Guidelines
● Mimic good code and good English:Using aspects of both systems means adhering to thestyle rules of both to some degree
● Ignore unnecessary details:If you are worrying about the placement of commas, you are using too much detail
● Don’t belabour the obvious:In many cases, the type of a variable is clear from context;unless it is critical that it is specified to be an integer or real, it is often unnecessary to make it explicit
● Take advantage of programming shorthands:
![Page 9: Algorithms](https://reader035.vdocument.in/reader035/viewer/2022071902/55c3692ebb61eb20248b492d/html5/thumbnails/9.jpg)
THANK YOU !!