Docstoc

Data Structures Lecture-1_Introduction

Document Sample
Data Structures Lecture-1_Introduction Powered By Docstoc
					Data Structures
  Lecture-1:
 Introduction
Instructor
                       Nawazish Naveed
  Online     course content and coordination:
       Group:
            To be announced.
       Teaching Assistant:
            To be Announced
       Office Hours
            Will be announced with course of time
Pre-Requisites
   Must have Good OOP Concepts

   Good programming skills

   Familiar with programming using MFC
Books
   Data Structures and Algorithms
    By A. V. Aho, J. E. Hopcroft, J. D. Ullman

   Introductions to algorithms by Thomas H.Cormen,
    Leiserson, Rivest and Stein.
   Data Structures Using C and C++
    By Y. Langsam, M. J. Augenstein, A. M. Tenenbaum

   Schaum's Outline Series, Theory and problems of Data
    Structures By Seymour Lipschutz

Some topics will be covered from other books. Material will
                be provided for these topics.
Grading(not rigid)

Assignments           15 %
Quizzes               15 %
Projects              10 %
Sessionals            20 %
Final                 40 %
              Total   100 %
Projects/Homeworks
submission
 Deadlines are always final
 Submission guidelines must be followed.
 Submit compressed files (rar,zip).
 Name your submission folder in the format
  RollNo_Name_HW#
 e.g. 123_Umar_HW#3
 No grouping is allowed in assignments.
Late assignments
 To cater for emergencies however,
  everyone gets 3 late days.
 The concept is that you can use these at
  your discretion any time during this course
  for regular assignments (not for project).
Homework Assignments
       Will be made very often in the class or lab
        with an opportunity for class discussion of
        answers.

       Answers for some problems can be
        discussed in class and others will be your
        responsibility.

       You should do all exercises by the stipulated
        time.

       It is important that you do the homework.
        Many (but not all) of the exam questions are
        similar to those assigned in the homework.
8
Quizzes
       Exact dates will be announced sometimes for the
        quizzes. Mostly there will be snap quiz.

       If quiz are missed due to illness, I must have a doctor
        or health center excuse explaining why you could not
        take the exam on that date.

       Makeup quiz, available only with pre-notification and
        prearrangement are often harder than the original.

       Excuses other than the above are not acceptable.

       The exams are prescheduled by the department as
        noted previously.
9
Policy Regarding Exams
    If you feel that you have a reasonable excuse for
     missing your quizzes or exams, then the solution
     doesn’t lie with me.

    Contact the academic office and let them decide
     the fate for your missed opportunities.

    The decision by academic office will be given
     due recognition.
10
Helping, Copying, Plagiarism
    We want you to learn.
    We want you to talk with each other, learn together, and
     help each other, But
         Plagiarism is unacceptable!
          (plagiarism = presenting other people’s work as your own)

    If you got help for your assignment from anyone but the
     lecturer or the TA,
          STATE IT ON THE ASSIGNMENT !
    If you copied bits of code from anywhere but
     the lecture slides or the textbook
          STATE IT ON THE ASSIGNMENT !
        (anything more than one line)



11
Guidelines
 Read your email and messages on the
  course yahoo group regularly
 Check notice board sub folder in course
  folder daily
 Start working on projects/homeworks from
  first day.
 Remain attentive during the class.
  Questions are always welcome.
 I will ask questions very often
Course Contents
   Introduction
   Complexity Analysis
   Simple Data Types and Abstract Data Types
   Arrays and Lists
   Elementary Data Structures
   Stack and Queues
   Recursion and Time Complexity of Recursive Algorithms
   Trees and Graphs
   Set structure
   Searching techniques
   Hashing
   Sorting techniques
What is a Computer Program?
   To exactly know, what is data structure?
    We must know:
     What    is a computer program?




                  Some mysterious
                    processing          Output
      Input
Example
   Data structure for storing data of students:-
     Arrays
     Linked    Lists
   Issues
     Space  needed
     Operations efficiency (Time required to complete
      operations)
          Retrieval
          Insertion
          Deletion
     Frequency        of usage of above operations
What data structure to use?
Data structures let the input and output be represented in a way
that can be handled efficiently and effectively.
                                                         array

                                                     Linked list




                         queue
    tree                                         stack
What’s the difference
    Different types of values
    Different structures
        No structure – just a collection of values
        Linear structure of values – the order matters
        Set of key-value pairs
        Hierarchical structures
        Grid/table
        ….
    Different access disciplines
        get, put, remove anywhere
        get, put, remove only at the ends, or only at the top, or …
        get, put, remove by position, or by value, or by key, or …
      ….
17
Algorithm Review

    An algorithm is a definite procedure for solving a
     problem in finite number of steps

    Algorithm is a well defined computational
     procedure that takes some value (s) as input,
     and produces some value (s) as output.

    Algorithm is finite number of computational
     statements that transform input into the output


18
Good Algorithms?


 Run in less time
 Consume less memory


     But computational resources (time
     complexity) is usually more important



19
Complexity
    In examining algorithm efficiency we must
     understand the idea of complexity

    Complexity is the consumptions of
     resources.

    Most important aspect of complexity are
      Space complexity
      Time Complexity
20
Space Complexity
    When memory was expensive we focused on
     making programs as space efficient as possible
     and developed schemes to make memory appear
     larger than it really was (virtual memory and
     memory paging schemes)

    Space complexity is still important in the field of
     embedded computing (hand held computer
     based equipment like cell phones, palm devices,
     etc)

21
Time Complexity
 Is the algorithm “fast enough” for my
  needs
 How much longer will the algorithm take if
  I increase the amount of data it must
  process
 Given a set of algorithms that accomplish
  the same thing, which is the right one to
  choose

22
Algorithm Efficiency
    A measure of the amount of resources
     consumed in solving a problem of size n
      time
      space

    Benchmarking: implement algorithm,
      run with some specific input and measure time taken
      better for comparing performance of processors than for
       comparing performance of algorithms
    Big Oh (asymptotic analysis)
      associates   n, the problem size,
      with t, the processing time required to solve the
       problem
23

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:6
posted:9/28/2012
language:Unknown
pages:23