1 Equivalence Relations 【Definition】A relation R is defined on a set S if for every pair of elements (a, b), a, b S, a R b is either true or false. If a R b is true, then we say that a is related to b
【Definition】An Abstract Data Type (ADT) is a data type that is organized in such a way that the specification on the objects and specification of the operations on the objects are separated from the representation of the objects and the implementation on the operations
Sorting: There is a series of data in random order, we sort them depending a certain key word. Datalist: an finity set of data waiting to be sorted. Key: data object has many attribute areas, namely there are many data element, one of all these elements can be used to distinguish object, we use it as sorting key. we also call it sorting code
A stack is a Last-In-First-Out (LIFO) list, that is, an ordered list in which insertions and deletions are made at the top only. Objects: A finite ordered list with zero or more elements
【Definition】An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition, all algorithms must satisfy the following criteria: (1) Input There are zero or more quantities that are externally supplied