没有合适的资源?快使用搜索试试~ 我知道了~
首页Foundations of Computer Science(英文版)
Foundations of Computer Science(英文版)
1星 需积分: 34 59 下载量 117 浏览量
更新于2023-03-16
评论 3
收藏 4.49MB PDF 举报
Tree, List, Set, Graph, Relational date structure, Recursive description Automata, Regular Expression, Propositional Logic, Predicate Logic.
资源详情
资源评论
资源推荐
TABLE OF CONTENTS v
✦
✦ ✦
✦
Table of Contents
Preface ix
Chapter 1. Computer Science: The Mechanization of Abstraction 1
1.1. What This Book Is About 3
1.2. What This Chapter Is About 6
1.3. Data Models 6
1.4. The C Data Model 13
1.5. Algorithms and the Design of Programs 20
1.6. Some C Conventions Used Throughout the Book 22
1.7. Summary of Chapter 1 23
1.8. Bibliographic Notes for Chapter 1 24
Chapter 2. Iteration, Induction, and Recursion 25
2.1. What This Chapter Is About 27
2.2. Iteration 27
2.3. Inductive Proofs 34
2.4. Complete Induction 44
2.5. Proving Properties of Pro grams 52
2.6. Recursive Definitions 59
2.7. Recursive Functions 69
2.8. Merge Sort: A Recursive Sorting Algorithm 75
2.9. Proving Properties of Recursive Programs 8 4
2.10. Summary of Chapter 2 87
2.11. Bibliographic Notes for Chapter 2 88
Chapter 3. The Running Time of Programs 89
3.1. What This Chapter Is About 89
3.2. Choosing an Algorithm 90
3.3. Measuring Running Time 9 1
3.4. Big-Oh and Approximate Running Time 96
3.5. Simplifying Big-Oh E xpressions 101
3.6. Analyzing the Running Time of a Program 109
3.7. A Recursive Rule for Bounding Running Time 116
3.8. Analyzing P rograms with Function Calls 127
3.9. Analyzing Recur sive Functions 132
3.10. Analysis of Merge Sort 1 36
3.11. Solving Recurrence Relations 144
3.12. Summary of Chapter 3 154
3.13. Bibliographic Notes for Chapter 3 155
Chapter 4. Combinatorics and Probability 156
4.1. What This Chapter Is About 156
4.2. Counting Assignments 157
4.3. Counting Permutations 160
4.4. Ordered Selections 167
vi TABLE OF CONTENTS
4.5. Unordered Sele c tio ns 170
4.6. Orderings With Identical Items 178
4.7. Distribution of Objects to Bins 181
4.8. Combining Counting Rules 184
4.9. Introduction to Probability Theory 187
4.10. Conditional Probability 193
4.11. Probabilistic Reasoning 203
4.12. Expected Value Calculations 212
4.13. Some Programming Applications of Probability 215
4.14. Summary of Chapter 4 220
4.15. Bibliographic Notes for Chapter 4 221
Chapter 5. The Tree Data Model 223
5.1. What This Chapter Is About 223
5.2. Basic Terminolo gy 224
5.3. Data Structures for Trees 231
5.4. Recursions on Trees 239
5.5. Structural Induction 248
5.6. Binary Trees 253
5.7. Binary Search Trees 258
5.8. Efficiency o f Binary Search Tree Operations 268
5.9. Priority Queues and Partially Ordered Trees 271
5.10. Heapsort: Sorting with Bala nce d POTs 280
5.11. Summary of Chapter 5 284
5.12. Bibliographic Notes for Chapter 5 285
Chapter 6. The List Da ta Model 286
6.1. What This Chapter Is About 286
6.2. Basic Terminolo gy 287
6.3. Operations on Lists 291
6.4. The Linked-List Data Str ucture 293
6.5. Array-Based Implementation of L ists 301
6.6. Stacks 306
6.7. Implementing Function Calls Using a Stack 312
6.8. Queues 318
6.9. Longest C ommon Subsequences 321
6.10. Representing Character Strings 327
6.11. Summary of Chapter 6 334
6.12. Bibliographic Notes for Chapter 6 335
Chapter 7. The Set Data Model 337
7.1. What This Chapter Is About 337
7.2. Basic Definitions 338
7.3. Operations on Sets 342
7.4. List Implementation of Sets 351
7.5. Characteristic-Vector Implementation of Sets 357
7.6. Hashing 360
7.7. Relations and Functions 366
7.8. Implementing Functions as Data 373
7.9. Implementing Binary Relations 380
TABLE OF CONTENTS vii
7.10. Some Special Properties of Binary Relations 386
7.11. Infinite Sets 396
7.12. Summary of Chapter 7 401
7.13. Bibliographic Notes for Chapter 7 402
Chapter 8. The Relational Data Model 403
8.1. What This Chapter Is About 403
8.2. Relations 404
8.3. Keys 411
8.4. Primary Storage Structures for Relations 414
8.5. Secondary Index Structur e s 419
8.6. Navigation among Relations 423
8.7. An Algebra of Relations 428
8.8. Implementing Relational Algebra Operations 436
8.9. Algebraic Laws for Rela tions 440
8.10. Summary of Chapter 8 449
8.11. Bibliographic Notes for Chapter 8 450
Chapter 9. The Graph Data Model 451
9.1. What This Chapter Is About 451
9.2. Basic Concepts 452
9.3. Implementation of Graphs 459
9.4. Connected Components of an Undirected Gra ph 466
9.5. Minimal Spanning Trees 478
9.6. Depth-First Search 484
9.7. Some Uses of Depth-First Search 495
9.8. Dijkstra’s Algo rithm for Finding Shortest Paths 502
9.9. Floyd’s Algorithm for Shortest Paths 513
9.10. An Introduction to Graph Theory 521
9.11. Summary of Chapter 9 526
9.12. Bibliographic Notes for Chapter 9 527
Chapter 10. Patterns, Automata, and Regular Expressions 529
10.1. What This Chapter Is About 530
10.2. State Machines and Automata 530
10.3. Deterministic and Nondeter ministic Automa ta 536
10.4. From Nondeterminism to Determinism 547
10.5. Regular Expressions 556
10.6. The UNIX Extensions to Regular Expressions 564
10.7. Algebraic Laws for Regular Expressions 568
10.8. From Regular Expressions to Automata 571
10.9. From Automata to Regular Expressions 58 2
10.10. Summary of Chapter 10 588
10.11. Bibliographic Notes for Chapter 10 589
Chapter 11. Recursive Description of Patterns 591
11.1. What This Chapter Is About 591
11.2. Context-Free Gra mma rs 592
11.3. Languages from Grammars 599
11.4. Parse Trees 602
viii TABLE OF CONTENTS
11.5. Ambiguity and the Design of Grammars 610
11.6. Constructing Parse Trees 617
11.7. A Table-Driven Parsing Algorithm 625
11.8. Grammars Ver sus Regular Expre ssions 634
11.9. Summary of Chapter 11 640
11.10. Bibliographic Notes for Chapter 11 641
Chapter 12. Propositional Logic 642
12.1. What This Chapter Is About 642
12.2. What Is Propositional Logic? 643
12.3. Logical Expressions 645
12.4. Truth Tables 649
12.5. From Boolean Functions to Logical Expressions 655
12.6. Designing Logical Ex pressions by Karnaugh Maps 660
12.7. Tautologies 669
12.8. Some Algebraic Laws for Logical Expressions 674
12.9. Tautologies and Methods of Proof 682
12.10. Deduction 686
12.11. Proofs by Resolution 692
12.12. Summary of Chapter 12 697
12.13. Bibliographic Notes for Chapter 12 698
Chapter 13. Using Logic to Design Co mputer Components 699
13.1. What This Chapter is About 699
13.2. Gates 700
13.3. Circuits 701
13.4. Logical Expressions and Circuits 705
13.5. Some Physical Constraints on Circuits 7 11
13.6. A Divide-and-Conquer Addition Circuit 716
13.7. Design of a Multiplexer 723
13.8. Memory Elements 730
13.9. Summary of Chapter 13 731
13.10. Bibliographic Notes for Chapter 13 732
Chapter 14. Predicate Logic 733
14.1. What This Chapter Is About 733
14.2. Predicates 734
14.3. Logical Expressions 736
14.4. Quantifiers 739
14.5. Interpretations 745
14.6. Tautologies 751
14.7. Tautologies Involving Quantifiers 753
14.8. Proofs in Predicate Logic 75 9
14.9. Proofs from Rules and Facts 762
14.10. Truth a nd Provability 7 68
14.11. Summary of Chapter 14 774
14.12. Bibliographic Notes for Chapter 14 775
Index 776
CHAPTER 1
✦
✦ ✦
✦
Computer Science:
The Mechanization
of Abstraction
Though it is a new field, computer science already touches virtually every aspect
of human endeavor. Its impact on society is se e n in the proliferation of computers,
information systems, text editors, spreadsheets, and all of the wonderful application
programs that have been developed to make computers easier to use and people more
productive. An important part of the field deals with how to make programming
easier and software more reliable. But fundamentally, computer science is a science
of abstraction — creating the right model for thinking about a problem and devising
Abstraction
the appropria te mechanizable techniques to solve it.
Every other science deals with the universe a s it is. The physicist’s job, for
example, is to understand how the world works, not to invent a world in which
physical laws would be simpler or more pleasant to follow. Computer scientists,
on the other hand, must create abstractions of real-world problems that can be
understood by computer users and, at the same time, that can be represented and
manipulated inside a computer.
Sometimes the process of abstraction is simple. For example, we can model the
behavior of the electronic circuits used to build computers quite well by an abstrac-
tion called “pr opo sitional logic.” The modeling of circuits by logical express ions is
not exact; it simplifies, or abstracts away, many details — such as the time it takes
for electrons to flow throug h circ uits and gates. Nevertheless, the propos itio nal
logic model is good enough to help us design computer circuits well. We shall have
much more to say about propositional logic in Chapter 12.
As another example, suppose we are faced with the problem of s cheduling final
Exam
scheduling
examinations for courses. That is, we must assign course exams to time slots so
that two courses may have their exams scheduled in the same time slot only if there
is no student taking both. At first, it may not be apparent how we should mo del
this problem. One approach is to draw a circle called a node for each co urse and
draw a line called an edge connecting two nodes if the c orresponding courses have
a student in common. Figure 1.1 suggests a possible picture for five courses; the
picture is called a course-conflict graph.
Given the course-conflict graph, we can solve the exam-scheduling problem by
repeatedly finding a nd removing “maximal independent sets” from the graph. An
1
剩余778页未读,继续阅读
丽娃河畔
- 粉丝: 19
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- stc12c5a60s2 例程
- Android通过全局变量传递数据
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1