Lecture Notes for SE 598, Data Structures and Algorithms
24 May 2000, Data Structures and Algorithms
- data structures
- what do programs do
- model the world, or some small piece of it
- how do data structures help model the world
- data structures are the model
- the value held by a data structure represents some specific
characteristic of the world
- the characteristic being modeled restricts the possible
values held by a data structure
- notice the relation between characteristic, value, and data
structures
- what's the problem - there are lots of characteristics
- do all characteristics need to be modeled
- no - it depends on the model
- no - it depends on the reason for developing the model
- abstraction is the process of
- classifying characteristics as important or unimportant
- throwing away (or ignoring) the unimportant characteristics
- correctly applying abstraction is the essence of successful
programming
- algorithms
- is that it - programs (that is, data structures) model the world
- are data structures good models of the world
- it depends on the reasons for developing the model
- generally speaking, data structures are not good models of the world
- data structures are unchanging, while the world is changing
- algorithms are the dynamic part of a program's world model
- an algorithm transforms data structures from one state to another
state
- an algorithm may change the value held by a data structure
- an algorithm may change the data structure itself (change of world
characteristics)
- but again, there are lots of changes in the world
- the reason for the model determines the important changes
- abstraction again - the important and unimportant changes
- a recap
-
- so what
- the quality of a data structure is related to its ability to
successfully model characteristics of the world
- is the model accurate
- is the model concise
- there are many other possibilities
- similarly, the quality of an algorithm is related to its ability to
successfully simulate changes in the world.
- however, independent of any particular world model, the quality of data
structures and algorithms is determined by their ability to work
together well
- the correct data structures lead to simple and efficient algorithms
- the correct algorithms lead to accurate and efficient data structures
- the air-line seat reservation example
This page last modified on 24 May 2000.