Essential Logic for Computer Science

Essential Logic for Computer Science

ISBN-10:
0262039184
ISBN-13:
9780262039185
Pub. Date:
01/08/2019
Publisher:
MIT Press
ISBN-10:
0262039184
ISBN-13:
9780262039185
Pub. Date:
01/08/2019
Publisher:
MIT Press
Essential Logic for Computer Science

Essential Logic for Computer Science

$50.0
Current price is , Original price is $50.0. You
$50.00 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Overview

An introduction to applying predicate logic to testing and verification of software and digital circuits that focuses on applications rather than theory.

Computer scientists use logic for testing and verification of software and digital circuits, but many computer science students study logic only in the context of traditional mathematics, encountering the subject in a few lectures and a handful of problem sets in a discrete math course. This book offers a more substantive and rigorous approach to logic that focuses on applications in computer science. Topics covered include predicate logic, equation-based software, automated testing and theorem proving, and large-scale computation.

Formalism is emphasized, and the book employs three formal notations: traditional algebraic formulas of propositional and predicate logic; digital circuit diagrams; and the widely used partially automated theorem prover, ACL2, which provides an accessible introduction to mechanized formalism. For readers who want to see formalization in action, the text presents examples using Proof Pad, a lightweight ACL2 environment. Readers will not become ALC2 experts, but will learn how mechanized logic can benefit software and hardware engineers. In addition, 180 exercises, some of them extremely challenging, offer opportunities for problem solving. There are no prerequisites beyond high school algebra. Programming experience is not required to understand the book's equation-based approach. The book can be used in undergraduate courses in logic for computer science and introduction to computer science and in math courses for computer science students.


Product Details

ISBN-13: 9780262039185
Publisher: MIT Press
Publication date: 01/08/2019
Series: The MIT Press
Pages: 304
Product dimensions: 7.20(w) x 9.10(h) x 0.90(d)
Age Range: 18 Years

About the Author

Rex Page is Professor Emeritus in the School of Computer Science at the University of Oklahoma.

Ruben Gamboa is Professor in the Department of Computer Science at the University of Wyoming.

Table of Contents

Preface xiii

I Logic and Equations

1 Computer Systems: Simple Principles Lead to Complex Behavior 3

1.1 Hardware and Software 3

1.2 Structure of a Program 5

1.3 Deep Blue and Inductive Definitions 9

Exercises 12

2 Boolean Formulas and Equations 15

2.1 Reasoning with Equations 15

Exercises 18

2.2 Boolean Equations 19

Exercises 26

2.3 Boolean Formulas 27

Exercises 32

2.4 Digital Circuits 33

Exercises 36

2.5 Deduction 37

Exercises 49

2.6 Predicates and Quantifiers 51

Exercises 54

2.7 Reasoning with Quantified Predicates 55

Exercises 62

2.8 Boolean Models 63

Exercises 68

2.9 More General Models with Predicates and Quantifiers 68

3 Software Testing and Prefix Notation 71

Exercises 76

4 Mathematical Induction 79

4.1 Lists as Mathematical Objects 79

Exercises 84

4.2 Mathematical Induction 85

Exercises 91

4.3 Defun: Defining Operators in ACL2 92

4.4 Concatenation, Prefixes, and Suffixes 93

Exercises 99

5 Mechanized Logic 101

5.1 ACL2 Theorems and Proofs 102

5.2 Using Books of Proven Theorems 103

Exercises 104

5.3 Theorems with Constraints 105

Exercises 107

5.4 Helping Mechanized Logic Find its Way 107

Exercises 111

5.5 Proof Automation and Things That Can't Be Done 112

Exercises 119

II Computer Arithmetic

6 Binary Numerals 123

6.1 Numbers and Numerals 123

Exercises 128

6.2 Numbers from Numerals 129

Exercises 133

6.3 Binary Numerals 134

Exercises 135

7 Adders 139

7.1 Adding Numerals 139

Exercises 140

7.2 Circuits for Adding One-Bit Binary Numerals 140

7.3 Circuit for Adding Two-Bit Binary Numerals 143

Exercises 145

7.4 Adding w-Bit Binary Numerals 145

Exercises 148

7.5 Numerals for Negative Numbers 150

Exercises 153

8 Multipliers and Bignum Arithmetic 157

8.1 Bignum Adder 158

Exercises 161

8.2 Shift-and-Add Multiplier 161

Exercises 165

III Algorithms

9 Multiplexers and Demultiplexers 169

9.1 Multiplexer 169

Exercises 172

9.2 Demultiplexer 173

Exercises 175

10 Sorting 177

10.1 Insertion-Sort 178

Exercises 180

10.2 Order-Preserving Merge 182

Exercises 183

10.3 Merge-Sort 184

Exercises 185

10.4 Analysis of Sorting Algorithms 186

10.4.1 Counting Computation Steps 186

Exercises 188

10.4.2 Computation Steps in Demultiplex 189

Exercises 190

10.4.3 Computation Steps in Merge 191

Exercises 192

10.4.4 Computation Steps in Merge-Sort 192

Exercises 194

10.4.5 Computation Steps in Insertion-Sort 196

Exercises 199

11 Search Trees 201

11.1 Finding Things 201

11.2 The AVL Solution 203

11.3 Representing Search Trees 206

11.4 Ordered Search Trees 207

Exercises 208

11.5 Balanced Search Trees 208

Exercises 210

11.6 Inserting a New Item in a Search Tree 210

Exercises 212

11.7 Insertion, Case by Case 212

Exercises 217

11.8 Double Rotations 218

Exercises 222

11.9 Fast Insertion 223

Exercises 225

12 Hash Tables 227

12.1 Lists and Arrays 227

12.2 Hash Operators 229

Exercises 234

12.3 Some Applications 236

IV Computation in Practice

13 Sharding with Facebook 243

13.1 The Technical Challenge 243

13.2 Stopgap Remedies 245

13.2.1 Caching 245

13.2.2 Sharding 246

13.3 The Cassandra Solution 247

13.4 Summary 249

14 Parallel Computation with MapReduce 251

14.1 Vertical and Horizontal Scaling 251

14.2 The MapReduce Strategy 252

14.3 Data Mining with MapReduce 256

14.4 Summary 261

15 Generating Art with Computers 263

15.1 Representing Images in a Computer 263

15.2 Generating Images Randomly 266

15.3 Generating Purposeful Images 270

Index 273

What People are Saying About This

From the Publisher

“Mathematical logic is to computer science what calculus is to physics. If you really want to understand computer science, let this book be your guide.”

J Strother Moore, Inman Chair Professor Emeritus, University of Texas at Austin

“Many other books present logic as an object of study. This book conveys instead, in an engaging tone, how logic gets put to work in computer science, covering usages of logic that range from the foundations for the infrastructure of computing to the design, testing and veri?cation of programs. As a bonus, the book uses a system of mechanized logic that allows readers to experiment with formal methods.”

Veronica Gaspes, Associate Professor, Halmstad University/CERES

“Have you ever wondered why logic and mathematics are important? Page and Gamboa take you on a wondrous journey through how Computer Science works based on logic. Discover how and why data structures, digital circuits, sorting, sharding, and MapReduce work and discover how mechanized logic is used to prove that they correctly work. This is essential knowledge for all citizens of the Information Age.”

Marco T. Morazán, Professor, Seton Hall University

“Page and Gamboa deliver a beautifully clear and elegant text that introduces aspiring software developers to the fundamental mathematics behind software. This book is the whole package: the content is well motivated, backed by software to help students work the multitude of exercises, and covers a wide range of topics. Offering a course on this text is a fantastic service to your students.”

Robby Findler, Professor, Northwestern University

From the B&N Reads Blog

Customer Reviews