Design and Analysis of Algorithms

Slides:



Advertisements
Similar presentations
Analysis of Computer Algorithms
Advertisements

Models of Computation Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms Week 1, Lecture 2.
MATH 224 – Discrete Mathematics
Theory of Computing Lecture 1 MAS 714 Hartmut Klauck.
Design & Analysis of Algoritms
I Advanced Algorithms Analysis. What is Algorithm?  A computer algorithm is a detailed step-by-step method for solving a problem by using a computer.
Introduction to Computer Programming in C
Unit 1. Sorting and Divide and Conquer. Lecture 1 Introduction to Algorithm and Sorting.
CS 103 Discrete Structures Lecture 01 Introduction to the Course
CS 390 Introduction to Theoretical Computer Science.
Fundamentals of Algorithms MCS - 2 Lecture # 1
Discrete mathematics Kwon, Taekyoung Courtesy of Dr. Michael P. Frank University of Florida.
Introduction to Algorithms Lecture 1. Introduction The methods of algorithm design form one of the core practical technologies of computer science. The.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
Introduction to Algorithms By Mr. Venkatadri. M. Two Phases of Programming A typical programming task can be divided into two phases: Problem solving.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
CSE 2320 Algorithms and Data Structures Dimitrios Kosmopoulos Introduction.
1Computer Sciences Department. Book: Introduction to Algorithms, by: Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein Electronic:
FUNDAMENTALS OF ALGORITHMS MCS - 2 LECTURE # 2. MODEL OF COMPUTATION REPRESENTATION OF ALGORITHMS.
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1.  A step by step process to solve any problem is called algorithm.  Algorithm is a process which take some values as input and provide us output.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
FURQAN MAJEED ALGORITHMS. A computer algorithm is a detailed step-by-step method for solving a problem by using a computer. An algorithm is a sequence.
CIS 313: Analysis and Design of Algorithms Assoc. Prof Hassan Aly Department of Computer Science and Information College of Science at AzZulfi Al-Majmaah.
RAIK 283 Data Structures and Algorithms
Design and Analysis of Algorithms
Advanced Algorithms Analysis and Design
Design and Analysis of Algorithms (09 Credits / 5 hours per week)
Applied Discrete Mathematics Week 2: Functions and Sequences
Analysis of Algorithms
GC101 Introduction to computers and programs
Data Structures and Algorithms
Unit 1. Sorting and Divide and Conquer
Introduction to the Design and Analysis of Algorithms
Piyush Kumar (Lecture 1: Introduction)
Piyush Kumar (Lecture 1: Introduction)
CPSC 311 Section 502 Analysis of Algorithm
Advance Analysis of Algorithms
Ch. 11 Theory of Computation
Course Description Algorithms are: Recipes for solving problems.
Algorithms Furqan Majeed.
CS 583 Fall 2006 Analysis of Algorithms
Data Structures (CS212D) Overview & Review.
Algorithm Design and Analysis
Lecture 3: Analysis of Algorithms
Definition In simple terms, an algorithm is a series of instructions to solve a problem (complete a task) We focus on Deterministic Algorithms Under the.
Design and Analysis of Algorithms (07 Credits / 4 hours per week)
Objective of This Course
Ch 2: Getting Started Ming-Te Chi
CMPT 438 Algorithms Instructor: Tina Tian.
Week # 1: Overview & Review
Algorithm Analysis and Design
Data Structures (CS212D) Overview & Review.
CSE 2010: Algorithms and Data Structures Algorithms
Design and Analysis of Algorithms
Algorithms Algorithm. [webster.com] A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps.
Piyush Kumar (Lecture 1: Introduction)
Course Description Algorithms are: Recipes for solving problems.
Algorithms Presented By:- Mr. Anup Ashok Shinde BBA (C.A) Dept.
Design and Analysis of Algorithms (04 Credits / 4 hours per week)
Design and Analysis of Algorithms
Divide and Conquer Merge sort and quick sort Binary search
Design and Analysis of Algorithms
Advanced Analysis of Algorithms
Algorithms and Data Structures
Welcome to the most Amazing course there is 
Presentation transcript:

Design and Analysis of Algorithms Lecture # 1 Muhammad Nasir Department of Computer Science COMSATS University Islamabad, Lahore Campus mnasir@cuilahore.edu.pk

About the Course Purpose: A brief introduction to Design and Analysis of Algorithms Lab or Programming Course: Math Course: No No Textbook: Introduction to Algorithms, second edition by Thomas H. Cormen

Pre-requisites Discrete Structures Data Structures

Course Evaluation Assignments Quizzes Term Projects / Reports S1 exam Final exam

Class Expectations Come to lectures on time and participate Keep up with reading material Complete assignments, projects, etc on time Submit clean, organized, and to the point reports

Key to Success Attendance Effort Consistency Pay attention to lectures and keep extra notes Ask questions Effort Do homework on your own. It’s ok to ask others but make your own effort. Consistency Keep up with reading, and homework.

Plagiarism Policy According to this policy, a student's submitted work must be the student's own. In this course, this policy will be applied to all work submitted for grade including exams, quizzes, homework, and projects.

Algorithm The word Algorithm comes from the name of the muslim author Abu Ja’far Mohammad ibn Musa al-Khowarizmi.

Introduction Algorithm: A computer algorithm is a detailed step-by- step method for solving a problem by using a computer. An algorithm is a sequence of unambiguous instructions for solving a problem in a finite amount of time. An Algorithm is well defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values as output.

Introduction sorting algorithms & Searching algorithms Algorithm: Most basic and popular algorithms are sorting algorithms & Searching algorithms

Introduction Algorithms and Programming: good understanding of algorithms is essential for a good programming Unlike a program, an algorithm is a mathematical entity, which is independent of a specific programming language, machine, or compiler. Algorithm design is all about the mathematical theory behind the design of good programs

Introduction Algorithms and Data Structures Efficient Algorithms require efficient Data Structures and vice versa Why Study Data Structures and Algorithms? For good algorithm design To be really complete algorithm designer, it is important to be aware of programming and machine issues as well They have various applications like databases, operating system, computer graphics , compilers and computer networks etc. a good understanding of algorithm design is a central element to a good understanding of computer science and good programming.

Course Outline Course will consist of four major sections: The first is on the mathematical tools necessary for the analysis of algorithms. This will focus on asymptotic, summations, recurrences. The second element will deal with one particularly important algorithmic problem: sorting a list of numbers. We will show a number of different strategies for sorting, and use this problem as a case-study in different techniques for designing and analyzing algorithms.

Course Outline The third one will deal with a collection of various algorithmic problems and solution techniques. Dynamic programming, greedy algorithms, graphs etc. Finally, a very brief introduction to the theory of NP- completeness. NP-complete problem are those for which no efficient algorithms are known, but no one knows for sure whether efficient solutions might exist.

Criterion for Analyzing Algorithms To design good algorithms, we must agree on the criterion for measuring the algorithms The emphasis is on the design of efficient algorithms

Criterion for Analyzing Algorithms Computational resources required an algorithm Running time Memory/space required An algorithm which requires less amount of running time and memory space will be called an efficient algorithm

Model of Computation Our analysis will be independent of the variations in: Machine hardware Operating system Compiler Programming language etc Algorithms need to understood by the people not machines

Model of Computation Ideally this model should be a reasonable abstraction of a standard generic single- processor machine We will call this machine as Random Access Machine

Random Access Machine (RAM) A Random Access Machine (RAM) is an ideal machine with Infinite large memory Executes one instruction at a time (no parallelism) Each instruction performs some basic operations on two values in memory

Basic RAM operations Basic operations include Assigning a value to a variable Performing basic arithmetic operation (+, -, *, /) on any size of integer values Accessing an element of an Array like array[100]

An Important Assumption Each basic operation takes same constant time to execute There is no difference between performing addition or multiplication on any size of the values

Running Time Analysis Criteria Worst case analysis Maximum running time over all (legal) inputs of size n Average case analysis average running time over all inputs of size n Best case analysis Running time over the best case input of size n We always look for the worst case running time