算法与数据结构的深入学习(A-1)

来源:互联网 发布:c语言const double pi 编辑:程序博客网 时间:2024/05/16 11:44

写在最前面:为了提升自己编程以及软件设计的水平,决定从最基础的数据结构与算法入手。通过翻译,学习,

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 
dictionarystackqueuepriority queuesetbag.

字典,堆栈,队列,优先级队列(带权队列),集合,包。

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.

  1. new() returns a stack
  2. popOff(push(v, S)) = S
  3. top(push(v, S)) = v
一个简单的抽象数据类型的堆栈。new(), push(v, S), top(S), and popOff(S)这些操作都是建立在公理定义之上的。


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.

  1. isEmpty(new()) = true
  2. isEmpty(push(v, S)) = false

基于公理,需要定义更多的堆栈比较方法,定义一个pop方法返回当堆栈不为空时堆栈顶部值的方法。所以我们可以断言isEmpty(S)这个方法将要定义并添加到公理当中。


0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 红米手机没有任务键怎么办 进网许可丢了怎么办 华为稳私空间被稳蔵怎么办 华为手机安装不了软件怎么办 华为手机自动安装软件怎么办 手机在实体店买贵了怎么办 日本买的kindle坏了怎么办 华为麦芒4屏幕失灵怎么办 华为麦芒6屏幕失灵怎么办 手机为什么总显示内存不足怎么办 小米云服务满了怎么办 魅蓝s6声音小怎么办 华为畅享7s丢失怎么办 华为耳机孔坏了怎么办 苹果手机耳机插孔坏了怎么办 荣耀8听筒声音小怎么办 荣耀8听筒音量小怎么办 华为荣耀6声音小怎么办 华为荣耀v8通话声音小怎么办 华为p20没有耳机孔怎么办 华为荣耀手机耳机声音小怎么办 小米5x显示耳机怎么办 手机进水听音乐人声小怎么办 华为荣耀v8手机音量小怎么办 手机充电孔松了怎么办 华为荣耀7卡顿怎么办 华为手机话筒没声音怎么办 苹果x耳机进水了怎么办 苹果6p进水了怎么办 华为手机声音变耳机模式怎么办 手机设置成耳机模式怎么办 opop耳机一个没有声音怎么办 oppo手机上显示耳机模式怎么办 微信显示耳机模式怎么办 微信变成耳机模式怎么办 5s变成耳机模式怎么办 华为手机一直是耳机模式怎么办 华为手机进水了耳机模式怎么办 蓝牙耳机通话声音小怎么办 华为手机自动进入耳机模式怎么办 华为手机耳机怎么挂了电话怎么办