This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

Number of credits: 5 Lectures: M and W 10-11 F 9-10 Tutorials: one hour per week there are 4 batches for Tutorials Practical: two hours per week there are 3 batches room no W204

EC251 Fall 2008 Rajdeep Niyogi IITR

1

Lab Batches Tuesday 2-4pm CSE 070801 to 070831 Wed 3-5pm ECE 070501 to 070535 Ths 2-4pm remaining students Fix your machine and work all throughout the semester. If it has to be changed, inform me and the lab assistants.

EC251 Fall 2008 Rajdeep Niyogi IITR 2

Tutorial batches W: 2-3pm ECE 070501 to 070524 (24) 3-4pm CSE 070801 to 070824 (24) 4-5pm CSE remaining and IDD CSE 12-1pm remaining of ECE + IDD ECE and back F: EC251 Fall 2008 Rajdeep Niyogi IITR 3 .

ernet.in office: S211 Preference: meeting with students by appointment Lab instructors: R Niyogi for two batches A Mittal for the other batch EC251 Fall 2008 Rajdeep Niyogi IITR 4 .Instructors Course and Tutorial instructor: R Niyogi rajdpfec@iitr.

quiz PRS: laboratory exercises All announcements regarding the course Will be made in the classroom. EC251 Fall 2008 Rajdeep Niyogi IITR 5 .Components Relative weightage: ETE 40 MTE 30 PRS 15 CWS 15 CWS: constitutes tutorial.

EC251 Fall 2008 Rajdeep Niyogi IITR 6 . and applications in C++ by Sartaj Sahni. and Lieserson. 2001 Data Structures. 1985 ♣ Introduction to Algorithms by Cormen. algorithms.Suggested Books Data Structures and algorithms in C++ by Adam Drozdek. 2001 Algorithms and Data Structures by Niklaus Writh. Rivest.

Binary tree. [wkpd] Data structures that are commonly used: 1. Stack 4. Queue 5. Heap 6.Introduction Data structures provide a way of storing data in a computer so that it can be used efficiently. Linked list 3. K-ary tree EC251 Fall 2008 Rajdeep Niyogi IITR 7 . Array 2.

design a new data structure. for an application in mind we need to suggest which DS is suitable for the purpose. If none suits properly.Introduction It is not appropriate to compare two DSs to suggest that x is better than y Rather. EC251 Fall 2008 Rajdeep Niyogi IITR 8 .

EC251 Fall 2008 Rajdeep Niyogi IITR 9 . What are we going to do with x ? This in turn implies what are we going to do with d? This in turn suggests some operations on the data set. for some data set d we have designed or have decided to use a DS say x.Introduction Given.

Introduction some operations on the data set: Example: Array: our first data structure Say we have an array of integers Int alpha[5] alpha = [3. Sort the array to get [1. Multiply each element with itself i. a2 Here we are concerned with operations on a static data EC251 Fall 2008 Rajdeep Niyogi IITR 10 .2. Increase/decrease the middle element by one 4.5] 1.7.e..2.7. Reverse the array to get [5.1.7] 3.5.3.2.1.3] 2.

How can this be achieved? The intended operation is to shrink the data set by one. EC251 Fall 2008 Rajdeep Niyogi IITR 11 . Thus the data set cannot grow! This provides the motivation to talk about efficient DSs that will serve the purpose. When we use an array: the objective is satisfied partially. Suppose we want to remove the middle element of ‘alpha’. Data sets that can shrink or grow. In the computer memory the array size remains the same! We already know that the operation alpha[5] is undefined.Motivation Our concern is regarding dynamic data.

w. Shortly we shall encounter another data structure called Tree. EC251 Fall 2008 Rajdeep Niyogi IITR 12 . Proof: to be established in due course .t this example array is better than tree Claim: for static data. arrays are the best choice.r.Motivation It should however be noted that arrays provide an excellent way to store and organize data.

Find the element with maximum value 4.Motivation Operations on dynamic data 1. Add a new element 2. Delete an element from the data set 3. Find the element with minimum value 5. Find the next highest. smallest valued element EC251 Fall 2008 Rajdeep Niyogi IITR 13 .

Motivation Let us consider the operations 3-5: Consider a tree representation of the data set 3 2 1 7 5 EC251 Fall 2008 Rajdeep Niyogi IITR 14 .

A data structure should also reflect. resemble the convenient way that humans normally store or represent data. EC251 Fall 2008 Rajdeep Niyogi IITR 15 . Trees are the intuitive data structure for the purpose. The example is too trivial to suggest opting for trees. DSs are for some application in mind.Motivation Now we ask the question: when should we consider arrays and when trees? As we said. Now consider representing a family tree.

How to priority queue represent this feature? If a person wants to know whether there is a rail connectivity between two locations what does he normally refer to? Map (technically. we call it a graph) EC251 Fall 2008 Rajdeep Niyogi IITR 16 .Motivation Some common representations of data by humans: pyramid How does a fruit vendor store oranges. mangoes? How does an office clerk store the office files? stack When a person goes to a railway counter to buy a ticket what does he see (normally) before him? queue Often we find someone from behind getting his ticket.

state administration? K-Tree How can we represent file systems in a computer? K-Tree How can we represent the internet domain naming system? K-Tree If someone encounters the word “nepotism” for the first time.Motivation Some common representations of data by humans (contd. what should he do? Dictionary EC251 Fall 2008 Rajdeep Niyogi IITR 17 .) How can we represent an office hierarchy.

Algorithms and DSs An Algorithm designer is not concerned with DSs. The only (sufficient) prerequisite for doing the verification is the knowledge of sets. • Generally. in most cases. • We should be able to verify its functioning with a pen and a paper. lists. EC251 Fall 2008 Rajdeep Niyogi IITR 18 . an algorithm should be independent of the DS (actually) used.

well-designed data structure leads to better performance. Thus the aims of this course : • To understand the elementary DSs (operations. usefulness) • To implement the DSs • To analyze and test the performance of the DSs EC251 Fall 2008 Rajdeep Niyogi IITR 19 . A good. a data structure is used---whether it is good or bad.Aims of the course When we implement an algorithm. applications.

and for independently designing efficient DSs EC251 Fall 2008 Rajdeep Niyogi IITR 20 .Objective of this course The objective is to provide a foundation for understanding advanced data structures.

computing model. worst-case. average case) • brief introduction to basic mathematical objects (sets.computer • Analyzing algorithms (best-case.The Flow of the course How do we intend to meet our aims and objectives? • Brief ideas of algorithms. trees) • consider elementary DSs EC251 Fall 2008 Rajdeep Niyogi IITR 21 . graphs.

implementing the DSs.Course Structures • In the lectures we shall use pseudocodes for understanding. EC251 Fall 2008 Rajdeep Niyogi IITR 22 . • In the practicals we shall implement the DSs using an object-oriented language (C++) • In the Tutorials we shall do exercises to acquire knowledge on the theoretical aspects of DSs. analyzing.

lab] Decorum [do not create disturbance in the classroom] • • • • this adversely affects the Instructor It also affects your classmates the overall class performance goes down this leads to wasting time Honesty [if you think the Instructor did not explain some points clearly. make it a point to contact him personally and ensure that the doubt is clarified.] EC251 Fall 2008 Rajdeep Niyogi IITR 23 . skip-in-toto—institute rules [end of lec. TAs.When can we achieve? Sincerity [be punctual in coming to the class.] feel free to contact me without any hesitation on any matters regarding the course. and lab assistants] most imp. Cooperation [with all Instructors.. Class Attendance: obs. tut.

algo

algo

- MOC-2791
- Software Architecture of NetSimQ
- UML 2 Deployment Diagram
- Assignment Object DataBase
- uml5
- Efficient Reverse Top-k Boolean Spatial Keyword Queries on Road Networks.pdf
- Mathematical Requirements 1
- Bab 10 Error Detect
- An Introduction to IIFEs - Immediately Invoked Function Expressions
- Lisp
- dsm
- QP1
- Untitled
- Feeder terminal
- l9 - 39p Taner ERKAN c++ Dersi
- Comp Sec Assign 2
- Rose
- MELJUN CORTES SOFTWARE ENGINEERING 6
- bobj
- Ab Initio Interview Questions
- DM7490A
- Eclipse and Java 8 - Eclipse Day India 2013
- Adaptive Huffman
- Assignments
- sql
- Linked List - Phone Address
- 11 - Indexers
- VirtualToPhysicalCellularMachines2010v1
- Com Bi National Circuits
- Formal Specification of Computing Systems

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd