Download presentation
Presentation is loading. Please wait.
1
Advance Analysis of Algorithms
Lecture # 1 MS(Computer Science) Semester 1 Fall 2017 Advance Analysis of Algorithms
2
Course Information Course Title Course Blog Grading Policy
Advanc Analysis of Algorithms Credit Hours 03 Course Blog Grading Policy Mid Term Examination = 25 Marks Final Term Examination = 50 Marks Attendance Marks = 10 Marks Sessional Marks = 15 Marks
3
Course Information Reference Books Other Books
Approximation Algorithms by Vijay V. Vazirni, Springer, 2004. Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, 2nd edition, published by MIT Press, 2001 Algorithms and Theory of Computation Handbook, by Mikhail J. Atallah Contributor Mikhail J. Atallah, CRC Press, 1998. Other Books Introduction to Design & Analysis Computer Algorithm 3rd, Sara Baase, Allen Van Geleder, Adisor-Wesley 2000. Algorithms, Richard Johnsonbaugh, Marcus Schaefer, Prentice Hall, 2004 Introduction to The Design and Analysis of Algorithms 2nd Edition Anany Levitin, Adison-Wesley, 2007.
4
Course Information Supporting Material Class Assessment Tools
Lecture Slides & Notes Research Articles Class Assessment Tools Assignments Presentations Research Articles Reading Research Paper Writing
5
Course Information Course Objective
Design and Analysis of Modern Algorithms Different variants Efficiency Accuracy Comparing Efficiencies Motivation Thinking New Algorithms Advanced Designing Techniques Real World Research Problems will be taken as example. Major focus of the subject is to Study Algorithms in Research Perspective.
6
Course Information Expected Results
On successful completion of this courses, students will be able to Understand, analyze algorithms Argue and prove correctness of algorithms Analyze Time and Space Complexity of Algorithms Understand algorithm design approaches Use of graph theory in Problem Solving Understand advance analysis and design topics. Easily analyze existing algorithms and able to propose more efficient and effective algorithm for any real life research problem / situation.
7
Course Objectives This course introduces students to the analysis and design of computer algorithms. Upon completion of this course, students will be able to do the following: Analyze the asymptotic performance of algorithms. Demonstrate a familiarity with major algorithms and data structures. Apply important algorithmic design paradigms and methods of analysis. Synthesize efficient algorithms in common engineering design situations.
8
Course Outline Preliminaries : different types of algorithms, analyzing methodologies, notations, proof techniques and limits. Asymptotic Notation : different notations and their examples, standard notations and their common functions. Analysis of Algorithms : analyzing control structures, using barometer instruction, amortization, and different examples for analysis and solving recurrences. Structures: use of arrays, stacks, queues, records, pointers, lists, graphs, trees, hash tables, heaps and binomial heaps. Searching/Sorting Algorithms : Various searching and sorting algorithms and their comparisons.
9
Course Outline
10
Algorithms ABU JAFAR MUHAMMAD IBN MUSU AL-KHOWARIZMI:
Abu Ja'far Muhammad ibn Musa Al-Khwarizmi [Born: about 780 in Baghdad (now in Iraq). Died: about 850] An algorithm, named after the ninth century scholar Abu Jafar Muhammad Ibn Musu Al-Khowarizmi.
11
Algorithm Informal Definition
What is an Algorithms ?
12
Algorithm Concepts What is Data Structure?
A data structure is a systematic way of organizing and accessing data. Some basic data structure as follows. Array Link List Stacks Queues Trees What is Program? Program is an implementation of an algorithm in some programming language. Data structure + Algorithm = Program
13
Design & Analysis of Algorithms
The “design” pertains to i. The description of algorithm at an abstract level by means of a pseudo language, and ii. Proof of correctness that is, the algorithm solves the given problem in all cases. 2. The “analysis” deals with performance evaluation (complexity analysis).
14
Problem, Solution and Tools
A computer does not solve problems; it's just a tool that I can use to implement my plan for solving the problem. A computer program is a set of instructions for a computer. These instructions describe the steps that the computer must follow to implement a plan. An algorithm is a plan for solving a problem. A person must design an algorithm. A person must translate an algorithm into a computer program. Algorithm Development Process Understand the problem Design an algorithm and proper data structures Analyze the algorithm Code the algorithm
15
What is a good algorithm?
Good algorithm is an efficient algorithm. What does efficient means? Efficient is something, which has small running time and takes (spaced used) less memory. We would be spending more time on analyzing the running time of an algorithm. We will also spend some time on analyzing the space. Efficiency of algorithms is as a function of input size.
16
How to Calculate Running Time
analyze running time in the best case (usually useless) worst case (we focus on the worst case running time) average case (very useful but often difficult to determine)
17
Theoretical Analysis of Running Time
Uses a pseudo-code description of the algorithm instead of an implementation Characterizes running time as a function of the input size, n Takes into account all possible inputs Allows us to evaluate the speed of an algorithm independent of the hardware/software environment
18
Pseudocode Example: find max element of an array
In this course, we will mostly use pseudocode to describe an algorithm Pseudocode is a high- level description of an algorithm More structured than English prose Less detailed than a program Preferred notation for describing algorithms Hides program design issues Algorithm arrayMax(A, n) Input: array A of n integers Output: maximum element of A currentMax A[0] for i 1 to n 1 do if A[i] currentMax then currentMax A[i] return currentMax
19
Pseudocode Details Algorithm arrayMax(A, n)
Input: array A of n integers Output: maximum element of A currentMax A[0] for i 1 to n 1 do if A[i] currentMax then currentMax A[i] return currentMax Control flow if … then … [else …] while … do … repeat … until … for … do … Indentation replaces braces Method declaration Algorithm method (arg, arg…) Input … Output …
20
Pseudocode Details Method call Return value Expressions
Algorithm arrayMax(A, n) Input: array A of n integers Output: maximum element of A currentMax A[0] for i 1 to n 1 do if A[i] currentMax then currentMax A[i] return currentMax Method call var.method (arg [, arg…]) Return value return expression Expressions Assignment (like in Java) Equality testing (like in Java) n2 superscripts and other mathematical formatting allowed
21
Primitive Operations For theoretical analysis, we will count primitive or basic operations, which are simple computations performed by an algorithm Basic operations are: Identifiable in pseudocode Largely independent from the programming language Exact definition not important (we will see why later) Assumed to take a constant amount of time
22
Primitive Operations Examples of primitive operations:
Evaluating an expression x2+ey Assigning a value to a variable cnt cnt+1 Indexing into an array A[5] Calling a method mySort(A,n) Returning from a method return(cnt)
23
Real-World Applications
Hardware design: VLSI chips Compilers Computer graphics: movies, video games Routing messages in the Internet Searching the Web Distributed file sharing Computer aided design and manufacturing Security: e-commerce, voting machines Multimedia: CD player, DVD, MP3, JPG, HDTV DNA sequencing, protein folding and many more!
24
Some Important Problem Types
Sorting a set of items Searching among a set of items String processing text, bit strings, gene sequences Graphs model objects and their relationships Combinatorial find desired permutation, combination or subset Geometric graphics, imaging, robotics Numerical continuous math: solving equations, evaluating functions
25
Algorithm Design Techniques
Brute Force & Exhaustive Search follow definition / try all possibilities Divide & Conquer break problem into distinct subproblems Transformation convert problem to another one Dynamic Programming break problem into overlapping subproblems Greedy repeatedly do what is best now Iterative Improvement repeatedly improve current solution Randomization use random numbers
26
FURTHER DISCUSSION NEXT WEEK …………….
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.