Textbook Invitation To Computer Science 8Th Edition G Michael Schneider Ebook All Chapter PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Invitation to Computer Science 8th

Edition G. Michael Schneider


Visit to download the full and correct content document:
https://textbookfull.com/product/invitation-to-computer-science-8th-edition-g-michael-s
chneider/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Political Science An Introduction Michael G. Roskin

https://textbookfull.com/product/political-science-an-
introduction-michael-g-roskin/

GATE 2020 Computer Science and Information Technology


8th Edition Trishna Knowledge Systems

https://textbookfull.com/product/gate-2020-computer-science-and-
information-technology-8th-edition-trishna-knowledge-systems/

Introduction to public health Schneider

https://textbookfull.com/product/introduction-to-public-health-
schneider/

Retailing Management, 8th Edition Michael Levy

https://textbookfull.com/product/retailing-management-8th-
edition-michael-levy/
Invitation to Number Theory 1st Edition Ore

https://textbookfull.com/product/invitation-to-number-theory-1st-
edition-ore/

Invitation to World Religions Second Edition Brodd

https://textbookfull.com/product/invitation-to-world-religions-
second-edition-brodd/

An Invitation to Geomathematics Willi Freeden

https://textbookfull.com/product/an-invitation-to-geomathematics-
willi-freeden/

Lawrie's Meat Science, 8th ed 8th Edition Fidel Toldra

https://textbookfull.com/product/lawries-meat-science-8th-ed-8th-
edition-fidel-toldra/

Invitation to Number Theory 2nd Edition Oystein Ore

https://textbookfull.com/product/invitation-to-number-theory-2nd-
edition-oystein-ore/
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
8th Edition

Invitation
to Computer
Science

G. Michael Schneider
Macalester College

Judith L. Gersting
Indiana University-Purdue University
at Indianapolis

Australia • Brazil • Mexico • Singapore • United Kingdom • United States

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.

Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Invitation to Computer ­Science, © 2019, 2016 Cengage Learning, Inc.
8th Edition
Unless otherwise noted, all content is © Cengage.
G. Michael Schneider & Judith L. Gersting
ALL RIGHTS RESERVED. No part of this work covered by the copy-
right herein may be reproduced or distributed in any form or by
SVP, GM Skills & Global Product Management:
any means, except as permitted by U.S. copyright law, without the
Jonathan Lau
prior written permission of the copyright owner.
Product Director: Lauren Murphy

Product Team Manager: Kristin McNary


For product information and technology assistance, contact us at
Product Manager: Kate Mason Cengage Customer & Sales Support, 1-800-354-9706

Executive Director, Development: Marah Bellegarde


For permission to use material from this text or product, submit
Senior Content Development Manager: all requests online at www.cengage.com/permissions.
Leigh Hefferon Further permissions questions can be e-mailed to
[email protected]
Developmental Editor: Deb Kaufmann

Senior Content Developer, Media: Michelle


­Ruelos Cannistraci
Library of Congress Control Number: 2017955994
Project Manager: Ann Loch
Student Edition ISBN: 978-1-3375-6191-4
Product Assistant: Jake Toth
Loose Leaf ISBN: 978-1-337-68593-1
Vice President, Marketing Services: Jennifer Ann
Baker Cengage
Marketing Manager: Stephanie Albracht 20 Channel Center Street
Boston, MA 02210
Senior Content Project Manager: Jennifer
USA
Feltri-George

Content Digitization Project Manager: Laura Cengage is a leading provider of customized learning solutions with
Ruschman employees residing in nearly 40 different countries and sales in more
than 125 countries around the world. Find your local representative
Senior Digital Project Manager: Noah Vincelette at www.cengage.com.
Senior Art Director: Diana Graham
Cengage products are represented in Canada by Nelson Education, Ltd.
Cover Designer: Angela Sheehan

Cover image(s): sumkinn/Shutterstock.com; To learn more about Cengage platforms and services, visit
­sumkinn/Shutterstock.com; Studiojumpee/ www.cengage.com.
Shutterstock.com
To register or access your online learning solution or purchase materials
Production Service/Composition: SPi Global for your course, visit www.cengagebrain.com.

Notice to the Reader

Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis in c­ onnection
with any of the product information contained herein. Publisher does not assume, and expressly disclaims, any obligation to obtain
and include information other than that provided to it by the manufacturer. The reader is expressly warned to consider and adopt
all safety precautions that might be indicated by the activities described herein and to avoid all potential hazards. By f­ ollowing
the instructions contained herein, the reader willingly assumes all risks in connection with such instructions. The p ­ ublisher makes
no representations or warranties of any kind, including but not limited to, the warranties of fitness for particular purpose or
­merchantability, nor are any such representations implied with respect to the material set forth herein, and the publisher takes no
responsibility with respect to such material. The publisher shall not be liable for any special, consequential, or exemplary damages
resulting, in whole or part, from the readers’ use of, or reliance upon, this material.

Printed in the United States of America


Print Number: 01 Print Year: 2018

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
To my wife, Ruthann, our children, Benjamin, Rebecca,
and Trevor, grandson, Liam, and granddaughter, Sena.

G. M. S.

To my husband, John, and to: Adam and Francine; Jason,


Cathryn, Sammie, and Johnny.

J. L. G.

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Level 6

Chap
ter Social
s
17 Issue
Level 5
Chap
te ions
14, 15rs 13, Applicat
, 16

Level 4
Chap
ters are
9 S oftw
11, 1 , 10, Th e d
2 Worl
Level 3

Chap e
ters lM achin
6, 7,
8 V irtua
The
Level 2

d
Chap Worl
ters ware
4, 5 Hard
The
Level 1
s
u n d ation
Fo
Chap
ters o r i t hmic Science
2, 3 Alg ter
The f Compu
o

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Brief Contents

Chapter 1 
An Introduction to Computer
Science   2

LEVEL 1 The Algorithmic Foundations


of Computer Science   42
Chapter 2 
Algorithm Discovery
and Design   44
Chapter 3 
The Efficiency of
Algorithms   92

LEVEL 2 The Hardware World   150


Chapter 4 
The Building Blocks: Binary
Numbers, Boolean Logic,
and Gates   152
Chapter 5 
Computer Systems
Organization   222

LEVEL 3 The Virtual Machine   278


Chapter 6 An Introduction to System
Software and Virtual
Machines   280
Chapter 7 Computer Networks and Cloud
Computing   336
Chapter 8 Information Security   394

LEVEL 4 The Software World   432


Chapter 9 
Introduction to High-Level
Language Programming   434
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 v
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vi Brief Contents

Chapter 10 The Tower of Babel:


Programming
Languages   480
Chapter 11 Compilers and Language
Translation   542
Chapter 12 Models of
Computation   588

LEVEL 5 Applications   636
Chapter 13 Simulation and
Modeling   638
Chapter 14 Ecommerce, Databases,
and Data Science   670
Chapter 15 Artificial Intelligence   712
Chapter 16 Computer Graphics and
Entertainment: Movies,
Games, and Virtual
Communities   758

LEVEL 6 Social Issues in Computing   790


Chapter 17 Making Decisions about
Computers, Information,
and Society   792

Answers to Practice Problems   833


Index   877

Online Chapters
This text includes five language-specific online-only downloadable
chapters on Ada, C++, C#, Java, and Python, available on the com-
panion site for this text (www.cengage.com) and in MindTap.

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents

Preface to the Eighth Edition    xix

Chapter 1 An Introduction to Computer Science   2


Introduction   2
1.1  
Special Interest Box: In the Beginning . . .    5
1.2  The Definition of Computer Science   6
Special Interest Box: Abu Ja’far Muhammad ibn
Musa Al-Khwarizmi (AD 780–850?)    10
1.3  Algorithms   12
1.3.1  The Formal Definition of an Algorithm    12
1.3.2  The Importance of Algorithmic
Problem Solving   17
Practice Problems   18
1.4  A Brief History of Computing    18
1.4.1  The Early Period: Up to 1940    18
Special Interest Box: The Original “Technophobia”    22
Special Interest Box: Charles Babbage (1791–1871)
Ada Augusta Byron, Countess of Lovelace (1815–1852)    24
1.4.2  The Birth of Computers: 1940–1950    24
Special Interest Box: John Von Neumann (1903–1957)    28
1.4.3  The Modern Era: 1950 to the Present    28
Special Interest Box: And the Verdict Is . . .    29
Special Interest Box: The World’s First Microcomputer    31
1.5  Organization of the Text   34
Laboratory Experience 1   38
EXERCISES   39
CHALLENGE WORK   41

LEVEL 1 The Algorithmic Foundations


of Computer Science   42
Chapter 2 Algorithm Discovery and Design    44
2.1  
Introduction   44
2.2  
Representing Algorithms   44
2.2.1  Pseudocode   44
2.2.2  Sequential Operations   48
2.2.3  Conditional and Iterative Operations    50

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 vii
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii Contents

Practice Problems   51
Special Interest Box: From Little Primitives Mighty
Algorithms Grow   60
2.3  Examples of Algorithmic Problem Solving    60
2.3.1   Example 1: Go Forth and Multiply    60
Practice Problems   61
Practice Problems   64
2.3.2  Example 2: Looking, Looking,
Looking   65
Laboratory Experience 2   70
2.3.3   Example 3: Big, Bigger, Biggest    70
Practice Problems   76
Laboratory Experience 3   76
2.3.4   Example 4: Meeting Your Match    77
Special Interest Box: Hidden Figures   84
2.4  Conclusion   84
Practice Problems   85
EXERCISES   86
CHALLENGE WORK   89

Chapter 3 The Efficiency of Algorithms    92


Introduction   92
3.1  
Attributes of Algorithms   92
3.2  
Practice Problems   97
3.3  Measuring Efficiency   97
3.3.1  Sequential Search   97
3.3.2  Order of Magnitude—Order n   100
Special Interest Box: Flipping Pancakes   102
3.3.3  Selection Sort   102
Practice Problem   103
Practice Problems   109
3.3.4  Order of Magnitude—Order n2   109
Special Interest Box: The Tortoise and the Hare    113
Laboratory Experience 4   114
Practice Problem   115
3.4  Analysis of Algorithms   115
3.4.1  Data Cleanup Algorithms   115
3.4.2  Binary Search   123
Practice Problems   123
Practice Problems   129
Laboratory Experience 5   130
3.4.3  Pattern Matching   130
3.4.4  Summary   131
Practice Problem   132
3.5  When Things Get Out of Hand    132
Practice Problems   137
3.6  Summary of Level 1    137
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents ix

Laboratory Experience 6   138


EXERCISES   139
CHALLENGE WORK   149

LEVEL 2 The Hardware World   150


Chapter 4 The Building Blocks: Binary Numbers, Boolean
Logic, and Gates   152
Introduction   152
4.1  
The Binary Numbering System    153
4.2  
B
 inary
Representation of Numeric and
4.2.1  
Textual Information   153
Special Interest Box: A Not So Basic Base    158
Practice Problems   166
4.2.2   Binary Representation of Sound
and Images   167
Practice Problems   175
4.2.3  The Reliability of Binary
Representation   176
4.2.4   Binary Storage Devices   177
Special Interest Box: Moore’s Law and the Limits
of Chip Design   182
4.3  Boolean Logic and Gates   183
4.3.1   Boolean Logic   183
Practice Problems   187
4.3.2   Gates   188
Special Interest Box: George Boole (1815–1864)    192
4.4  Building Computer Circuits   193
4.4.1   Introduction   193
4.4.2   A Circuit Construction Algorithm    195
Practice Problems   199
4.4.3  Examples of Circuit Design and
­Construction   200
Laboratory Experience 7   200
Laboratory Experience 8   208
Practice Problems   209
Special Interest Box: Dr. William Shockley
(1910–1989)   209
4.5  Control Circuits   211
4.6  Conclusion   215
EXERCISES   217
CHALLENGE WORK   220

Chapter 5 Computer Systems Organization   222


Introduction   222
5.1  
The Components of a Computer System   225
5.2  
Memory
5.2.1   and Cache   227
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x Contents

Special Interest Box: Powers of 10    230


Input/Output and Mass Storage    238
5.2.2  
Practice Problems   239
Practice Problems   244
The Arithmetic/Logic Unit   245
5.2.3  
The Control Unit   249
5.2.4  
Practice Problems   256
5.3  Putting the Pieces Together—the Von Neumann
Architecture   258
Special Interest Box: An Alphabet Soup of Speed
Measures: MHz, GHz, MIPS, and GFLOPS    264
Laboratory Experience 9   265
5.4   Non–Von Neumann Architectures   265
Special Interest Box: Speed to Burn    269
5.5   Summary of Level 2   271
Special Interest Box: Quantum Computing   272
EXERCISES   273
CHALLENGE WORK   276

LEVEL 3 The Virtual Machine   278


Chapter 6 An Introduction to System Software and
Virtual Machines   280
Introduction   280
6.1  
System Software   282
6.2  
The Virtual Machine   282
6.2.1  
Types of System Software    284
6.2.2  
Assemblers and Assembly Language   286
6.3  
6.3.1   Assembly Language   286
Practice Problems   294
6.3.2  Examples of Assembly Language
Code   295
Practice Problems   299
Laboratory Experience 10   300
6.3.3  Translation and Loading   300
Practice Problems   307
6.4  Operating Systems   308
6.4.1   Functions of an Operating System    308
Special Interest Box: A Machine for the Rest of Us    311
Practice Problems   315
6.4.2   Historical Overview of Operating ­Systems
Development   318
Special Interest Box: Now That’s Big!    320
6.4.3   The Future   327
Special Interest Box: Gesture-Based Computing   330
EXERCISES   331
Challenge Work   334
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents xi

Chapter 7 Computer Networks and Cloud


Computing   336
Introduction   336
7.1  
Basic Networking Concepts   338
7.2  
Communication
7.2.1   Links   338
Special Interest Box: The Internet of Things    345
Practice Problems   346
7.2.2  Local Area Networks   346
Practice Problems   349
7.2.3  Wide Area Networks   349
7.2.4  Overall Structure of the Internet    351
Special Interest Box: Firewalls   354
7.3  Communication Protocols   356
7.3.1  Physical Layer   357
7.3.2  Data Link Layer   358
Practice Problems   362
7.3.3  Network Layer   363
Special Interest Box: I Can’t Believe We’ve Run Out    364
7.3.4  Transport Layer   366
Practice Problems   367
7.3.5  Application Layer   371
7.4  Network Services and Benefits   374
Laboratory Experience 11   375
7.4.1  Interpersonal Communications   375
7.4.2  Social Networking   376
7.4.3  Resource Sharing   376
7.4.4  Electronic Commerce   378
7.5   Cloud Computing   379
7.6   A History of the Internet and the World Wide
Web   382
7.6.1  The Internet   382
7.6.2  The World Wide Web    387
Special Interest Box: Geography Lesson   388
Special Interest Box: Net Neutrality   389
7.7   Conclusion   390
EXERCISES   390
CHALLENGE WORK   393

Chapter 8 Information Security   394


Introduction   394
8.1  
Threats and Defenses   395
8.2  
8.2.1  Authentication and Authorization   396
Special Interest Box: The Metamorphosis of Hacking    397
Practice Problems   401
8.2.2  Threats from the Network    402
Special Interest Box: Beware the Trojan Horse    403
Special Interest Box: Your Money or Your Files    404
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii Contents

Special Interest Box: Defense against the Dark Arts   406


Practice Problem   407
8.2.3  White Hats vs. Black Hats    407
8.3  Encryption   407
Special Interest Box: You’ve Been Hacked    408
8.3.1  Encryption Overview   409
8.3.2  Simple Encryption Algorithms   410
Practice Problems   412
Laboratory Experience 12   413
8.3.3  DES   413
Special Interest Box: Hiding in Plain Sight    413
8.3.4  Public-Key Systems   417
Special Interest Box: Quantum Computing vs. RSA    419
Practice Problem   419
8.4  Web Transmission Security   420
8.5  Embedded Computing   422
Special Interest Box: Mischief-Makers in the Internet
of Things   425
8.6  Conclusion   425
8.7  Summary of Level 3   426
EXERCISES   427
CHALLENGE WORK   429

LEVEL 4 The Software World   432


Chapter 9 Introduction to High-Level Language
Programming   434
The Language Progression   434
9.1  
Where
Do We Stand and What Do We
9.1.1  
Want?   435
9.1.2  Getting Back to Binary    438
9.2  A Family of Languages   439
Special Interest Box: Ada, C11, C#, Java,
and Python Online Chapters    439
9.3  Two Examples in Five-Part Harmony   440
9.3.1  Favorite Number   440
9.3.2  Data Cleanup (Again)   444
9.4   Feature Analysis   454
9.5   Meeting Expectations   454
9.6   The Big Picture: Software Engineering   463
9.6.1  Scaling Up   464
9.6.2  The Software Development Life Cycle    464
Special Interest Box: Vital Statistics for Real Code    466
9.6.3  Modern Environments   472
9.6.4  Agile Software Development   474

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents xiii

Special Interest Box: Software Engineering Failures    475


9.7  Conclusion   476
EXERCISES   477
CHALLENGE WORK   477

Online Chapters
This text includes five language-specific online-only downloadable
chapters on Ada, C++, C#, Java, and Python, available on the com-
panion site for this text (www.cengage.com) and in MindTap.

Chapter 10 The Tower of Babel: Programming


Languages   480
Why Babel?   480
10.1  
Procedural Languages   482
10.2  
Plankalkül   482
10.2.1  
10.2.2  Fortran   483
COBOL   484
10.2.3  
Special Interest Box: Old Dog, New Tricks #1    485
Practice Problems   486
Practice Problem   487
Special Interest Box: Uncle Sam Wants Who?   487
10.2.4  C/C11   488
Practice Problems   492
10.2.5  Ada   492
Practice Problem   493
10.2.6  Java   494
Practice Problem   496
10.2.7  Python   496
10.2.8  C# and .NET   497
Practice Problem   497
Special Interest Box: The “Popularity” Contest    498
Special Interest Box: Old Dog, New Tricks #2    500
Practice Problem   501
10.3  Special-Purpose Languages   501
10.3.1  SQL   501
10.3.2  HTML   502
Laboratory Experience 13   505
10.3.3  JavaScript   505
Special Interest Box: Beyond HTML   506
Special Interest Box: PHP   509
Practice Problems   509
10.3.4  R   510

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiv Contents

Alternative Programming Paradigms   513


10.4  
Functional
10.4.1   Programming   513
Special Interest Box: It’s All in How You
Look, Look, Look, . . . at It    518
Practice Problems   519
Laboratory Experience 14   520
10.4.2  Logic Programming   520
Practice Problems   525
10.4.3  Parallel Programming   526
Special Interest Box: New Dogs, New Tricks    531
Practice Problems   532
10.5  New Languages Keep Coming   532
10.5.1  Go   532
Special Interest Box: Go is Going Places    533
10.5.2  Swift   534
10.5.3  Milk   535
10.6  Conclusion   535
EXERCISES   537
Challenge Work   540

Chapter 11 Compilers and Language Translation    542


Introduction   542
11.1  
The Compilation Process   545
11.2  
Phase
I: Lexical Analysis    546
11.2.1  
Phase
II: Parsing   550
11.2.2  
Practice Problems   550
Practice Problems   556
Practice Problems   567
11.2.3  Phase III: Semantics and Code
­Generation   568
Practice Problem   577
11.2.4   Phase IV: Code Optimization    577
Laboratory Experience 15   577
Special Interest Box: “Now I Understand,”
Said the Machine   582
11.3   Conclusion   583
EXERCISES   584
CHALLENGE WORK   587

Chapter 12 Models of Computation   588


12.1   Introduction   588
12.2   What Is a Model?   589
12.3  A Model of a Computing Agent   591
Properties
12.3.1  of a Computing Agent    591
Practice Problems   592
12.3.2  The Turing Machine   593
Special Interest Box: Alan Turing, Brilliant Eccentric    593
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents xv

Practice Problems   600
12.4   A Model of an Algorithm   602
12.5   Turing Machine Examples   604
12.5.1  A Bit Inverter   605
Practice Problems   607
12.5.2  A Parity Bit Machine    607
12.5.3  Machines for Unary Incrementing    610
Practice Problem   610
12.5.4  A Unary Addition Machine    614
Practice Problems   616
Laboratory Experience 16   616
12.6   The Church–Turing Thesis   617
Special Interest Box: The Turing Award    618
12.7   Unsolvable Problems   621
Special Interest Box: Couldn’t Do, Can’t Do, Never
Will Be Able to . . .    626
Practice Problems   626
Laboratory Experience 17   627
12.8   Conclusion   627
12.9   Summary of Level 4   628
EXERCISES   629
CHALLENGE WORK   633

LEVEL 5 Applications   636
Chapter 13 Simulation and Modeling   638
Introduction   638
13.1  
Computational Modeling   639
13.2  
Introduction
13.2.1   to Systems and Models    639
Computational
13.2.2   Models, Accuracy,
and Errors   642
13.2.3  An Example of Model Building    644
Practice Problems   653
Laboratory Experience 18   654
13.3  Running the Model and Visualizing Results   654
13.4   Conclusion   664
Special Interest Box: The Mother of All
Computations!   664
EXERCISES   665
CHALLENGE WORK   667

Chapter 14 Ecommerce, Databases, and Data


Science   670
Introduction   670
14.1  
Ecommerce   671
14.2  
Special Interest Box: Shopping on the Web    672
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvi Contents

Decisions, Decisions   673
14.2.1  
Anatomy of a Transaction    675
14.2.2  
Special Interest Box: A Rose by Any Other Name. . .    677
14.2.3  Designing Your Website   680
Special Interest Box: Less Is More    682
14.2.4  Behind the Scenes   682
Practice Problems   683
14.2.5  Other Ecommerce Models   683
14.2.6  Electronic Payment Systems   685
Special Interest Box: Blockchain: A New Revolution?    687
14.3  Databases   688
14.3.1  Data Organization   688
14.3.2  Database Management Systems   690
14.3.3  Other Considerations   696
Special Interest Box: SQL, NoSQL, NewSQL    697
Practice Problems   698
Laboratory Experience 19   699
14.4  Data Science   699
14.4.1  Tools   700
Special Interest Box: Algorithm Bias   703
Practice Problem   704
14.4.2  Personal Privacy   704
Special Interest Box: What Your Smartphone
Photo Knows   705
14.4.3  For the Greater Good    706
14.5  Conclusion   707
EXERCISES   708
CHALLENGE WORK   711

Chapter 15 Artificial Intelligence   712


Introduction   712
15.1  
Special Interest Box: Victory in the Turing Test?    714
15.2  A Division of Labor   715
Special Interest Box: Predicted AI Milestones     718
15.3  Knowledge Representation   718
Practice Problems   722
15.4  Recognition Tasks   723
Special Interest Box: Brain on a Chip     728
Laboratory Experience 20   729
Practice Problems   730
15.5  Reasoning Tasks   730
15.5.1  Intelligent Searching   730
15.5.2  Swarm Intelligence   733
Special Interest Box: Robot Swarms   734
15.5.3  Intelligent Agents   734
15.5.4  Expert Systems   736

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents xvii

Practice Problems   739
15.5.5  The Games We Play    739
15.6  Robots and Drones   744
15.6.1  Robots   744
Special Interest Box: Wait—Where Am I?    746
15.6.2  Drones   749
15.7  Conclusion   751
EXERCISES   752
CHALLENGE WORK   754

Chapter 16 Computer Graphics and Entertainment: Movies,


Games, and Virtual Communities   758
Introduction   758
16.1  
Computer-Generated Imagery (CGI)   761
16.2  
16.2.1  Introduction
to CGI   761
Special Interest Box: Computer Horsepower   763
16.2.2  How It’s Done: The Graphics
Pipeline   763
16.2.3   Object Modeling   764
16.2.4   Object Motion   767
Practice Problem   768
Practice Problem   772
16.2.5   Rendering and Display   772
16.2.6   The Future of CGI    775
16.3  Video Gaming   776
Special Interest Box: The Good, the Bad, and
the Ugly   780
16.4  Multiplayer Games and Virtual Communities   781
16.5   Conclusion   783
Special Interest Box: The Computer Will See You
Now   784
16.6   Summary of Level 5   785
Exercises   786
Challenge Work   788

LEVEL 6 Social Issues in Computing   790


Chapter 17 Making Decisions about Computers,
Information, and Society   792
Introduction   792
17.1  
Case Studies   793
17.2  
17.2.1  Case 1: Is It Sharing or Stealing?    793
Special Interest Box: Death of a Dinosaur    797
Practice Problems   800
Special Interest Box: The Sound of Music    801

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xviii Contents

17.2.2  Case
2: Legalized Snooping—Privacy vs.
Security   801
Special Interest Box: Hero or Traitor?    803
Practice Problems   809
Case 3: Hackers—Public Enemies
17.2.3  
or Gadflies?   809
Practice Problems   815
17.2.4  Case 4: Genetic Information
and Medical Research   815
Special Interest Box: Professional Codes of Conduct    821
17.3  Personal Privacy and Social Media   822
Practice Problems   826
17.4   Fake News, Politics, and Social Media   827
17.5   Conclusion   830
17.6   Summary of Level 6   830
EXERCISES   831

Answers to Practice Problems   833


Index   877

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface to the Eighth
Edition

Overview
This text is intended for a one-semester introductory course in computer
science. It presents a broad-based overview of the discipline that assumes
no prior background in computer science, programming, or mathematics. It
would be appropriate for a college or university service course for students
not majoring in computer science, as well as for schools that implement
their first course for majors using a breadth-first approach that surveys the
fundamental aspects of computer science. It would be highly suitable for
a high school computer science course, especially the AP Computer Sci-
ence Principles course created by the College Board in cooperation with
the National Science Foundation and colleges and universities around the
United States.

The Non-Majors Service Course


The introductory computer science service course (often called CS 0) has
undergone numerous changes. In the 1970s and early 1980s, it was usu-
ally a class in FORTRAN, BASIC, or Pascal programming. In the mid-to-late
1980s, a rapid increase in computer use caused the service course to evolve
into something called “computer literacy,” in which students learned about
new applications of computing in fields such as business, medicine, law,
and education. With the growth of personal computers and productivity
software, a typical early to mid-1990s version of this course would teach
students how to use word processors, databases, spreadsheets, and email.
The most recent change was its evolution into a web-centric course in which
students learned to design and implement webpages using HTML, XML,
ASP, and Java applets.
In many institutions, the computer science service course is evolving
once again. There are two reasons for this change. First, virtually all col-
lege and high school students are familiar with personal computers and

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 xix
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xx Preface to the Eighth Edition

productivity software. They have been using word processors and search
engines since elementary school and are familiar with social media, online
retailing, and email; many have designed webpages and even manage their
own websites and blogs. In today’s world, a course that focuses on comput-
ing applications would be of little or no interest.
But a more important reason for rethinking the structure of the CS 0
service course, and the primary reason why we authored this book, is the
following observation:
Most computer science service courses do not teach students the foun-
dations and fundamental concepts of computer science!
We believe that students in a computer science service course should receive
a solid grounding in the fundamental concepts of the discipline, just as
introductory courses in biology, physics, and geology present the central
concepts of their fields. Topics in a breadth-first computer science service
course would not be limited to “fun” applications such as webpage creation,
blogging, game design, and interactive graphics, but would also cover foun-
dational issues such as algorithms, abstraction, hardware, computer organi-
zation, system software, language models, and the social and ethical issues
of computing. An introduction to these core ideas exposes students to the
overall richness and beauty of the field and allows them not only to use
computers and software effectively, but also to understand and appreciate
the basic ideas underlying the discipline of computer science and the cre-
ation of computational artifacts. As a side benefit, students who complete
such a course will have a much better idea of what a major or a minor in
computer science will entail.
This last point was the primary reason for the development of the AP
Computer Science Principles high school course, which is quite similar to
the breadth-first overview model just described. By learning about the field
in its entirety, rather than seeing only the small slice of it called “program-
ming,” high school students will be in a better position to decide if computer
science is a subject they wish to study when they begin college.

The First Course for Majors


Since the emergence of computer science as an academic discipline in the
1960s, the first course in the major (often called CS 1) has usually been an
introduction to programming—from Fortran to BASIC to Pascal, and, later,
C++, Java, and Python. But today there are numerous alternatives, including
a breadth-first overview. A first course for computer science majors using the
breadth-first model emphasizes early exposure to the field’s sub-­disciplines
rather than placing exclusive emphasis on programming. This gives new
majors a complete and well-rounded understanding of the field, including
the concepts and ways of thinking that are part of computer science.
Our book—intended for either majors or non-majors—is organized around
this breadth-first approach as it presents a wide range of subject matter
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface to the Eighth Edition xxi

drawn from diverse areas of computer science. However, to avoid drowning


students in a sea of seemingly unrelated facts and details, a breadth-first
presentation must be carefully woven into a coherent fabric, a theme, a “big
picture” that ties together the individual topics and presents computer sci-
ence as a unified and integrated discipline. To achieve this, our text divides
the study of computer science into a hierarchy of six subareas, called layers,
with each layer building upon concepts presented in earlier chapters.

A Hierarchy of Abstractions
The central theme of this book is that computer science is the study of
­algorithms. Our hierarchy utilizes this definition by initially looking at the
algorithmic foundations of computer science and then moving upward from
this central theme to higher-level issues such as hardware, systems, software,
applications, and ethics.
The six levels in our computer science hierarchy are:
Level 1. The Algorithmic Foundations of Computer Science
Level 2. The Hardware World
Level 3. The Virtual Machine
Level 4. The Software World
Level 5. Applications
Level 6. Social Issues in Computing

Level 1
Following an introductory chapter, Level 1 (Chapters 2–3) introduces “The
Algorithmic Foundations of Computer Science,” the bedrock on which all
other aspects of the discipline are built. It presents fundamental ideas such as
the design of algorithms, algorithmic problem solving, abstraction, pseudo-
code, and iteration and illustrates these ideas using well-known examples. It
also introduces the concepts of algorithm efficiency and asymptotic growth
and demonstrates that not all algorithms are, at least in terms of running
time, created equal.
The discussions in Level 1 assume that our algorithms are executed by
something called a “computing agent,” an abstract concept for any entity
that can carry out the instructions in our solution.

Level 2
However, in Level 2 (Chapters 4–5), “The Hardware World,” we want our
algorithms to be executed by “real” computers to produce “real” results.
Thus begins our discussion of hardware, logic design, and computer orga-
nization. The initial discussion introduces the basic building blocks of com-
puter ­systems—binary numbers, Boolean logic, gates, and circuits. It then
shows how these elementary concepts can be combined to construct a real
computer using the Von Neumann architecture, composed of processors,
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxii Preface to the Eighth Edition

memory, and input/output. This level presents a simple machine language


instruction set and explains how the algorithmic primitives of Level 1,
such as assignment and conditional, can be implemented in machine lan-
guage and run on the Von Neumann hardware of Level 2, conceptually
tying together these two areas. It ends with a discussion of important new
directions in hardware design—multicore processors and massively parallel
machines.
By the end of Level 2, students have been introduced to basic concepts
in logic design and computer organization, and they can appreciate the
complexity inherent in these ideas.

Level 3
This complexity is the motivation for the material contained in Level 3
(Chapters 6–8), “The Virtual Machine.” This section describes how system
software is used to create a user-friendly, user-oriented problem-solving
environment that hides many of the ugly hardware details just described.
Level 3 looks at the same problems discussed in Level 2, encoding and
executing algorithms, but shows how this can be done easily in a virtual
environment containing helpful tools like a graphical user interface, editors,
language translators, file systems, and debuggers. This section discusses the
services and responsibilities of the operating system and how it has evolved.
It investigates one of the most important virtual environments in current
use, computer networks, and shows how technologies such as Ethernet, the
Internet, and the web link together independent systems via transmission
media and communications software. This creates a virtual environment in
which we seamlessly and transparently use not only the computer on our
desk or in our hand, but also computing devices located around the world.
This transparency has progressed to the point where we can now use sys-
tems located “in the cloud” without regard for where they are, how they
provide their services, and even whether they exist as real physical entities.
Level 3 concludes with a look at one of the most important services provided
by a virtual machine, namely information security, and describes algorithms
for protecting the user and the system from accidental or malicious damage.

Level 4
Once we have created this powerful user-oriented virtual environment, what
do we want to do with it? Most likely we want to write programs to solve
interesting problems. This is the motivation for Level 4 (Chapters 9–12), “The
Software World.” Although this book should not be viewed as a program-
ming text, it contains an overview of the features found in modern procedural
programming languages. This gives students an appreciation for the inter-
esting and challenging task of the computer programmer and the power of
the problem-solving environment created by a modern high-level language.
(More detailed introductions to five important high-level programming lan-
guages are available via online, downloadable chapters accessible through
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface to the Eighth Edition xxiii

MindTap, as well as at www.cengage.com.) There are many different language


models, so Level 4 also includes a discussion of other language types, includ-
ing special-purpose languages such as SQL, HTML, JavaScript, and R, as well
as the functional, logic, and parallel language paradigms. An introduction to
the design and construction of a compiler shows how high-level languages
can be translated into machine language for execution. This latter discussion
ties together numerous ideas from earlier chapters, as we show how an algo-
rithm (Level 1), expressed in a high-level language (Level 4), can be compiled
and executed on a typical Von Neumann machine (Level 2) using system
software tools (Level 3). These “recurring themes” and frequent references to
earlier concepts help reinforce the idea of computer science as an integrated
set of topics. At the conclusion of Level 4, we introduce the idea of comput-
ability and insolvability to show students that there are provable limits to
what programs, computers, and computer science can achieve.

Level 5
We now have a high-level programming environment in which it is possible
to write programs to solve important problems. In Level 5 (Chapters 13–16),
“Applications,” we take a look at some important uses of computers. There is
no way to cover more than a fraction of the many applications of computers
and information technology in a single section. We have included applica-
tions drawn from the sciences and engineering (simulation and modeling),
business and finance (ecommerce, databases, data science), the social sci-
ences (artificial intelligence), and everyday life (computer-generated imag-
ery, video gaming, virtual communities). Our goal is to show students that
these applications are not “magic boxes” whose inner workings are totally
unfathomable. Rather, they are the direct result of building upon the core
concepts of computer science presented in the previous chapters.

Level 6
Finally, we reach the highest level of study, Level 6 (Chapter 17), “Social
Issues in Computing,” which addresses the social, ethical, moral, and legal
issues raised by pervasive computer technology. This section, based on con-
tributions by Professor Bo Brinkman of Miami University, examines issues
such as the theft of intellectual property, national security concerns, the
erosion of personal privacy, and the political impact of the proliferation of
fake news distributed using social media. This chapter does not attempt to
provide easy solutions to these many-faceted problems. Instead, it focuses
on techniques that students can use to think about ethical issues and reach
their own conclusions. Our goal in this final section is to make students
aware of the enormous impact that information technology is having on our
society and to give them tools for making informed decisions.
This, then, is the hierarchical structure of our text. It begins with the
algorithmic foundations of the discipline and works its way from lower-
level hardware concepts through virtual machine environments, high-level
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxiv Preface to the Eighth Edition

languages, software, and applications, to the social issues raised by com-


puter technology. This organizational structure, along with the use of recur-
ring themes, enables students to view computer science as a unified and
coherent field of study. The material in Chapters 1–12 is intended to be
covered sequentially, but the applications discussed in Chapters 13–16 can
be covered in any order and the social issues in Chapter 17 can be presented
at any time.

What’s New in This Edition


This eighth edition of Invitation to Computer Science addresses a number
of emerging issues in computer science. We have added new material on
ransomware, code repositories, electronic payment systems, new program-
ming languages such as R and Milk, data science, artificial intelligence, and
drones. There is an entirely new section on fake news, politics, and social
media.
New and updated Special Interest Boxes highlight interesting historical
vignettes, new developments in computing, biographies of important people in
the field, and news items showing how computing affects our everyday lives.

An Interactive Experience—
MindTap
This edition offers significantly enhanced supplementary material and addi-
tional resources available online through MindTap. MindTap, an online
teaching and learning solution, helps students be more successful and con-
fident in the course and in their real life. MindTap guides students through
the course by combining the complete textbook with interactive multimedia
activities, assessments, and learning tools. Readings and activities engage
students in learning core concepts, practicing needed skills, and applying
what they learn. Instructors can rearrange and add content to personalize
their MindTap course, and easily track students’ progress with real-time
analytics. MindTap integrates seamlessly with any learning management
system.

An Experimental Science—
Laboratory Software and Manual
Another important aspect of computer science education is the realization
that, like such scientific fields as physics, chemistry, and biology, computer
science is an empirical, laboratory-based discipline in which learning comes
not only from watching and listening but also from doing and trying. Many
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface to the Eighth Edition xxv

ideas in computer science cannot be fully understood and appreciated until


they are visualized, manipulated, and tested. Today, most computer science
faculty see structured laboratories as an essential part of an introductory
course, and this view is fully reflected in our approach to the material.
Associated with this text is a laboratory manual and custom-designed
laboratory software that enables students to experiment with the concepts
we present. The manual contains 20 laboratory experiences, closely coor-
dinated with the main text, that cover all levels except Level 6. These
labs give students the chance to observe, study, analyze, and modify an
important concept. For example, associated with Level 1 (the algorithmic
foundations of computer science) are experiments that animate the algo-
rithms in Chapters 2 and 3 and ask students to observe and discuss what
is happening in these animations. There are also labs that allow students
to measure the running time of these algorithms for different-sized data
sets and discuss their behavior, thus providing concrete observations of an
abstract concept like algorithmic efficiency. There are similar labs available
for Levels 2, 3, 4, and 5 that highlight and clarify the material presented
in the text.
Each lab experiment includes an explanation of how to use the software,
a description of how to conduct the experiment, and problems for students
to complete. For these lab projects, students can either work on their own or
in teams, and the course may utilize either a closed-lab (formal, scheduled)
or open-lab (informal, unscheduled) setting. The manual and software work
well with all these laboratory models. The text contains “Laboratory Exer-
cise” boxes that describe each lab and identify the point in the text where it
would be most appropriate.
In this new eighth edition, the Laboratory Manual has been integrated
into the MindTap for this text.

Programming and Online


Language Modules
Programming concepts are presented in the text in the form of a survey of
the features each high-level language provides and how they differ based
on the computing tasks for which they were intended. Code examples are
shown only to illustrate how algorithms can be embedded into the vary-
ing syntax of different languages. For instructors who want their students
to have additional programming experience, online language modules for
Ada, C++, C#, Java, and Python are available. Students may download any
or all of these for free by going to www.cengage.com. These PDF docu-
ments can be read online, downloaded to the student’s computer, or printed.
Each chapter includes language-specific practice problems and exercises.
The exercises are also included in our educational Integrated Development
Environment (IDE) within MindTap. This exposes your students to an impor-
tant developer tool.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxvi Preface to the Eighth Edition

Computer science is a young and exciting discipline, and we hope that


the new material in this edition, along with the laboratory projects and
online modules, will convey this feeling of excitement to students.

Instructor Resources
The following supplemental teaching tools are available when this book is
used in a classroom setting. All supplements are available to instructors for
download at www.cengage.com.

Instructor’s Manual
The Instructor’s Manual follows the text chapter by chapter and includes
material to assist in planning and organizing an effective, engaging course.
The Instructor’s Manual includes Overviews, Learning Objectives, Teaching
Tips, Quick Quizzes, Class Discussion Topics, Additional Projects, Additional
Resources, and Key Terms. A sample syllabus is also available.

Solutions
Complete solutions to chapter exercises are provided online for instructors.

Test Bank
Cengage Learning Testing, powered by Cognero, is a flexible, online system
that allows instructors to:
• Author, edit, and manage test bank content from multiple Cengage
Learning solutions
• Create multiple test versions in an instant
• Deliver tests from your Learning Management System (LMS), your
classroom, or anywhere you want

PowerPoint Presentations
Microsoft PowerPoint slides to accompany each chapter are available. Slides
may be used to guide classroom presentation or to print as classroom hand-
outs, or they may be made available to students for chapter review. Instruc-
tors may customize the slides to best suit their course.

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface to the Eighth Edition xxvii

Acknowledgments
The authors would like to thank Bo Brinkman, Ph.D., Miami University, for
his contributions to the Social Issues in Computing content. The authors
would also like to thank Deb Kaufmann and Emma Newsom for their invalu-
able assistance in developing this new edition, as well as the reviewers for
this edition, whose comments were very helpful.
• Travis Dalton, Columbia College
• Debbie Collins, Black Hawk College
• Barry Poulson, University of Colorado, Boulder
• Akira Kawaguchi, The City College of New York
• H. Paul Haiduk, West Texas A&M University
• Melissa Stange, Lord Fairfax Community College
• Tom Schendl, Benedictine University
Any errors, of course, are the fault solely of the authors.

—G. Michael Schneider


Macalester College
[email protected]

—Judith L. Gersting
Indiana University-Purdue University at Indianapolis
[email protected]

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Another random document with
no related content on Scribd:
Part 2

T HE Willoweses came back to London about the second week in


September. For many years the children’s schooling had governed the
date of their return; and when the children had grown too old for school,
the habit had grown too old to be broken. There was also a further reason.
The fallen leaves, so Henry and Caroline thought, made the country
unhealthy after the second week in September. When Laura was younger
she had sometimes tried to argue that, even allowing the unhealthiness of
fallen leaves, leaves at that time of year were still green upon the trees. This
was considered mere casuistry. When they walked in Kensington Gardens
upon the first Sunday morning after their return, Caroline would point along
the tarnishing vistas and say: ‘You see, Lolly, the leaves are beginning to
fall. It was quite time to come home.’
It was useless to protest that autumn begins earlier in London than it
does in the country. That it did so, Laura knew well. That was why she
disliked having to come back; autumn boded her no good, and it was hard
that by a day’s train-journey she should lose almost a month’s reprieve.
Obediently looking along the tarnishing vistas, she knew that once again
she was in for it.
What It was exactly, she would have found hard to say. She sometimes
told herself that it must be the yearly reverberation of those miserable first
months in London when her sorrow for her father’s death was still fresh. No
other winter had been so cold or so long, not even the long cold winters of
the war. Yet now her thoughts of Everard were mellowed and painless, and
she had long ago forgiven her sorrow. Had the coming of autumn quickened
in her only an experienced grief she would not have dreaded it thus, nor felt
so restless and tormented.
Her disquiet had no relevance to her life. It arose out of the ground with
the smell of the dead leaves: it followed her through the darkening streets; it
confronted her in the look of the risen moon. ‘Now! Now!’ it said to her:
and no more. The moon seemed to have torn the leaves from the trees that it
might stare at her more imperiously. Sometimes she tried to account for her
uneasiness by saying that she was growing old, and that the year’s death
reminded her of her own. She compared herself to the ripening acorn that
feels through windless autumnal days and nights the increasing pull of the
earth below. That explanation was very poetical and suitable. But it did not
explain what she felt. She was not wildly anxious either to die or to live;
why, then, should she be rent by this anxiety?
At these times she was subject to a peculiar kind of day-dreaming, so
vivid as to be almost a hallucination: that she was in the country, at dusk,
and alone, and strangely at peace. She did not recall the places which she
had visited in holiday-time, these reproached her like opportunities
neglected. But while her body sat before the first fires and was cosy with
Henry and Caroline, her mind walked by lonely sea-bords, in marshes and
fens, or came at nightfall to the edge of a wood. She never imagined herself
in these places by daylight. She never thought of them as being in any way
beautiful. It was not beauty at all that she wanted, or, depressed though she
was, she would have bought a ticket to somewhere or other upon the
Metropolitan railway and gone out to see the recumbent autumnal graces of
the country-side. Her mind was groping after something that eluded her
experience, a something that was shadowy and menacing, and yet in some
way congenial; a something that lurked in waste places, that was hinted at
by the sound of water gurgling through deep channels and by the voices of
birds of ill-omen. Loneliness, dreariness, aptness for arousing a sense of
fear, a kind of ungodly hallowedness—these were the things that called her
thoughts away from the comfortable fireside.
In this mood she would sometimes go off to explore among the City
churches, or to lose herself in the riverside quarters east of the Pool. She
liked to think of the London of Defoe’s Journal, and to fancy herself back
in the seventeenth century, when, so it seemed to her, there were still
darknesses in men’s minds. Once, hemmed in by the jostling tombstones at
Bunhill Fields, she almost pounced on the clue to her disquiet; and once
again in the goods-yard of the G.W.R., where she had gone to find, not her
own secret, but a case of apples for Caroline.
As time went on Laura grew accustomed to this recurrent autumnal
fever. It was as much a sign of the season as the falling leaves or the first
frost. Before the end of November it was all over and done with. The next
moon had no message for her. Her rambles in the strange places of the mind
were at an end. And if she still went on expeditions to Rotherhithe or the
Jews’ Burying-Ground, she went in search for no more than a little
diversion. Nothing was left but cold and sleet and the knowledge that all
this fuss had been about nothing. She fortified herself against the
dismalness of this reaction by various small self-indulgences. Out of these
she had contrived for herself a sort of mental fur coat. Roasted chestnuts
could be bought and taken home for bedroom eating. Second-hand book-
shops were never so enticing; and the combination of east winds and
London water made it allowable to experiment in the most expensive soaps.
Coming back from her expeditions, westward from the city with the sunset
in her eyes, or eastward from a waning Kew, she would pause for a
sumptuous and furtive tea, eating marrons glacés with a silver fork in the
reflecting warm glitter of a smart pastry-cook’s. These things were exciting
enough to be pleasurable, for she kept them secret. Henry and Caroline
would scarcely have minded if they had known. They were quite indifferent
as to where and how she spent her afternoons; they felt no need to question
her, since they could be sure that she would do nothing unsuitable or
extravagant. Laura’s expeditions were secret because no one asked her
where she had been. Had they asked, she must have answered. But she did
not examine too closely into this; she liked to think of them as secret.
One manifestation of the fur-coat policy, however, could not be kept
from their knowledge, and that manifestation slightly qualified their trust
that Laura would do nothing unsuitable or extravagant.
Except for a gradual increment of Christmas and birthday presents,
Laura’s room had altered little since the day it ceased to be the small spare-
room and became hers. But every winter it blossomed with an unseasonable
luxury of flowers, profusely, shameless as a greenhouse.
‘Why, Lolly! Lilies at this time of year!’ Caroline would say, not
reproachfully, but still with a consciousness that in the drawing-room there
were dahlias, and in the dining-room a fern, and in her own sitting-room,
where she did the accounts, neither ferns nor flowers. Then Laura would
thrust the lilies into her hands; and she would take them to show that she
had not spoken with ill-will. Besides, Lolly would really see more of them
if they were in the drawing-room. And the next day she would meet Laura
on the stairs carrying azaleas. On one occasion even Henry had noticed the
splendour of the lilies: red lilies, angular, authoritative in form and colour
like cardinal’s hats.
‘Where do these come from?’ Caroline had asked, knowing well that
nothing so costly in appearance could come from her florist.
‘From Africa,’ Laura had answered, pressing the firm, wet stalks into her
hand.
‘Oh well, I daresay they are quite common flowers there,’ said Caroline
to herself, trying to gloss over the slight awkwardness of accepting a trifle
so needlessly splendid.
Henry had also asked where they came from.
‘From Anthos, I believe,’ said Caroline.
‘Ah!’ said Henry, and roused the coins in his trousers pocket.
‘It’s rather naughty of Lolly. Would you like me just to hint to her that
she mustn’t be quite so reckless?’
‘No. Better not. No need for her to worry about such things.’
Husband and wife exchanged a glance of compassionate understanding.
It was better not. Much better that Lolly should not be worried about money
matters. She was safe in their hands. They could look after Lolly. Henry
was like a wall, and Caroline’s breasts were like towers.
They condoned this extravagance, yet they mistrusted it. Time justified
them in their mistrust. Like many stupid people, they possessed acute
instincts. ‘He that is unfaithful in little things ...’ Caroline would say when
the children forgot to wind up their watches. Their instinct told them that
the same truth applies to extravagance in little things. They were wiser than
they knew. When Laura’s extravagance in great things came it staggered
them so completely that they forgot how judiciously they had suspected it
beforehand.
It befell in the winter of 1921. The war was safely over, so was their
silver wedding, so was Marion’s first confinement. Titus was in his third
year at Oxford, Sibyl was at last going grey, Henry might be made a judge
at any moment. The Trade Returns and the Stock Exchange were not all that
they should be, and there was always the influenza. But Henry was doing
well enough to be lenient to his investments, and Aunt Lucilla and her
fortune had been mercifully released. In the coming spring Caroline
proposed to have the house thoroughly done up. The lesser renovations she
was getting over beforehand, and that was why Laura had gone out before
the shops shut to show Mr. Bunting a pair of massy candlesticks and to
inquire how much he would charge for re-plating them. His estimate was
high, too high to be accepted upon her own responsibility. She decided to
carry the candlesticks back and consult Caroline.
Mr. Bunting lived in the Earls Court Road, rather a long way off for such
a family friend. But she had plenty of time for walking back, and for
diversion she thought she would take a circuitous route, including the two
foxes who guard the forsaken approach in Holland Park and the lane beside
the Bayswater Synagogue. It was in Moscow Road that she began to be
extravagant. But when she walked into the little shop she had no particular
intention of extravagance, for Caroline’s parcel hung remindingly upon her
arm, and the shop itself, half florist and half greengrocer, had a simple
appearance.
There were several other customers, and while she stood waiting to be
served she looked about her. The aspect of the shop pleased her greatly. It
was small and homely. Fruit and flowers and vegetables were crowded
together in countrified disorder. On the sloping shelf in the window, among
apples and rough-skinned cooking pears and trays of walnuts, chestnuts,
and filberts, was a basket of eggs, smooth and brown, like some larger kind
of nut. At one side of the room was a wooden staging. On this stood jars of
home-made jam and bottled fruits. It was as though the remnants of summer
had come into the little shop for shelter. On the floor lay a heap of earthy
turnips.
Laura looked at the bottled fruits, the sliced pears in syrup, the glistening
red plums, the greengages. She thought of the woman who had filled those
jars and fastened on the bladders. Perhaps the greengrocer’s mother lived in
the country. A solitary old woman picking fruit in a darkening orchard,
rubbing her rough fingertips over the smooth-skinned plums, a lean wiry
old woman, standing with upstretched arms among her fruit trees as though
she were a tree herself, growing out of the long grass, with arms stretched
up like branches. It grew darker and darker; still she worked on,
methodically stripping the quivering taut boughs one after the other.
As Laura stood waiting she felt a great longing. It weighed upon her like
the load of ripened fruit upon a tree. She forgot the shop, the other
customers, her own errand. She forgot the winter air outside, the people
going by on the wet pavements. She forgot that she was in London, she
forgot the whole of her London life. She seemed to be standing alone in a
darkening orchard, her feet in the grass, her arms stretched up to the pattern
of leaves and fruit, her fingers seeking the rounded ovals of the fruit among
the pointed ovals of the leaves. The air about her was cool and moist. There
was no sound, for the birds had left off singing and the owls had not yet
begun to hoot. No sound, except sometimes the soft thud of a ripe plum
falling into the grass, to lie there a compact shadow among shadows. The
back of her neck ached a little with the strain of holding up her arms. Her
fingers searched among the leaves.
She started as the man of the shop came up to her and asked her what
she wished for. Her eyes blinked, she looked with surprise at the gloves
upon her hands.
‘I want one of those large chrysanthemums,’ she said, and turned
towards the window where they stood in a brown jar. There were the apples
and pears, the eggs, the disordered nuts overflowing from their
compartments. There on the floor were the earthy turnips, and close at hand
were the jams and bottled fruits. If she was behaving foolishly, if she looked
like a woman roused out of a fond dream, these were kindly things to
waken to. The man of the shop also had a kind face. He wore a gardener’s
apron, and his hands were brown and dry as if he had been handling earth.
‘Which one would you like, ma’am?’ he asked, turning the bunch of
chrysanthemums about that she might choose for herself. She looked at the
large mop-headed blossoms. Their curled petals were deep garnet colour
within and tawny yellow without. As the light fell on their sleek flesh the
garnet colour glowed, the tawny yellow paled as if it were thinly washed
with silver. She longed for the moment when she might stroke her hand
over those mop heads.
‘I think I will take them all,’ she said.
‘They’re lovely blooms,’ said the man.
He was pleased. He did not expect such a good customer at this late
hour.
When he brought her the change from her pound-note and the
chrysanthemums pinned up in sheets of white paper, he brought also several
sprays of beech leaves. These, he explained, were thrown in with her
purchase. Laura took them into her arms. The great fans of orange tracery
seemed to her even more beautiful than the chrysanthemums, for they had
been given to her, they were a surprise. She sniffed. They smelt of woods,
of dark rustling woods like the wood to whose edge she came so often in
the country of her autumn imagination. She stood very still to make quite
sure of her sensations. Then: ‘Where do they come from?’ she asked.
‘From near Chenies, ma’am, in Buckinghamshire. I have a sister living
there, and every Sunday I go out to see her, and bring back a load of foliage
with me.’
There was no need to ask now who made the jams and tied on the
bladders. Laura knew all that she wanted to know. Her course lay clear
before her. Holding the sprays of beech as though she were marching on
Dunsinane, she went to a bookseller’s. There she bought a small guide-book
to the Chilterns and inquired for a map of that district. It must, she
explained, be very detailed, and give as many names and footpaths as
possible. Her eyes were so bright and her demands so earnest that the
bookseller, though he had not that kind of map, was sympathetic, and
directed her to another shop where she could find what she wanted. It was
only a little way off, but closing-time was at hand, so she took a taxi.
Having bought the map she took another taxi home. But at the top of
Apsley Terrace she had one of her impulses of secrecy and told the driver
that she would walk the rest of the way.
There was rather a narrow squeak in the hall, for Caroline’s parcel
became entangled in the gong stand, and she heard Henry coming up from
the wine cellar. If she alarmed the gong Henry would quicken his steps. She
had no time to waste on Henry just then for she had a great deal to think of
before dinner. She ran up to her room, arranged the chrysanthemums and
the beech leaves, and began to read the guide-book. It was just what she
wanted, for it was extremely plain and unperturbed. Beginning as early as
possible with Geology, it passed to Flora and Fauna, Watersheds,
Ecclesiastical Foundations and Local Government. After that came a list of
all the towns and villages, shortly described in alphabetical order. Lamb’s
End had three hundred inhabitants and a perpendicular font. At Walpole St.
Dennis was the country seat of the Bartlet family, faced with stucco and
situated upon an eminence. The almshouses at Semple, built in 1703 by
Bethia Hood, had a fine pair of wrought-iron gates. It was dark as she
pressed her nose against the scrolls and rivets. Bats flickered in the little
courtyard, and shadows moved across the yellow blinds. Had she been born
a deserving widow, life would have been simplified.
She wasted no time over this regret, for now at last she was simplifying
life for herself. She unfolded the map. The woods were coloured green and
the main roads red. There was a great deal of green. She looked at the beech
leaves. As she looked a leaf detached itself and fell slowly. She remembered
squirrels.
The stairs creaked under the tread of Dunlop with the hot-water can.
Dunlop entered, glancing neither at Laura curled askew on the bed nor at
the chrysanthemums ennobling the dressing-table. She was a perfectly
trained servant. Before she left the room she took a deep breath, stooped
down, and picked up the beech leaf.
Quarter of an hour afterwards Laura exclaimed: ‘Oh! a windmill!’ She
took up the guide-book again, and began to read intently.
She was roused by an unaccustomed clash of affable voices in the hall.
She remembered, leapt off the bed, and dressed rapidly for the family
dinner-party. They were all there when she reached the drawing-room. Sibyl
and Titus, Fancy and her Mr. Wolf-Saunders, Marion with the latest news
from Sprat, who, being in the Soudan, could not dine out with his wife.
Sprat had had another boil on his neck, but it had yielded to treatment. ‘Ah,
poor fellow,’ said Henry. He seemed to be saying: ‘The price of Empire.’
During dinner Laura looked at her relations. She felt as though she had
awoken, unchanged, from a twenty-years slumber, to find them almost
unrecognisable. She surveyed them, one after the other. Even Henry and
Caroline, whom she saw every day, were half hidden under their
accumulations—accumulations of prosperity, authority, daily experience.
They were carpeted with experience. No new event could set jarring foot on
them but they would absorb and muffle the impact. If the boiler burst, if a
policeman climbed in at the window waving a sword, Henry and Caroline
would bring the situation to heel by their massive experience of normal
boilers and normal policemen.
She turned her eyes to Sibyl. How strange it was that Sibyl should have
exchanged her former look of a pretty ferret for this refined and waxen
mask. Only when she was silent, though, as now she was, listening to Henry
with her eyes cast down to her empty plate: when she spoke the ferret look
came back. But Sibyl in her house at Hampstead must have spent many
long afternoons in silence, learning this unexpected beauty, preparing her
face for the last look of death. What had been her thoughts? Why was she
so different when she spoke? Which, what, was the real Sibyl: the greedy,
agile little ferret or this memorial urn?
Fancy’s Mr. Wolf-Saunders had eaten all his bread and was at a loss.
Laura turned to him and asked after her great-nephew, who was just then
determined to be a bus-conductor. ‘He probably will be,’ said his father
gloomily, ‘if things go on as they are at present.’
Great-nephews and great-nieces suggested nephews and nieces.
Resuming her scrutiny of the table she looked at Fancy, Marion, and Titus.
They had grown up as surprisingly as trees since she first knew them, and
yet it did not seem to her that they were so much changed as their elders.
Titus, in particular, was easily recognisable. She caught his eye, and he
smiled back at her, just as he had smiled back when he was a baby. Now he
was long and slim, and his hay-coloured hair was brushed smoothly back
instead of standing up in a crest. But one lock had fallen forward when he
laughed, and hung over his left eye, and this gave him a pleasing, rustic
look. She was glad still to be friends with Titus. He might very usefully abet
her, and though she felt in no need of allies, a little sympathy would do no
harm. Certainly the rustic forelock made Titus look particularly congenial.
And how greedily he was eating that apple, and with what disparagement of
imported fruit he had waved away the Californian plums! It was nice to feel
sure of his understanding and approval, since at this moment he was
looking the greatest Willowes of them all.
Most of the family attention was focussed on Titus that evening. No
sooner had coffee been served than Sibyl began about his career. Had
Caroline ever heard of anything more ridiculous? Titus still declared that he
meant to manage the family brewery. After all his success at Oxford and his
popularity, could anything be more absurd than to bury himself in
Somerset?
His own name was the first thing that Titus heard as he entered the
drawing-room. He greeted it with an approving smile, and sat down by
Laura, carefully crossing his long legs.
‘She spurns at the brewery, and wants me to take a studio in Hampstead
and model bustos,’ he explained.
Titus had a soft voice. His speech was gentle and sedate. He chose his
words with extreme care, but escaped the charge of affectation by
pronouncing them in a hesitating manner.
‘I’m sure sculpture is his métier,’ said Sibyl. ‘Or perhaps poetry.
Anyhow, not brewing. I wish you could have seen that little model he made
of the grocer at Arcachon.’
Marion said: ‘I thought bustos always had wigs.’
‘My dear, you’ve hit it. In fact, that is my objection to this plan for
making me a sculptor. Revive the wig, and I object no more. The head is the
noblest part of man’s anatomy. Therefore enlarge it with a wig.’
Henry thought the conversation was taking a foolish turn. But as host it
was his duty to take part in it.
‘What about the Elgin Marbles?’ he inquired. ‘No wigs there.’
The Peruke and its Functions in Attic Drama, thought Titus, would be a
pretty fancy. But it would not do for his uncle. Agreeably he admitted that
there were no wigs in the Elgin Marbles.
They fell into silence. At an ordinary dinner party Caroline would have
felt this silence to be a token that the dinner party was a failure. But this
was a family affair, there was no disgrace in having nothing to say. They
were all Willoweses and the silence was a seemly Willowes silence. She
could even emphasise it by counting her stitches aloud.
All the chairs and sofas were comfortable. The fire burnt brightly, the
curtains hung in solemn folds; they looked almost as solemn as organ pipes.
Lolly had gone off into one of her day dreams, just her way, she would
never trouble to give a party the least prod. Only Sibyl fidgeted, twisting
her heel about in her satin slipper.
‘What pretty buckles, Sibyl! Have I seen them before?’
Sibyl had bought them second-hand for next to nothing. They came from
Arles, and the old lady who had sold them to her had been such a character.
She repeated the characteristic remarks of the old lady in a very competent
French accent. Her feet were as slim as ever, and she could stretch them out
very prettily. Even in doing so she remembered to ask Caroline where they
were going for the Easter holidays.
‘Oh, to Blythe, I expect,’ said Caroline. ‘We know it.’
‘When I have evicted my tenants and brewed a large butt of family ale, I
shall invite you all down to Lady Place,’ said Titus.
‘But before then,’ said Laura, speaking rather fast, ‘I hope you will all
come to visit me at Great Mop.’
Every one turned to stare at her in bewilderment.
‘Of course, it won’t be as comfortable as Lady Place. And I don’t
suppose there will be room for more than one of you at a time. But I’m sure
you’ll think it delightful.’
‘I don’t understand,’ said Caroline. ‘What is this place, Lolly?’
‘Great Mop. It’s not really Great. It’s in the Chilterns.’
‘But why should we go there?’
‘To visit me. I’m going to live there.’
‘Live there? My dear Lolly!’
‘Live there, Aunt Lolly?’
‘This is very sudden. Is there really a place called ...?’
‘Lolly, you are mystifying us.’
They all spoke at once, but Henry spoke loudest, so Laura replied to
him.
‘No, Henry, I’m not mystifying you. Great Mop is a village in the
Chilterns, and I am going to live there, and perhaps keep a donkey. And you
must all come on visits.’
‘I’ve never even heard of the place!’ said Henry conclusively.
‘But you’ll love it. “A secluded hamlet in the heart of the Chilterns,
Great Mop is situated twelve miles from Wickendon in a hilly district with
many beech-woods. The parish church has a fine Norman tower and a
squint. The population is 227.” And quite close by on a hill there is a ruined
windmill, and the nearest railway station is twelve miles off, and there is a
farm called Scramble Through the Hedge....’
Henry thought it time to interrupt. ‘I suppose you don’t expect us to
believe all this.’
‘I know. It does seem almost too good to be true. But it is. I’ve read it in
a guide-book, and seen it on a map.’
‘Well, all I can say is....’
‘Henry! Henry!’ said Caroline warningly. Henry did not say it. He threw
the cushion out of his chair, glared at Laura, and turned away his head.
For some time Titus’s attempts at speech had hovered above the tumult,
like one holy appeasing dove loosed after the other. The last dove was
luckier. It settled on Laura.
‘How nice of you to have a donkey. Will it be a grey donkey, like
Madam?’
‘Do you remember dear Madam, then?’
‘Of course I remember dear Madam. I can remember everything that
happened to me when I was four. I rode in one pannier, and you, Marion,
rode in the other. And we went to have tea in Potts’s Dingle.’
‘With sponge cakes and raspberry jam, do you remember?’
‘Yes. And milk surging in a whisky bottle. Will you have thatch or slate,
Aunt Lolly? Slate is very practical.’
‘Thatch is more motherly. Anyhow, I shall have a pump.’
‘Will it be an indoor or an outdoor pump? I ask, for I hope to pump on it
quite often.’
‘You will come to stay with me, won’t you, Titus?’
Laura was a little cast-down. It did not look, just then, as if any one else
wanted to come and stay with her at Great Mop. But Titus was as
sympathetic as she had hoped. They spent the rest of the evening telling
each other how she would live. By half-past ten their conjectures had
become so fantastic that the rest of the family thought the whole scheme
was nothing more than one of Lolly’s odd jokes that nobody was ever
amused by. Henry took heart. He rallied Laura, supposing that when she
lived at Great Mop she would start hunting for catnip again, and become the
village witch.
‘How lovely!’ said Laura.
Henry was satisfied. Obviously Laura could not be in earnest.
When the guests had gone, and Henry had bolted and chained the door,
and put out the hall light, Laura hung about a little, thinking that he or
Caroline might wish to ask her more. But they asked nothing and went
upstairs to bed. Soon after, Laura followed them. As she passed their
bedroom door she heard their voices within, the comfortable fragmentary
talk of a husband and wife with complete confidence in each other and
nothing particular to say.
Laura decided to tackle Henry on the morrow. She observed him during
breakfast and saw with satisfaction that he seemed to be in a particularly
benign mood. He had drunk three cups of coffee, and said ‘Ah! poor
fellow!’ when a wandering cornet-player began to play on the pavement
opposite. Laura took heart from these good omens, and, breakfast being
over, and her brother and the Times retired to the study, she followed them
thither.
‘Henry,’ she said. ‘I have come for a talk with you.’
Henry looked up. ‘Talk away, Lolly,’ he said, and smiled at her.
‘A business talk,’ she continued.
Henry folded the Times and laid it aside. He also (if the expression may
be allowed) folded and laid aside his smile.
‘Now, Lolly, what is it?’
His voice was kind, but business-like. Laura took a deep breath, twisted
the garnet ring round her little finger, and began.
‘It has just occurred to me, Henry, that I am forty-seven.’
She paused.
‘Go on!’ said Henry.
‘And that both the girls are married. I don’t mean that that has just
occurred to me too, but it’s part of it. You know, really I’m not much use to
you now.’
‘My dear Lolly!’ remonstrated her brother ‘You are extremely useful.
Besides, I have never considered our relationship in that light.’
‘So I have been thinking. And I have decided that I should like to go and
live at Great Mop. You know, that place I was talking about last night.’
Henry was silent. His face was completely blank. Should she recall
Great Mop to him by once more repeating the description out of the guide-
book?
‘In the Chilterns,’ she murmured. ‘Pop. 227.’
Henry’s silence was unnerving her.
‘Really, I think it would be a good plan. I should like to live alone in the
country. And in my heart I think I have always meant to, one day. But one
day is so like another, it’s almost impossible to throw salt on its tail. If I
don’t go soon, I never shall. So if you don’t mind, I should like to start as
soon as possible.’
There was another long pause. She could not make out Henry at all. It
was not like him to say nothing when he was annoyed. She had expected
thunders and tramplings, and those she could have weathered. But thus
becalmed under a lowering sky she was beginning to lose her head.
At last he spoke.
‘I hardly know what to say.’
‘I’m sorry if the idea annoys you, Henry.’
‘I am not annoyed. I am grieved. Grieved and astonished. For twenty
years you have lived under my roof. I have always thought—I may be
wrong, but I have always thought—that you were happy here.’
‘Quite happy,’ said Laura.
‘Caroline and I have done all we could to make you so. The children—
all the children—look on you as a second mother. We are all devoted to
you. And now, without a word of warning, you propose to leave us and go
and live at a place called Great Mop. Lolly! I must ask you to put this
ridiculous idea out of your head.’
‘I never expected you to be so upset, Henry. Perhaps I should have told
you more gradually. I should be sorry to hurt you.’
‘You have hurt me, I admit,’ said he, firmly seizing on this advantage.
‘Still, let that pass. Say you won’t leave us, Lolly.’
‘I’m afraid I can’t quite do that.’
‘But Lolly, what you want is absurd.’
‘It’s only my own way, Henry.’
‘If you would like a change, take one by all means. Go away for a
fortnight. Go away for a month! Take a little trip abroad if you like. But
come back to us at the end of it.’
‘No, Henry. I love you all, but I feel I have lived here long enough.’
‘But why? But why? What has come over you?’
Laura shook her head.
‘Surely you must have some reasons.’
‘I have told you my reasons.’
‘Lolly! I cannot allow this. You are my sister. I consider you my charge.
I must ask you, once for all to drop this idea. It is not sensible. Or suitable.’
‘I have reminded you that I am forty-seven. If I am not old enough now
to know what is sensible and suitable, I never shall be.’
‘Apparently not.’
This was more like Henry’s old form. But though he had scored her off,
it did not seem to have encouraged him as much as scoring off generally
did. He began again, almost as a suppliant.
‘Be guided by me, Lolly. At least, take a few days to think it over.’
‘No, Henry. I don’t feel inclined to; I’d much rather get it over now.
Besides, if you are going to disapprove as violently as this, the sooner I
pack up and start the better.’
‘You are mad. You talk of packing up and starting when you have never
even set eyes on the place.’
‘I was thinking of going there to-day, to make arrangements.’
‘Well, then, you will do nothing of the kind. I’m sorry to seem harsh,
Lolly. But you must put all this out of your mind.’
‘Why?’
‘It is impracticable.’
‘Nothing is impracticable for a single, middle-aged woman with an
income of her own.’
Henry paled slightly, and said: ‘Your income is no longer what it was.’
‘Oh, taxes!’ said Laura contemptuously. ‘Never mind; even if it’s a little
less, I can get along on it.’
‘You know nothing of business, Lolly. I need not enter into explanations
with you. It should be enough for me to say that for the last year your
income has been practically non-existent.’
‘But I can still cash cheques.’
‘I have placed a sum at the bank to your credit.’
Laura had grown rather pale too. Her eyes shone.
‘I’m afraid you must enter into explanations with me, Henry. After all, it
is my income, and I have a right to know what has happened to it.’
‘Your capital has always been in my hands, Lolly, and I have
administered it as I thought fit.’
‘Go on,’ said Laura.
‘In 1920 I transferred the greater part of it to the Ethiopian Development
Syndicate, a perfectly sound investment which will in time be as good as
ever, if not better. Unfortunately, owing to this Government and all this
socialistic talk the soundest investments have been badly hit. The Ethiopian
Development Syndicate is one of them.’
‘Go on, Henry. I have understood quite well so far. You have
administered all my money into something that doesn’t pay. Now explain
why you did this.’
‘I had every reason for thinking that I should be able to sell out at a
profit almost immediately. During November the shares had gone up from
5¾ to 8½. I bought in December at 8½. They went to 8¾ and since then
have steadily sunk. They now stand at 4. Of course, my dear, you needn’t
be alarmed. They will rise again the moment we have a Conservative
Government, and that, thank Heaven, must come soon. But you see at
present it is out of the question for you to think of leaving us.’
‘But don’t these Ethiopians have dividends?’
‘These,’ said Henry with dignity, ‘are not the kind of shares that pay
dividends. They are—that is to say, they were, and of course will be again
—a sound speculative investment. But at present they pay no dividends
worth mentioning. Now, Lolly, don’t become agitated. I assure you that it is
all perfectly all right. But you must give up this idea of the country.
Anyhow, I’m sure you wouldn’t find it suit you. You are rheumatic——’
Laura tried to interpose.
‘—or will be. All the Willoweses are rheumatic. Buckinghamshire is
damp. Those poetical beech-woods make it so. You see, trees draw rain. It
is one of the principles of afforestation. The trees—that is to say, the rain
——’
Laura stamped her foot with impatience. ‘Have done with your trumpery
red herrings!’ she cried.
She had never lost her temper like this before. It was a glorious
sensation.
‘Henry!’ She could feel her voice crackle round his ears. ‘You say you
bought those shares at eight and something, and that they are now four. So
if you sell out now you will get rather less than half what you gave for
them.’
‘Yes,’ said Henry. Surely if Lolly were business woman enough to grasp
that so clearly, she would in time see reason on other matters.
‘Very well. You will sell them immediately——’
‘Lolly!’
‘—and reinvest the money in something quite unspeculative and
unsound, like War Loan, that will pay a proper dividend. I shall still have
enough to manage on. I shan’t be as comfortable as I thought I should be. I
shan’t be able to afford the little house that I hoped for, nor the donkey. But
I shan’t mind much. It will matter very little to me when I’m there.’
She stopped. She had forgotten Henry, and the unpleasant things she
meant to say to him. She had come to the edge of the wood, and felt its cool
breath in her face. It did not matter about the donkey, nor the house, nor the
darkening orchard even. If she were not to pick fruit from her own trees,
there were common herbs and berries in plenty for her, growing wherever
she chose to wander. It is best as one grows older to strip oneself of
possessions, to shed oneself downward like a tree, to be almost wholly earth
before one dies.
As she left the room she turned and looked at Henry. Such was her
mood, she could have blessed him solemnly, as before an eternal departure.
But he was sitting with his back to her, and did not look round. When she
had gone he took out his handkerchief and wiped his forehead.
Ten days later Laura arrived at Great Mop. After the interview with
Henry she encountered no more opposition. Caroline knew better than to
persist against an obstinacy which had worsted her husband, and the other
members of the family, their surprise being evaporated, were indifferent.
Titus was a little taken aback when he found that his aunt’s romantic
proposals were seriously intended. He for his part was going to Corsica. ‘A
banal mountainous spot,’ he said politely, ‘compared with
Buckinghamshire.’
The day of Laura’s arrival was wet and blusterous. She drove in a car
from Wickendon. The car lurched and rattled, and the wind slapped the rain
against the windows; Laura could scarcely see the rising undulations of the
landscape. When the car drew up before her new home, she stood for a
moment looking up the village street, but the prospect was intercepted by
the umbrella under which Mrs. Leak hastened to conduct her to the porch.
So had it rained, and so had the wind blown, on the day when she had come
on her visit of inspection and had taken rooms in Mrs. Leak’s cottage. So,
Henry and Caroline and their friends had assured her, did it rain and blow
all through the winter in the Chilterns. No words of theirs, they said, could
describe how dismal and bleak it would be among those unsheltered hills.
To Laura, sitting by the fire in her parlour, the sound of wind and rain was
pleasant. ‘Weather like this,’ she thought, ‘would never be allowed in
London.’
The unchastened gusts that banged against the side of the house and
drove the smoke down the chimney, and the riotous gurgling of the rain in
the gutters were congenial to her spirit. ‘Hoo! You daredevil,’ said the wind.
‘Have you come out to join us?’ Yet sitting there with no companionship
except those exciting voices she was quiet and happy.
Mrs. Leak’s tea was strong Indian tea. The bread-and-butter was cut in
thick slices, and underneath it was a crocheted mat; there was plum jam in a
heart-shaped glass dish, and a plate of rather heavy jam-puffs. It was not
quite so good as the farmhouse teas she remembered in Somerset, but a
great deal better than teas at Apsley Terrace.
Tea being done with, Laura took stock of her new domain. The parlour
was furnished with a large mahogany table, four horsehair chairs and a
horsehair sofa, an armchair, and a sideboard, rather gimcrack compared to
the rest of the furniture. On the walls, which were painted green, hung a
print of the Empress Josephine and two rather scowling classical landscapes
with ruined temples, and volcanoes. On either side of the hearth were
cupboards, and the fireplace was of a cottage pattern with hobs, and a small
oven on one side. This fireplace had caught Laura’s fancy when she first
looked at the rooms. She had stipulated with Mrs. Leak that, should she so
wish, she might cook on it. There are some things—mushrooms, for
instance, or toasted cheese—which can only be satisfactorily cooked by the
eater. Mrs. Leak had made no difficulties. She was an oldish woman,
sparing of her words and moderate in her demands. Her husband worked at
the sawmill. They were childless. She had never let lodgings before, but till
last year an aunt with means of her own had occupied the parlour and
bedroom which were now Laura’s.
It did not take Laura very long to arrange her belongings, for she had
brought little. Soon after supper, which consisted of rabbit, bread and
cheese, and table beer, she went upstairs to bed. Moving about her small
cold bedroom she suddenly noticed that the wind had fallen, and that it was
no longer raining. She pushed aside a corner of the blind and opened the
window. The night air was cold and sweet, and the full moon shone high
overhead. The sky was cloudless, lovely, and serene; a few stars glistened
there like drops of water about to fall. For the first time she was looking at
the intricate landscape of rounded hills and scooped valleys which she had
chosen for learning by heart.
Dark and compact, the beech-woods lay upon the hills. Alighting as
noiselessly as an owl, a white cat sprang up on to the garden fence. It
glanced from side to side, ran for a yard or two along the top of the fence
and jumped off again, going secretly on its way. Laura sighed for happiness.
She had no thoughts; her mind was swept as clean and empty as the
heavens. For a long time she continued to lean out of the window, forgetting
where she was and how she had come there, so unearthly was her
contentment.
Nevertheless her first days at Great Mop gave her little real pleasure. She
wrecked them by her excitement. Every morning immediately after
breakfast she set out to explore the country. She believed that by eating a
large breakfast she could do without lunch. The days were short, and she
wanted to make the most of them, and making the most of the days and
going back for lunch did not seem to her to be compatible. Unfortunately,
she was not used to making large breakfasts, so her enthusiasm was
qualified by indigestion until about four P.M., when both enthusiasm and
indigestion yielded to a faintish feeling. Then she turned back, generally by
road, since it was growing too dark to find out footpaths, and arrived home
with a limp between six and seven. She knew in her heart that she was not
really enjoying this sort of thing, but the habit of useless activity was too
strong to be snapped by change of scene. And in the evening, as she looked
at the map and marked where she had been with little bleeding footsteps of
red ink, she was enchanted afresh by the names and the bridle-paths, and,
forgetting the blistered heel and the dissatisfaction of that day’s walk,
planned a new walk for the morrow.
Nearly a week had gone by before she righted herself. She had made an
appointment with the sunset that she should see it from the top of a certain
hill. The hill was steep, and the road turned and twisted about its sides. It
was clear that the sunset would be at their meeting-place before she was,
nor would it be likely to kick its heels and wait about for her. She looked at
the sky and walked faster. The road took a new and unsuspected turn,
concealed behind the clump of trees by which she had been measuring her
progress up the hill. She was growing more and more flustered, and at this
prick she lost her temper entirely. She was tired, she was miles from Great
Mop, and she had made a fool of herself. An abrupt beam of light shot up
from behind the hedge as though the sun in vanishing below the horizon
had winked at her. ‘This sort of thing,’ she said aloud, ‘has got to be put a
stop to.’ She sat down in the extremely comfortable ditch to think.
The shades that had dogged her steps up the hill closed in upon her as
she sat in the ditch, but when she took out her map there was enough light
to enable her to see where the nearest inn lay. It was close at hand; when
she got there she could just read its name on the sign. Its name was The
Reason Why. Entering The Reason Why, she ordered tea and a conveyance
to drive her back to Great Mop. When she left the inn it was a brilliant night
of stars. Outside stood a wagonette drawn by a large white horse. Piled on
the seat of the wagonette were a number of waterproof rugs with finger-
rings on them, and these she wrapped round her with elaborate care.
The drive back to Great Mop was more filled with glory than anything
she had ever experienced. The wagonette creaked over bare hill-tops and
plunged downwards into the chequered darknesses of unknown winter
woods. All the stars shook their glittering spears overhead. Turning this way
and that to look at them, the frost pinched her cheeks.
That evening she asked Mrs. Leak if she would lend her some books.
From Mrs. Leak’s library she chose Mehalah, by the Rev. Sabine Baring-
Gould, and an anonymous work of information called Enquire Within Upon
Everything. The next morning was fine and sunny. She spent it by the
parlour fire, reading. When she read bits of Mehalah she thought how
romantic it would be to live in the Essex Marshes. From Enquire Within
Upon Everything she learned how gentlemen’s hats if plunged in a bath of
logwood will come out with a dash of respectability, and that ruins are best
constructed of cork. During the afternoon she learned other valuable facts
like these, and fell asleep. On the following morning she fell asleep again,
in a beech-wood, curled up in a heap of dead leaves. After that she had no
more trouble. Life becomes simple if one does nothing about it. Laura did
nothing about anything for days and days till Mrs. Leak said: ‘We shall
soon be having Christmas, miss.’
Christmas! So it had caught them all again. By now the provident
Caroline herself was suffering the eleventh hour in Oxford Street. But here
even Christmas was made easy.

You might also like