AmirulLaskar_CA2_23600123002_compressed

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

GREATER KOLKATA COLLEGE OF ENGINEERING AND MANAGEMENT

Report on

Idea of Algorithm

Subject : Programming for Problem Solving

Subject Code : ES-CS201

Submitted by : Amirul Laskar

University Roll : 23600123002

Department : CSE

Semester : 2nd

Date of Submission : 08/03/2024

Abstract:

Intelligence is one of the key characteristics which differentiate a human being from other

living creatures on the earth. Basic intelligence covers day to day problem solving and

making strategies to handle different situations which keep arising in day to day life. One

person goes Bank to withdraw money. After knowing the balance in his account, he/she

decides to withdraw the entire amount from his account but he/she has to leave

minimumbalance in his account. Here deciding about how much amount he/she may with
draw from the account is one of the examples of the basic intelligence. During the process

of solving any problem, one tries to find the necessary steps to be taken in a sequence.

Introduction:

Algorithm can be defined as: A formula or set of steps for solving a particular problem. To

be an algorithm, a set of rules must be unambiguous and have a clear stopping point.

There may be more than one way to solve a problem, so there may be more than one

algorithm for a problem.

Now, if we take definition of algorithm as: “A sequence of activities to be processed for

getting desired output from a given input.” Then we can say that 1.Getting specified

output is essential after algorithm is executed. 2. One will get output only if algorithm stops

after finite time. 3.Activities in an algorithm to be clearly defined in other words for it to be

unambiguous. Before writing an algorithm for a problem, one should find out what is/are

the inputs to the algorithm and what is/are expected output after running the algorithm.

Example: Write an algorithm to read two numbers and find their sum.Inputs to the

algorithm:First num1.Second num2.Expected output:Sum of the two numbers.

Algorithm:

Step1: Start

Step2: Read\input the first num1.

Step3: Read\input the second num2.

Step4: Sum num1+num2 // calculation of sum

Step5: Print Sum

Step6: End
Description:

Algorithms are step-by-step procedures designed to solve specific problems and perform

tasks efficiently in the realm of computer science and mathematics. These powerful sets

of instructions form the backbone of modern technology and govern everything from web

searches to artificial intelligence. Here's how algorithms work:

● Input: Algorithms take input data, which can be in various formats, such as numbers,

text, or images.

● Processing: The algorithm processes the input data through a series of logical and

mathematical operations, manipulating and transforming it as needed.

● Output: After the processing is complete, the algorithm produces an output, which

could be a result, a decision, or some other meaningful information.

● Efficiency: A key aspect of algorithms is their efficiency, aiming to accomplish tasks

quickly and with minimal resources.

● Optimization: Algorithm designers constantly seek ways to optimize their algorithms,

making them faster and more reliable.


● Implementation: Algorithms are implemented in various programming languages,

enabling computers to execute them and produce desired outcomes.

You require algorithms for the following reasons:

Scalability

It aids in your understanding of scalability. When you have a sizable real-world problem,

you must break it down into small steps to analyze it quickly.

Performance

The real world is challenging to break down into smaller steps. If a problem can be easily

divided into smaller steps, it indicates that the problem is feasible.

Types of Algorithms:

1. Brute Force Algorithm: A straightforward approach that exhaustively tries all

possible solutions, suitable for small problem instances but may become impractical for

larger ones due to its high time complexity.

2. Recursive Algorithm: A method that breaks a problem into smaller, similar

subproblems and repeatedly applies itself to solve them until reaching a base case,

making it effective for tasks with recursive structures.

3. Encryption Algorithm: Utilized to transform data into a secure, unreadable form

using cryptographic techniques, ensuring confidentiality and privacy in digital

communications and transactions.

4. Backtracking Algorithm: A trial-and-error technique used to explore potential

solutions by undoing choices when they lead to an incorrect outcome, commonly

employed in puzzles and optimization problems.

5. Searching Algorithm: Designed to find a specific target within a dataset, enabling

efficient retrieval of information from sorted or unsorted collections.


6. Sorting Algorithm: Aimed at arranging elements in a specific order, like numerical or

alphabetical, to enhance data organization and retrieval.

7. Hashing Algorithm: Converts data into a fixed-size hash value, enabling rapid data

access and retrieval in hash tables, commonly used in databases and password storage.

8. Divide and Conquer Algorithm: Breaks a complex problem into smaller subproblems,

solves them independently, and then combines their solutions to address the original

problem effectively.

9. Greedy Algorithm: Makes locally optimal choices at each step in the hope of finding

a global optimum, useful for optimization problems but may not always lead to the best

solution.

10. Dynamic Programming Algorithm: Stores and reuses intermediate results to avoid

redundant computations, enhancing the efficiency of solving complex problems

11. Randomized Algorithm: Utilizes randomness in its steps to achieve a solution, often

used in situations where an approximate or probabilistic answer suffices.

Conclusion:

The world of algorithms is continually evolving, with ongoing research and innovations

leading to the development of more efficient and specialized algorithms. From everyday

tasks to complex computational challenges, algorithms permeate various aspects of

modern life, underpinning technological systems and advancements.

As technology continues to progress, the potential applications of algorithms are limitless,

fueling progress and innovation across diverse fields.

Reference:
1. https://en.m.wikipedia.org/wiki/Algorithm

2. https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-an-algorithm#:~:

text=An%20algorithm%20is%20a%20set,to%20perform%20a%20particular%20task.

3. https://www.google.com/amp/s/www.geeksforgeeks.org/introduction-to-algorithms/a

mp/

4. https://www.britannica.com/science/algorithm

You might also like