Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

NAME: Delgado, Edward Anilov G.

STUDENT NO: 21-2010

YEAR/SECTION: BAIT-1E

DATE: September 27, 2022

INSTRUCTIONS: Explain the following questions.

1) What is an algorithm? Explain its characteristics?

An algorithm is a step-by-step procedure that defines a set of instructions that must be carried
out in a specific order to produce the desired result. Algorithms are generally developed
independently of underlying languages, which means that an algorithm can be implemented in
more than one programming language.

Input specified
The input is the data to be transformed during the computation to produce the output. An
algorithm should have 0 or more well-defined inputs. Input precision requires that you know
what kind of data, how much and what form the data should be.

Output specified
The output is the data resulting from the computation (your intended result). An algorithm
should have 1 or more well-defined outputs, and should match the desired output.

Definiteness
Algorithms must specify every step and the order the steps must be taken in the process.
Definiteness means specifying the sequence of operations for turning input into output.

Effectiveness
For an algorithm to be effective, it means that all those steps that are required to get to output
must be feasible with the available resources. It should not contain any unnecessary and
redundant steps which could make an algorithm ineffective.

Finiteness
The algorithm must stop, eventually. Stopping may mean that you get the expected output OR
you get a response that no solution is possible. Algorithms must terminate after a finite number
of steps. An algorithm should not be infinite and always terminate after definite number of
steps.

Independent
An algorithm should have step-by-step directions, which should be independent of any
programming code. It should be such that it could be run on any of the programming languages.
2) How to test algorithms? Why is it needed?

One way to test short programs is to do what is known as a dry run using paper. A dry run
involves creating a trace table , containing all the variables a program contains. Whenever the
value of a variable changes, the change is indicated in the trace table. looking at software
algorithm performance during developmental testing is to ensure that industry best practices
have been employed to ensure operational mission threads involving large data sets operate
efficiently.

3) Explain Practical complexities of algorithms?

Complexity of an algorithm is a measure of the amount of time and/or space required by an


algorithm for an input of a given size

4) What is meant by profiling? Explain.


Profiling refers to the process of construction and application of user profiles generated by
computerized data analysis. This is the use of algorithms or other mathematical techniques that
allow the discovery of patterns or correlations in large quantities of data, aggregated in
databases.

5) What is meant by space complexity and time complexity of an algorithm? Explain.

the Space complexity of an algorithm quantifies the amount of space or memory taken by an
algorithm to run as a function of the length of the input. While Time complexity of an algorithm
quantifies the amount of time taken by an algorithm to run as a function of the length of the
input.

6) What is meant by asymptotic notation? Explain.

Asymptotic notations are the mathematical notations used to describe the running time of an
algorithm when the input tends towards a particular value or a limiting value.

You might also like