0% found this document useful (0 votes)
2 views2 pages

Algorithm Design

An algorithm is a finite set of precise instructions designed to accomplish a specific task, such as making tea or solving a problem. It must include input, output, definiteness, finiteness, and effectiveness criteria. The process of problem-solving using algorithms involves defining the problem, designing the algorithm, analyzing it, implementing it, testing, and maintaining it.

Uploaded by

0808400
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Algorithm Design

An algorithm is a finite set of precise instructions designed to accomplish a specific task, such as making tea or solving a problem. It must include input, output, definiteness, finiteness, and effectiveness criteria. The process of problem-solving using algorithms involves defining the problem, designing the algorithm, analyzing it, implementing it, testing, and maintaining it.

Uploaded by

0808400
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

What is an Algorithm?

Algorithm is a set of steps to complete a task.


For example,
Task: to make a cup of tea.
Algorithm:
· add water and milk to the kettle,
· boil it, add tea leaves,
· Add sugar, and then serve it in cup.
‘’a set of steps to accomplish or complete a task that is described precisely
enough that
a computer can run it’’.
Described precisely: very difficult for a machine to know how much water, milk to
be
added etc. in the above tea making algorithm.
These algorithms run on computers or computational devices..For example, GPS in
our
smartphones, Google hangouts.
GPS uses shortest path algorithm.. Online shopping uses cryptography which uses
RSA
algorithm.
Algorithm Definition1:
• An algorithm is a finite set of instructions that, if followed, accomplishes a
particular task.

In addition, all algorithms must satisfy the following criteria:


• Input. Zero or more quantities are externally supplied.
• Output. At least one quantity is produced.
• Definiteness. Each instruction is clear and unambiguous.
• Finiteness. The algorithm terminates after a finite number of steps.
• Effectiveness. Every instruction must be very basic enough and must be feasible.

Algorithm Definition2:
• An algorithm is a sequence of unambiguous instructions for solving a problem, i.e.,
for obtaining a required output for any legitimate input in a finite amount of time.
• Algorithms that are definite and effective are also called computational procedures.
• A program is the expression of an algorithm in a programming language

Problem

Algorithm

Input Computer Output

• Algorithms for Problem Solving


The main steps for Problem Solving are:
1. Problem definition
2. Algorithm design / Algorithm specification
3. Algorithm analysis
4. Implementation
5. Testing
6. [Maintenance]

• Step1.
Problem Definition
What is the task to be accomplished?
Ex: Calculate the average of the grades for a given student

• Step2.
Algorithm Design / Specifications:
Describe: in natural language / pseudo-code / diagrams / etc

• Step3.
Algorithm analysis
Space complexity - How much space is required
Time complexity - How much time does it take to run the algorithm Computer
Algorithm. An algorithm is a procedure (a finite set of well-defined instructions) for
accomplishing some tasks which, given an initial state terminate in a defined end-state
The computational complexity and efficient implementation of the algorithm are
important in computing, and this depends on suitable data structures.

• Steps 4,5,6:
Implementation, Testing, Maintainance
•Implementation: Decide on the programming language to use C, C++, Lisp, Java,
Perl, Prolog, assembly, etc.
Write clean, well documented code
• Test, test, test
Integrate feedback from users, fix bugs, ensure compatibility across different versions
• Maintenance.
Release Updates,fix bugs
Keeping illegal inputs separate is the responsibility of the algorithmic problem, while
treating special classes of unusual or undesirable inputs is the responsibility of the
algorithm
itself.

You might also like