css106 introduction to elementary algorithms m.sc askar satabaldiyev
TRANSCRIPT
![Page 1: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/1.jpg)
CSS106 Introduction to Elementary
AlgorithmsM.Sc Askar Satabaldiyev
![Page 2: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/2.jpg)
What is an “algorithm”?
![Page 3: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/3.jpg)
algorithm(noun):a set of steps
to accomplish a task
![Page 4: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/4.jpg)
•Go to bus station
![Page 5: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/5.jpg)
•Go to bus station• Take a bus
![Page 6: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/6.jpg)
•Go to bus station• Take a bus•Go to university
![Page 7: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/7.jpg)
•Go to bus station• Take a bus•Go to university (!)
![Page 8: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/8.jpg)
• Slice bread
![Page 9: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/9.jpg)
• Slice bread•Apply cheese
![Page 10: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/10.jpg)
• Slice bread•Apply cheese•Get your cheese toast
![Page 11: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/11.jpg)
Computer Science algorithms
![Page 12: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/12.jpg)
Start with an input data
![Page 13: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/13.jpg)
Start with an input data
Do complex calculations
![Page 14: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/14.jpg)
Start with an input data
Do complex calculations
Stop when we find answer
![Page 15: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/15.jpg)
Computer Science
![Page 16: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/16.jpg)
a few examples…
![Page 17: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/17.jpg)
![Page 18: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/18.jpg)
Compression algorithms
![Page 19: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/19.jpg)
Finding optimal route algorithms
![Page 20: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/20.jpg)
rendering algorithms
![Page 21: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/21.jpg)
Optimization and scheduling algorithms
![Page 22: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/22.jpg)
Which algorithms will you use?
![Page 23: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/23.jpg)
Make your programs
FASTER
![Page 24: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/24.jpg)
![Page 25: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/25.jpg)
![Page 26: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/26.jpg)
Which algorithms could you CREATE?
![Page 27: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/27.jpg)
![Page 28: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/28.jpg)
![Page 29: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/29.jpg)
Big Data Analysis
![Page 30: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/30.jpg)
What makes a good algorithm?
![Page 31: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/31.jpg)
What makes a good algorithm?
1. Correctness
2. Efficiency
![Page 32: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/32.jpg)
![Page 33: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/33.jpg)
Asymptotic Analysis
#nodes Nearest insertion
Brute force
1 1 1
2 4 1
3 9 2
4 16 6
…
25 625 620448401733239439360000
N2 N!
![Page 34: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/34.jpg)
k = 0;for (i = 1; i <= N; i++) if (N % i == 0) k++;
return k == 2;
for (i = 2; i < n; i++) if(N % i == 0) return false;return true;
another method…
for (i = 2; i < sqrt(n); i++) if(N % i == 0) return false;return true;
Which one is faster?
![Page 35: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/35.jpg)
Grading Policy
![Page 36: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/36.jpg)
Attendance 10%Midterm Exam 20%Assignment 15%Homework 15%Quizes 10%Final Exam 30%Contests/Codeforces/Bonus 20%Total 100%(+20?)
Grading Policy
![Page 37: CSS106 Introduction to Elementary Algorithms M.Sc Askar Satabaldiyev](https://reader036.vdocument.in/reader036/viewer/2022062409/56649eab5503460f94bb04b8/html5/thumbnails/37.jpg)
Intro to algorithms 01.Sept – 04.SeptBinary Search/Asymptotic notations
07.Sept – 11.Sept
Selection sort/Insertion sort 15.Sept – 18.SeptRecursive algorithms 22.Sept – 25.SeptTowers of Hanoi/Merge Sort/Quick sort
29.Sept – 02.OctGraph Representation 05.Oct – 09.OctBreadth-first search 12.Oct – 16.OctMidterm Exam 19.Oct – 23.Oct
Upcoming Topics