Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 151 Data Structures, Algorithms, and Abstraction
Navigation
Log in


Forgot your password?
« May 2008 »
Su Mo Tu We Th Fr Sa
123
456789 10
11121314151617
18192021222324
25262728293031
 
Document Actions

Data Structures, Algorithms, and Abstraction

by admin last modified 2005-05-11 18:13

Data Structures, Algorithms, and Abstraction

Data Structures

Data structures and algorithms are fundamental to all of computer science.  Whether you are working with operating systems, databases, graphics, artificial intelligence, networks, or any other area of computer science, you will be using data structures and algorithms.  Fundamental to all of these areas is the need to organize data.

Much of programming involves the storage and retrieval of data.  Many of the most efficient algorithms for important problems are based on the use of specific data structures; the efficiency of the algorithm depends on the efficiency of the underlying data structure.  Software design often involves the choice of appropriate data structures.  So the study of data structures is considered by computer scientists to be fundamental to learning computer science.

A few examples:

example  Looking up a name and number in a telephone book.  What effect does the organization of the telephone book have on the efficiency of the lookup algorithm?

example  Tree-structured file directories in Unix and Windows.  How does this organization help the user?

example  Customer queues in a bank or supermarket.  How does the organization of the queues affect customer wait time?

How data is organized has an important impact on the performance of a system.

Data structures are used for:
  • Temporary storage for specific algorithms and programs.  For example, stacks and trees are used heavily by compilers, operating systems use queues for scheduling processes.
  • Long term storage for databases.

Algorithms

Data structure design is closely related is the issue of algorithm design. 
  • Some algorithms require that data be organized in a particular type of data structure.  For example, a binary search can be applied to an array of data only if the array is sorted.
  • Some algorithms use certain data structures for temporary storage.  For example, an algorithm to find a path through a maze typically uses a stack.
For each of the data structures we study, we will look at some of the common algorithms which use it.

We are also interested in algorithm analysis; that is, the study of the performance of algorithms.
  • We need to measure the effectiveness of our solutions to problems; that is, of our algorithms and data structures.
  • We will be studying the tools that computer scientists have developed for algorithm analysis, and apply them to the algorithms and data structures we study.
  • Give some scientific basis to justify why we choose certain data structures and algorithms and reject others.


Abstraction

Abstraction is another fundamental tool of computer scientists.  Why?
  • Programs are large (many lines of code) and complex (many interactions between components).
  • Structure and abstraction are used to manage this size and complexity.
Abstract data types.  The fundamental data structures of computer science (stacks, queues, lists, trees, maps) are defined as abstract data types (ADTs).  The use of abstraction makes it possible to separate the specification of an ADT from its implementation.

Software design.  Every program is based on an abstract model of some application domain.

Design patterns.  A design pattern is an abstraction of a problem solution which can then be applied to a variety of similar problems.

Object-oriented programming languages such as Java and C++ have proven to be effective as languages in which abstractions can be defined and used.



So, how will we be studying data structures in this course?  We will be:
  • Designing specifications for abstract data types, such as List, Set, Map, Stack, Queue, etc.
  • Writing concrete implementations of ADTs.
  • Learning the common applications of various ADTs.
Design goals:
  • Efficiency (of time and space)
  • Applicability (useful in a variety of problems)
  • Reusability (Get the interface right!)

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: