Department of Computer Science and Engineering, College of Engineering, Qatar University Course: CMPS 323 Design and Analysis of Algorithms Instructor: Khaled Bashir Shaban
Quiz #1 with Answers
Date: Wednesday 23th, 2011
Name: . ID: .
1- Order the followi

Backtracking
Backtracking
Backtracking is used to solve problems in which a sequence of objects is selected from a specified set so that the sequence satisfies some criterion. Backtracking is used to solve a class of problems known as Constraint Satisfac

The Greedy Approach
The Greedy Approach
Like Dynamic Programming, greedy algorithms are often used to solve optimization problems. In the greedy approach there is no division of the problem into smaller instances. No need for a recursive property
The gr

Dynamic Programming
Dynamic Programming
Similar to divide-and-conquer in that the problem instance is divided into smaller instances. It is a bottom-up approach. In this approach the small instances are solved first, their result is saved and retrieved l

Designing Algorithms Brute F B t Force
Dr. Khaled Bashir Shaban i
Brute Force
A straightforward approach, usually based directly on the problem's statement and definitions of the concepts involved Examples: 1. Computing an (a > 0, n a nonnegative integer)

Analyzing Iterative (Non-recursive) and Recursive Algorithms
Analyzing Iterative Algorithms -I Simple statement sequence: s1; s2; . ; sk (1) as long as k is constant Simple loops: for(i = 1; i n ; i+) cfw_ s; where s is in (1) n Time complexity is 1 = n

Efficiency Analysis of Algorithms
Dr. Khaled Bashir Shaban
What is Analysis of Algorithms ?
Algorithms devised to solve the same problem often differ dramatically in their efficiency. How do we measure the "efficiency" of an algorithm? Time complexity: H

Efficiency Analysis of Algorithms
What is Analysis of Algorithms ?
Algorithms devised to solve the same problem often differ dramatically in their efficiency. How do we measure the "efficiency" of an algorithm? Time complexity: How long does it take the

Lecture #1 #1
Introduction
Dr. Kh l d B hi Shaban D Khaled Bashir Sh b
What is an algorithm?
An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of

Qatar University College of Engineering Department of Computer Science and Engineering Course: CMPS 323 Design and Analysis of Algorithms Instructor: Khaled Bashir Shaban
Assignment #4
Due Date: Saturday, May 14th, 2011 Important Note: assignments are to

Qatar University College of Engineering Department of Computer Science and Engineering Course: CMPS 323 Design and Analysis of Algorithms Instructor: Dr. Khaled Bashir Shaban
Assignment #2 (with Answers) Due date Saturday, March 26th, 2011 (12:00 midnight

Qatar University College of Engineering Department of Computer Science and Engineering Course: CMPS 323 Design and Analysis of Algorithms Instructor: Khaled Bashir Shaban
Assignment #1 Due date Wednesday, March 16th, 2011 (12:00 midnight).
1. Order the fo