写在最前面:为了提升自己编程以及软件设计的水平,决定从最基础的数据结构与算法入手。通过翻译,学习,
《Dictionary of Algorithms and Data Structures》字典来提升自己。
A: absolute performance guarantee
绝对性能优先算法
approximation algorithm
近似算法
Definition: An approximation algorithm will return a solution at most a bounded amount more (or less, as appropriate) than the optimum.
一个近似的算法返回的解大于,小于或者等于最优解。
optimal solution
最优解
A:abstract data type
抽象数据类型 缩写ADT
Definition: A set of data values and associated operations that are precisely specified independent of any particular implementation.
一组数值与其相关的操作可以实现某些特定的任务。
Specialization
dictionary, stack, queue, priority queue, set, bag.
字典,堆栈,队列,优先级队列(带权队列),集合,包。
axiomatic semantic
公理定义
Note: Since the data values and operations are defined with mathematical precision, rather than as an implementation in a computer language, we may reason about effects of the operations, relations to other abstract data types, whether a program implements the data type, etc.
所有的数值和操作都用数学方法定义的,而不是用计算机语言来实现的,所以我们实现的这些抽象数据类型以及操作,没有使用任何一中计算机语言。例如:
One of the simplest abstract data types is the stack. The operations new(), push(v, S), top(S), and popOff(S) may be defined with axiomatic semantics as following.
- new() returns a stack
- popOff(push(v, S)) = S
- top(push(v, S)) = v
where S is a stack and v is a value. (The usual pop operation is a combination of top, to return the top value, and popOff, to remove the top value.) Contrast this with the axiomatic semanticsdefinition of a set, a dictionary, or a queue.
定义S为堆栈 V位值。(通常使用POP操作来取得堆栈顶端的数据,并使用popOff来移除它。)我们使用同样的公理来定义一个集合,字典,或者是队列。(这里指的应该不使用任何计算机语言,而是用数学方式定义)。
From these axioms, one may define equality between stacks, define a pop function which returns the top value in a non-empty stack, etc. For instance, the predicate isEmpty(S) may be added and defined with the following additional axioms.
- isEmpty(new()) = true
- isEmpty(push(v, S)) = false
基于公理,需要定义更多的堆栈比较方法,定义一个pop方法返回当堆栈不为空时堆栈顶部值的方法。所以我们可以断言isEmpty(S)这个方法将要定义并添加到公理当中。