100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

Analysis and Design of Algorithms - Lecture Notes

Rating
-
Sold
-
Pages
78
Uploaded on
01-04-2023
Written in
2022/2023

The Algorithms lecture notes PDF provides a comprehensive overview of the principles and techniques used in designing efficient algorithms for solving various computational problems. The notes cover a wide range of topics, including sorting and searching algorithms, graph algorithms, dynamic programming, and greedy algorithms, among others. The notes also provide a detailed analysis of time and space complexity, and how to measure and optimize the performance of algorithms. Overall, these lecture notes are an excellent resource for students and professionals who are interested in learning and mastering the art of algorithm design.

Show more Read less
Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
April 1, 2023
Number of pages
78
Written in
2022/2023
Type
Class notes
Professor(s)
K singh
Contains
All classes

Subjects

Content preview

CONTENTS

MODULE – I

Lecture 1 - Introduction to Design and analysis of algorithms
Lecture 2 - Growth of Functions ( Asymptotic notations)
Lecture 3 - Recurrences, Solution of Recurrences by substitution
Lecture 4 - Recursion tree method
Lecture 5 - Master Method
Lecture 6 - Worst case analysis of merge sort, quick sort and binary search
Lecture 7 - Design and analysis of Divide and Conquer Algorithms
Lecture 8 - Heaps and Heap sort
Lecture 9 - Priority Queue
Lecture 10 - Lower Bounds for Sorting

MODULE -II

Lecture 11 - Dynamic Programming algorithms
Lecture 12 - Matrix Chain Multiplication
Lecture 13 - Elements of Dynamic Programming
Lecture 14 - Longest Common Subsequence
Lecture 15 - Greedy Algorithms
Lecture 16 - Activity Selection Problem
Lecture 17 - Elements of Greedy Strategy
Lecture 18 - Knapsack Problem
Lecture 19 - Fractional Knapsack Problem
Lecture 20 - Huffman Codes

MODULE - III

Lecture 21 - Data Structure for Disjoint Sets
Lecture 22 - Disjoint Set Operations, Linked list Representation
Lecture 23 - Disjoint Forests
Lecture 24 - Graph Algorithm - BFS and DFS
Lecture 25 - Minimum Spanning Trees
Lecture 26 - Kruskal algorithm
Lecture 27 - Prim's Algorithm
Lecture 28 - Single Source Shortest paths
Lecture 29 - Bellmen Ford Algorithm
Lecture 30 - Dijkstra's Algorithm

MODULE -IV

Lecture 31 - Fast Fourier Transform
Lecture 32 - String matching
Lecture 33 - Rabin-Karp Algorithm
Lecture 34 - NP-Completeness
Lecture 35 - Polynomial time verification
Lecture 36 - Reducibility
Lecture 37 - NP-Complete Problems (without proofs)
Lecture 38 - Approximation Algorithms
Lecture 39 - Traveling Salesman Problem

, MODULE - I

• Lecture 1 - Introduction to Design and analysis of algorithms

• Lecture 2 - Growth of Functions ( Asymptotic notations)

• Lecture 3 - Recurrences, Solution of Recurrences by substitution

• Lecture 4 - Recursion tree method

• Lecture 5 - Master Method

• Lecture 6 - Design and analysis of Divide and Conquer Algorithms

• Lecture 7 - Worst case analysis of merge sort, quick sort and binary search

• Lecture 8 - Heaps and Heap sort

• Lecture 9 - Priority Queue

• Lecture 10 - Lower Bounds for Sorting

, Lecture 1 - Introduction to Design and analysis of algorithms


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,
• boilit, add tea leaves,
• Add sugar, and then serve it in cup.

What is Computer algorithm?

‘’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 algorithmsrun on computers or computational devices.Forexample, GPS in our
smartphones, Google hangouts.

GPS uses shortest path algorithm. Online shopping uses cryptography which uses RSA
algorithm.

Characteristics of an algorithm:-

• Must take an input.
• Must give some output(yes/no,valueetc.)
• Definiteness –each instruction is clear and unambiguous.
• Finiteness –algorithm terminates after a finite number of steps.
• Effectiveness –every instruction must be basic i.e. simple instruction.

, Expectation from an algorithm

• Correctness:-
 Correct: Algorithms must produce correct result.
 Produce an incorrect answer:Even if it fails to give correct results all the time still
there is a control on how often it gives wrong result. Eg.Rabin-Miller PrimalityTest
(Used in RSA algorithm): It doesn’t give correct answer all the time.1 out of 250 times
it gives incorrect result.
 Approximation algorithm: Exact solution is not found, but near optimal solution can
be found out. (Applied to optimization problem.)
• Less resource usage:
Algorithms should use less resources (time and space).


Resource usage:
Here, the time is considered to be the primary measure of efficiency .We are also
concerned with how much the respective algorithm involves the computer memory.But
mostly time is the resource that is dealt with. And the actual running time depends on a
variety of backgrounds: like the speed of the Computer, the language in which the
algorithm is implemented, the compiler/interpreter, skill of the programmers etc.
So, mainly the resource usage can be divided into: 1.Memory (space) 2.Time


Time taken by an algorithm?
 performance measurement or Apostoriori Analysis: Implementing the algorithm
in a machine and then calculating the time taken by the system to execute the program
successfully.
 Performance Evaluation or Apriori Analysis. Before implementing the algorithm in a
system. This is done as follows
$5.98
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
abhisek05

Get to know the seller

Seller avatar
abhisek05 Panjab University
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions