数据结构 - 西南财经大学天府学院

advertisement
西南财经大学天府学院
教
案
任课教师:王静
课程名称:数据结构
任课班级:2007 级计算机 03 班、04 班
授课时间:2008—2009 第一学期
西南财经大学天府学院教务处制
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:1
前 言 第1章
Introduction
章,节
授课方式
课堂讲授
让学生了解教师信息
让学生课程信息、教材及参考书目
介绍本课程的主要内容及安排
介绍学习本课程的方法,增强学好本课程的信心
明确学习纪律、考核、考试方法
教
学
目
的
(1)
(2)
(3)
(4)
(5)
教
学
重
点
(1)举 4 个实际例子阐述本课程的主要内容
(2)让学生明确学习目的、意义及本课程的基本要求
教
学
难
点
培养学生的学习兴趣
教
时间分配
Min
10
15
40
25
10
作业布置
课后总结
(1)
(2)
(3)
(4)
(5)
学
内
容
让学生了解教师信息
让学生课程信息、教材及参考书目
介绍本课程的主要内容及安排
介绍学习本课程的方法,增强学好本课程的信心
明确学习纪律、考核、考试方法
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:2
章,节
教
学
目
的
教
学
重
点
教
学
难
点
时间分配
Min
15
10
25
25
20
授课方式
Chapter 1 Introduction
In this chapter we establish a background for the tools used in the rest of text.
Pseudocode
Sample Algorithm
Statement Constructs
Pseudocode(Algorithm, Tools to define algorithms, Pseudocode)
Sample Algorithm
Statement Constructs
Algorithm
Tools to define algorithms
Pseudocode
Sample Algorithm
Statement Constructs
教
学
内
容
Vocabulary
Highlights in chapter 1
•Pseudocode
•Abstract data type
•Algorithm efficiency analysis
1-1 Pseudocode
Algorithm, Tools to define algorithms: Pseudocode
Sample Algorithm
Statement Constructs
•Sequence statements
•Selection statements
•Loop statements
作业布
置
课后总
结
课堂讲授
Understand Algorithm and Pseudocode
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:3
章,节
教
学
目
的
Abstract data type
Algorithm efficiency analysis
Big-O Notation
教
学
难
点
Abstract data type
Algorithm efficiency analysis
教
时间分配
20
40
10
课堂讲授
In this chapter we establish a background for the tools used in the rest of text.
The Abstract data type
Algorithm efficiency analysis
Big-O Notation
教
学
重
点
Min
30
授课方式
Chapter 1 Introduction(continue)
学
内
容
1-2 The Abstract data type
•Development of programming techniques
•Data type
•Atomic Data
•Composite Data
•Data Structure
•Abstract Data Type
1-3 A Model for an Abstract Data Type
The Concept of ADT Data Structure
1-4 Algorithm efficiency
efficiency analysis
typical Loops and their efficiency
Big-O Notation
1-5 Summary
作业布置
Exercise 2,3,4,6,8,10,12.
课后总结
Understand ADT and algorithm efficiency
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:4
章,节
教
学
目
的
授课方式
Chapter 2 Searching
课堂讲授
In this chapter we discuss One of the most common and consuming operation
in computer science , searching.
List searches (work with arrays)
Sequential search algorithm
Variations on sequential searches
Sentinel search
probability search
Ordered list search
教
学
重
点
sequential search algorithm
Variations on sequential searches
Sentinel search
probability search
Ordered list search
教
学
难
点
sequential search algorithm
Variations on sequential searches
Sentinel search
probability search
教
时间分配
2
15
10
75
学
内
Vocabulary
Highlights in chapter 2
•List searching(including two basic search algorithms)
• Hashed list searching—the key through an algorithmic function
determines the location of data.
2-1 list searches (work with arrays)
sequential search algorithm
Variations on sequential searches
Sentinel search
probability search
Ordered list search
作业布置
课后总结
容
Understand sequential search of list searches
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:5
章,节
Chapter 2 Searching(continue)
授课方式
课堂讲授
教
学
目
的
In this chapter we discuss One of the most common and consuming operation
in computer science , searching.
Binary search(ordered list)
Hashed list searches
Hashing methods: direct, subtraction, modulo division, digit extraction,
midsquare, folding, rotation, pseudorandom generation.
教
学
重
点
Binary search(ordered list)
Hashing methods: direct, subtraction, modulo division,
extraction,midsquare, folding, rotation, pseudorandom generation.
教
学
难
点
时间分配
Min
30
70
Binary search(ordered list)
Hashed list searches
Hashing methods
教
学
内
容
2-1 Binary search(ordered list)
2-3 Hashed list searchesHashing methods:
direct
subtraction
modulo
division
digit extraction
midsquare
folding
rotation
pseudorandom generation
作业布置
课后总结
Understand Binary search and of list searches and Hashed list searches
digit
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:6
章,节
教
学
目
的
授课方式
Chapter 2 Searching(continue)
课堂讲授
In this chapter we discuss One of the most common and consuming operation
in computer science , searching.
collision resolution
Open addressing (Linear probe, Quadratic probe, pseudorandom, Key
offset)
Linked lists
Buckets hashing
Two problems & combination approaches
教
学
重
点
Collision resolution
Open addressing (Linear probe, pseudorandom, Key offset)
Linked lists
Buckets hashing
教
学
难
点
Open addressing (pseudorandom, Key offset)
Linked lists
Buckets hashing
教
时间分配
Min
90
50
15
15
10
10
学
内
容
2-4 Collision resolution
Open addressing
Linear probe
Quadratic probe
Pseudorandom
Key offset
Linked lists
Buckets hashing
Two problems & combination approaches
2-5 summary
作业布置
Exercise 1,2,3,5,8
课后总结
Collision resolution is important to hash list searching, Understand the Open
addressing Collision resolution
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:7
章,节
Chapter 2 Searching(C Implementation)
授课方式
教
学
目
的
Implement the basic searching algorithm with C (Turbo-C)
教
学
重
点
Implement the basic searching algorithm with C (Turbo-C)
教学
难点
时间分配
Min
100
作业布置
课后总结
上机实习
C Implementation
教
学
内
容
Write two functions main & binsrch in Turbo C to implement binary search
algorithm that meets this specification:
The sub-function implementing binary search, it contain 4 parameters :
● list is ordered; it contain at least one element
● end is index to the largest element in the list
● Target is the value of element being sought
● Locn is address of index in calling algorithm
The main function defining preconditions and display the results that meets
this specification:
●
creating an array list1 with 20 elements and initialized
●
input a target from keyboard
●
calling the sub-function binsrch to search target
●
display “The target has been found” and the “location” locn(a
number) if target found
●
display “ The target not found” and the “location” locn(a number )
if target not found.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:8
章,节
教
学
目
的
Linked list Definition
Singly linked list
Linked List Data Structure
Linked List Algorithms
教
学
难
点
Linked list Definition
Singly linked list
Linked List Data Structure
Linked List Algorithms
Min
15
25
20
40
课堂讲授
In this chapter we study the linked list implementation of linear lists.
Linear List Classification, Operation
Linked list Definition
Singly linked list
Linked List Data Structure
Linked List Algorithms
教
学
重
点
时间分配
授课方式
Chapter 3 Linked List
教
学
内
容
Vocabulary
3-1 Linear List Concepts
Linear List Definition
Linear List Classification
Linear List Operation: Insertion, Deletion, Retrieval, traversal
3-2 Linked list concepts
Linked list Definition
A singly linked list
Linked List Data Structure
3-3 Linked List Algorithms
Create List
Insert node
Delete node
Search list
作业布置
课后总结
Using chart, all of the students can easily understand the linked list based on pointer in C
programming.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:9
章,节
教
学
目
的
课堂讲授
In this chapter we study the linked list implementation of linear lists.
Processing A Linked listCreate Linked List
Get Data
Add Node
Remove Node
Print List
Destroy List
教
学
重
点
Processing A Linked list
Get Data
Add Node
Remove Node
教
学
难
点
Get Data
Add Node
Remove Node
教
时间分配
Min
20
5
10
20
20
20
5
授课方式
Chapter 3 Linked List(continue)
学
内
容
3-4 Processing A Linked list
Create Linked List
Get Data
Add Node
Remove Node
Print List
Destroy List
作业布置
课后总结
Go ahead to understand the application of pointer in linked list.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:10
章,节
教
学
目
的
Chapter 3 Linked List(continue)
授课方式
In this chapter we study the linked list implementation of linear lists.
List Applications
Complex Linked List Structures
Multilinked Lists
教
学
重
点
List Applications
Append Lists: append the second list
Array of lists (another application)
Complex Linked List Structures
教
学
难
点
List Applications
Complex Linked List Structures
Circularly Linked Lists
Doubly linked list
教
时间分配
Min
30
60
10
课堂讲授
学
to the end of the first one .
内
3-5 List Applications
Append Lists
append the second list
to the end of the first one .
Array of lists (another application)
3-6 Complex Linked List Structures
Circularly Linked Lists
Doubly linked list
Doubly Linked List Insertion
Doubly Linked List deletion
Multilinked Lists
3-9 Summary
作业布置
Exercise 1,2,3,4,7,8
课后总结
Understand the doubly linked list, It’s not too easy
容
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:11
章,节
教学
目的
Practice the Linked list in Turbo C on PC
教学
重点
To write programs and Justify it.
教学
难点
To write a correct program.
时间
分配
Min
100
作业
布置
课后
总结
授课方式
第 3 章 Linked List(C Implementation)
教
学
内
上机实习
容
Write a function main and 3 sub-functions linsch, linsert and lprint in Turbo C
to implement linked list processing algorithm that meets this specification:
The sub-function implementing linked list operations :
● linsch: locate the location node insert
● linsert : insert a node into linked list
● lprint : output all node of linked list
The main function defining preconditions and display the results that meets
this specification:
● input the number and data of nodes from keyboard
● calling linsch to locate the location
● calling linsert to create a linked list
● calling lprint output linked list
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:12
章,节
授课方式
Chapter 4 Stack
课堂讲授
教
学
目
的
In this chapter we study the stacks .
Stack definition
Basic stack operations
Stack Linked List Implementation
Stack Algorithms and Pseudocode implementation
教
学
重
点
Basic stack operations
Stack Linked List Implementation
Stack Algorithms and Pseudocode implementation
教
学
难
点
时间分配
Min
10
5
5
20
60
Stack Linked List Implementation
Stack Algorithms and Pseudocode implementation
教
学
内
容
Vocabulary
Stack definition
Understand stack
4-1 Basic stack operations
Push stack
Pop stack
Stack top
Example of basic stack operations
4-2 Stack Linked List Implementation
The Structure of Stack Head and Stack node
Stack Algorithms and Pseudocode implementation
Create stack
Push stack
Pop stack
Stack top
Empty Stack
Full stack
Stack count
Destroy stack
作业布置
课后总结
On the basis of linked list, it’s easy to understand the concept of stack..
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:13
章,节
教
学
目
的
教
学
重
点
教
学
难
点
5
10
课堂讲授
In this chapter we study the stacks
Reversing (data Reverse a List, Convert decimal to binary)
Parsing data(Postponing data usage Postponement and arithmetic
expression evaluation, Infix to postfix transformation, Transformexpression
with stack, Evaluating Postfix expressions)
Backtracking steps
Reversing (data Reverse a List, Convert decimal to binary)
Parsing data(Postponing data usage Postponement and arithmetic
expression evaluation, Infix to postfix transformation, Transform expression
with stack, Evaluating Postfix expressions)
Backtracking steps
Reversing (data Reverse a List, Convert decimal to binary)
Parsing
data(Postponement
and
arithmetic
expression
Transform expression with stack, Evaluating Postfix expressions)
Backtracking steps
教
时间分配
Min
90
10
20
20
15
20
授课方式
Chapter 4 Stack (continue)
学
内
4-3 Stack Applications
Reversing data
Reverse a List
Convert decimal to binary
Parsing
Postponement and arithmetic expression
Manual transformation
Transform expression with stack
Evaluating Postfix expressions
Backtracking
Summary
作业布置
Exercise 1,2,3,4
课后总结
It’s a big problem to develop stack appliction.
容
evaluation,
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:14
章,
节
教
学
目
的
Practice the Stack in Turbo C on PC
教
学
重
点
To write programs and Justify it.
教
学
难
点
To write a correct program.
时
间
分
配
Min
100
作
业
布
置
课
后
总
结
授课方式
第 4 章 Stack (C Implementation)
教
学
内
容
Write a program to implement that convert decimal to binary
Test it with the numbers 19,127,255.
上机实习
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:15
章,节
教
学
目
的
Queue Operations
Queue Linked List Design
Queue Algorithms
Queue Operations
Queue Linked List Design
教
学
难
点
Queue Linked List Design
Data structure
Queue Algorithms
Data structure: Queue head, Queue data node
Enqueue, Dequeue, Retrieving Queue Data
教
时间分配
70
10
60
课堂讲授
In this chapter we study the stacks
教
学
重
点
Min
10
20
授课方式
Chapter 5 Queue
学
内
容
Vocabulary
5.1 Queue Operations
Enqueue
Dequeue
Queue Front
Queue Rear
5.2 Queue Linked List Design
Data structure
Queue head
Queue data node
Queue Algorithms
Create queue
Enqueue
Dequeue
Retrieving Queue Data
Empty Queue
Full Queue
Queue Count
Destroy Queue
作业布置
课后总结
On the basis of linked list, it’s easy to understand the concept of .queue.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:16
章,节
Chapter 5 Queue (continue)
教
学
目
的
In this chapter we study the stacks
Queuing Theory
Queue Applications
Categorizing Data
授课方式
课堂讲授
教
学
重
点
A Single-server queue
A Multi-server queue
Queue Applications
Queue simulation
教
学
难
点
A Single-server queue
Two factors affect the queue: The arriving rate and service time
Queue simulation
教
时间分配
Min
20
70
10
学
内
容
5.3 Queuing Theory
A Single-server queue
A Multi-server queue
Two elements to all queues
Two factors affect the queue
The arriving rate
service time
5.4 Queue Applications
Two queue implementations
Queue simulation: An example(Events, Data structures, Simulation
lgorithm)
Categorizing Data
5.8
Summary
作业布置
Exercise 1,2,4,5
课后总结
Although most of the students can understand the concept of queue, it’s another case in
queue theory and queue simulation application.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:17
章,
节
教
学
目
的
Practice the Queue in Turbo C on PC
教
学
重
点
To write programs and Justify it.
教
学
难
点
To write a correct program.
时
间
分
配
Min
100
作
业
布
置
课
后
总
结
授课方式
第 5 章 Queue (C Implementation)
教
学
内
上机实习
容
Write a program to implement that creates a queue from stack
After the queue has been created , the top of the stack should be the front of
the queue and the base of the stack should be the rear of the queue.
At the end of the program , the stack should be empty.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:18
章,节
教
学
目
的
Chapter 6 Recursion
授课方式
In this chapter we study one approach to writeing repetitive algorithm
Recursion
Factorial – A classical recursive case
How recursion works
Designing recursion algorithms
教
学
重
点
Factorial – A classical recursive case
How recursion works
Designing recursion algorithms
教
学
难
点
Factorial – A classical recursive case
The difference of Iterative and recursion
How recursion works
Designing recursion algorithms
教
时间分配
Min
10
5
25
30
25
5
课堂讲授
学
内
容
Vocabulary
Highlights in this chapter
6-1 Factorial – A classical recursive case
Factorial definition
Iteration algorithm definition
Recursion algorithm definition
6-2 How recursion works
How any call works
How recursion works
6-3 Designing recursion algorithms
The design methodology
The rules for designing a recursive algorithm
Limitation of recursion
Design implementation reverse a linked list
Summary
作业布置
Exercise 1,2,3
课后总结
Also they study the recursion in C language, but most student understand this class
difficultly.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:19
章,节
教
学
目
的
教
学
重
点
教
学
难
点
时间分配
Min
15
30
40
15
Chapter 7
授课方式
Introduction to trees
课堂讲授
In this chapter we discuss the basic concept of tree.
Basic tree concepts
Terminology
definition of a tree
Tree representation
Binary tree structure
properties of Binary trees
Binary tree traversals
Basic tree concepts Lists and Trees
Terminology
Definition of a tree Tree representation
Properties of Binary trees
Binary tree structure
Binary tree traversals
Definition of a tree Tree representation
Properties of Binary trees
Binary tree structure
Binary tree traversals
教
学
内
容
Vocabulary
7-1 Basic tree concepts
Lists and Trees
Terminology
Recursive definition of a tree
Tree representation
7-2 Binary trees
Several binary trees
Properties
Binary tree structure
7-3 Binary tree traversals
Depth first traversals
Breadth first traversals
作业布置
课后总结
The students who have stronger basis of linked list and recursion can easily understand the
basic concept of tree.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:20
章,节
教
学
目
的
教
学
重
点
教
学
难
点
Chapter 7
In this chapter we discuss the basic concept of tree.
Depth-first traversals(NLR,LNR,LRN)
Breadth-first traversals
Expression trees
General tree & Changing general tree to binary tree
Huffman code
Depth-first traversals(NLR,LNR,LRN)
Breadth-first traversals
Expression trees
Huffman code
Depth-first traversals(NLR,LNR,LRN)
Breadth-first traversals
Expression trees
Huffman code
教
时间分配
Min
25
25
10
30
10
授课方式
Introduction to trees(continue)
学
内
容
7-3 Binary tree traversals (continue)
Depth-first traversals
Preorder traversal (NLR)
Inorder traversal (LNR)
Postorder traversal (LRN)
Breadth-first traversals
7-4 Expression trees
Infix traversal
Postfix traversal
Prefix traversal
7-4 General tree
Changing general tree to binary tree
7-6 Huffman code
7-7 Summary
作业布置
Exercise 2,4,7,9,12,16,18
课后总结
It’s difficult to understand expression tree for many students.
课堂讲授
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:21
章,节
教
学
目
的
教
学
重
点
教
学
难
点
10
10
课堂讲授
In this chapter we discuss the binary search trees..
Binary search trees
Operations on binary search trees
Binary search tree traversals
Binary search tree search algorithms
Insert node: Iterative insert (algorithm),Recursive insert node(algorithm)
Delete node
AVL trees
Binary search trees
Operations on binary search trees
Binary search tree traversals
Binary search tree search algorithms
AVL trees
Operations on binary search trees
Binary search tree traversals
Binary search tree search algorithms
AVL trees
教
时间分配
Min
80
授课方式
Chapter 8 Search trees
学
内
容
8-1 Binary search trees
Operations on binary search trees
Binary search tree traversals
Binary search tree search algorithms
Insert node: Iterative insert (algorithm)
Recursive insert node(algorithm)
Delete node
8-2 AVL trees
8-5 SUMMARY
作业布置
Exercise 2,4,6,7,8,10,12
课后总结
The students have the basis of tree can easily understand binary search tree.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:22
章,节
教
学
目
的
教
学
重
点
教学
难点
Chapter 11
65
课堂讲授
In this chapter we discuss advanced sorting concepts.
General sort concept
Insertion sorts
Straight insertion sorts
Shell sorts
Diminishing increments in shell sort
Algorithm Shell sort
Insertion sort algorithm efficiency
Insertion sorts
Straight insertion sorts
Shell sorts
Diminishing increments in shell sort
Algorithm Shell sort
Insertion sort algorithm efficiency
Shell sorts
Diminishing increments in shell sort
Algorithm Shell sort
教
时间分配
Min
15
20
授课方式
advanced sorting concepts
学
内
容
Vocabulary
11-1 General sort concept
Internal sort
External sort
Sort order
Sort stability
Sort efficiency
Passes
11-2 Insertion sorts
Straight insertion sorts
Shell sorts
Diminishing increments in shell sort
Algorithm Shell sort
Insertion sort algorithm efficiency
作业布置
课后总结
Most students are very interesting in sorting algorithms,but it’s to easy to understand the
Shell sorts.
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:23
章,节
教
学
目
的
教
学
重
点
教
学
难
点
时间分配
Min
30
70
advanced sorting
授课方式
concepts(continue)
In this chapter we discuss advanced sorting concepts.
Selection sorts
Straight selection sorts
Selection sort algorithm efficiency
Exchange sorts
Bubble sorts
Quick sorts
Selection sorts
Straight selection sorts
Exchange sorts
Bubble sorts
Quick sorts
Chapter 11
Selection sorts
Straight selection sorts
Exchange sorts
Quick sorts
教
学
内
容
11-3 Selection sorts
Straight selection sorts
selection sort algorithm efficiency
11-4 Exchange sorts
Bubble sorts
Quick sorts
Quick Sorts Algorithm
作业布置
课后总结
Most student understand the Shell sorts difficultly.
课堂讲授
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:24
advanced sorting
授课方式
concepts(continue)
In this chapter we discuss advanced sorting concepts.
Quick Sorts Algorithm
教
Straight insertion module
学
Determinie median of three
目
Quick sort pivot
的
Quick sort algorithm: quickSort
Exchange Sorts Algorithm efficiency
Quick Sorts Algorithm
教
Straight insertion module
学
Determinie median of three
重
Quick sort pivot
点
Quick sort algorithm: quickSort
Exchange Sorts Algorithm efficiency
Quick Sorts Algorithm
教
Straight insertion module
学
Determine median of three
难
Quick sort pivot
点
Quick sort algorithm: quick Sort
Exchange Sorts Algorithm efficiency
时间分配
教 学 内 容
Min
80
11-4 Quick Sorts Algorithm(continue)
Straight insertion module
Determine median of three
Quick sort pivot
Quick sort algorithm: quick Sort
Exchange Sorts Algorithm efficiency
20
11-5 Summary
章,节
Chapter 11
作业布置
Exercise 2,3,4,6,8,9
课后总结
Most student understand the Shell sorts difficultly.
课堂讲授
西南财经大学天府学院教案
TIANFU COLLEGE OF SWUFE
教
案
编号:24
章,
节
教
学
目
的
Practice the Sort in Turbo C on PC
教
学
重
点
To write programs and Justify it.
教
学
难
点
To write a correct program.
时
间
分
配
Min
100
授课方式
第 11 章 Sort (C Implementation)
教
学
内
上机实习
容
Write a program to implement Bubble sort algorithm.
Display .the array before and after the sort At the end of the program display the total
moves needed to sort the array.
作
业
布
置
课
后
总
结
Download