Microsoft PowerPoint - DS_Ch3_EN [兼容模式]

Size: px
Start display at page:

Download "Microsoft PowerPoint - DS_Ch3_EN [兼容模式]"

Transcription

1 Data Structure Ch.3 Stacks & Queues Dr. He Emil Huang School of Computer Science and Technology Soochow University 苏州大学计算机科学与技术学院网络工程系 本章 ppt 与教材对应情况 本章涉及所有内容涵盖了 Kruse 教材以下章节 Chapter 2 ( 栈,Introduction to Stacks) Chapter 3 ( 队列,Queues) Chapter 4 ( 链栈和链队列,Linked Stacks & Queues) huangh@suda.edu.cn Subsection 1 栈 _ 引言 3.0 Stack Specification ( 栈的说明 ) 由下面这个问题引入 Now, let us consider one open issue (Page 50) Read an integer n, then read a list of n numbers, and print the list in reverse order. Solution 1: Use an array ( 使用数组 ). Occupying part of an array of fixed size, with some of the entries in the array remaining unused. 3 #include <iostream> using namespace std; int main( ) /* Pre: The user supplies an integer n and n decimal numbers. Post: The numbers are printed in reverse order.*/ int n; double item; double numbers[ 25n ]; cout << " Type in an integer n followed by n decimal numbers." << endl<< " The numbers will be printed in reverse order." << endl; cin >> n; for (int i = 0; i < n; i++) cin >> item; numbers[i]=item; cout << endl << endl; for ( i = n-1; i >=0; i--) cout << numbers[i]; cout << endl; NOTE: 很多学生会认识到需要一个数组, 但有些学生会试图建立一个长度为 n 的数组, 然后会被提示的错误信息所困扰 因为他企图利用一个变量而不是常量作为数组的长度 The difference between list and array ( 表和数组的区别 ) 1 The length of a list can be changed by insert or delete some items from the list, but the length of an array is an constant. 表的长度是可变的 即表中的数字是可以增加和删除的, 因此, 如果 n=3, 那么表中只有 3 个数字, 如果 n=19, 那么表中就有 19 个数字 ; 数组 ( 或称为向量 ), 具体编程时的术语 数组中的元素个数是个常量, 也即当程序被编译时, 数组的长度就确定了 2 List is a dynamic data structure, but array is an static data structure. 表是一个动态数据结构, 因为它的长度是可以变化的, 然而, 数组是一种静态数据结构, 因为它的长度是固定的 3 List is a logical concept and array is a programming feature. 表是一个逻辑层面的概念, 数组是编程实现时的概念 1

2 The relation between list and array A list of variable size can be implemented in a computer by occupying part of an array with fixed size, andsomeofthe entries in the array are kept unused. 长度可变的表在计算机中的实现可以用一个定长数组实现, 其中定长数组中的部分单元未使用 But we will find that there are several ways to implement lists, using an array is only one of them, we should not confuse the fundamental data structure with the choice of implementations. 然而, 我们以后会发现, 有很多种方法可以用来完成表的实现, 因此我们不能将实现方法的选择和基本的数据结构相混淆 Standard Template Library (STL, P52) The standard template library (abbreviated STL) in C++ contains much useful information, many functions, and many classes. The STL provides convenient implementations for many common data structures (including almost all the data structures we shall study in this book). We can include the STL stack implementation into our programs with the directive #include <stack> and then we can define initially empty stack objects and apply methods called push, pop, top, and empty. 我们可以直接使用 STL 栈定义的方法, 如 push, pop, etc. Standard Template Library (STL, P52) In C++, a template construction allows us to create data structures whose entries have different types. Example: stack<double> numbers and stack<int> numbers The STL provides several implementations of various data structures such as stacks.( 提供各种数据结构的多种实现手段 ) The code in a client program should not depend on a particular choice of implementation, but the performance of the final program may very much depend on the choice of implementation. ( 客户程序中的代码不依赖于所用类的具体实现, 但程序的性能受栈的具体实现手段的影响 ) A second, optional template parameter selects the implementation. To stack the default implementation comes from deque. (double-ended queue) The STL implementations are highly efficient, convenient and designed with enough default options to allow programmers to use them easily. ( 高效 方便 很多可选项 ) Solution 2: by using a stack #include <stack>; //include the STL stack implementation into our program using namespace std; int main( ) /* Pre: The user supplies an integer n and n decimal numbers. Post: The numbers are printed in reverse order. Uses: The STL class stack and its methods */ int n; double item; stack <double> numbers; // declares and initializes a stack of numbers cout << " Type in an integer n followed by n decimal numbers." << endl << " The numbers will be printed in reverse order." << endl; cin >> n; for (int i = 0; i < n; i++) cin >> item; numbers.push(item); C++ STL 标准模板类库提供了一个 stack 类可以实现栈的功能 cout << endl << endl; while (!numbers.empty( )) cout << numbers.top( ) << " "; numbers.pop( ); cout << endl; // 请参考 C++ STL 中 stack 类, 也可参考 msdn 或相关书籍 Information Hiding ( 信息隐藏, P54) Information hiding: The methods for handling stacks are implemented in the C++ standard library, and we can use them without needing to know the details of how stacks are kept in memory or of how the stack operations are actually done. One important difference between practicing information hiding with regard to arrays and practicing information hiding with regard to stacks: C++ provides just one built-in implementation of arrays, but the STL has several implementations of stacks. Information Hiding Advantage of information hiding ( 信息隐藏的优点 ) If the instructions for manipulating a stack have been written out every time a stack is used, then every occurrence of these instructions will need to be changed. If we have practiced information hiding by using separate functions for manipulating stacks, then only the declarations will need to be changed. ( 用方法封装栈的操作, 当栈的实现改变时, 修改更容易 ) ---change of implementation Another advantage of information hiding shows up in programs that use stacks where the very appearance of the words push and pop immediately alert a person reading the program to what is being done, whereas the instructions themselves might be more obscure. --- clarity of program We shall find that separating the use of data structures from their implementation will help us improve the top-down design of both our data structures and our programs. ---top-down design 2

3 Example and sketch map ( 示意图 ) Page 51 in Our Text Book Page 44 in 严蔚敏老师的教材 3.1 Stack Definition & Operations Stack All insertions and deletions of entries are made at one end of the list. Insert Push Delete Pop Top of the stack the end for insertions and deletions 栈顶 Bottom of the stack the other end 栈底 修改原则 : 退栈者总是最近入栈者 服务原则 : last in first out (LIFO) e.g.: Push Pop a n a 2 a Stack Pushing and Popping a stack Logical Structure Specification: A stack is a list in which all insertions and deletions of entries are made at one end, called the top of the stack( 栈顶 ). The last entry inserted is the first one that will be removed ( 后进先出 ). Empty stack means the stack has no item. Example: plates sitting on the counter in a busy cafeteria. Customers take trays off the top of stack. Employees returned trays back on top of the stack. Other examples Methods Push( 入栈 ) Pop( 出栈 ) Empty( 判空 ) Top( 取栈顶元素 ) Size Constructor Pushing and Popping a stack 3.1 Stack Note: The last item pushed into a stack is always the first that will be popped from the stack. 但不排除后者未进栈, 先入栈者先出栈 an,, a, a

4 3.1 Stack Implementation of Stack ( 栈的实现 ) Suppose we have five items which were pushed into a stack in turn, the order of the push is abcde, and the pop turn is dceba, please decide the minimum size of the stack. 假设有 5 个元素 abcde 顺序进栈 ( 进栈过程中可以出栈 ), 出栈序列为 dceba, 则该栈容量必定不小于多少? Stack Specification of Methods for Stacks constructor--- initialization( 构造函数 --- 初始化, P58) The constructor is a function with the same name as the corresponding class and no return type. It is invoked automatically whenever an object of the class is declared. Specification of Methods for Stacks Entry Types, Generics( 泛型, P58) For generality, we use Stack_entry for the type of entries in a Stack. A client can specify this type with a definition such as typedef int Stack_entry; or typedef char Stack_entry; The ability to use the same underlying data structure and operations for different entry types is called generics ( 对不同的元素类型使用同样的基本数据结构和操作的能力称为泛型 ). typedef provides simple generics. Specification of Methods for Stacks Error Processing ( 出错处理, P58) We shall use a single enumerated type ( 枚举类型 ) called Error_code to report errors from all of our programs and functions. The enumerated type Error_code is part of the utility package in Appendix C. Stacks use three values of an Error_code: success, overflow, underflow Later, we shall use several further values of an Error_code. 程序设计规则 Determine the methods and their specifications for the Stack class, similar as the STL stack class: pop push top empty Specification of Methods for Stacks Specification for Methods( 方法的定义 ) Error_code Stack :: push(const Stack_entry &item); pre: None. post: If the Stack is not full, item is added to the top of the Stack. If the Stack is full, an Error_code of overflow( 上溢 )is returned and the Stack is left unchanged. Error_code Stack :: pop( ); pre: None. post: If the Stack is not empty, the top of the Stack is removed. If the Stack is empty, an Error_code of underflow( 下溢 )is returned and the Stack is left unchanged. 4

5 Specification of Methods for Stacks Specification for Methods( 方法的定义 ) Error_code Stack :: top(stack_entry &item) const; precondition: None. postcondition: The top of a nonempty Stack is copied to item. A code of fail is returned if the Stack is empty. 以下内容为顺序栈介绍 Sequential Stack bool Stack :: empty( ) const; precondition: None. postcondition: A result of true is returned if the Stack is empty, otherwise false is returned Sequential Stack ( 顺序栈, 顺序存储结构 ) Bottom is relatively fixed Sequential Stack ( 顺序栈 ) The bottom can be set at either end of an array ( 栈底可以约定在数组的任意一端, 一般用下标为 0 一端做栈底 ) Use position number as pointer of top ( 用数组下标表示栈顶位置 ) Declaration:(C-version) #define StackSize 100 typedef struct DataType data[stacksize]; int top; // 栈顶指针, 随 push, pop 改变 SeqStack; // 顺序栈的结构定义 27 Note:top pointer reflects position number relative to the bottom. top 指针不是指物理地址, 与指针变量含义不同 可理解为相对地址, 是指示元素的所在位置 Sequential Stack If the bottom is at the low end of the array, i.e. data[0], then: Push:top+1 Pop:top-1 Empty:top<0 Full:top=StackSize-1 Overflow:Push an item when the stack is full Underflow:Pop an item when the stack is empty ( 不一定是错误, 可以作为控制转移条件 ) Sequential Stack Implementation in C version: Initialize a stack operation: 初始化置空栈 void InitStack(SeqStack *S) S->top=-1; Is a stack empty: 判定一个栈 S 是否为空 int StackEmpty(SeqStack *S) return S->top == -1; Is a stack full: 判定一个栈 S 是否为满 int StackFull (SeqStack *S) return S->top==StackSize-1; 30 5

6 3.1.1 Sequential Stack Push operation: 入栈操作 void Push(SeqStack *S, DataType x) if ( StackFull(S) ) Error( overflow );// 上溢, 退出运行 S->data[++S->top]=x; // 指针先加 1, 后 x 入栈 Pop operation: 出栈操作 DataType Pop(SeqStack *S) if ( StackEmpty(S) ) Error( UnderFlow ); // 下溢 return S->data[S->top--]; // 返回栈顶后指针减 Sequential Stack Stack Class definition in C++ version: 顺序栈的类定义 #include < > #include<stack.h> class SeqStack : public Stack<T> // 顺序栈类定义 private: T *elements; // 存放栈元素的栈数组 int top; // 栈顶指针, int 型 int maxsize; void overflowprocess(); // 栈最大容量 Top operation: 读栈顶 // 栈的溢出处理 Sequential Stack public: SeqStack(int sz =50); // 构造函数, 建立空栈 ~SeqStack() delete [] elements; // 析构函数 void Push(const T& x); // 进栈, 将元素 x 插入到栈顶 bool Pop(T& x); \\ 栈顶元素出栈,pop 出的元素值通过引用型参数 x 返回栈顶元素值 bool gettop(t& x); // 取栈顶内容 bool IsEmpty ( ) const return top == -1; bool IsFull ( ) const return top == maxsize-1; 33 ; Sequential Stack Implementation in C++: void SeqStack<T>::Push(const T& x) // 若栈不满, 则将元素 x 插入该栈栈顶, 否则溢出处理 if (IsFull( ) == true) overflowprocess( ); // 栈满 elements[++top] = x; // 栈顶指针先加 1, 再进栈 ; bool SeqStack<T>::Pop(T& x) // 函数退出栈顶元素并返回栈顶元素的值 if (IsEmpty( ) == true) return false; x = elements[top--]; // 栈顶指针退 1 return true; // 退栈成功 ; Sequential Stack Implementation in C++ bool Seqstack<T>::getTop(T& x) // 若栈不空则函数返回该栈栈顶元素的地址 if (IsEmpty( ) == true) return false; x = elements[top]; return true; ; 以下 6 页 PPT 涉及内容均为 text book 上的 stack 类 ( 顺序栈 ) 定义及方法说明 35 6

7 The Class Specification (SeqStack 类的定义 ) We set up an array to hold the entries in the stack and a counter to indicate how many entries there are. const int maxstack = 10; // small value for testing class Stack public: Stack( ); bool empty( ) const; Error_code pop( ); Error_code top(stack_entry &item) const; Error_code push(const Stack_entry &item); private: int count; //to indicate how may entries in the sequential stack Stack_entry entry[maxstack]; ; Pushing, Popping, and Other Methods We note that the data member count represents the number of items in a Stack. Therefore, the top of a Stack occupies entry[count - 1], as shown in Figure 2.4. Pushing, Popping, and Other Methods Error_code Stack :: push(const Stack_entry &item) /* Pre: None. Post: If the Stack is not full, item is added to the top of the Stack. If the Stack is full, an Error_code of overflow is returned and the Stack is left unchanged. */ Error_code outcome = success; if (count >= maxstack) outcome = overflow; else entry[count++] = item; return outcome; Pushing, Popping, and Other Methods Error_code Stack :: pop( ) //only remove the top of the stack /* Pre: None. Post: If the Stack is not empty, the top of the Stack is removed. If the Stack is empty, an Error_code of underflow is returned. */ Error_code outcome = success; if (count == 0) outcome = underflow; else --count; return outcome; Pushing, Popping, and Other Methods Error_code Stack :: top(stack_entry &item) const /* Pre: None. Post: If the Stack is not empty, the top of the Stack is returned in item. If the Stack is empty an Error_code of underflow is returned. */ Error_code outcome = success; if (count == 0) outcome = underflow; else item = entry[count - 1]; return outcome; Pushing, Popping, and Other Methods bool Stack :: empty( ) const /* Pre: None. Post: If the Stack is empty, true is returned. Otherwise false is returned. */ bool outcome = true; if (count > 0) outcome = false; return outcome; Stack :: Stack( ) /* Pre: None. Post: The stack is initialized to be empty. */ count = 0; 7

8 以下内容为链栈 (Linked Stack) 介绍 在我们介绍 Linked Stack 之前 请对应我们的 textbook, 再次复习一些有关链式存储结构的基础知识 (P114-P126) 43 POINTERS AND LINKED STRUCTURES Diagram Conventions Variable contain pointers In the diagram, the object Dave is lost, with no pointer referring to it, and therefore there is no way to find it. In such a situation, we shall say that the object has become garbage. Therefore, in our work, we shall always strive to avoid the creation of garbage by ensuring no object is lost. POINTERS AND LINKED STRUCTURES Linked Structures The idea of a linked list is to augment every element of a list structure with a pointer giving the location of the next element in the list. 小心谨慎使用指针, 避免对象丢失, 避免 垃圾 产生 Analogies to a linked list 关于链表的类比 1. The game of Children s treasure hunt. 2. friends passing a popular cassette. 3. following instructions where each instruction is given out only upon completion of the previous task. There is then no inherent limit on the number of tasks to be done, since each task may specify a new instruction, and there is no way to tell in advance how many instructions there are. Analogies to a contiguous list 关于顺序表的类比 1. list of instructions written on a single sheet of paper. It is then possible to see all the instructions in advance, but there is a limit to the number of instructions that can be written on the single sheet of paper. The Basics of Linked Structures Nodes and Type Declarations The only difference between a struct and a class is that, unless modified by the keywords private and public, members of a struct are public whereas members of a class are private. Thus, by using modifiers public and private to adjust the visibility of members, we can implement any structure as either a struct or a class. struct Node // data members Node_entry entry; Node *next; //use before definition // constructors Node( ); Node(Node_entry item, Node *pointer = NULL); ; 8

9 The Basics of Linked Structures The Basics of Linked Structures Node Constructors Node :: Node( ) next = NULL; The second form accepts two parameters for initializing the data members. Node :: Node(Node_entry item, Node *pointer) entry = item; next = pointer; The Basics of Linked Structures For example, the following code will produce the linked nodes illustrated in Figure 4.8. Node first_node( a ); // Node first_node stores data a. Node *p0 = &first_node; // p0 points to first_node. Node *p1 = new Node( b ); // A second node storing b is created. p0->next = p1; // The second Node is linked after first_node. Node *p2 = new Node( c, p0); // A third Node storing c is created. // The third Node links back to the first node, *p0. p1->next = p2; // The third Node is linked after the second Node Linked Stack ( 链栈 ) Top pointer of stack could be used as head pointer, since all operations are performed at top of stack. Declaration typedef struct snode DataType data; struct snode *next; StackNode; // 链栈结点定义 typedef struct StackNode *top; LinkStack; // 链栈定义 Dynamic Memory Allocation, free of overflow ( 链栈动态分配结点, 无需考虑上溢 ) 链栈 void InitStack(LinkStack *S) S->top=NULL; int StackEmpty (LinkStack *S) return S->top==NULL; void Push(LinkStack *S, DataType x) StackNode *p=(stacknode*) malloc (sizeof(stacknode)); p->data=x; p->next=s->top; S->top=p; 链栈 DataType Pop(LinkStack *S) DataType x; StackNode *p=s->top; // 保存栈顶指针 if ( StackEmpty(S) ) Error ( underflow ); // 下溢 x=p->data; // 保存栈顶数据 S->top=p->next; // 将栈顶结点从链头摘下 free(p); // 释放原栈顶结点空间 return x;

10 3.1.1 Linked Stack Class definition in C++ struct StackNode // 栈结点类定义 private: T data; // 栈结点数据 StackNode<T> *link; // 结点链指针 public: StackNode(T d = 0, StackNode<T> *next = NULL) : data(d), link(next) // 构造函数, 初始化列表, 效率更高 ; class LinkedStack : public Stack<T> // 链式栈类定义 private: StackNode<T> *top; Linked Stack public: LinkedStack( ) : top(null) // 构造函数 ~LinkedStack( ) makeempty( ); // 析构函数 void Push(const T& x); // 进栈 bool Pop(T& x); // 退栈 bool gettop(t& x) const; // 取栈顶 bool IsEmpty( ) const return top == NULL; int getsize( ) const; // 求栈的元素个数 void makeempty( ); // 清空栈的内容 friend ostream& operator << (ostream& os, LinkedStack<T>& s); // 输出栈元素的重载操作 << ; Linked Stack Implementation in C++ LinkedStack<T> :: makeempty() // 逐次删去链式栈中的元素直至栈顶指针为空 StackNode<T> *p; while (top!= NULL) // 逐个结点释放 p = top; top = top->link; delete p; ; void LinkedStack<T> :: Push(const T& x) // 将元素值 x 插入到链式栈的栈顶, 即链头 top = new StackNode<T> (x, top); // 创建新结点 assert (top!= NULL); // 创建失败退出 Linked Stack bool LinkedStack<T>::Pop(T& x) // 删除栈顶结点, 返回被删栈顶元素的值 if (IsEmpty() == true) return false; // 栈空返回 StackNode<T> *p = top; // 暂存栈顶元素 top = top->link; // 退栈顶指针 x = p->data; delete p; // 释放结点 return true; ; bool LinkedStack<T>::getTop(T& x) const if (IsEmpty( ) == true) return false; // 栈空返回 x = top->data; // 返回栈顶元素的值 return true; ; ; Linked Stack ostream& operator<<(ostream& os, LinkedStack<T>& s) // 输出栈中所有元素的重载操作 << os<< 栈中元素个数 <<s.getsize( )<<endl; // 输出栈元素个数 LinkNode<T> *p =S.top; // 逐个输出栈元素的值 int i=0; while(p!=null) os<<++i<< : <<p->data<<endl; p=p->link; return os; ; Linked Stacks( 链栈 ) Whether the beginning or the end of the linked structure will be the top of the stack? The only information needed to keep track of the data in a linked stack is the location of its top

11 Linked Stacks declaration of type Stack class Stack public: Stack( ); bool empty( ) const; Error_code push(const Stack_entry &item); Error_code pop( ); Error_code top(stack_entry &item) const; protected: Node *top_node; ; Linked Stacks pushing a linked stack ( 入栈 ) Empty stack( 空栈 ) Linked Stacks Let us start with an empty stack, which now means top_node == NULL, and consider how to add Stack_entry item as the first entry. We must create a new Node storing a copy of item, in dynamic memory. We shall access this Node with a pointer variable new_top. We must then copy the address stored in new_top to the Stack member top_node. Hence, pushing item onto the Stack consists of the Instructions Node *new_top = new Node(item); top_node = new_top; Notice that the constructor that creates the Node *new_top sets its next pointer to the default value NULL. Not empty Node *new_top = new Node(item, top_node); top_node = new_top; pushing a linked stack( 入栈 ) Linked Stacks Error_code Stack :: push(const Stack_entry &item) /* Post: Stack_entry item is added to the top of the Stack; returns success or returns a code of overflow if dynamic memory is exhausted. */ Node *new_top = new Node(item, top_node); if (new_top == NULL) return overflow; top_node = new_top; return success; popping a linked stack( 出栈 ) Linked Stacks Error_code Stack :: pop( ) /* Post: The top of the Stack is removed. If the Stack is empty the method returns underflow; otherwise it returns success. */ Node *old_top=top_node; if (top_node==null) return underflow; top_node=top_node->next; delete old_top; return success; LINKED STACKS WITH SAFEGUARDS 带保护的链栈 (P131-P137) Problem Example for (int i = 0; i < ; i++) Stack small; small.push(some_data); As soon as the object small goes out of scope, the data stored in small becomes garbage. Over the course of a million iterations of the loop, a lot of garbage will accumulate. 11

12 The Destructor The C++ language provides class methods known as destructors that solve our problem. For every class, a destructor is a special method that is executed on objects of the class immediately before they go out of scope. 对于每一个类来说, 析构函数是一个特殊的方法, 在类对象超出范围前立即执行 LINKED STACKS WITH SAFEGUARDS Stack :: ~ Stack( ) // Destructor /* Post: The Stack is cleared. */ while (!empty( )) pop( ); Stack :: ~Stack( ); LINKED STACKS WITH SAFEGUARDS Stack outer_stack; //outer_stack 对象 for (int i = 0; i < ; i++) Stack inner_stack; //inner_stack 对象 inner_stack.push(some_data); inner_stack = outer_stack; Misbehaviors: Lost data space. Two stacks have shared nodes. The destructor on inner stack deletes outer stack. Such a deletion leaves the pointer outer_stack.top_ node addressing what a random memory location. LINKED STACKS WITH SAFEGUARDS Overloading the Assignment Operator 重载赋值操作 void Stack :: operator = (const Stack &original) // Overload assignment /* Post: The Stack is reset as a copy of Stack original. */ Node *new_top, *new_copy, *original_node = original.top_node; if (original_node == NULL) new_top = NULL; else // Duplicate the linked nodes new_copy = new_top = new Node(original_node->entry); while (original_node->next!= NULL) original_node = original_node->next; new_copy->next = new Node(original_node->entry); new_copy = new_copy->next; while (!empty( )) // Clean out old Stack entries pop( ); top_node = new_top; // and replace them with new entries. LINKED STACKS WITH SAFEGUARDS The Copy Constructor ( 拷贝构造函数 ) Problem example: void destroy_the_stack (Stack copy) In this code, a copy of the Stack vital_data is passed to the function. The Stack copy shares int main( ) its nodes with the Stack vital data, and therefore when a Stack Stack vital_data; destructor is applied to copy, at the end of the function, vital_data is also destroyed. destroy_the_stack (vital_data); 12

13 LINKED STACKS WITH SAFEGUARDS Copy constructor Implementation outline: 1. Deal with the case of copying an empty Stack. 2. Copy the first node. 3. Run a loop to copy all of the other nodes. The Modified Linked-Stack Specification class Stack public:// Standard Stack methods Stack( ); bool empty( ) const; Error_code push(const Stack_entry &item); Error_code pop( ); Error_code top(stack_entry &item) const; // Safety features for linked structures ~Stack( ); Stack(const Stack &original); void operator = (const Stack &original); protected: Node *top_node; ; 3.2 Queue 队列 (Queue) Basic Concepts 1. Definitions Queue:A list in which all insert operations are made at one end, and all deletions are made at other end. Features ( 同样是一种运算受限的线性表 ) First in, First out (a.k.a FIFO List) Applications:queues of tasks for printer OS 中虚拟内存一种页替换算法 Operations ( 入队列 出队列, etc.) Append (Enqueue): Serve (Dequeue): Queue Operations ( 队列的基本操作 ) As in our treatment of stacks, we shall implement queues whose entries have a generic type, which we call Queue_entry. Queue :: Queue( ); postcondition: The Queue has been created and is initialized to be empty. Queue Operations ( 队列的基本操作 ) Error_code Queue :: append(const Queue_entry &x); postcondition: If there is space, x is added to the Queue as its rear. Otherwise an Error_code of overflow is returned. Error_code Queue :: serve( ); postcondition: If the Queue is not empty, the front of the Queue has been removed. Otherwise an Error_code of underflow is returned. 13

14 Queue Operations ( 队列的基本操作 ) Error_code Queue :: retrieve(queue_entry &x) const; postcondition: If the Queue is not empty, the front of the Queue has been recorded as x. Otherwise an Error_code of underflow is returned. ( 取队头元素 ) bool Queue :: empty( ) const; postcondition: Return true if the Queue is empty, otherwise return false. Queue Operations ( 队列的基本操作 ) class Queue Add x to rear public: or overflow Remove front Queue( ); Record push front as x or underflow pop bool empty( ) const; or underflow front Error_code append(const Queue_entry &x); Error_code serve( ); Error_code retrieve(queue_entry &x) const; // Additional members will represent queue data. ; Extended Queue Operations Extended Queue Operations: full clear size serve_and_retrieve class Queue methods: Queue (constructor) append serve retrieve empty data members Base class 基类 inheritance class Extended_Queue methods: Extended_queue (constructor) append serve retrieve empty full clear Derived class size serve_and_retrieve 派生类 data members additional data members Extended Queue Operations class Extended_queue: public Queue public: bool full( ) const; int size( ) const; void clear( ); Error_code serve_and_retrieve(queue_entry &item); ; Extended Queue Operations The new operations for our class Extended_queue have the following specifications. bool Extended_queue :: full( ) const; postcondition: Return true if the Extended_queue is full; return false otherwise. void Extended_queue :: clear( ); postcondition: All entries in the Extended_queue have been removed; it is now empty. Extended Queue Operations int Extended_queue :: size( ) const; postcondition: Return the number of entries in the Extended_queue. Error_code Extended_queue :: serve_and_retrieve(queue_entry &item); postcondition: Return underflow if the Extended_queue is empty. Otherwise remove and copy the item at the front of the Extended_queue to item and return success. 14

15 Extended Queue Operations The relationship between the class Extended_queue and the class Queue is often called an is-a relationship. This is because every Extended_queue object is a Queue object with other features namely, the methods serve_and_retrieve, full, size, and clear. Every A is a B Every A has a B 3.2 Queue Implementations Of Queues Contiguous implementation ( 对应课本 chapter 3) 1. The physical model implementation 2. Linear implementation 3. Circular array implementation Linked implementation class A is derived from class B class A has a data member of type B Contiguous implementation 顺序队列 ( 循环队列 ) 介绍 The basic way is the same. We create a queue in memory by setting up an array to hold the entries. To facilitate the operations, we must keep track of the front and the rear of the queue. 基本方法是相同的, 我们使用一个数组来存放队列中的元素, 为了方便操作, 需要保存队列中的队头和队尾位置 87 To keep the front of the queue always in the first location of the array? An entry can be appended to the queue simply by increasing the rear by one and putting the entry in that location. ( 入队时元素添加到最后, 队尾指示器增 1) To remove an entry from the queue, however, would be very expensive indeed. ( 出队时队列中所有元素都向前移动一个位置 ) rear rear front Not a practical way! 1 15

16 3.2 Queue 2. Queue Contiguous Implementation Empty queue:front = rear; Append:insert an element at rear of the queue, then rear++; Serve:delete the front element from the queue, then front++; Contiguous Implementation ( 队列的顺序实现 ) To append an entry to the queue, we simply increase the rear by one and put the entry in that position. To serve an entry, we take it from the position at the front and then increase the front by one. Front pointer points to the head element Rear pointer points to the next position of the last element Job 1 Job 2 Job 3 Job 4 Job 5 Job 6 append Job 1 append Job 2 append Job 3 serve Job 1 append Job 4 append Job 5 append Job 6 serve Job 2 append Job Queue Overflow:Append when the queue is full Underflow:Serve when the queue is empty 伪上溢 : 队非满但不能插入 原因 :f,r 只增不减例如 : 入, 出, 入, 出, 尽管任一时刻, 队中最多只有 1 个元素, 但无论事先定义多大的空间, 均会产生指针越界 Problem: not true overflow ( 假溢出 )happens Fault: discarded space ( 空间无故被丢弃 ) This method has a major defect ( 缺点 ): Both the front and rear indices are increased but never decreased. As the queue moves down the array, the storage space at the beginning of the array is discarded ( 丢弃 ) and never used again. Advantage: for applications where the queue is regularly emptied, then at a time when the queue is empty, the front and rear can both be reset to the beginning of the array, and the simple scheme of using two indices and straight-line storage becomes a very efficient implementation. Inefficient use of space 93 Circular Array( 循环队列 P85~P87) Job 71 Job 2 Job 3 Job 4 Job 5 Job 6 In concept, we can overcome the inefficient use of append Job 7 space simply by thinking of the array as a circle rather than a straight line. Now we need not worry about running out of space unless the array is fully occupied, in which case we truly have overflow. 除非队列真的已满, 否则可以消除假溢出问题 下标计算发生了什么变化? [ 0 ] Job7 [ 5 ] Job6 Job5 [ 4 ] [ 1 ] Job3 [ 2 ] Job4 [ 3 ] 16

17 3.2 Queue 怎样消除伪上溢? 重复利用已删除的结点空间, 将向量视为首尾相接的环 这种用循环向量实现的队列称为循环队列 f,r 在循环意义下的加 1 动作 : 越界时, 令其指向下界 0 i = (i+1==queuesize)? 0:i++; // i 为 front 或 rear 可用模运算简化 : i=(i+1)%queuesize; Circular Arrays 实用顺序队列多为循环队列 Queue Boundary Conditions (P88, possible solution) The front and rear indices are in the same relative positions for an empty queue and for a full queue. 1 Set a boolean flag 2 Leave one empty position 3 Set a counter to record the size Declaration #define QueueSize 100 typedef struct int front; int rear; int count; DataType data [QueueSize]; CirQueue; Queue Implementation Initialize/Clear void InitQueue (CirQueue *Q) Q->front = Q->rear = 0; Q->count = 0; // 队空 Is Empty int QueueEmpty (CirQueue *Q) return Q->count == 0; Is Full int QueueFull (CirQueue *Q) return Q->count ==QueueSize; Queue Append (Enqueue) void EnQueue (CirQueue *Q, DataType x) if (QueueFull (Q) ) Error( overflow ); // 上溢 Q->count++; Q->data [Q->rear] = x; // 插入 Q->rear = (Q->rear+1)%QueueSize; // 尾指针加 1 Serve (Dequeue) 与课本中的 Serve and Retrieve 相同 DataType DeQueue (CirQueue *Q) if (QueueEmpty (Q) ) Error ( underflow ); // 下溢, 不一定是错 temp = Q->data[Q->front]; Q->count--; Q->front= (Q->front+1)%QueueSize; // 头指针加 1 return temp; Queue (Circular Array) Implementation in C++ CirQueue<T>::CirQueue(int sz) : front(0), rear(0), maxsize(sz) // 构造函数 elements = new E[maxSize]; assert ( elements!= NULL ); ; bool CirQueue<T>::EnQueue(const T& x) // 若队列不满, 则将 x 插入到该队列队尾, 否则返回 if (IsFull( ) == true) return false; elements[rear] = x; // 先存入 rear = (rear+1) % maxsize; // 尾指针加一 return true; 3.2 Queue bool CirQueue<T>::DeQueue(T& x) // 若队列不空则函数退队头元素并返回其值 if (IsEmpty( ) == true) return false; x = elements[front]; // 先取队头 front = (front+1) % maxsize; // 再队头指针加一 return true; ; bool CirQueue<T>::getFront(T& x) const // 若队列不空则函数返回该队列队头元素的值 if (IsEmpty() == true) return false; // 队列空 x = elements[front]; // 返回队头元素 return true; ; ;

18 IMPLEMENTATIONS OF QUEUES 课本对应的关于循环队列的实现内容供同学们自学 (P84-P91) 请所有同学注意 : 课本中对空队列的初始设置与严蔚敏等国内教材有差别, 请加以区分, 但本质思想相同 Boundary Conditions ( 边界条件 ) 初值设置 rear = maxqueue - 1; front = 0; 存在问题 : 如何区别队空和队满? rear 指向哪?front 指向哪 CIRCULAR IMPLEMENTATION OF QUEUES IN C++ ( 循环队列实现 ) The implementation in a circular array which uses a counter to keep track of the number of entries in the queue both illustrates techniques for handling circular arrays and simplifies the programming of some of the extended-queue operations. We shall take the queue as stored in an array indexed with the range 0 to (maxqueue - 1) CIRCULAR IMPLEMENTATION OF QUEUES IN C++ const int maxqueue = 10; // small value for testing class Queue public: Queue( ); bool empty( ) const; Error_code serve( ); Error_code append(const Queue_entry &item); Error_code retrieve(queue_entry &item) const; protected: int count; int front, rear; Queue_entry entry[maxqueue]; ; CIRCULAR IMPLEMENTATION OF QUEUES IN C++ CIRCULAR IMPLEMENTATION OF QUEUES IN C++ Queue :: Queue( ) /* Post: The Queue is initialized to be empty. */ count = 0; rear = maxqueue - 1; front = 0; bool Queue :: empty( ) const /* Post: Return true if the Queue is empty, otherwise return false. */ return count == 0; Error_code Queue :: append(const Queue_entry &item) /* Post: item is added to the rear of the Queue. If the Queue is full return an Error_code of overflow and leave the Queue unchanged. */ if (count >= maxqueue) return overflow; count++; rear = ((rear + 1) == maxqueue)? 0 : (rear + 1); entry[rear] = item; return success; 18

19 CIRCULAR IMPLEMENTATION OF QUEUES IN C++ Error_code Queue :: serve( ) /* Post: The front of the Queue is removed. If the Queue is empty return an Error_code of underflow. */ if (count <= 0) return underflow; count--; front = ((front + 1) == maxqueue)? 0 : (front + 1); return success; CIRCULAR IMPLEMENTATION OF QUEUES IN C++ Error_code Queue :: retrieve(queue_entry &item) const /* Post: The front of the Queue retrieved to the output parameter item. If the Queue is empty return an Error_code of underflow. */ if (count <= 0) return underflow; item = entry[front]; return success; int Extended_queue :: size( ) const /* Post: Return the number of entries in the Extended_queue. */ return count; APPLICATION OF QUEUES: SIMULATION Introduction Simulation is the use of one system to imitate the behavior of another system. Simulations are often used when it would be too expensive or dangerous to experiment with the real system. 仿真是指用一个系统模拟另一个系统的行为 经常使用于实际系统比较昂贵或危险的情形 Such as: wind tunnel flight simulators computer simulation: uses the steps of a program to imitate the behavior of the system under study. 3.2 Queue 链队列 (Linked Queue) 3. Linked Queue typedef struct qnode DataType data; struct qnode *next; QNode; typedef struct QNode *front; QNode *rear; LinkQueue; LinkQueue *Q; a1 不带头节点 : an

20 void InitQueue (LinkQueue *Q) Q->front = Q->rear = NULL; // 若有头结点则不同 int QEmpty (LinkQueue *Q) // 无上溢, 故不判满队 return Q->front == NULL; // 头尾指针均为空, 有头结点时 f = r void EnQueue (LinkQueue *Q, DataType x) QNode *p = (QNode *) malloc (sizeof(qnode) ); p->data = x; p->next = NULL; // 新结点作为新的队尾 if ( QEmpty(Q) ) // 若有头结点无需判此项 Q->front = Q->rear = p; // *p 插入空队 else // 插入非空队尾, 有无头结点均要做此项 Q->rear->next = p; // *p 链到原尾结点之后 Q->rear = p; // 指向新尾 *p 3.Linked Queue DataType DeQueue (LinkQueue *Q) if ( QEmpty(Q) ) Error ( underflow ); // 下溢 p = Q->front; // 指向队头 x = p->data; Q->front = p->next; // 队头摘下 if (Q->rear == p) // 原队中只有一个结点, 删去后队变空 Q->rear = NULL; free (p) ; return x; Queue (Linked Queue) Declarations in C++ struct QueueNode // 队列结点类定义 private: T data; // 队列结点数据 QueueNode<T> *link; // 结点链指针 public: QueueNode(T d = 0, QueueNode<T> *next = NULL) : data(d), link(next) ; class LinkedQueue private: QueueNode<T> *front, *rear; // 队头 队尾指针 Queue (Linked Queue) public: LinkedQueue() : rear(null), front(null) ~LinkedQueue(); bool EnQueue(const T& x); bool DeQueue(T& x); bool GetFront(T& x) const; // 查看队头元素的值 void MakeEmpty(); // 实现与 ~Queue() 同 bool IsEmpty() const return front == NULL; friend ostream& operator<<(ostream& os, LinkedQueue<T>& Q) // 输出队列中元素的重载操作 ; Queue (Linked Queue) Implementation in C++ LinkedQueue<T>::~LinkedQueue() // 析构函数 QueueNode<T> *p; while (front!= NULL) // 逐个结点释放 p = front; front = front->link; delete p; ; bool LinkedQueue<T>::EnQueue(const T& x) // 将新元素 x 插入到队列的队尾 3.2 Queue (Linked Queue) if (front == NULL) // 创建第一个结点 front = rear = new QueueNode<T> (x); if (front == NULL) return false; // 分配失败 else // 队列不空, 插入 rear->link = new QueueNode<T> (x); if (rear->link == NULL) return false; rear = rear->link; return true; ; // 如果队列不空, 将队头结点从链式队列中删去

21 3.2 Queue (Linked Queue) bool LinkedQueue<T>::DeQueue(T& x) if (IsEmpty( ) == true) return false; // 判队空 QueueNode<T> *p = front; x = front->data; front = front->link; delete p; return true; ; LINKED QUEUES ( 链队列 ) bool LinkedQueue<T>::GetFront(T& x) const // 若队列不空, 则函数返回队头元素的值 if (IsEmpty( ) == true) return false; x = front->data; return true; ; 121 LINKED QUEUES( 链队列 ) Basic Declarations class Queue public: // standard Queue methods Queue( ); bool empty( ) const; Error_code append(const Queue_entry &item); Error_code serve( ); Error_code retrieve(queue_entry &item) const; // safety features for linked structures ~Queue( ); Queue(const Queue &original); void operator = (const Queue &original); protected: Node *front, *rear; ; LINKED QUEUES Initialize( 初始化 ) Queue :: Queue( ) /* Post: The Queue is initialized to be empty. */ front = rear = NULL; Append( 入队 ) LINKED QUEUES Error_code Queue :: append(const Queue_entry &item) /* Post: Add item to the rear of the Queue and return a code of success or return a code of overflow if dynamic memory is exhausted. */ Node *new_rear = new Node(item); if (new_rear == NULL) return overflow; if (rear == NULL) front = rear = new_rear; else rear->next = new_rear; rear = new_rear; return success; Serve( 出队 ) LINKED QUEUES Error_code Queue :: serve( ) /* Post: The front of the Queue is removed. If the Queue is empty, return an Error_code of underflow. */ if (front == NULL) return underflow; Node *old_front = front; front = old_front->next; if (front == NULL) rear = NULL; delete old_front; return success; 21

22 LINKED QUEUES Extended Linked Queues class Extended_queue: public Queue public: bool full( ) const; int size( ) const; void clear( ); Error_code serve_and_retrieve(queue_entry &item); ; 以下内容为栈的应用介绍 There is no need to supply explicit methods for the copy constructor, the overloaded assignment operator, or the destructor, since the compiler calls the corresponding method of the base Queue object. 128 Application: A Desk Calculator (P66) Reverse Polish Calculator( 逆波兰计算器 ) In a Reverse Polish calculator, the operands (numbers, usually) are entered before an operation (like addition, subtraction, multiplication, or division) is specified. (a * (b - c)) + d --> a b c - * d + The advantage of a reverse Polish calculator is that any expression, no matter how complicated, can be specified without the use of parentheses. ( 括号 ) Infix Expression Postfix Expression Application: A Desk Calculator Reverse Polish Calculator( 逆波兰计算器 ) We shall write? to denote an instruction to read an operand; +, -, *, and / represent arithmetic operations; and = is an instruction to print the value just got. Eg1: we write a, b, c, and d to denote numerical values such as 3.14 or -7. The instructions? a? b + = mean read and store the numbers a and b, calculate and store their sum, and then print the sum. Eg2: The instructions? a? b +? c? d + * = request four numerical operands, and the result printed is the value of (a + b) * (c + d). Eg3: the instructions? a? b? c - = *? d + = mean read the numbers a, b, c, calculate b - c and print its value, then calculate a * (b - c), read d, and finally calculate and print (a * (b - c)) + d. 依次输入 :?1?2+?3*= 后, 显示计算结果 9 算法思想 : 程序从键盘接受命令符?1?2+?3*= 如输入的命令为? 则继续读入一个操作数, 由于对该操作数执行的运算符还未知, 所以暂时将它存储起来 ; 如输入的是 +, -, *, / 等运算符则此时应将最近保存过的数拿出两个作算术运算, 并将运算的中间结果存储起来 由于最近存储的操作数 ( 或是最近存储的中间结果 ) 是即将拿出来作运算的操作数, 也即后存储的先取出来, 即满足 后进先出 的原则, 因此, 应把这些操作数存储在栈中 如输入的命令为 = 将刚才的运算结果即栈顶元素输出 22

23 ? denote an instruction to read an operand and push it onto (onto 很形象 ) the stack; +, -, *, and / represent arithmetic operations; When an operation is performed, it pops its operands from the stack and pushes its result back onto the stack. = is an instruction to print the value. Application: A Desk Calculator typedef double Stack_entry; #include Stack.h" int main( ) /* Post: The program has executed simple arithmetic commands entered by the user. Uses: The class Stack and the functions introduction, instructions, do_command,and get_command. */ Stack stored_numbers; introduction( ); instructions( ); while (do_command(get_command( ), stored_numbers)); The auxiliary function get_command obtains a command from the user, checking that it is valid and converting it to lowercase by using the string function tolower( ) that is declared in the standard header file cctype. Application: A Desk Calculator char get_command( ) char command; bool waiting = true; cout << "Select command and press < Enter > :"; while (waiting) cin >> command; command = tolower(command); if (command ==? command == '=' command == '+' command == '-' command == '*' command == '/' command == 'q') waiting = false; else cout << "Please enter a valid command:" << endl<< "[?]push to stack [=]print top" <<endl<< "[+] [-] [*] [/] are arithmetic operations" << endl<< "[Q]uit." << endl; //endwhile return command; Application: A Desk Calculator bool do_command(char command, Stack &numbers) /* Pre: The first parameter specifies a valid calculator command. Post: The command specified by the first parameter has been applied to the Stack of numbers given by the second parameter. A result of true is returned unless command == ' q '. Uses: The class Stack. */ double p, q; switch (command) case '?': // read cout << "Enter a real number: " << flush; cin >> p; if (numbers.push(p) == overflow) cout << "Warning: Stack full, lost number" << endl; break; case '=': // print if (numbers.top(p) == underflow) cout << "Stack empty" << endl; else cout << p << endl; break; Application: A Desk Calculator case '+': if (numbers.top(p) == underflow) cout << "Stack empty" << endl; else numbers.pop( ); if (numbers.top(q) == underflow) cout << "Stack has just one entry" << endl; numbers.push(p); else numbers.pop( ); if (numbers.push(q + p) == overflow) cout << "Warning: Stack full, lost result" << endl; break; // Add options for further user commands. Application: A Desk Calculator case 'q': cout << "Calculation finished.\n"; return false; return true; In calling this function, we must pass the Stack parameter by reference, because its value might need to be modified. For example, if the command parameter is +, then we normally pop two values off the Stack numbers and push their sum back onto it: This should certainly change the Stack. The function do_command allows for an additional user command, q, that quits the program. 23

24 数据转换 问题 : 一非负十进制整数 N 基为 B 的 B 进制数 例 : 规律 : (3.1) 其中 bi 表示 B 进制数的第 i 位数字十进制数 N 可用长度为位 B 进制数表示为 栈的应用 如何确定? 令, 则 (3.1) 式为 : (3.2) (3.2) 式整除 B, 则余数为, 商为括号内的和式 故 (3.2) 式 可表达为 : // / 为整除 算法思想 : 1 模除求余数 : 2 整除求商 :N/B, 令此为新的 N, 重复 1 求, 反复至某 N 为 0 时结束 上述过程依次求出的 B 进制各位为 ( 从低位至高位 ): 用栈保存, 退栈输出 即为所求 栈的应用 例如 : 141 实现 typedef int DataType; void MultiBaseOutput (int N, int B) // N 为非负十进制整数, B 为基 int i; SeqStack * S; // 顺序栈 S InitStack( S ); // 置空栈 while (N) // 从右向左产生 b i, i=0,1,, j Push( S, N%B); // 将 b i 入栈 N=N/B; while(!stackempty(s) ) // 栈 S 非空 i = Pop(S); printf( %d,i); 时间复杂度 :O(log B N ) 142 APPLICATION: POLYNOMIAL ARITHMETIC ( 多项式运算, Section 4.5 in our textbook, P141) 以下内容为队列应用介绍 We develop a program that simulates a calculator that does addition, subtraction, multiplication, division, and other operations for polynomials rather than numbers. We model a reverse Polish calculator whose operands (polynomials) are entered before the operation is specified. The operands are pushed onto a stack. When an operation is performed, it pops its operands from the stack and pushes its result back onto the stack. We reuse the conventions of Section 2.3:? denotes pushing an operand onto the stack, +, -, *, / represent arithmetic operations, and = means printing the top of the stack (but not popping it off)

25 APPLICATION: POLYNOMIAL ARITHMETIC The Main Program int main( ) /* Post: The program has executed simple polynomial arithmetic commands entered by the user. Uses: The classes Stack and Polynomial and the functions introduction, instructions,do_command, and get_command. */ Stack stored_polynomials; introduction( ); instructions( ); while (do_command(get_command( ), stored_polynomials)); APPLICATION: POLYNOMIAL ARITHMETIC Polynomial Methods As in Section 2.3, we represent the commands that a user can type by the characters?, =, +, -, *, /, where? requests input of a polynomial from the user, = prints the result of an operation, and the remaining symbols denote addition, subtraction, multiplication, and division, respectively. Most of these commands will need to invoke Polynomial class methods; hence we must now decide on the form of some of these methods. APPLICATION: POLYNOMIAL ARITHMETIC We will need a method to add a pair of polynomials. One convenient way to implement this method is as a method, equals_sum, of the Polynomial class. Thus, if p, q, r are Polynomial objects, the expression p.equals_sum(q, r) replaces p by the sum of the polynomials q and r. We shall implement similar methods called equals_difference, equals_product, and equals_quotient to perform other arithmetic operations on polynomials. The user commands = and? will lead us to call on Polynomial methods to print out and read in polynomials. Thus we shall suppose that Polynomial objects have methods without parameters called print and read to accomplish these tasks. APPLICATION: POLYNOMIAL ARITHMETIC Performing Commands bool do_command(char command, Stack & stored_polynomials) /* Pre: The first parameter specifies a valid calculator command. Post: The command specified by the first parameter has been applied to the Stack of Polynomial objects given by the second parameter. A result of true is returned unless command == q. Uses: The classes Stack and Polynomial. */ Polynomial p, q, r; APPLICATION: POLYNOMIAL ARITHMETIC switch (command) case? : p.read( ); // if (stored_polynomials.push(p) == overflow) cout << "Warning: Stack full, lost polynomial" << endl; break; case = : if (stored_polynomials.empty( )) cout << "Stack empty" << endl; else stored_polynomials.top(p); p.print( ); break; APPLICATION: POLYNOMIAL ARITHMETIC case + : if (stored_polynomials.empty( )) cout << "Stack empty" << endl; else stored_polynomials.top(p); //get the first operand to be added stored_polynomials.pop( ); if (stored_polynomials.empty( )) cout << "Stack has just one polynomial" << endl; stored_polynomials.push(p); else stored_polynomials.top(q); //get the second operand to be added stored_polynomials.pop( ); break; r.equals_sum(q, p); //do command r=q+p; if (stored_polynomials.push(r) == overflow) //push r back to the stack cout << "Warning: Stack full, lost polynomial" << endl; 25

26 APPLICATION: POLYNOMIAL ARITHMETIC // Add options for further user commands. case q : cout << "Calculation finished." << endl; return false; //end switch return true; 一元多项式 p n n 1 2 n( x) pnx pn 1 x... p2x p1x p0 We can represent it as a list : P = (p n, p n-1,,p 0 ) But if we have a polynomial like: S(x) = 2x x Does the representation reasonable? Determine the polynomial implementation: a contiguous or a linked queue? Should we use a contiguous or a linked queue? If, in advance, we know a bound on the degree of the polynomials that can occur and if the polynomials that occur have nonzero coefficients in almost all their possible terms, then we should probably do better with contiguous queues. But if we do not know a bound on the degree, or if polynomials with only a few nonzero terms are likely to appear, then we shall find linked storage preferable. Let us in fact decide to represent a polynomial as an extended linked queue of terms. 事先不知道多项式的长度, 多项式指数不连续, 建议采用链式结构 Any Sparse Polynomial: P n (x) = p m x e m + pi x e i + + p 1 x e 1 + p 0 x e 0 其中 :p i 是指数为 e i 的项的非零系数, 0 e 0 < e 1 < < e m = n 可以下列线性表表示 : ((p m,e m ) (p 1, e 1 ), (p 0, e 0 )) example: P 999 (x) = - 8x 999-2x 12 +7x 3 Can be represented by a list : ((-8, 999), (-2, 12), (7, 3) ) The Polynomial Data Structure We implement a Term as a struct with a constructor as following. struct Term int degree; double coefficient; Term (int exponent = 0, double scalar = 0); ; Term :: Term(int exponent, double scalar) /* Post: The Term is initialized with the given coefficient and exponent, or with default parameter values of 0. */ degree = exponent; coefficient = scalar; 26

27 Determine the polynomial data structure: a stack? A queue or a general list? Consider the sum operation that applies to the polynomial A(x) = 5x x 8 +3x+7 B(x) = -9x x 7 +8x C (x) = A(x)+B(x) = 5x x 7 +11x +7 A polynomial is represented as a list of terms. We must then build into our methods rules for performing arithmetic on two such lists. When we do this work, however, we find that we continually need to remove the first entry from the list, and we find that we need to insert new entries only at the end of the list. In other words, we find that the arithmetic operations treat the list as a queue, or, more precisely, as an extended queue, since we frequently need methods such as clear and serve_and_retrieve, as well as deletion from the front and insertion at the rear. 1. Each node represents one term of a polynomial and is a structure containing a coefficient, an exponent, and a pointer to the next term of the polynomial. 2. The terms of every polynomial are stored in the order of decreasing exponent within the linked queue, and no two terms have the same exponent. 3. Terms with zero coefficient are not stored in the polynomial. 4. The polynomial that is identically 0 is represented by an empty queue. The Polynomial Data Structure class Polynomial: private Extended_queue // Use private inheritance. public: void read( ); void print( ) const; void equals_sum(polynomial p, Polynomial q); void equals_difference(polynomial p, Polynomial q); void equals_product(polynomial p, Polynomial q); Error_code equals_quotient(polynomial p, Polynomial q); int degree( ) const;// 最高次项的指数 private: void mult_term(polynomial p, Term t); ; Reading and Writing Polynomials print Polynomial void Polynomial :: print( ) const /* Post: The Polynomial is printed to cout. */ Node *print_node = front; bool first_term = true; while (print_node!= NULL) Term &print_term = print_node->entry; if (first_term) // In this case, suppress printing an initial +. first_term = false; if (print_term.coefficient < 0) cout << "- "; else if (print_term.coefficient < 0) cout << " - "; else cout << " + "; 27

28 Reading and Writing Polynomials double r = (print_term.coefficient >= 0)// r is abs of the coefficient? print_term.coefficient : -(print_term.coefficient); if (r!= 1) cout << r; if (print_term.degree > 1) cout << " Xˆ" << print_term.degree; if (print_term.degree == 1) cout << " X"; if (r == 1 && print_term.degree == 0) cout << " 1"; print_node = print_node->next; if (first_term) cout << "0"; // Print 0 for an empty Polynomial. cout << endl; Reading and Writing Polynomials read Polynomial void Polynomial :: read( ) /* Post: The Polynomial is read from cin. */ clear( ); double coefficient; int last_exponent, exponent; bool first_term = true; cout << "Enter the coefficients and exponents for the polynomial, " << "one pair per line. Exponents must be in descending order." << endl << "Enter a coefficient of 0 or an exponent of 0 to terminate." << endl; do cout << "coefficient? " << flush; cin >> coefficient; if (coefficient!= 0.0) cout << "exponent? " << flush; cin >> exponent; Reading and Writing Polynomials if ((!first_term && exponent >= last_exponent) exponent < 0) exponent = 0; cout << "Bad exponent: Polynomial terminates without its last term."<< endl; //the input is invalid! else Term new_term(exponent, coefficient); append(new_term); first_term = false; last_exponent = exponent; while (coefficient!= 0.0 && exponent!= 0); Addition of Polynomials( 多项式相加 ) A(x) = 5x x 8 +3x+7 B(x) = -9x x 7 +8x C (x) = A(x)+B(x) = 5x x 7 +11x +7 A B void Polynomial :: equals_sum(polynomial p, Polynomial q) /* Post: The Polynomial object is reset as the sum of the two parameters. */ clear( ); while (!p.empty( )!q.empty( )) Term p_term, q_term; if (p.degree( ) > q.degree( )) p.serve_and_retrieve(p_term); append(p_term); Addition of Polynomials ( 多项式相加 ) else if (q.degree( ) > p.degree( )) q.serve_and_retrieve(q_term); append(q_term); else p.serve_and_retrieve(p_term); q.serve_and_retrieve(q_term); if (p_term.coefficient + q_term.coefficient!= 0) Term answer_term(p_term.degree, p_term.coefficient + q_term.coefficient); append(answer_term); 28

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

Microsoft PowerPoint - Ch3 [兼容模式]

Microsoft PowerPoint - Ch3 [兼容模式] Ch.3 栈和队列 1 3.1 栈 定义和运算 栈 仅在表的一端插 删的线性表插入 进 ( 入 ) 栈 删除 出 ( 退 ) 栈 栈顶 插删的一端 栈底 另一端 结构特征 -- 后进先出 修改原则 : 退栈者总是最近入栈者 服务原则 : 后来者先服务 (LIFO 表 ) 例 : 入栈出栈 a n a 2 a 1 2 3.1 栈 Note: 后入栈者先出栈, 但不排除后者未进栈, 先入栈者先出栈 an,,

More information

Microsoft PowerPoint - string_kruse [兼容模式]

Microsoft PowerPoint - string_kruse [兼容模式] Strings Strings in C not encapsulated Every C-string has type char *. Hence, a C-string references an address in memory, the first of a contiguous set of bytes that store the characters making up the string.

More information

2/80 2

2/80 2 2/80 2 3/80 3 DSP2400 is a high performance Digital Signal Processor (DSP) designed and developed by author s laboratory. It is designed for multimedia and wireless application. To develop application

More information

Microsoft Word - template.doc

Microsoft Word - template.doc HGC efax Service User Guide I. Getting Started Page 1 II. Fax Forward Page 2 4 III. Web Viewing Page 5 7 IV. General Management Page 8 12 V. Help Desk Page 13 VI. Logout Page 13 Page 0 I. Getting Started

More information

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡 Tips of the Week 课 堂 上 的 英 语 习 语 教 学 ( 二 ) 2015-04-19 吴 倩 MarriottCHEI 大 家 好! 欢 迎 来 到 Tips of the Week! 这 周 我 想 和 老 师 们 分 享 另 外 两 个 课 堂 上 可 以 开 展 的 英 语 习 语 教 学 活 动 其 中 一 个 活 动 是 一 个 充 满 趣 味 的 游 戏, 另 外

More information

ebook39-5

ebook39-5 5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

ENGG1410-F Tutorial 6

ENGG1410-F Tutorial 6 Jianwen Zhao Department of Computer Science and Engineering The Chinese University of Hong Kong 1/16 Problem 1. Matrix Diagonalization Diagonalize the following matrix: A = [ ] 1 2 4 3 2/16 Solution The

More information

穨control.PDF

穨control.PDF TCP congestion control yhmiu Outline Congestion control algorithms Purpose of RFC2581 Purpose of RFC2582 TCP SS-DR 1998 TCP Extensions RFC1072 1988 SACK RFC2018 1996 FACK 1996 Rate-Halving 1997 OldTahoe

More information

Microsoft Word - 11月電子報1130.doc

Microsoft Word - 11月電子報1130.doc 發 行 人 : 楊 進 成 出 刊 日 期 2008 年 12 月 1 日, 第 38 期 第 1 頁 / 共 16 頁 封 面 圖 話 來 來 來, 來 葳 格 ; 玩 玩 玩, 玩 數 學 在 11 月 17 到 21 日 這 5 天 裡 每 天 一 個 題 目, 孩 子 們 依 據 不 同 年 段, 尋 找 屬 於 自 己 的 解 答, 這 些 數 學 題 目 和 校 園 情 境 緊 緊 結

More information

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d WeChat Search Visual Identity Guidelines WEDESIGN 2018. 04 Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies

More information

Strings

Strings Inheritance Cheng-Chin Chiang Relationships among Classes A 類 別 使 用 B 類 別 學 生 使 用 手 機 傳 遞 訊 息 公 司 使 用 金 庫 儲 存 重 要 文 件 人 類 使 用 交 通 工 具 旅 行 A 類 別 中 有 B 類 別 汽 車 有 輪 子 三 角 形 有 三 個 頂 點 電 腦 內 有 中 央 處 理 單 元 A

More information

<4D6963726F736F667420576F7264202D2032303130C4EAC0EDB9A4C0E04142BCB6D4C4B6C1C5D0B6CFC0FDCCE2BEABD1A15F325F2E646F63>

<4D6963726F736F667420576F7264202D2032303130C4EAC0EDB9A4C0E04142BCB6D4C4B6C1C5D0B6CFC0FDCCE2BEABD1A15F325F2E646F63> 2010 年 理 工 类 AB 级 阅 读 判 断 例 题 精 选 (2) Computer mouse How does the mouse work? We have to start at the bottom, so think upside down for now. It all starts with mouse ball. As the mouse ball in the bottom

More information

Microsoft Word - TIP006SCH Uni-edit Writing Tip - Presentperfecttenseandpasttenseinyourintroduction readytopublish

Microsoft Word - TIP006SCH Uni-edit Writing Tip - Presentperfecttenseandpasttenseinyourintroduction readytopublish 我 难 度 : 高 级 对 们 现 不 在 知 仍 道 有 听 影 过 响 多 少 那 次 么 : 研 英 究 过 文 论 去 写 文 时 作 的 表 技 引 示 巧 言 事 : 部 情 引 分 发 言 该 生 使 在 中 用 过 去, 而 现 在 完 成 时 仅 表 示 事 情 发 生 在 过 去, 并 的 哪 现 种 在 时 完 态 成 呢 时? 和 难 过 道 去 不 时 相 关? 是 所 有

More information

untitled

untitled Co-integration and VECM Yi-Nung Yang CYCU, Taiwan May, 2012 不 列 1 Learning objectives Integrated variables Co-integration Vector Error correction model (VECM) Engle-Granger 2-step co-integration test Johansen

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

Microsoft PowerPoint - AWOL - Acrobat Windows Outlook.ppt [Compatibility Mode]

Microsoft PowerPoint - AWOL - Acrobat Windows Outlook.ppt [Compatibility Mode] AWOL Windows - Tips & Tricks Resolution, color depth & refresh rate Background color Service packs Disk cleanup (cleanmgr) Disk defragmentation AWOL Windows Resolution, Color Depth & Refresh Rate The main

More information

Microsoft Word - Final Exam Review Packet.docx

Microsoft Word - Final Exam Review Packet.docx Do you know these words?... 3.1 3.5 Can you do the following?... Ask for and say the date. Use the adverbial of time correctly. Use Use to ask a tag question. Form a yes/no question with the verb / not

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

東莞工商總會劉百樂中學

東莞工商總會劉百樂中學 /2015/ 頁 (2015 年 版 ) 目 錄 : 中 文 1 English Language 2-3 數 學 4-5 通 識 教 育 6 物 理 7 化 學 8 生 物 9 組 合 科 學 ( 化 學 ) 10 組 合 科 學 ( 生 物 ) 11 企 業 會 計 及 財 務 概 論 12 中 國 歷 史 13 歷 史 14 地 理 15 經 濟 16 資 訊 及 通 訊 科 技 17 視 覺

More information

K301Q-D VRT中英文说明书141009

K301Q-D VRT中英文说明书141009 THE INSTALLING INSTRUCTION FOR CONCEALED TANK Important instuction:.. Please confirm the structure and shape before installing the toilet bowl. Meanwhile measure the exact size H between outfall and infall

More information

Microsoft Word doc

Microsoft Word doc 中 考 英 语 科 考 试 标 准 及 试 卷 结 构 技 术 指 标 构 想 1 王 后 雄 童 祥 林 ( 华 中 师 范 大 学 考 试 研 究 院, 武 汉,430079, 湖 北 ) 提 要 : 本 文 从 结 构 模 式 内 容 要 素 能 力 要 素 题 型 要 素 难 度 要 素 分 数 要 素 时 限 要 素 等 方 面 细 致 分 析 了 中 考 英 语 科 试 卷 结 构 的

More information

提纲 1 2 OS Examples for 3

提纲 1 2 OS Examples for 3 第 4 章 Threads2( 线程 2) 中国科学技术大学计算机学院 October 28, 2009 提纲 1 2 OS Examples for 3 Outline 1 2 OS Examples for 3 Windows XP Threads I An Windows XP application runs as a seperate process, and each process may

More information

BC04 Module_antenna__ doc

BC04 Module_antenna__ doc http://www.infobluetooth.com TEL:+86-23-68798999 Fax: +86-23-68889515 Page 1 of 10 http://www.infobluetooth.com TEL:+86-23-68798999 Fax: +86-23-68889515 Page 2 of 10 http://www.infobluetooth.com TEL:+86-23-68798999

More information

ebook39-6

ebook39-6 6 first-in-first-out, FIFO L i n e a r L i s t 3-1 C h a i n 3-8 5. 5. 3 F I F O L I F O 5. 5. 6 5. 5. 6.1 [ ] q u e n e ( r e a r ) ( f r o n t 6-1a A 6-1b 6-1b D C D 6-1c a) b) c) 6-1 F I F O L I F ADT

More information

Microsoft PowerPoint - STU_EC_Ch08.ppt

Microsoft PowerPoint - STU_EC_Ch08.ppt 樹德科技大學資訊工程系 Chapter 8: Counters Shi-Huang Chen Fall 2010 1 Outline Asynchronous Counter Operation Synchronous Counter Operation Up/Down Synchronous Counters Design of Synchronous Counters Cascaded Counters

More information

Microsoft Word - 第四組心得.doc

Microsoft Word - 第四組心得.doc 徐 婉 真 這 四 天 的 綠 島 人 權 體 驗 營 令 我 印 象 深 刻, 尤 其 第 三 天 晚 上 吳 豪 人 教 授 的 那 堂 課, 他 讓 我 聽 到 不 同 於 以 往 的 正 義 之 聲 轉 型 正 義, 透 過 他 幽 默 熱 情 的 語 調 激 起 了 我 對 政 治 的 興 趣, 願 意 在 未 來 多 關 心 社 會 多 了 解 政 治 第 一 天 抵 達 綠 島 不 久,

More information

Logitech Wireless Combo MK45 English

Logitech Wireless Combo MK45 English Logitech Wireless Combo MK45 Setup Guide Logitech Wireless Combo MK45 English................................................................................... 7..........................................

More information

A VALIDATION STUDY OF THE ACHIEVEMENT TEST OF TEACHING CHINESE AS THE SECOND LANGUAGE by Chen Wei A Thesis Submitted to the Graduate School and Colleg

A VALIDATION STUDY OF THE ACHIEVEMENT TEST OF TEACHING CHINESE AS THE SECOND LANGUAGE by Chen Wei A Thesis Submitted to the Graduate School and Colleg 上 海 外 国 语 大 学 SHANGHAI INTERNATIONAL STUDIES UNIVERSITY 硕 士 学 位 论 文 MASTER DISSERTATION 学 院 国 际 文 化 交 流 学 院 专 业 汉 语 国 际 教 育 硕 士 题 目 届 别 2010 届 学 生 陈 炜 导 师 张 艳 莉 副 教 授 日 期 2010 年 4 月 A VALIDATION STUDY

More information

國 立 政 治 大 學 教 育 學 系 2016 新 生 入 學 手 冊 目 錄 表 11 國 立 政 治 大 學 教 育 學 系 博 士 班 資 格 考 試 抵 免 申 請 表... 46 論 文 題 目 申 報 暨 指 導 教 授... 47 表 12 國 立 政 治 大 學 碩 博 士 班 論

國 立 政 治 大 學 教 育 學 系 2016 新 生 入 學 手 冊 目 錄 表 11 國 立 政 治 大 學 教 育 學 系 博 士 班 資 格 考 試 抵 免 申 請 表... 46 論 文 題 目 申 報 暨 指 導 教 授... 47 表 12 國 立 政 治 大 學 碩 博 士 班 論 國 立 政 治 大 學 教 育 學 系 2016 新 生 入 學 手 冊 目 錄 一 教 育 學 系 簡 介... 1 ( 一 ) 成 立 時 間... 1 ( 二 ) 教 育 目 標 與 發 展 方 向... 1 ( 三 ) 授 課 師 資... 2 ( 四 ) 行 政 人 員... 3 ( 五 ) 核 心 能 力 與 課 程 規 劃... 3 ( 六 ) 空 間 環 境... 12 ( 七 )

More information

入學考試網上報名指南

入學考試網上報名指南 入 學 考 試 網 上 報 名 指 南 On-line Application Guide for Admission Examination 16/01/2015 University of Macau Table of Contents Table of Contents... 1 A. 新 申 請 網 上 登 記 帳 戶 /Register for New Account... 2 B. 填

More information

國家圖書館典藏電子全文

國家圖書館典藏電子全文 i ii Abstract The most important task in human resource management is to encourage and help employees to develop their potential so that they can fully contribute to the organization s goals. The main

More information

UDC The Policy Risk and Prevention in Chinese Securities Market

UDC The Policy Risk and Prevention in Chinese Securities Market 10384 200106013 UDC The Policy Risk and Prevention in Chinese Securities Market 2004 5 2004 2004 2004 5 : Abstract Many scholars have discussed the question about the influence of the policy on Chinese

More information

徐汇教育214/3月刊 重 点 关 注 高中生异性交往的小团体辅导 及效果研究 颜静红 摘 要 采用人际关系综合诊断量表 郑日昌编制并 与同性交往所不能带来的好处 带来稳定感和安全感 能 修订 对我校高一学生进行问卷测量 实验组前后测 在 够度过更快乐的时光 获得与别人友好相处的经验 宽容 量表总分和第 4 项因子分 异性交往困扰 上均有显著差 大度和理解力得到发展 得到掌握社会技术的机会 得到 异

More information

PowerPoint Presentation

PowerPoint Presentation Decision analysis 量化決策分析方法專論 2011/5/26 1 Problem formulation- states of nature In the decision analysis, decision alternatives are referred to as chance events. The possible outcomes for a chance event

More information

Microsoft Word - 物件導向編程精要.doc

Microsoft Word - 物件導向編程精要.doc Essential Object-Oriented Programming Josh Ko 2007.03.11 object-oriented programming C++ Java OO class object OOP Ruby duck typing complexity abstraction paradigm objects objects model object-oriented

More information

2015年4月11日雅思阅读预测机经(新东方版)

2015年4月11日雅思阅读预测机经(新东方版) 剑 桥 雅 思 10 第 一 时 间 解 析 阅 读 部 分 1 剑 桥 雅 思 10 整 体 内 容 统 计 2 剑 桥 雅 思 10 话 题 类 型 从 以 上 统 计 可 以 看 出, 雅 思 阅 读 的 考 试 话 题 一 直 广 泛 多 样 而 题 型 则 稳 中 有 变 以 剑 桥 10 的 test 4 为 例 出 现 的 三 篇 文 章 分 别 是 自 然 类, 心 理 研 究 类,

More information

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl SKLOIS (Pseudo) Preimage Attack on Reduced-Round Grøstl Hash Function and Others Shuang Wu, Dengguo Feng, Wenling Wu, Jian Guo, Le Dong, Jian Zou March 20, 2012 Institute. of Software, Chinese Academy

More information

Lorem ipsum dolor sit amet, consectetuer adipiscing elit

Lorem ipsum dolor sit amet, consectetuer adipiscing elit English for Study in Australia 留 学 澳 洲 英 语 讲 座 Lesson 3: Make yourself at home 第 三 课 : 宾 至 如 归 L1 Male: 各 位 朋 友 好, 欢 迎 您 收 听 留 学 澳 洲 英 语 讲 座 节 目, 我 是 澳 大 利 亚 澳 洲 广 播 电 台 的 节 目 主 持 人 陈 昊 L1 Female: 各 位

More information

中国科学技术大学学位论文模板示例文档

中国科学技术大学学位论文模板示例文档 University of Science and Technology of China A dissertation for doctor s degree An Example of USTC Thesis Template for Bachelor, Master and Doctor Author: Zeping Li Speciality: Mathematics and Applied

More information

國 史 館 館 刊 第 23 期 Chiang Ching-kuo s Educational Innovation in Southern Jiangxi and Its Effects (1941-1943) Abstract Wen-yuan Chu * Chiang Ching-kuo wa

國 史 館 館 刊 第 23 期 Chiang Ching-kuo s Educational Innovation in Southern Jiangxi and Its Effects (1941-1943) Abstract Wen-yuan Chu * Chiang Ching-kuo wa 國 史 館 館 刊 第 二 十 三 期 (2010 年 3 月 ) 119-164 國 史 館 1941-1943 朱 文 原 摘 要 1 關 鍵 詞 : 蔣 經 國 贛 南 學 校 教 育 社 會 教 育 掃 盲 運 動 -119- 國 史 館 館 刊 第 23 期 Chiang Ching-kuo s Educational Innovation in Southern Jiangxi and

More information

Microsoft PowerPoint - L17_Inheritance_v4.pptx

Microsoft PowerPoint - L17_Inheritance_v4.pptx C++ Programming Lecture 17 Wei Liu ( 刘 威 ) Dept. of Electronics and Information Eng. Huazhong University of Science and Technology May. 2015 Lecture 17 Chapter 20. Object-Oriented Programming: Inheritance

More information

1505.indd

1505.indd 上 海 市 孙 中 山 宋 庆 龄 文 物 管 理 委 员 会 上 海 宋 庆 龄 研 究 会 主 办 2015.05 总 第 148 期 图 片 新 闻 2015 年 9 月 22 日, 由 上 海 孙 中 山 故 居 纪 念 馆 台 湾 辅 仁 大 学 和 台 湾 图 书 馆 联 合 举 办 的 世 纪 姻 缘 纪 念 孙 中 山 先 生 逝 世 九 十 周 年 及 其 革 命 历 程 特 展

More information

Microsoft Word - CX VMCO 3 easy step v1.doc

Microsoft Word - CX VMCO 3 easy step v1.doc Abacus Fully Automated Process of VMCO on CX, KA, CPH & KAH 16 Nov 2009 To streamline the VMCO handling on CX, KA, CPH & KAH, Abacus is pleased to inform you that manual submission of VMCO to CX/KA/CPH/KAH

More information

HCD0174_2008

HCD0174_2008 Reliability Laboratory Page: 1 of 5 Date: December 23, 2008 WINMATE COMMUNICATION INC. 9 F, NO. 111-6, SHING-DE RD., SAN-CHUNG CITY, TAIPEI, TAIWAN, R.O.C. The following merchandise was submitted and identified

More information

Guide to Install SATA Hard Disks

Guide to Install SATA Hard Disks SATA RAID 1. SATA. 2 1.1 SATA. 2 1.2 SATA 2 2. RAID (RAID 0 / RAID 1 / JBOD).. 4 2.1 RAID. 4 2.2 RAID 5 2.3 RAID 0 6 2.4 RAID 1.. 10 2.5 JBOD.. 16 3. Windows 2000 / Windows XP 20 1. SATA 1.1 SATA Serial

More information

Microsoft Word - ChineseSATII .doc

Microsoft Word - ChineseSATII .doc 中 文 SAT II 冯 瑶 一 什 么 是 SAT II 中 文 (SAT Subject Test in Chinese with Listening)? SAT Subject Test 是 美 国 大 学 理 事 会 (College Board) 为 美 国 高 中 生 举 办 的 全 国 性 专 科 标 准 测 试 考 生 的 成 绩 是 美 国 大 学 录 取 新 生 的 重 要 依

More information

A Community Guide to Environmental Health

A Community Guide to Environmental Health 102 7 建 造 厕 所 本 章 内 容 宣 传 推 广 卫 生 设 施 104 人 们 需 要 什 么 样 的 厕 所 105 规 划 厕 所 106 男 女 对 厕 所 的 不 同 需 求 108 活 动 : 给 妇 女 带 来 方 便 110 让 厕 所 更 便 于 使 用 111 儿 童 厕 所 112 应 急 厕 所 113 城 镇 公 共 卫 生 设 施 114 故 事 : 城 市 社

More information

C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1

C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1 C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1 1 CARDGAME 1 CardGame 题目描述 桌上有一叠牌, 从第一张牌 ( 即位于顶面的牌 ) 开始从上往下依次编号为 1~n 当至少还剩两张牌时进行以下操作 : 把第一张牌扔掉, 然后把新的第一张放到整叠牌的最后 请模拟这个过程, 依次输出每次扔掉的牌以及最后剩下的牌的编号 输入 输入正整数 n(n

More information

WTO

WTO 10384 200015128 UDC Exploration on Design of CIB s Human Resources System in the New Stage (MBA) 2004 2004 2 3 2004 3 2 0 0 4 2 WTO Abstract Abstract With the rapid development of the high and new technique

More information

東吳大學

東吳大學 律 律 論 論 療 行 The Study on Medical Practice and Coercion 林 年 律 律 論 論 療 行 The Study on Medical Practice and Coercion 林 年 i 讀 臨 療 留 館 讀 臨 律 六 礪 讀 不 冷 療 臨 年 裡 歷 練 禮 更 老 林 了 更 臨 不 吝 麗 老 劉 老 論 諸 見 了 年 金 歷 了 年

More information

Microsoft Word - HC20138_2010.doc

Microsoft Word - HC20138_2010.doc Page: 1 of 7 Date: April 26, 2010 WINMATE COMMUNICATION INC. 9 F, NO. 111-6, SHING-DE RD., SAN-CHUNG CITY, TAIPEI, TAIWAN, R.O.C. The following merchandise was submitted and identified by the vendor as:

More information

Microsoft PowerPoint - Model Checking a Lazy Concurrent List-Based Set Algorithm.ppt [Compatibility Mode]

Microsoft PowerPoint - Model Checking a Lazy Concurrent List-Based Set Algorithm.ppt [Compatibility Mode] Model Checking a Lazy Concurrent List-Based Set Algorithm ZHANG Shaojie, LIU Yang National University of Singapore Agenda Introduction Background Ourapproach Overview Linearizabilitydefinition Modelinglanguage

More information

Construction of Chinese pediatric standard database A Dissertation Submitted for the Master s Degree Candidate:linan Adviser:Prof. Han Xinmin Nanjing

Construction of Chinese pediatric standard database A Dissertation Submitted for the Master s Degree Candidate:linan Adviser:Prof. Han Xinmin Nanjing 密 级 : 公 开 学 号 :20081209 硕 士 学 位 论 文 中 医 儿 科 标 准 数 据 库 建 设 研 究 研 究 生 李 楠 指 导 教 师 学 科 专 业 所 在 学 院 毕 业 时 间 韩 新 民 教 授 中 医 儿 科 学 第 一 临 床 医 学 院 2011 年 06 月 Construction of Chinese pediatric standard database

More information

PowerPoint Presentation

PowerPoint Presentation ITM omputer and ommunication Technologies Lecture #4 Part I: Introduction to omputer Technologies Logic ircuit Design & Simplification ITM 計算機與通訊技術 2 23 香港中文大學電子工程學系 Logic function implementation Logic

More information

< F5FB77CB6BCBD672028B0B6A46AABE4B751A874A643295F5FB8D5C5AA28A668ADB6292E706466>

< F5FB77CB6BCBD672028B0B6A46AABE4B751A874A643295F5FB8D5C5AA28A668ADB6292E706466> A A A A A i A A A A A A A ii Introduction to the Chinese Editions of Great Ideas Penguin s Great Ideas series began publication in 2004. A somewhat smaller list is published in the USA and a related, even

More information

A Study on Grading and Sequencing of Senses of Grade-A Polysemous Adjectives in A Syllabus of Graded Vocabulary for Chinese Proficiency 2002 I II Abstract ublished in 1992, A Syllabus of Graded Vocabulary

More information

WTO

WTO 10384 X0115018 UDC MBA 2004 5 14 2004 6 1 WTO 2004 2006 7 2 Abstract According to the promise after our country enter into WTO, our country will open the readymade oil retail market in the end of 2004

More information

untitled

untitled Ogre Rendering System http://antsam.blogone.net AntsamCGD@hotmail.com geometry systemmaterial systemshader systemrendering system API API DirectX OpenGL API Pipeline Abstraction API Pipeline Pipeline configurationpipeline

More information

2015 Chinese FL Written examination

2015 Chinese FL Written examination Victorian Certificate of Education 2015 SUPERVISOR TO ATTACH PROCESSING LABEL HERE Letter STUDENT NUMBER CHINESE FIRST LANGUAGE Written examination Monday 16 November 2015 Reading time: 11.45 am to 12.00

More information

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

More information

The Development of Color Constancy and Calibration System

The Development of Color Constancy and Calibration System The Development of Color Constancy and Calibration System The Development of Color Constancy and Calibration System LabVIEW CCD BMP ii Abstract The modern technologies develop more and more faster, and

More information

软件测试(TA07)第一学期考试

软件测试(TA07)第一学期考试 一 判 断 题 ( 每 题 1 分, 正 确 的, 错 误 的,20 道 ) 1. 软 件 测 试 按 照 测 试 过 程 分 类 为 黑 盒 白 盒 测 试 ( ) 2. 在 设 计 测 试 用 例 时, 应 包 括 合 理 的 输 入 条 件 和 不 合 理 的 输 入 条 件 ( ) 3. 集 成 测 试 计 划 在 需 求 分 析 阶 段 末 提 交 ( ) 4. 单 元 测 试 属 于 动

More information

Abstract There arouses a fever pursuing the position of being a civil servant in China recently and the phenomenon of thousands of people running to a

Abstract There arouses a fever pursuing the position of being a civil servant in China recently and the phenomenon of thousands of people running to a Abstract There arouses a fever pursuing the position of being a civil servant in China recently and the phenomenon of thousands of people running to attend the entrance examination of civil servant is

More information

Microsoft PowerPoint - STU_EC_Ch04.ppt

Microsoft PowerPoint - STU_EC_Ch04.ppt 樹德科技大學資訊工程系 Chapter 4: Boolean Algebra and Logic Simplification Shi-Huang Chen Fall 200 Outline Boolean Operations and Expressions Laws and Rules of Boolean Algebra DeMorgan's Theorems Boolean Analysis

More information

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING 前言 - Andrew Payne 目录 1 2 Firefly Basics 3 COMPONENT TOOLBOX 目录 4 RESOURCES 致谢

More information

硕 士 学 位 论 文 论 文 题 目 : 北 岛 诗 歌 创 作 的 双 重 困 境 专 业 名 称 : 中 国 现 当 代 文 学 研 究 方 向 : 中 国 新 诗 研 究 论 文 作 者 : 奚 荣 荣 指 导 老 师 : 姜 玉 琴 2014 年 12 月

硕 士 学 位 论 文 论 文 题 目 : 北 岛 诗 歌 创 作 的 双 重 困 境 专 业 名 称 : 中 国 现 当 代 文 学 研 究 方 向 : 中 国 新 诗 研 究 论 文 作 者 : 奚 荣 荣 指 导 老 师 : 姜 玉 琴 2014 年 12 月 硕 士 学 位 论 文 论 文 题 目 : 北 岛 诗 歌 创 作 的 双 重 困 境 专 业 名 称 : 中 国 现 当 代 文 学 研 究 方 向 : 中 国 新 诗 研 究 论 文 作 者 : 奚 荣 荣 指 导 老 师 : 姜 玉 琴 2014 年 12 月 致 谢 文 学 是 我 们 人 类 宝 贵 的 精 神 财 富 两 年 半 的 硕 士 学 习 让 我 进 一 步 接 近 文 学,

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

Microsoft PowerPoint _代工實例-1

Microsoft PowerPoint _代工實例-1 4302 動態光散射儀 (Dynamic Light Scattering) 代工實例與結果解析 生醫暨非破壞性分析團隊 2016.10 updated Which Size to Measure? Diameter Many techniques make the useful and convenient assumption that every particle is a sphere. The

More information

Microsoft PowerPoint - Lecture7II.ppt

Microsoft PowerPoint - Lecture7II.ppt Lecture 8II SUDOKU PUZZLE SUDOKU New Play Check 軟體實作與計算實驗 1 4x4 Sudoku row column 3 2 } 4 } block 1 4 軟體實作與計算實驗 2 Sudoku Puzzle Numbers in the puzzle belong {1,2,3,4} Constraints Each column must contain

More information

中山大學學位論文典藏

中山大學學位論文典藏 -- IEMBA 3 ii 4W2H Who( ) When( ) What( ) Why( ) How much( ) How to do( ) iii Abstract Pharmaceutical industry can be regard as one of the knowledge-intensive industries. Designing a sales promotion for

More information

國立中山大學學位論文典藏

國立中山大學學位論文典藏 I II III IV The theories of leadership seldom explain the difference of male leaders and female leaders. Instead of the assumption that the leaders leading traits and leading styles of two sexes are the

More information

快乐蜂(Jollibee)快餐连锁店 的国际扩张历程

快乐蜂(Jollibee)快餐连锁店 的国际扩张历程 Case6 Jollibee Foods Corporation Jollibee FAN Libo Case Synopsis (1) The case opens with a trigger issue focused on three investment decisions facing the international division new manager, Noli Tingzon.

More information

Chn 116 Neh.d.01.nis

Chn 116 Neh.d.01.nis 31 尼 希 米 书 尼 希 米 的 祷 告 以 下 是 哈 迦 利 亚 的 儿 子 尼 希 米 所 1 说 的 话 亚 达 薛 西 王 朝 二 十 年 基 斯 流 月 *, 我 住 在 京 城 书 珊 城 里 2 我 的 兄 弟 哈 拿 尼 和 其 他 一 些 人 从 犹 大 来 到 书 珊 城 我 向 他 们 打 听 那 些 劫 后 幸 存 的 犹 太 人 家 族 和 耶 路 撒 冷 的 情 形

More information

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc 聖 保 羅 男 女 中 學 學 年 中 一 入 學 申 請 申 請 須 知 申 請 程 序 : 請 將 下 列 文 件 交 回 本 校 ( 麥 當 勞 道 33 號 ( 請 以 A4 紙 張 雙 面 影 印, 並 用 魚 尾 夾 夾 起 : 填 妥 申 請 表 並 貼 上 近 照 小 學 五 年 級 上 下 學 期 成 績 表 影 印 本 課 外 活 動 表 現 及 服 務 的 證 明 文 件 及

More information

2017 CCAFL Chinese in Context

2017 CCAFL Chinese in Context Student/Registration Number Centre Number 2017 PUBLIC EXAMINATION Chinese in Context Reading Time: 10 minutes Working Time: 2 hours and 30 minutes You have 10 minutes to read all the papers and to familiarise

More information

Gassama Abdoul Gadiri University of Science and Technology of China A dissertation for master degree Ordinal Probit Regression Model and Application in Credit Rating for Users of Credit Card Author :

More information

2009.05

2009.05 2009 05 2009.05 2009.05 璆 2009.05 1 亿 平 方 米 6 万 套 10 名 20 亿 元 5 个 月 30 万 亿 60 万 平 方 米 Data 围 观 CCDI 公 司 内 刊 企 业 版 P08 围 观 CCDI 管 理 学 上 有 句 名 言 : 做 正 确 的 事, 比 正 确 地 做 事 更 重 要 方 向 的 对 错 于 大 局 的 意 义 而 言,

More information

考試學刊第10期-內文.indd

考試學刊第10期-內文.indd misconception 101 Misconceptions and Test-Questions of Earth Science in Senior High School Chun-Ping Weng College Entrance Examination Center Abstract Earth Science is a subject highly related to everyday

More information

03施琅「棄留臺灣議」探索.doc

03施琅「棄留臺灣議」探索.doc 38 93 43 59 43 44 1 2 1621 1645 1646 3 1647 1649 4 1 1996 12 121 2 1988 1 54---79 3 1990 2 39 4 1987 8 16 19 1649 27---28 45 1651 5 1656 1662 1664 1667 1668 6 1681 1683 7 13 1958 2 1651 2002 11 67 1961

More information

untitled

untitled 數 Quadratic Equations 數 Contents 錄 : Quadratic Equations Distinction between identities and equations. Linear equation in one unknown 3 ways to solve quadratic equations 3 Equations transformed to quadratic

More information

Abstract Since 1980 s, the Coca-Cola came into China and developed rapidly. From 1985 to now, the numbers of bottlers has increased from 3 to 23, and

Abstract Since 1980 s, the Coca-Cola came into China and developed rapidly. From 1985 to now, the numbers of bottlers has increased from 3 to 23, and Abstract Since 1980 s, the Coca-Cola came into China and developed rapidly. From 1985 to now, the numbers of bottlers has increased from 3 to 23, and increases ulteriorly. When the Coca-Cola company came

More information

99 學年度班群總介紹 第 370 期 班群總導 陳怡靜 G45 班群總導 陳怡靜(河馬) A 家 惠如 家浩 T 格 宜蓁 小 霖 怡 家 M 璇 均 蓁 雴 家 數學領域 珈玲 國燈 370-2 英領域 Kent

99 學年度班群總介紹 第 370 期 班群總導 陳怡靜 G45 班群總導 陳怡靜(河馬) A 家 惠如 家浩 T 格 宜蓁 小 霖 怡 家 M 璇 均 蓁 雴 家 數學領域 珈玲 國燈 370-2 英領域 Kent 2010 年 8 月 27 日 出 刊 精 緻 教 育 宜 蘭 縣 公 辦 民 營 人 國 民 中 小 學 財 團 法 人 人 適 性 教 育 基 金 會 承 辦 地 址 : 宜 蘭 縣 26141 頭 城 鎮 雅 路 150 號 (03)977-3396 http://www.jwps.ilc.edu.tw 健 康 VS. 學 習 各 位 合 夥 人 其 實 都 知 道, 我 是 個 胖 子, 而

More information

TX-NR3030_BAS_Cs_ indd

TX-NR3030_BAS_Cs_ indd TX-NR3030 http://www.onkyo.com/manual/txnr3030/adv/cs.html Cs 1 2 3 Speaker Cable 2 HDMI OUT HDMI IN HDMI OUT HDMI OUT HDMI OUT HDMI OUT 1 DIGITAL OPTICAL OUT AUDIO OUT TV 3 1 5 4 6 1 2 3 3 2 2 4 3 2 5

More information

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D>

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D> Homeworks ( 第 三 版 ):.4 (,, 3).5 (, 3).6. (, 3, 5). (, 4).4.6.7 (,3).9 (, 3, 5) Chapter. Number systems and codes 第 一 章. 数 制 与 编 码 . Overview 概 述 Information is of digital forms in a digital system, and

More information

Thesis for the Master degree in Engineering Research on Negative Pressure Wave Simulation and Signal Processing of Fluid-Conveying Pipeline Leak Candi

Thesis for the Master degree in Engineering Research on Negative Pressure Wave Simulation and Signal Processing of Fluid-Conveying Pipeline Leak Candi U17 10220 UDC624 Thesis for the Master degree in Engineering Research on Negative Pressure Wave Simulation and Signal Processing of Fluid-Conveying Pipeline Leak Candidate:Chen Hao Tutor: Xue Jinghong

More information

:

: A Study of Huangtao : I Abstract Abstract This text focuses on the special contribution of Huangtao in the history of literature and culture of Fukien, by analyzing the features of Huangtao s thought,

More information

untitled

untitled LBS Research and Application of Location Information Management Technology in LBS TP319 10290 UDC LBS Research and Application of Location Information Management Technology in LBS , LBS PDA LBS

More information

1990-1997 1980-1997 Abstract The relationship between human resource development and economy increase has been an important research item with the coming of knowledge economy. In this paper, ahead item

More information

untitled

untitled 20 90 1998 2001 1 Abstract Under the environment of drastic competitive market, risk and uncertainty that the enterprise faces are greater and greater, the profit ability of enterprise assets rises and

More information

pdf

pdf THE INSTLLING INSTRUCTION FOR CONCELED TNK Important instuction:.. Please confirm the structure and shape before installing the toilet bowl. Meanwhile measure the exact size H between outfall and infall

More information

LH_Series_Rev2014.pdf

LH_Series_Rev2014.pdf REMINDERS Product information in this catalog is as of October 2013. All of the contents specified herein are subject to change without notice due to technical improvements, etc. Therefore, please check

More information

VASP应用运行优化

VASP应用运行优化 1 VASP wszhang@ustc.edu.cn April 8, 2018 Contents 1 2 2 2 3 2 4 2 4.1........................................................ 2 4.2..................................................... 3 5 4 5.1..........................................................

More information

<D0D0D5FED7A8CFDF2E696E6464>

<D0D0D5FED7A8CFDF2E696E6464> 3 4 5 6 7 8 9 10 11 12 13 14 16 报 导 : 资 源 处 主 任 陆 素 芬 视 是 青 少 年 喜 爱 的 一 门 艺 术 在 孩 子 们 的 成 长 过 程 中, 许 多 优 秀 的 影 影 片 通 过 直 观 的 艺 术 手 段, 感 染 和 鼓 舞 着 青 少 年 选 择 人 生 的 走 向, 获 得 各 种 知 识, 不 断 提 高 综 合 素 质 因 此,

More information

PowerPoint Presentation

PowerPoint Presentation 数据结构与算法 ( 三 ) 张铭主讲 采用教材 : 张铭, 王腾蛟, 赵海燕编写高等教育出版社,2008. 6 ( 十一五 国家级规划教材 ) http://www.jpk.pku.edu.cn/pkujpk/course/sjjg 第 3 章栈与队列 栈 栈的应用 递归到非递归的转换 队列 2 栈 (Stack) 操作受限的线性表 运算只在表的一端进行 队列 (Queue) 运算只在表的两端进行

More information

University of Science and Technology of China A dissertation for master s degree Research of e-learning style for public servants under the context of

University of Science and Technology of China A dissertation for master s degree Research of e-learning style for public servants under the context of 中 国 科 学 技 术 大 学 硕 士 学 位 论 文 新 媒 体 环 境 下 公 务 员 在 线 培 训 模 式 研 究 作 者 姓 名 : 学 科 专 业 : 导 师 姓 名 : 完 成 时 间 : 潘 琳 数 字 媒 体 周 荣 庭 教 授 二 一 二 年 五 月 University of Science and Technology of China A dissertation for

More information

THE APPLICATION OF ISOTOPE RATIO ANALYSIS BY INDUCTIVELY COUPLED PLASMA MASS SPECTROMETER A Dissertation Presented By Chaoyong YANG Supervisor: Prof.D

THE APPLICATION OF ISOTOPE RATIO ANALYSIS BY INDUCTIVELY COUPLED PLASMA MASS SPECTROMETER A Dissertation Presented By Chaoyong YANG Supervisor: Prof.D 10384 070302 9825042 UDC 2001.6. 2001.7. 20016 THE APPLICATION OF ISOTOPE RATIO ANALYSIS BY INDUCTIVELY COUPLED PLASMA MASS SPECTROMETER A Dissertation Presented By Chaoyong YANG Supervisor: Prof.Dr. Xiaoru

More information

Microsoft Word - A200811-773.doc

Microsoft Word - A200811-773.doc 语 言 模 型 在 高 校 保 研 工 作 中 的 应 用 王 洋 辽 宁 工 程 技 术 大 学 理 学 院 信 息 与 计 算 科 学, 辽 宁 阜 新 (3000) E-mail: ben.dan000 @63.com 摘 要 : 问 题 重 述 : 模 糊 性 数 学 发 展 的 主 流 是 在 它 的 应 用 方 面, 其 中 模 糊 语 言 模 型 实 现 了 人 类 语 言 的 数 学

More information

Open topic Bellman-Ford算法与负环

Open topic   Bellman-Ford算法与负环 Open topic Bellman-Ford 2018 11 5 171860508@smail.nju.edu.cn 1/15 Contents 1. G s BF 2. BF 3. BF 2/15 BF G Bellman-Ford false 3/15 BF G Bellman-Ford false G c = v 0, v 1,..., v k (v 0 = v k ) k w(v i 1,

More information