Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms.

Similar presentations


Presentation on theme: "CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms."— Presentation transcript:

1 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms Khawaja Mohiuddin Assistant Professor, Department of Computer Sciences Bahria University, Karachi Campus, Contact: khawaja.mohiuddin@bimcs.edu.pk Lecture # 1 - Introduction

2 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Your Responsibilities 2  As a Student  Attend classes regularly to avoid Attendance Shortage issue  Ask questions if you have any queries regarding course material or anything  Submit assignments in time  Don’t miss quizzes, assignments, mid term and final examinations – Can get good result  No Plagiarism is allowed in any sort of a written material. Write everything in your own words

3 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Course Policy 3  Assignments  Assignments are due at the beginning of class  Late assignments will not be accepted  All work has to be done independently except in case of group assignments  Students handing in similar assignments will receive a grade of 0 (ZERO) and face possible disciplinary actions  Makeup Exams  In accordance with university regulations, i.e. students should bring a valid excuse authenticated through valid channels immediately within first week after the exam  Otherwise they will be considered absent and no makeup exam for them  Mobile Phones  Cell phones are restricted during class. Cell phones must be turned off during the lecture. If your cell phone rings during the class, you may be asked to leave

4 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Course Policy 4  Attendance  Students are expected to attend all classes  If a student misses 10 hours in total without an acceptable reason, the student will be barred from the final exams  Code of Conduct  The assignments, quizzes and exams need to be done individually. Copying of another student's work or code, even if changes are subsequently made, is inappropriate, and such work or code will not be accepted  The University has very clear guidelines for academic misconduct, and they will be enforced in this class  In case of group assignments, copying of another group’s work or code, even if changes are subsequently made, is inappropriate, and such work or code will not be accepted

5 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Marks Distribution 5 ActivitiesMarks Quizzes10 Assignment # 1 and 2 (Theory + Exercises - Individual) 10 Assignment # 3 (Coding – in Groups of 3 or less) 10 Mid Term20 Final Term50 Total100

6 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Recommended Books 6  Text Book  Himanshu, D. P. (2014). Design and Analysis of Algorithms (2nd ed.). Pearson (New Delhi).  Reference Books  Stephens, R. (2013). Essential Algorithms: A Practical Approach to Computer Algorithms. Wiley  Cormen, T. H. (2012). Introduction to Algorithms (3rd ed.). PHI Learning.

7 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Essential Mathematical Background 7  Sets  A set is a collection of entities that can be identified  The entities are called members or elements of the set  Sets are characterised by the concept of membership, denoted by symbol  a S implies entity a is a member of the set S  A set can be finite, for example, the set of non-negative integers less than 5  A small finite set is normally written completely, for example, {1,2,3,4}  A set can be empty, for example, a set of all human beings aged more than 500 years  Such a set is also called null-set and denoted by symbol Ф  A set can be infinite, for example, a set of all C programs  This is not a finite set, since no matter how large a program you write, it is possible to write a larger one by inserting another statement

8 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Essential Mathematical Background 8  Notation of Sets  Usually, two notations are used to specify sets:  Enumeration: for example {0,1,2,3,4}  Set-Builder Form or Predicate Form: {x | P(x)} where P(x) is a predicate that describes a property of all elements x  {x S | P(x)} equivalent to {x| x S ٨ P(x)}  For example, {x | x is an integer ٨ 0 ≤ x ٨ x < 5}  There are few sets used frequently that are called Special sets  N : the set of natural numbers (usually including 0)  Z : the set of integers  Q : the set of rational numbers  R : the set of real numbers  I : the set of imaginary numbers  C : the set of complex numbers

9 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Essential Mathematical Background 9  Relationships Between Sets  Subset  Superset  Proper Subset  Disjoint  Set Operations  Let U denote the Universal set that is common set from which elements of sets are selected  The following operations on sets are defined:  Union  Intersection  Complement  Set Difference  Cartesian Product  Power Set

10 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Essential Mathematical Background 10  Sequences and Series  A sequence of objects is a list of these objects in some order. We usually designate a sequence by writing the list within parentheses. For example, the sequence 7, 21, 63 would be written (7, 21, 63)  In sets, order does not matter but in sequence it does matter  Sequence can be finite or infinite  Finite Sequence is often called as “TUPLE”  A sequence with n-elements is a n-tuple. Thus (7, 21,63) is a 3-tuple  A 2-tuple is also called a “PAIR”  A series is a summation of terms in a sequence. For example the corresponding series is the sum "7 + 21 + 63", and the value of the series is 91.

11 CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Essential Mathematical Background 11  Upper and Lower Bounds of a Set  Upper Bound: Any number that is greater than or equal to all of the elements of a given set  Lower Bound: Any number that is less than or equal to all of the elements of a given set  For example: 5 is lower bound for the set { 5, 10, 34, 13934 }, but 8 is not. 42 is both an upper and a lower bound for the set { 42 }; all other numbers are either an upper bound or a lower bound for that set.  World’s strongest man claims he can lift 70 kg with his little finger rounded to the nearest 10kg. What is the smallest and greatest amount he can lift?


Download ppt "CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms."

Similar presentations


Ads by Google