L01-02 - 8.11.2022 - Introduction To Algorithms and Roadmap of This Course
L01-02 - 8.11.2022 - Introduction To Algorithms and Roadmap of This Course
• A Problem is specified by
1. The givens (a formulation)
• A set of objects
• Relations between them
2. The query
• The information one is trying to extract from the formulation, the question to answer
• An algorithm is a method or procedure that solves instances of a
problem
• ‘Algorithm’ is a distortion of Al-Khawarizmi, a Persian mathematician
Real World Computing World
Objects represented by… data Structures, ADTs, Classes
Relations implemented with… relations & functions (e.g., predicates)
Actions Implemented with… algorithms: a sequence of instructions
Algorithms Basic: Formal Definition
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Comparisons
Sorting Nearly Sorted Random Reversed
Algorithms
Bubble Sort
Insertion Sort
Selection Sort
Algorithms Basic: Sorting
Sorting Algorithms
Non-
Comparisons Sort Comparis
ons Sort
Merge
insert
Cockt
Insert Selec Odd- ion Count
Bubbl Quick Heaps Shells Merge Intros ail Cycle Smoo Timso Radix Bucke
ion tion even (Ford- ing
e Sort sort ort ort sort ort shake sort thsort rt sort t sort
sort sort sort Johns sort
r sort
on)
sort
Algorithms
Analysis Designs Paradigm
Solving Sorting
Asympto Dynamic Sorting & Graph
Recurren and Divide & Greedy Backtrac
tic Program Searchin Algorith
ce Searchin Conquer Method king
Analysis ming g ms
Relations g
Algorithms Basic: Sorting
Sorting Algorithms
Non-
Comparisons Sort Comparis
ons Sort
Merge
Cock insert
Bubb Hea Merg Inser Sele Odd- tail Cycl ion Smo Coun Radi Buck
Quic Shell Intro Tims
le psor e tion ction even shak e (Ford- oths ting x et
ksort sort sort sort Johns ort
Sort t sort sort sort er sort ort sort sort sort
sort on)
sort
Merge Sort
Quick Sort
Calculate pow(x, n)
Count Inversions
Tiling Problem
Non-
Compariso
Compariso
ns Sort
ns Sort
Egyptian Fraction
Lists Based Job Sequencing Problem
Huffman Coding
Greedy Method
Dial’s Algorithm
Backtracking
The Knight’s
Rat in a N Queen m Coloring Hamiltonian Solving
Print all tour Subset Sum Sudoku Tug of War
Maze Problem Problem Cycle Cryptarithm
permutation problem
etic Puzzles
s of a given
string
Dynamic programming
Program Bellman
Longest Longest Longest Floyd
Matrix 0-1 for –Ford Largest
Increasi Commo Edit Palindro Warshal Ugly Subset
Coin Chain Knapsac Fibonac Algorith Indepen Tiling
ng n Distanc mic l Number Sum
Change Multipli k ci m for dent Set Problem
Subsequ Subsequ e Subsequ Algorith s Problem
cation Problem number Shortest Problem
ence ence ence m
s Paths
Graph Algorithm
DFS and BFS Minimum Spanning Tree
Graph Algorithm
Dijkstra’ Tarjan’s
Johnson Articulat Fleury’s Algorith
Dijkstra’ s
’s Shortest ion Algorith Strongly Euler m to
s Algorith Bellman Floyd Biconne
algorith Path in Points Biconne Bridges Eulerian m for Connect Circuit find
shortest m for –Ford Warshall cted
m for Directed (or Cut cted in a path and printing ed in a Strongly
path Adjacen Algorith Algorith Compon
All-pairs Acyclic Vertices graph graph circuit Eulerian Compon Directed Connect
algorith cy List m m ents
shortest Graph ) in a Path or ents Graph ed
m Represe
paths Graph Circuit Compon
ntation
ents
Graph Algorithm
Find Vertex
Ford- maximum Travelling
Fulkerson Graph Travelling Cover K Centers
number of Find Salesman
Algorithm Coloring Greedy Salesman Problem Problem
edge minimum Maximum Channel Problem
for (Introducti Algorithm Problem Hamiltonia (Introducti (Greedy
disjoint s-t cut in a Bipartite Assignment (Naive and
Maximum on and for Graph (Approxim n Cycle on and Approxima
paths flow Matching Problem Dynamic
Flow Application Coloring ate using Approxima te
between network Programmi
Problem s) MST) te Algorithm)
two ng)
Algorithm)
vertices
• Lecture slides.
• Download code.
• Summary of content.
http://algs4.cs.princeton.edu
11/8/2022
• https://visualgo.net/en/sorting
• https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
• https://www.toptal.com/developers/sorting-algorithms/insertion-
sort
• https://www.geeksforgeeks.org/insertion-sort/
• Introduction to Algorithms, Third Edition (International Edition),
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford
Stein, ISBN-13: 978-0262033848.
• https://www.hackerearth.com/practice/algorithms/sorting/insertion
-sort/practice-problems/
• https://www.codechef.com/problems/SOPC03
Md. Sabir Hossain, Asst. Professor, Dept. of CSE, CUET.
Allah Hafez & Best Wishes
https://www.westernsydney.edu.au/research/researchers/preparing_a_grant_applicati
on/dest_definition_of_research#:~:text=Research%20is%20defined%20as%20the,to%20ne
w%20and%20creative%20outcomes.