II. Notes on Data Structuring * - Cornell University
II. Notes on Data Structuring * - Cornell University
II. Notes on Data Structuring * - Cornell University
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
NOTES ON DATA STRUCTURING 91<br />
possible computer representati<strong>on</strong>s is given, together with the criteria which<br />
should influence the selecti<strong>on</strong> of a suitable representati<strong>on</strong> <strong>on</strong> each occasi<strong>on</strong>.<br />
Secti<strong>on</strong> 11 is devoted to an example, a program for c<strong>on</strong>structing an<br />
examinati<strong>on</strong> timetable. The last secti<strong>on</strong> puts the whole expositi<strong>on</strong> <strong>on</strong> a<br />
rigorous theoretical basis by formulating the axioms which express the basic<br />
properties of data structures. This secti<strong>on</strong> may be used as a summary of the<br />
theory, as a reference to refine the understanding, or as a basis for the proof<br />
of correctness of programs.<br />
2. Taz CONCEPT OF TYPE<br />
The theory of data structuring here propounded is str<strong>on</strong>gly dependent <strong>on</strong><br />
the c<strong>on</strong>cept of type. This c<strong>on</strong>cept is familiar to mathematicians, logicians,<br />
and programmers.<br />
(1) In mathematical reas<strong>on</strong>ing, it is customary to make a rather sharp<br />
distincti<strong>on</strong> between individuals, sets of individuals, families of sets, and so<br />
<strong>on</strong>; to distinguish between real functi<strong>on</strong>s, complex functi<strong>on</strong>s, functi<strong>on</strong>als,<br />
sets of functi<strong>on</strong>s, etc. In fact for each new variable introduced in his reas<strong>on</strong>ing,<br />
a mathematician usually states immediately what type of object the vhriable<br />
can stand for, e.g.<br />
"Let f be a real functi<strong>on</strong> of two real variables"<br />
"Let S be a family of sets".<br />
Sometimes in mathematical texts a general rule is given which relates the<br />
type of a symbol with a particular printer's type f<strong>on</strong>t, for example"<br />
"We use small Roman letters to stand for individuals, capitals to<br />
stand for sets of individuals, and script capitals to denote families of sets".<br />
In general, mathematicians do not use type c<strong>on</strong>venti<strong>on</strong>s of this sort to<br />
make distincti<strong>on</strong>s of an arbitrary kind; for example, they would not be<br />
generally used to distinguish prime numbers from n<strong>on</strong>-primes or Abelian<br />
groups from general groups. In practice, the type c<strong>on</strong>venti<strong>on</strong>s adopted by<br />
mathematicians are very similar to those which would be of interest to<br />
logicians and programmers.<br />
(2) Logicians <strong>on</strong> the whole prefer to work without typed variables.<br />
However without types it is possible to formulate within set theory certain<br />
paradoxes which would lead to inescapable c<strong>on</strong>tradicti<strong>on</strong> and collapse of<br />
logical and mathematical reas<strong>on</strong>ing. The most famous of these is the Russell<br />
paradox:<br />
"let s be the set of all sets which are not members of themselves.<br />
Is s a member of itself or not?"