100% found this document useful (2 votes)
79 views

Instant Download Discovering Computer Science Interdisciplinary Problems Principles and Python Programming 2nd Edition Jessen Havill PDF All Chapters

Havill

Uploaded by

aouiliheil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
79 views

Instant Download Discovering Computer Science Interdisciplinary Problems Principles and Python Programming 2nd Edition Jessen Havill PDF All Chapters

Havill

Uploaded by

aouiliheil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Discovering Computer Science Interdisciplinary


Problems Principles and Python Programming 2nd
Edition Jessen Havill

https://textbookfull.com/product/discovering-computer-
science-interdisciplinary-problems-principles-and-python-
programming-2nd-edition-jessen-havill-2/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Discovering Computer Science Interdisciplinary Problems


Principles and Python Programming 2nd Edition Jessen
Havill
https://textbookfull.com/product/discovering-computer-science-
interdisciplinary-problems-principles-and-python-programming-2nd-
edition-jessen-havill-2/
textboxfull.com

Discovering Computer Science Interdisciplinary Problems


Principles and Python Programming 1st Edition Jessen
Havill
https://textbookfull.com/product/discovering-computer-science-
interdisciplinary-problems-principles-and-python-programming-1st-
edition-jessen-havill/
textboxfull.com

Discovering Computer Science Interdisciplinary Problems


Principles and Python Programming First Edition Jessen
Havill
https://textbookfull.com/product/discovering-computer-science-
interdisciplinary-problems-principles-and-python-programming-first-
edition-jessen-havill/
textboxfull.com

Python Programming An Introduction to Computer Science


John M. Zelle

https://textbookfull.com/product/python-programming-an-introduction-
to-computer-science-john-m-zelle/

textboxfull.com
Python Programming An Introduction to Computer Science 3rd
Edition John M. Zelle

https://textbookfull.com/product/python-programming-an-introduction-
to-computer-science-3rd-edition-john-m-zelle/

textboxfull.com

Data Science from Scratch First Principles with Python 2nd


Edition Joel Grus

https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-joel-grus/

textboxfull.com

Data Science from Scratch First Principles with Python 2nd


Edition Grus Joel

https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-grus-joel/

textboxfull.com

Practical Programming An Introduction to Computer Science


Using Python 3 6 3rd Edition Paul Gries

https://textbookfull.com/product/practical-programming-an-
introduction-to-computer-science-using-python-3-6-3rd-edition-paul-
gries/
textboxfull.com

Programming Interview Problems: Dynamic Programming (with


solutions in Python) 1st Edition Leonardo Rossi

https://textbookfull.com/product/programming-interview-problems-
dynamic-programming-with-solutions-in-python-1st-edition-leonardo-
rossi/
textboxfull.com
Discovering Computer Science
Chapman & Hall/CRC
Textbooks in Computing
Series Editors
John Impagliazzo
Andrew McGettrick

Pascal Hitzler, Markus Krötzsch, and Sebastian Rudolph, Foundations of Semantic Web Technologies
Henrik Bærbak Christensen, Flexible, Reliable Software: Using Patterns and Agile Development
John S. Conery, Explorations in Computing: An Introduction to Computer Science
Lisa C. Kaczmarczyk, Computers and Society: Computing for Good
Mark Johnson, A Concise Introduction to Programming in Python
Paul Anderson, Web 2.0 and Beyond: Principles and Technologies
Henry Walker, The Tao of Computing, Second Edition
Ted Herman, A Functional Start to Computing with Python
Mark Johnson, A Concise Introduction to Data Structures Using Java
David D. Riley and Kenny A. Hunt, Computational Thinking for the Modern Problem Solver
Bill Manaris and Andrew R. Brown, Making Music with Computers: Creative Programming in Python
John S. Conery, Explorations in Computing: An Introduction to Computer Science and Python Programming
Jessen Havill, Discovering Computer Science: Interdisciplinary Problems, Principles, and Python
Programming
Efrem G. Mallach, Information Systems: What Every Business Student Needs to Know
Iztok Fajfar, Start Programming Using HTML, CSS, and JavaScript
Mark C. Lewis and Lisa L. Lacher, Introduction to Programming and Problem-Solving Using Scala,
Second Edition
Aharon Yadin, Computer Systems Architecture
Mark C. Lewis and Lisa L. Lacher, Object-Orientation, Abstraction, and Data Structures Using Scala,
Second Edition
Henry M. Walker, Teaching Computing: A Practitioner’s Perspective
Efrem G. Mallach, Information Systems:What Every Business Student Needs to Know, Second Edition
Jessen Havill, Discovering Computer Science: Interdisciplinary Problems, Principles, and Python
Programming, Second Edition
For more information about this series please visit:
https://www.crcpress.com/Chapman--HallCRC-Textbooks-in-Computing/book-series/CANDHTEXCO
MSER?page=2&order=pubdate&size=12&view=list&status=published,forthcoming
Discovering Computer Science
Interdisciplinary Problems, Principles, and
Python Programming
Second Edition

Jessen Havill
Second edition published 2021
by CRC Press
2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

and by CRC Press


6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742

© 2021 Jessen Havill

The right of Jessen Havill to be identified as author of this work has been asserted by him in accordance with sections
77 and 78 of the Copyright, Designs and Patents Act 1988.

All rights reserved. No part of this book may be reprinted or reproduced or utilised in any form or by any electronic,
mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any infor­
mation storage or retrieval system, without permission in writing from the publishers.

For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the
Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are
not available on CCC please contact [email protected]

Trademark notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.

British Library Cataloguing-in-Publication Data


A catalogue record for this book is available from the British Library

Library of Congress Cataloging-in-Publication Data

Names: Havill, Jessen, author.


Title: Discovering computer science : interdisciplinary problems,
principles, and Python programming / Jessen Havill.
Description: Second edition. | Boca Raton : CRC Press, 2021. | Series:
Chapman & Hall/CRC press textbooks in computing | Includes
bibliographical references and index.
Identifiers: LCCN 2020030144 | ISBN 9780367472498 (paperback) | ISBN
9780367613358 (hardback) | ISBN 9781003037149 (ebook)
Subjects: LCSH: Computer science--Textbooks. | Python (Computer program
language)--Textbooks.
Classification: LCC QA76 .H3735 2021 | DDC 005.13/3--dc23
LC record available at https://lccn.loc.gov/2020030144

ISBN: 9780367613358 (hbk)


ISBN: 9780367472498 (pbk)
ISBN: 9781003037149 (ebk)

Typeset in Computer Modern font


by Cenveo Publisher Services
Contents

Preface xv

Acknowledgments xxiii

About the author xxv

Chapter 1 ∎ How to Solve It 1


1.1 UNDERSTAND THE PROBLEM 3
A first problem: computing reading level 4
Functional abstraction 5
1.2 DESIGN AN ALGORITHM 6
Take it from the top 7
Pseudocode 10
Implement from the bottom 14
1.3 WRITE A PROGRAM 23
Welcome to the circus 23
What’s in a name? 28
Interactive computing 31
Looking ahead 32
1.4 LOOK BACK 36
Testing 37
Algorithm efficiency 39
1.5 SUMMARY AND FURTHER DISCOVERY 45

Chapter 2 ∎ Visualizing Abstraction 49


2.1 DATA ABSTRACTION 51
Turtle graphics 53
2.2 DRAWING FLOWERS AND PLOTTING EARTHQUAKES 55
Iteration 57
Tangent 2.1 Defining colors 60

v
vi • Contents

Data visualization 62
2.3 FUNCTIONAL ABSTRACTION 66
Function parameters 69
2.4 PROGRAMMING IN STYLE 77
Program structure 78
Documentation 79
Tangent 2.2 Global variables 80
Self-documenting code 83
2.5 A RETURN TO FUNCTIONS 87
The math module 88
Writing functions with return values 89
Return vs. print 92
2.6 SCOPE AND NAMESPACES 97
Local namespaces 98
The global namespace 101
2.7 SUMMARY AND FURTHER DISCOVERY 105

Chapter 3 ∎ Inside a Computer 107


3.1 COMPUTERS ARE DUMB 108
Tangent 3.1 High performance computing 109
Machine language 111
Tangent 3.2 Byte code 112
3.2 EVERYTHING IS BITS 112
Bits are switches 112
Bits can represent anything 113
Tangent 3.3 Hexadecimal notation 114
Computing with bits 114
3.3 COMPUTER ARITHMETIC 118
Limited precision 118
Tangent 3.4 Floating point notation 120
Error propagation 120
Division 121
Complex numbers 122
*3.4 BINARY ARITHMETIC ***
More limited precision

*
Sections with *** in lieu of a page number are available on the book website.
Contents • vii

Negative integers
Designing an adder
Implementing an adder
3.5 THE UNIVERSAL MACHINE 124
3.6 SUMMARY AND FURTHER DISCOVERY 126

Chapter 4 ∎ Growth and Decay 129


4.1 ACCUMULATORS 130
Managing a fishing pond 130
Measuring network value 136
Organizing a concert 139
4.2 DATA VISUALIZATION 150
4.3 CONDITIONAL ITERATION 155
When will the fish disappear? 155
When will your nest egg double? 157
*4.4 CONTINUOUS MODELS ***
Difference equations
Radiocarbon dating
Tradeoffs between accuracy and time
Simulating an epidemic
*4.5 NUMERICAL ANALYSIS ***
The harmonic series
Approximating π
Approximating square roots
4.6 SUMMING UP 161
Tangent 4.1 Triangular numbers 163
4.7 FURTHER DISCOVERY 164
*4.8 PROJECTS ***
4.1 Parasitic relationships
4.2 Financial calculators
4.3 Market penetration
4.4 Wolves and moose

Chapter 5 ∎ Forks in the Road 165


5.1 RANDOM WALKS 166
Tangent 5.1 Interval notation 167
One small step 167
viii • Contents

Monte Carlo simulation 171


*5.2 PSEUDORANDOM NUMBER GENERATORS ***
Implementation
Testing randomness
*5.3 SIMULATING PROBABILITY DISTRIBUTIONS ***
The central limit theorem
5.4 BACK TO BOOLEANS 180
Predicate functions 182
Short circuit evaluation 183
DeMorgan’s laws 184
Thinking inside the box 187
Many happy returns 192
5.5 DEFENSIVE PROGRAMMING 199
Checking parameters 199
Assertions 202
Unit testing 204
Tangent 5.2 Unit testing frameworks 205
Testing floats 207
Catching exceptions 207
5.6 GUESS MY NUMBER 210
Ending the game nicely 212
Friendly hints 213
A proper win/lose message 214
5.7 SUMMARY AND FURTHER DISCOVERY 219
*5.8 PROJECTS ***
5.1 The magic of polling
5.2 Escape!

Chapter 6 ∎ Text, Documents, and DNA 221


6.1 FIRST STEPS 222
Normalization 223
Tangent 6.1 Natural language processing 224
Tokenization 228
Creating your own module 232
Testing your module 233
6.2 TEXT DOCUMENTS 238
Contents • ix

Reading from text files 239


Writing to text files 242
Reading from the web 243
6.3 ENCODING STRINGS 246
Computing checksums 246
Unicode 247
Tangent 6.2 Compressing text files 250
Indexing and slicing 251
6.4 A CONCORDANCE 256
Finding a word 257
A concordance entry 262
A complete concordance 263
6.5 WORD FREQUENCY TRENDS 266
Finding the frequency of a word 268
Getting the frequencies in slices 269
Plotting the frequencies 270
6.6 COMPARING TEXTS 272
Dot plots 274
*6.7 TIME COMPLEXITY ***
Best case vs. worst case
Asymptotic time complexity
*6.8 COMPUTATIONAL GENOMICS ***
A genomics primer
Basic DNA analysis
Transforming sequences
Comparing sequences
Reading sequence files
6.9 SUMMARY AND FURTHER DISCOVERY 281
*6.10 PROJECTS ***
6.1 Polarized politics
6.2 Finding genes

Chapter 7 ∎ Data Analysis 285


7.1 SUMMARY STATISTICS 286
Mean and variance 286
Minimum and maximum 288
x • Contents

7.2 WRANGLING DATA 293


Smoothing data 294
A more efficient algorithm 295
Modifying lists in place 297
List operators and methods 302
*List comprehensions 305
Tangent 7.1 NumPy arrays 306
7.3 TALLYING FREQUENCIES 310
Word frequencies 310
Dictionaries 311
Tangent 7.2 Hash tables 315
Finding the most frequent word 315
Bigram frequencies 317
Tangent 7.3 Sentiment analysis 318
7.4 READING TABULAR DATA 325
Earthquakes 326
*7.5 DESIGNING EFFICIENT ALGORITHMS ***
Removing duplicates
A first algorithm
A more elegant algorithm
A more efficient algorithm
*7.6 LINEAR REGRESSION ***
*7.7 DATA CLUSTERING ***
Defining similarity
A simple example
Implementing k-means clustering
Locating bicycle safety programs
7.8 SUMMARY AND FURTHER DISCOVERY 333
Tangent 7.4 Privacy in the age of big data 334
*7.9 PROJECTS ***
7.1 Climate change
7.2 Does education influence unemployment?
7.3 Maximizing profit
7.4 Admissions
7.5 Preparing for a 100-year flood
7.6 Voting methods
Contents • xi

7.7 Heuristics for traveling salespeople

Chapter 8 ∎ Flatland 335


8.1 TABULAR DATA 335
Reading a table of temperatures 336
Tangent 8.1 Pandas 339
8.2 THE GAME OF LIFE 342
Creating a grid 344
Initial configurations 345
Surveying the neighborhood 346
Performing one pass 347
Tangent 8.2 NumPy arrays in two dimensions 349
Updating the grid 349
8.3 DIGITAL IMAGES 353
Colors 353
Tangent 8.3 Additive vs. subtractive color models 354
Image filters 355
Tangent 8.4 Image storage and compression 356
Transforming images 358
8.4 SUMMARY AND FURTHER DISCOVERY 363
*8.5 PROJECTS ***
8.1 Modeling segregation
8.2 Modeling ferromagnetism
8.3 Growing dendrites
8.4 Simulating an epidemic

Chapter 9 ∎ Self-similarity and Recursion 365


9.1 FRACTALS 365
Trees 367
Snowflakes 369
9.2 RECURSION AND ITERATION 375
Solving a problem recursively 379
Palindromes 380
Guessing passwords 382
9.3 THE MYTHICAL TOWER OF HANOI 388
*Is the end of the world nigh? 390
9.4 RECURSIVE LINEAR SEARCH 392
xii • Contents

*Efficiency of recursive linear search 393


9.5 DIVIDE AND CONQUER 396
Buy low, sell high 397
Navigating a maze 400
*9.6 LINDENMAYER SYSTEMS ***
Formal grammars
L-systems
Implementing L-systems
9.7 SUMMARY AND FURTHER DISCOVERY 405
*9.8 PROJECTS ***
9.1 Lindenmayer’s beautiful plants
9.2 Gerrymandering
9.3 Percolation

Chapter 10 ∎ Organizing Data 407


10.1 BINARY SEARCH 408
Tangent 10.1 Databases 409
Efficiency of iterative binary search 412
A spelling checker 414
Recursive binary search 415
*Efficiency of recursive binary search 416
10.2 SELECTION SORT 418
Implementing selection sort 419
Efficiency of selection sort 422
Querying data 423
10.3 INSERTION SORT 427
Implementing insertion sort 428
Efficiency of insertion sort 430
10.4 EFFICIENT SORTING 433
Merge sort 433
Internal vs. external sorting 437
Efficiency of merge sort 437
*10.5 TRACTABLE AND INTRACTABLE ALGORITHMS ***
Hard problems
10.6 SUMMARY AND FURTHER DISCOVERY 441
*10.7 PROJECTS ***
Contents • xiii

10.1 Creating a searchable database


10.2 Binary search trees

Chapter 11 ∎ Networks 443


11.1 MODELING WITH GRAPHS 444
Making friends 446
11.2 SHORTEST PATHS 451
Breadth-first search 451
Finding the actual paths 455
11.3 IT’S A SMALL WORLD. . . 458
Small world networks 458
Clustering coefficients 459
Scale-free networks 461
11.4 RANDOM GRAPHS 464
11.5 SUMMARY AND FURTHER DISCOVERY 467
*11.6 PROJECTS ***
11.1 Diffusion of ideas and influence
11.2 Slowing an epidemic
11.3 The Oracle of Bacon

Chapter 12 ∎ Object-oriented Design 469


12.1 SIMULATING AN EPIDEMIC 470
Object design 471
Person class 472
Augmenting the Person class 477
World class 479
The simulation 481
12.2 OPERATORS AND POLYMORPHISM 486
Designing a Pair ADT 487
Pair class 488
Arithmetic methods 489
Special methods 491
Comparison operators 493
Indexing 494
*12.3 A FLOCKING SIMULATION ***
The World
Boids
xiv • Contents

*12.4 A STACK ADT ***


Stack class
Reversing a string
Converting numbers to other bases
*12.5 A DICTIONARY ADT ***
Hash tables
Implementing a hash table
Indexing
ADTs vs. data structures
12.6 SUMMARY AND FURTHER DISCOVERY 499
*12.7 PROJECTS ***
12.1 Tracking GPS coordinates
12.2 Economic mobility
12.3 Slime mold aggregation
12.4 Boids in space

Bibliography 501

Appendix A ∎ Python Library Reference ***

Appendix B ∎ Selected Exercise Solutions ***

Index 505
Preface

I nthree
my view, an introductory computer science course should strive to accomplish
things. First, it should demonstrate to students how computing has become
a powerful mode of inquiry, and a vehicle of discovery, in a wide variety of disciplines.
This orientation is also inviting to students of the natural and social sciences, and the
humanities, who increasingly benefit from an introduction to computational thinking,
beyond the limited “black box” recipes often found in manuals and “Computing
for X” books. Second, the course should engage students in computational problem
solving, and lead them to discover the power of abstraction, efficiency, and data
organization in the design of their solutions. Third, the course should teach students
how to implement their solutions as computer programs. In learning how to program,
students more deeply learn the core principles, and experience the thrill of seeing
their solutions come to life.
Unlike most introductory computer science textbooks, which are organized around
programming language constructs, I deliberately lead with interdisciplinary problems
and techniques. This orientation is more interesting to a more diverse audience, and
more accurately reflects the role of programming in problem solving and discovery.
A computational discovery does not, of course, originate in a programming language
feature in search of an application. Rather, it starts with a compelling problem which
is modeled and solved algorithmically, by leveraging abstraction and prior experience
with similar problems. Only then is the solution implemented as a program.
Like most introductory computer science textbooks, I introduce programming skills
in an incremental fashion, and include many opportunities for students to practice
them. The topics in this book are arranged to ease students into computational
thinking, and encourage them to incrementally build on prior knowledge. Each
chapter focuses on a general class of problems that is tackled by new algorithmic
techniques and programming language features. My hope is that students will leave
the course, not only with strong programming skills, but with a set of problem
solving strategies and simulation techniques that they can apply in their future work,
whether or not they take another computer science course.
I use Python to introduce computer programming for two reasons. First, Python’s
intuitive syntax allows students to focus on interesting problems and powerful
principles, without unnecessary distractions. Learning how to think algorithmically
is hard enough without also having to struggle with a non-intuitive syntax. Second,
the expressiveness of Python (in particular, low-overhead lists and dictionaries)
expands tremendously the range of accessible problems in the introductory course.

xv
xvi • Preface

Teaching with Python over the last fifteen years has been a revelation; introductory
computer science has become fun again.

Changes in the second edition


In this comprehensive, cover-to-cover update, some sections were entirely rewritten
while others saw only minor revisions. Here are the highlights:

Problem solving The new first chapter, How to Solve It, sets the stage by focusing on
Polya’s elegant four-step problem solving process, adapted to a computational frame­
work. I introduce informal pseudocode, functional decomposition, hand-execution
with informal trace tables, and testing, practices that are now carried on throughout
the book. The introduction to Python (formally Chapter 2) is integrated into this
framework. Chapter 7, Designing Programs, from the first edition has been elimi­
nated, with that material spread out more naturally among Chapters 1, 5, and 6 in
the second edition.
Chapter 2, Visualizing Abstraction (based on the previous Chapter 3), elaborates on
the themes in Chapter 1, and their implementations in Python, introducing turtle
graphics, functions, and loops. The new Chapter 3, Inside a Computer (based on
the previous Sections 1.4 and 2.5), takes students on a brief excursion into the simple
principles underlying how computers work.

Online materials To reduce the size of the printed book, we have moved some
sections and all of the projects online. These sections are marked in the table of
contents with ***. Online materials are still indexed in the main book for convenience.

Exercises I’ve added exercises to most sections, bringing the total to about 750.
Solutions to exercises marked with an asterisk are available online for both students
and self-learners.

Digital humanities The interdisciplinary problems in the first edition were focused
primarily in the natural and social sciences. In this edition, especially in Chapters 1,
6, and 7, we have added new material on text analysis techniques commonly used in
the “digital humanities.”

Object-oriented design Chapter 12 begins with a new section to introduce object-


oriented design in a more concrete way through the development of an agent-based
simulation of a viral epidemic. The following sections flesh out more details on how
to implement polymorphic operators and collection classes.
Preface • xvii

Book website
Online materials for this book are available at

https://www.discoveringCS.net.
Here you will find

• additional “optional” sections, marked with an asterisk in the main text,


• over thirty interdisciplinary programming projects,
• solutions to selected exercises,
• programs and data files referenced in the text, exercises, and projects, and
• pointers for further exploration and links to additional documentation.

To students
Active learning Learning how to solve computational problems and implement
them as computer programs requires daily practice. Like an athlete, you will get
out of shape and fall behind quickly if you skip it. There are no shortcuts. Your
instructor is there to help, but he or she cannot do the work for you.
With this in mind, it is important that you type in and try the examples throughout
the text, and then go beyond them. Be curious! There are numbered “Reflection”
questions throughout the book that ask you to stop and think about, or apply,
something that you just read. Often, the question is answered in the book immediately
thereafter, so that you can check your understanding, but peeking ahead will rob
you of an important opportunity.

Further discovery There are many opportunities to delve into topics more deeply.
“Tangent” boxes scattered throughout the text briefly introduce related, but more
technical or applied, topics. For the most part, these are not strictly required to
understand what comes next, but I encourage you to read them anyway. In the
“Summary and Further Discovery” section of each chapter, you can find both a
high-level summary of the chapter and additional pointers to explore chapter topics
in more depth.

Exercises and projects At the end of most sections are several programming exercises
that ask you to further apply concepts from that section. Often, the exercises assume
that you have already worked through all of the examples in that section. Solutions
to the starred exercises are available on the book website. There are also more
involved projects available on the book website that challenge you to solve a variety
of interdisciplinary problems.

No prerequisites The book assumes no prior knowledge of computer science. How­


ever, it does assume a modest comfort with high school algebra. In optional sections,
xviii • Preface

trigonometry is occasionally mentioned, as is the idea of convergence to a limit, but


these are not relevant to understanding the main topics in the book.

Have fun! Programming and problem solving should be a fun, creative activity. I
hope that this book sparks your curiosity and love of learning, and that you enjoy
the journey as much as I have enjoyed writing this book.

To instructors
This book is appropriate for a traditional CS1 course for majors, a CS0 course for
non-majors (at a slower pace and omitting more material), or a targeted introductory
computing course for students in the natural sciences, social sciences, or humanities.
The approach is gentle and holistic, introducing programming concepts in the context
of interdisciplinary problems. We start with problem-solving, featuring pseudocode
and hand-execution with trace tables, and carry these techniques forward, especially
in the first half of the book.

Problem focus Most chapters begin with an interesting problem, and new concepts
and programming techniques are introduced in the context of solving it. As new
techniques are introduced, students are frequently challenged to re-solve old problems
in different ways. They are also encouraged to reuse their previous functions as
components in later programs.

Reflection questions, exercises, and projects “Reflection” questions are embedded


in every section to encourage active reading. These may also be assigned as “reading
questions” before class. The end-of-section exercises are appropriate for regular home­
work, and some more complex ones may form the basis of longer-term assignments.
The book website also hosts a few dozen interdisciplinary projects that students may
work on independently or in pairs over a longer time frame. I believe that projects
like these are crucial for students to develop both problem solving skills and an
appreciation for the many fascinating applications of computer science.

Additional instructor resources All of the reflection questions and exercises are
available to instructors as Jupyter notebooks. Solutions to all exercises and projects
are also available. Please visit the publisher’s website to request access.

Python coverage This book is not intended to be a Python manual. Some features
of the language were intentionally omitted because they would have muddled the core
problem solving focus or are not commonly found in other languages that students
may see in future CS courses (e.g., simultaneous swap, chained comparisons, zip,
enumerate in for loops).

Topic coverage There is more in this book than can be covered in a single semester,
giving instructors the opportunity to tailor the content to their particular situation
Preface • xix

Chapter 2 Chapter 3 Chapter 4


Chapter 1
Visualizing Inside a Growth and
How to Solve It
Abstraction Computer Decay

Chapter 6
Chapter 7 Chapter 5
Text, Documents,
Data Analysis Forks in the Road
and DNA

Chapter 9
Chapter 8 Chapter 10
Self-similarity and
Flatland Organizing Data
Recursion

Chapter 12
Chapter 11
Object-oriented
Networks
Design

Figure 1 An overview of chapter dependencies.

and interests. As illustrated in Figure 1, Chapters 1–7 form the core of the book, and
should be covered sequentially. The remaining chapters can be covered, partially or
entirely, at your discretion, although I would expect that most instructors will cover
at least parts of Chapters 8–10, and 12 if the course covers object-oriented design.
Chapter 11 introduces social network graphs and small-world and scale-free networks
as additional powerful applications of dictionaries, and may come any time after
Chapter 7. Sections marked with an asterisk are optional, in the sense that they are
not assumed for future sections in that chapter. When exercises and projects depend
on optional sections, they are also marked with an asterisk, and the dependency is
stated at the beginning of the project.

Chapter outlines The following tables provide brief overviews of what is available
in each chapter. Each table’s three columns, reflecting the three parts of the book’s
subtitle, provide three lenses through which to view the chapter.

1 How to Solve It
Sample problems Principles Programming
● reading level ● problems, input/output ● int, float, str types
● counting syllables, words ● functional abstraction ● arithmetic
● sphere volume ● functional decomposition ● assignment

● digital music ● top-down design ● variable names

● search engines ● bottom-up implementation ● calling built-in functions

● GPS devices ● algorithms and programs ● using strings

● phone trees ● pseudocode ● string operators

● wind chill ● names as references ● print and input

● compounding interest ● trace tables


● Mad Libs ● constant- vs. linear-time
xx • Preface

2 Visualizing Abstraction

Sample problems Principles Programming


● visualizing earthquakes ● using abstract data types ● using classes and objects
● drawing flowers ● creating functional ● turtle module
● random walks abstractions ● for loops (range and lists)
● ideal gas ● functional decomposition ● using and writing functions
● groundwater flow ● bottom-up implementation ● return vs. print

● demand functions ● turtle graphics ● namespaces and scope


● reading level ● trace tables with loops ● docstrings and comments
● self-documenting code
● program structure

3 Inside a Computer

Principles Programming
● computer organization ● int and float types
● machine language ● arithmetic errors
● binary representations ● true vs. floor division
● computer arithmetic
● finite precision, error propagation
● Boolean logic, truth tables, logic gates

● Turing machines, finite state machines

4 Growth and Decay

Sample problems Principles Programming


● population models ● accumulators ● for loops, range
● network value ● list accumulators ● format strings
● demand and profit ● data visualization ● matplotlib.pyplot

● loans and investing ● conditional iteration ● appending to lists


● bacterial growth ● classes of growth ● while loops
● radiocarbon dating ● continuous models
● epidemics (SIR, SIS) ● accuracy vs. time
● diffusion models ● numerical approximation

5 Forks in the Road


Sample problems Principles Programming
● random walks ● random number generators ● random module
● Monte Carlo simulation ● simulating probabilities ● if/elif/else
● guessing games ● flag variables ● comparison operators
● polling and ● using distributions ● Boolean operators

sampling ● DeMorgan’s laws ● short circuit evaluation

● particle escape ● defensive programming ● predicate functions


● pre- and post-conditions ● assert, isinstance

● unit testing ● catching exceptions


● histograms
● while loops
Preface • xxi

6 Text, Documents, and DNA


Sample problems Principles Programming
● text analysis ● functional decomposition ● str class and methods
● word frequency trends ● unit testing ● iterating over strings, lists
● checksums ● ASCII, Unicode ● indexing and slicing

● concordances ● linear-time algorithms ● iterating over indices


● dot plots, plagiarism ● time complexity ● creating a module
● congressional votes ● linear search ● text files and the web
● genomics ● string accumulators ● break
● nested loops

7 Data Analysis

Sample problems Principles Programming


● word, bigram frequencies ● histograms ● list class
● smoothing data ● hash tables ● indexing and slicing
● 100-year floods ● tabular data files ● list operators and methods
● traveling salesman ● efficient algorithm design ● reading CSV files
● meteorite sites ● linear regression ● modifying lists in place
● zebra migration ● k-means clustering ● list parameters
● tumor diagnosis ● heuristics ● tuples
● supply and demand ● list comprehensions
● voting methods ● dictionaries

8 Flatland
Sample problems Principles Programming
● earthquake data ● 2-D data ● lists of lists
● Game of Life ● cellular automata ● nested loops
● image filters ● digital images ● 2-D data in a dictionary

● racial segregation ● color models


● ferromagnetism
● dendrites
● epidemics
● tumor growth

9 Self-similarity and Recursion

Sample problems Principles Programming


● fractals ● self-similarity ● writing recursive functions
● cracking passwords ● recursion ● divide and conquer
● Tower of Hanoi ● linear search ● backtracking
● maximizing profit ● recurrence relations
● navigating a maze ● divide and conquer

● Lindenmayer systems ● depth-first search


● gerrymandering ● grammars
● percolation
xxii • Preface

10 Organizing Data

Sample problems Principles Programming


● spell check ● binary search ● nested loops
● querying data sets ● quadratic-time sorting ● writing recursive functions
● parallel lists
● merge sort
● recurrence relations

● intractability, P=NP?

11 Networks
Sample problems Principles Programming
● social media, web graphs ● graphs ● dictionaries
● diffusion of ideas ● adjacency list, matrix
● epidemics ● breadth-first search

● Oracle of Bacon ● queues


● shortest paths
● depth-first search
● small-world networks
● scale-free networks

● uniform random graphs

12 Object-oriented Design

Sample problems Principles Programming


● epidemic simulation ● abstract data types ● object-oriented design
● data sets ● encapsulation ● writing classes
● genomic sequences ● polymorphism ● special methods

● rational numbers ● data structures ● overriding operators


● flocking behavior ● stacks ● modules
● slime mold aggregation ● hash tables
● agent-based simulation
● swarm intelligence

Software assumptions
To follow along in this book and complete the exercises, you will need to have
installed Python 3.6 or later on your computer, and have access to IDLE or another
programming environment. The book also assumes that you have installed the
matplotlib.pyplot and numpy modules. The easiest way to get this software is to
install the free open source Anaconda distribution from http://www.anaconda.com.

Errata
While I (and my students) have ferreted out many errors, readers will inevitably find
more. You can find an up-to-date list of errata on the book website. If you find an error
in the text or have another suggestion, please let me know at [email protected].
Acknowledgments

In addition to those who provided their support and expertise for the first edition,
I wish to thank Janet Davis (Whitman College), Jim Deverick (The College of
William and Mary), David Goodwin (Denison University), and Ashwin Lall (Denison
University) for their valuable feedback on drafts of the second edition.
I would also like to thank Dee Ghiloni, Mary Lucas-Miller, and Tony Silveira for
their steadfast support, Mike Brady and my Data Analytics colleagues for reminding
me how much fun it can be to learn new things, and the Book Group for reminding
me to not take life too seriously. A Bowen Fellowship awarded by Denison University
gave me the time needed to complete this project.
Finally, my family has once again provided me with seemingly infinite patience and
love during this intensive period of writing. I am an extraordinarily lucky husband
and father.

xxiii
About the author

Jessen Havill is a Professor of Computer Science at Denison University. He has


been teaching courses across the computer science curriculum for almost thirty years,
and was awarded the College’s highest teaching honor, the Charles A. Brickman
Teaching Excellence Award, in 2013. Although his primary expertise is in the
development and analysis of online algorithms, Dr. Havill has spent many years
collaborating with colleagues across the curriculum to develop interdisciplinary
academic opportunities for students. From 2016–2019, he became the founding
Director of Denison University’s interdisciplinary Data Analytics program. Dr. Havill
earned his bachelor’s degree from Bucknell University and his Ph.D. in computer
science from The College of William and Mary.

xxv
CHAPTER 1

How to Solve It

We need to do away with the myth that computer science is about computers. Computer
science is no more about computers than astronomy is about telescopes, biology is about
microscopes or chemistry is about beakers and test tubes. Science is not about tools, it is
about how we use them and what we find out when we do.

Michael R. Fellows and Ian Parberry


Computing Research News (1993)

It has often been said that a person does not really understand something until after teaching
it to someone else. Actually a person does not really understand something until after
teaching it to a computer, i.e., expressing it as an algorithm.

Donald E. Knuth
American Scientist (1973)

C consciously
omputers now touch almost every facet of our daily lives, whether we are
aware of them or not. Computers have changed the way we learn,
communicate, shop, travel, receive healthcare, and entertain ourselves. They are
embedded in virtually everything, from major feats of engineering like airplanes,
spaceships, and factories to everyday items like microwaves, cameras, and tooth­
brushes. In addition, all of our critical infrastructure—utilities, transportation,
finance, communication, healthcare, law enforcement—relies upon computers.
Since computers are the most versatile tools ever invented, it should come as
no surprise that they are also employed throughout academia in the pursuit of
new knowledge. Social scientists use computational models to better understand
social networks, epidemics, population dynamics, markets, and auctions. Humanists
use computational tools to gain insight into literary trends, authorship of ancient
texts, and the macroscopic significance of historical records. Artists are increasingly
incorporating digital technologies into their compositions and performances. Natural

1
2 • 1 How to Solve It

Look back at
Understand the Design an Write a
your algorithm
problem algorithm program
and results

Figure 1.1 A simplified view of the problem solving process.

scientists use computers to collect and analyze immense quantities of data to


make discoveries in environmental science, genomics, particle physics, neuroscience,
pharmacology, and medicine.
But computers are neither productive nor consequential on their own. All of the
computers now driving civilization, for good or ill, were taught by humans. Computers
are amplifiers of human ingenuity. Without us, they are just dumb machines.
The goal of this book is to empower you to teach computers to solve problems and
make discoveries. Computational problem solving is a process that you will find both
familiar and new. We all solve problems every day and employ a variety of strategies
in doing so. Some of these strategies, like breaking big problems into smaller, more
manageable ones, are also fundamental to solving problems with a computer. Where
computational problem solving is different stems from computers’ lack of intellect
and intuition. Computers will only do what you tell them to and nothing more.
They cannot tolerate ambiguity or intuit your intentions. Computational problem
solving, by necessity, must be more precise and intentional than you may be used to.
The payoff though, paraphrasing Donald Knuth1 , is that teaching a computer to do
something can also dramatically deepen our understanding of that thing.
The problem solving process that we will outline in this chapter is inspired by How to
Solve It, a short book written by mathematician George Polya [50] in 1945. Polya’s
problem solving framework, having withstood the test of time, consists of four steps:

1. First, understand the problem. What is the unknown? What are the data?
What is the condition?
2. Second, devise a plan to solve the problem.
3. Third, carry out your plan, checking each step.
4. Fourth, look back. Check the result. Can you derive the result differently?

These four steps, with some modifications, can be applied just as well to compu­
tational problem solving, as illustrated in Figure 1.1. In the first step, we make

1
You can learn more about Donald Knuth at the end of this chapter.
Another Random Scribd Document
with Unrelated Content
home. Lucy, who has heard nothing of the feud, makes the
acquaintance of Howe’s three timid sisters, and eventually meets
him. It follows that the two fall in love. On her death bed, Ellen
discovers how matters stand with her niece and neighbor and
determines on final revenge. When her will is read it is found that
she leaves all her property to Howe provided he repairs the long-
disputed wall. Otherwise it is to become the town poor farm. The
situation develops into a battle between Howe’s pride and the
inclinations of his heart. But love, as usual, finds a way out.”—
Springf’d Republican

“A wholesome and pleasant, though not remarkable story that will


please girls and women.”

+ Booklist 17:70 N ’20

“Her previous novels, if one reads right, were somewhat


saccharine, but with growing firmness of touch due to experience in
writing ‘The wall between’ is more natural, more real, than its
predecessors.” R. D. W.

+ Boston Transcript p9 O 16 ’20 160w

“While different from her ‘Cape’ tales, this story is fully as


interesting, for, in spite of its artificialities, it is told with
understanding of human nature and the perversion of human
instincts.”

+ − Springf’d Republican p11a S 26 ’20


320w
BATES, KATHARINE LEE. Sigurd our golden
collie and other comrades of the road. il *$2 (3c)
Dutton 636.7

19–19679

Under the first title we have the biography of a beloved dog,


household pet of two professional women, teachers in Wellesley
college, who tended him from puppyhood until old age ended his
career. The other comrades of the road were birds, a cat, and Hamlet
and Polonius, another dog and a parrot. Poems occur between the
chapters.

“The grownup lover of pets will enjoy this book of dog, cat and bird
biography much as children enjoy their numerous animal books. The
writer’s fondness for collies is tempered with a sly delightful humor
which relieves the book of sentimentality.”

+ Booklist 16:169 F ’20

“She has, in short, made literature out of a dog and enshrined one
lovable member of that remarkable race in a work as thoughtful as it
is delightful. Sigurd, I believe, will take his place among the canine
immortals, along with Greyfriars Bobby, John Muir’s Stikeen, and
the great dogs of fiction.” W. A. Dyer

+ Bookm 51:575 Jl ’20 750w

“It was almost inevitable that in writing the life-story of Sigurd


Miss Bates should have woven into the book so much of the
atmosphere of Wellesley that it will take on for the alumnæ of those
years the character of an unfading memory.” D. L. M.

+ Boston Transcript p6 Ja 28 ’20 1100w


+ Cleveland p33 Mr ’20 40w

“It may be that Miss Bates really understands dog nature, but she
has not expressed it here.”

− Nation 110:861 Je 26 ’20 310w


+ Outlook 124:203 F 4 ’20 60w

“We like her writing best when it is most bookish. That is its note.
We have other books on our shelves aplenty in which the canine hero
plays a more tragic or pathetic or even humorous rôle, but none in
which he is more humanly literate than Miss Bates’s Sigurd of the
golden fleece.”

+ Review 2:135 F 7 ’20 260w

“Cannot fail to please all animal lovers.”

+ Springf’d Republican p13 F 1 ’20 1000w

BATTERSBY, HENRY FRANCIS PREVOST


(FRANCIS PREVOST, pseud.). Edge of doom.
*$1.75 (2c) Lane
20–7652

A novel with scenes laid in England, East Africa and on the


western front. Rumors of Julian Abingdon’s disgraceful conduct in
Central Africa, where he has held official position, reach London,
together with an unconfirmed rumor of his death. Believing him still
alive and desiring to clear his name, his fiancée, Cyllene Moriston,
insists on going out to look for him. His cousin, Jim Chaytor, who
has always disliked Abingdon, takes charge of her expedition. Cyllene
is stricken with fever and is left in the care of German missionaries
while Chaytor goes on to find Julian. He finds him alive and well and
living voluptuously with native women and hence desiring to remain
officially dead. He does not tell Cyllene the truth; marries her himself
and is then separated from her by the outbreak of the war. During his
absence she meets Julian, finds that her old love is dead, and turns
with full hearted devotion to her husband.

“‘The edge of doom’ is a very capable piece of work, serious


without being in any way disagreeable, absorbing both on account of
the intensity of the emotion, the consciousness of beauty both in
emotion and in the physical aspect of things, and the importance of
the historic background.”

+ Boston Transcript p9 Je 5 ’20 400w

“The book reads very much as though the author had started out to
write one kind of a story, then suddenly changed his mind and
proceeded to produce another. This is the more deplorable because
the second part of the book, the war section, is well done and
interesting.”

+ − N Y Times 25:25 Je 27 ’20 480w


“The story is skilfully told, with a deft, yet sparing use of local
colour which helps to carry conviction. It is well worth its place on
any bookshelf.”

+ Sat R 129:111 Ja 31 ’20 200w

“The novel part cannot be commended as a story. At the same time


there is no doubt that the whole book is well written; the dialogue
and the narrative skilfully and vividly handled.”

+ − The Times [London] Lit Sup p652 N 13


’19 280w

BAXTER, ARTHUR BEVERLEY. Blower of


bubbles. *$1.75 (2½c) Appleton

20–1698

Five unusual stories based on the war, with a sparkling iridescent


quality remote from, yet not antagonistic to, reality. The title story
depicts a delightful, apparently carefree personality, a gentleman,
university bred, who has no set vocation in life, is a dilettante in
almost everything it is possible to be, and who spends most of his
time and energy making unfortunate or gloomy people happy: in
other words, blowing bubbles. In spite of his weak heart he contrives
to get into the war, is permanently crippled, yet sitting in his invalid’s
chair in a picturesque garden on the Isle of Wight, blows brighter,
gayer, more luminous bubbles than ever before, and gives one
person, at least, a lasting happiness. The other titles are: Petite
Simunde; The man who scoffed; The airy prince; Mr Craighouse of
New York, satirist.
“All are readable.”

+ Ath p1411 D 26 ’19 40w


Booklist 16:242 Ap ’20

“The very fact that the actors are of various nationalities affords a
wide scope in character drawing and the author has done this work
with an incisive delicacy of feeling which one cannot fail to
appreciate. Humor is not lacking and forceful, thought-compelling
passages add to the graceful style of every story.”

+ Boston Transcript p6 Mr 24 ’20 160w

“They are whimsically written. But the regularity with which the
various characters undergo a metamorphosis under the stimulus of
the patriotic impulse becomes wearisome.”

+ − Dial 68:399 Mr ’20 60w

“In this brightly written collection of five short stories we have


proof—rather sorely needed—that fiction with the recent great war as
a setting can avoid bathos on the one hand and obviously false
joviality on the other. One of the best books of unassuming and yet
purposeful fiction that has seen the light this season.”

+ N Y Times 25:123 Mr 14 ’20 1650w

“Perhaps the last is the best—‘Mr Craighouse of New York, satirist.’


His visit as a typical American to Lord Summersdale makes a very
taking story.”
+ The Times [London] Lit Sup p754 D 11
’19 100w

BAXTER, ARTHUR BEVERLEY. Parts men


play. *$2 (2c) Appleton

20–20646

Austin Selwyn, an American writer in England, has first hand


opportunity, in his intercourse with the family of Lord Durwent, to
observe the parasitism of the English aristocracy. The colorful
personality of Elise Durwent and her latent protest against the
uselessness of her class arouse his interest and love. When the war
breaks out he sees in it a hideous wrong into which the people of all
countries have been trapped by their ignorance. He embarks on a
crusade against this ignorance and writes pacifist literature, which
leads to a break with Elise. She declares indignantly that, far from
crying out against the infamy and cruelty of the war, women feel the
glory of it in their blood. The usual thing happens: Selwyn is
gradually convinced of the error of his ways and his subsequent
bravery in France wins him Elise.

“When he writes of London society as it was before the world war


he exhibits a deft, light touch in drawing character sketches. Later he
loses his attitude of detachment and ends in a loud outburst of
jingoism which sounds strangely hollow in these disillusioned
times.”

+ − N Y Evening Post p18 D 4 ’20 80w


“The author wrote another novel, ‘The blower of bubbles,’ which
proved that he had a facile style, a whimsical spirit, and the power to
divine and portray human nature. This book possesses all those
qualities and an original undercurrent of philosophy as well.”
Katharine Oliver

+ Pub W 98:1890 D 18 ’20 270w


Springf’d Republican p5a Ja 23 ’21 150w

“A work of considerable promise. It is crude in parts, but


crudeness is only a synonym of unripeness, and Mr Baxter’s literary
defects are of a kind that experience can cure. Meanwhile, he has a
vitality, a gift for swiftly moving narrative, and a creative power in
flinging his characters upon the canvas which augur well for his
future development.”

+ − The Times [London] Lit Sup p761 N 18


’20 440w

BAXTER, LEON H. Boy bird house architecture.


il *$1 Bruce pub. 680

20–7092

Mr Baxter, director of manual training in the public schools of St


Johnsbury, Vt., has prepared this book out of his own experience
with boy architects. “Each drawing offered is of a proven house, one
that has served as a home for some of our songsters and if the
directions, here set down, are faithfully followed, equal success will
crown the builders’ efforts.” (Author’s preface) Some of the topics
covered by the text are: Our friends the birds; Birds that adapt
themselves to nesting boxes; Bird house material; Methods of
conducting a bird house contest; Bird house day; Winter care of the
birds. There are twenty plates with full working drawings for bird
houses of various designs.

+ Booklist 16:302 Je ’20


+ School Arts Magazine 20:41 S ’20 70w

BAYFIELD, MATTHEW ALBERT. Measures


of the poets. *$2 Macmillan (Cambridge univ. press)
808.1

20–12409

“Mr Bayfield’s aim in ‘The measures of the poets’ is to ‘provide


students of English verse with a system of prosody that is on the one
hand sound in principle, and on the other not liable to break down
when brought to the test of application.’” (Spec) “The broad outlines
of Mr Bayfield’s system are fairly adequately apprehended if we
blend together our existing notions about a foot in verse and a bar in
music. Metre in music is built up out of a succession of equal time
divisions marked off by the recurrence of an accent, the accented
beat falling at the beginning of each of them. Mr Bayfield considers
that the basis of metrical structure in poetry is essentially the same:
and he therefore lays it down that the first syllable of every foot must
bear an accent. The bulk of English poetry being written in
dissyllabic feet or their equivalents, it follows that the typical English
foot must be the trochee. The main portion of Mr Bayfield’s primer is
devoted to an exposition of the system of scansion which he deduces
from this governing perception.” (The Times [London] Lit Sup)
“Mr Bayfield expounds his theory with bold lucidity, and illustrates
it with telling examples from every variety of English verse.”

+ Ath p1017 O 10 ’19 210w

“Like almost all prosodic theories which look at theory first, Mr


Bayfield’s necessitates, even on its own showing, endless easements
and epicycles to get it to work at all. There is no plain sailing; in fact,
Mr Bayfield would seem to agree with Dr Johnson that ‘pure’ metre
is dull and inartistic.” G: Saintsbury

− Ath p1150 N 7 ’19 2050w

“Mr Bayfield’s general treatment and scansions are by no means so


convincing as those of his predecessors, [Lanier in ‘The science of
English verse’ and Thomson in ‘The basis of English rhythm.’]” J. R.
Hulbert

− Mod Philol 17:727 Ap ’20 200w

“The principle of his scheme is sound, and in the application of it


to English verse he has shown, besides the wisdom of his instinct, a
careful patience that is beyond praise.”

+ − Spec 122:864 D 20 ’19 1050w

“His theory has not cut him off from vital contact with poetry. The
things of which he is chiefly aware are the essential things, and to
read him is to have the ear quickened to a new enjoyment.”
+ − The Times [London] Lit Sup p668 N 20
’19 1100w

BAYLEY, HAROLD. Archaic England. *$7.50


Lippincott 942.01

(Eng ed 20–11405)

“This is in the nature of a sequel to a book which Mr Bayley


published some years ago called ‘The lost language of symbolism.’ He
has long been an enthusiastic and industrious student of symbolisms
and emblems and their hidden meanings, and of esoteric doctrines
generally. The present work is copiously illustrated and offers
controversial theories as to the peopling of Britain. Mr Bayley,
among other things, sees in the Cretan discoveries a wholly new
standpoint for the survey of prehistoric civilization. He believes that
the Cretans systematically visited Britain, and that men of Trojan
race peopled the island.”—The Times [London] Lit Sup

“No doubt, Mr Bayley has worked hard and honestly. Use him as a
quarry and one will find gold, and, may be, other things. But how
accept his doctrine as a whole?” R. R. M.

− + Ath p240 F 20 ’20 260w


The Times [London] Lit Sup p22 Ja 8
’20 120w
The Times [London] Lit Sup p166 Mr
11 ’20 2100w
BAZALGETTE, LÉON. Walt Whitman, the man
and his work. *$3.50 (2c) Doubleday

20–2834

This work, the author says, was for him not a mere literary
enterprise, but the fruit of close and fervent communion with
Whitman’s work and character. Speaking of Whitman’s universality
he says: “The America which dreams and sings, back of the one
which works and invents, has given the world four universal
geniuses: Poe, Emerson, Thoreau, and Whitman.... And among these
four figures, one of them more and more dominates the group: it is
Walt Whitman.” (Introd.) The translator of the volume from the
French, Ellen FitzGerald, attempts an explanation of the American
masses’ neglect of Whitman, from the geniuses’ inevitable disregard
of “untrained” minds, in deference to whom she has taken it upon
herself to abridge M. Bazalgette’s treatment of the New Orleans
episode and to lighten his emphasis on the “Leaves of grass” conflict.
The book is in eight parts: Origin and youth; The multitudinary life;
“Leaves of grass”; The wound dresser; The good gray poet; The
invalid; The sage of Camden; The setting sun.

“Some remarkable pen portraits, a little Gallic exuberance at


times.”

+ Booklist 16:241 Ap ’20

“The Frenchman’s biography, sympathetic and glowingly eloquent


as it is, can scarcely rank as an authoritative chronicle of the poet’s
life. It possesses, however, multiple values of its own. The translator
has taken the liberty of abridging M. Bazalgette’s book. This is
regrettable and not easily justified.” J. Black
+ − Bookm 51:172 Ap ’20 1100w

Reviewed by James Oppenheim

+ − Dial 68:633 My ’20 1350w

“M. Bazalgette communicates an absolute sense of Whitman’s


greatness. His book, like his theme, is ample and magnificent.” V. W.
B.

+ Freeman 1:68 Mr 31 ’20 500w

Reviewed by B: de Casseres

+ N Y Times 25:239 My 9 ’20 1350w

“Well informed, and adjusted to all the aspects of his subject, M.


Bazalgette has written what is in all points as good a short life of
Whitman as a reasonable person could wish. But M. Bazalgette is
often illuminating, seldom penetrating.”

+ − No Am 211:719 My ’20 680w

“Admirers of Whitman will find it a stimulating and suggestive


treatment of the poet from a new angle.”

+ Outlook 124:336 F 25 ’20 50w


“The book has been prepared with some care. But M. Bazalgette is
inseparable from his subject; his jubilee from page 1 to page 355 is
uninterrupted. When the author is too lavish of exclamation points
the reader parries with the question mark.”

+ − Review 2:310 Mr 27 ’20 450w

“The biography, though rhapsodical rather than critical, will rank


high among the scarce half-dozen of impressive books about the poet
which have appeared in the quarter century since his death.”

+ Springf’d Republican p8 Ap 8 ’20 480w

BAZETT, L. M. After-death communications.


(Psychic ser.) *$1.60 Holt 134

The communications were received through automatic writing and


the author says of them: “Whether these communications can come
under the heading of telepathy from the living, or whether as the title
suggests, they are partly due to telepathy from discarnate minds, is
for the reader to decide.” (Preface) J. Arthur Hill, in his introduction
to the book is inclined to attribute them to discarnate agency.
Contents: First communications received; Cases where some link
with communicators existed; Cases where relations were present;
Cases where relations were not present; Character sketches; Special
relationships; Erroneous, confused and irrelevant matter; Guides;
Supernormal sense-impressions, etc.; The potential value of
communication; Index.
N Y Evening Post p11 N 6 ’20 120w

BAZIN, RENÉ FRANÇOIS NICOLAS MARIE.


Pierre and Joseph. *$1.75 Harper

20–7722

The story takes us to an Alsatian village at the outbreak of the war


where the German subjects have all remained French at heart. Of the
two brothers, Pierre and Joseph Ehrsam, the elder at once decides to
flee the country and go to France to enlist, while the younger deems
it wise to sacrifice himself in another way, to save the factory and the
Ehrsam estate from confiscation by the Germans, by joining his
German regiment. Pierre, in the French army makes unfavorable
comparisons between French ways and German efficiency and is but
slowly won over to complete enthusiasm for the spirit of France.
Joseph at the eastern front develops an increasing hatred for the
German spirit and when he is sent to the west and faces the necessity
of fighting the French, he kills his superior officer and deserts to the
French side. The translation is by Frank Hunter Potter.

Booklist 17:30 O ’20

“This latest novel of the gifted Frenchman adds not a single leaf to
his laurel crown. For the most part, the interpretation is labored, and
much space is devoted to moralizing upon the obvious. The general
effect of the novel is accentuated by a translation which is awkward
and infelicitous.”
− Cath World 111:688 Ag ’20 300w

“Interesting in itself, the story has an added interest through what


it tells us of some of the events of the war, events which though
important have not been much written about.”

+ N Y Times 25:264 My 23 ’20 1050w

“In its English dress, ‘Pierre and Joseph’ is not markedly


distinguished from several earlier romances of Alsace-Lorraine in
wartime, unless by its simplicity and precision.” H. W. Boynton

+ − Review 3:45 Jl 14 ’20 450w

BEAMAN, ARDERN ARTHUR HULME.


Squadroon. il *$2.50 (3c) Lane 940.48

20–14681

The cavalry in the great war was most of the time in little demand,
and had to take its turn in the trenches and at digging parties to
relieve the infantry. “Towards the end of 1917 ... a horse soldier could
hardly pass an infantry detachment on the road without being
greeted by ironical cheers and bitter abuse.” (Foreword) But the time
came when their prestige was reestablished. The war episodes
sketched in the book are the reminiscences of a clergyman attached
to a cavalry brigade. Among the contents are: Joining the squadroon;
Day marching; The gap; The trench party; The devastated area; The
great advance; The last lap.
+ Ath p751 Je 4 ’20 100w

“We commend the book most heartily: it is well and simply


written, and deserves a wide popularity.”

+ Sat R 129:545 Je 12 ’20 50w

“Those who happen not to have read many ‘war books’ of the kind,
or not to be tired of them, will find these genial, graphic, fluently-
written pages pleasant enough.”

+ The Times [London] Lit Sup p215 Ap 1


’20 130w

BEARD, DANIEL CARTER. American boys’


handybook of camp-lore and woodcraft. il *$3
Lippincott 796

20–21339

This volume of the Woodcraft series is profusely illustrated by the


author. The first chapters have to do with outdoor fires under the
captions: Fire making by friction; Fire making by percussion; How to
build a fire; How to lay a good cooking fire. Other chapters take up:
Camp kitchens; Camp food; Packing horses; The use of dogs;
Preparing for camping trip; Saddles; Choosing a camp site; Axe and
saw; Council grounds and fires; Ritual of the council fire.
“His book is interesting, cheery, practical and constructive.”

+ Cath World 112:697 F ’21 110w

“A really valuable and comprehensive volume.” Hildegarde


Hawthorne

+ N Y Times p9 D 19 ’20 80w

BEARD, MARY (RITTER) (MRS CHARLES


AUSTIN BEARD). Short history of the American
labor movement. *$1.50 (4c) Harcourt 331.87

20–7573

As the title indicates, the book is intended as a brief and simple


story of the labor movement in the United States from the day of
independence to the present time. After pointing out that every
modern industrial country has a labor movement and that, although
there are national peculiarities, it has overleapt national boundaries;
that the origin of the movement lies in self-defense; and that it has a
deep spiritual and social significance, the author limits herself to a
plain statement of the facts in each phase of the movement as it
appeared. Contents: Nature and significance of the labor movement;
Origin of American trade unions; The century old tactics of labor;
Labor’s first political experiments; Return to direct industrial action;
Industrial panic, political action and utopias; Trade unionism and
the Civil war; A decade of panics, politics and labor chaos; Rise of the
American federation of labor; The American federation of labor and
politics; Revolutionary philosophies and tactics; Labor and the world
war; Index.
“It is well organized, carefully definitive of simplest terms, and
adapted to a less advanced student or reader of labor policies than
Carlton.”

+ Booklist 16:327 Jl ’20

“Mrs Mary Beard has not only supplied the student of the works of
Professor Commons and his associates with a text-book admirably
lucid and condensed, but she has achieved what is far more difficult
in writing a text-book—especially where no text-book exists—a
connected and in many ways a dramatic story.” A. L. Dakyns

+ Freeman 1:523 Ag 11 ’20 1500w

“Mrs Beard’s book could hardly be better, as a readable and brief


summary.” G: Soule

+ Nation 111:17 Jl 3 ’20 800w

“Naturally, a large field has been covered in so small a work, but


the reader in search of a small volume that will give him the
essentials of this history will find this one valuable for the purpose.”
James Oneal

+ N Y Call p10 Je 13 ’20 370w


+ R of Rs 61:671 Je ’20 40w

“An excellent summary of American labor history. The book is


based on recent more voluminous works, but the clarity of
explanation and the skill in selecting the salient facts of somewhat
complicated situations and incidents are largely the author’s own.”

+ Springf’d Republican p10 My 6 ’20 120w

“In her ‘Short history of the American labor movement’ Mrs Beard
performs with interest, competence and wide sympathy a much
needed service.”

+ Survey 44:313 My 29 ’20 150w

“It gives a clear impression of the ups and downs of a movement


which in one form or another goes back to colonial times. But its
value is impaired by the author’s laudable desire for brevity. Her
book is so general that it gives no sense of the real life and color of
the labor movement and but little understanding of the contending
philosophies within it. So important a phase of the modern labor
movement as the development of the Amalgamated clothing workers
is not even mentioned.” N. T.

+ − World Tomorrow 3:189 Je ’20 180w

“The book preserves an admirably sane and restrained tone to the


end.” W: B. Walling

+ Yale R n s 10:214 O ’20 380w

BEAUMONT, ROBERTS. Union textile


fabrication. (Pitman’s textile industries ser.) il *$7.50
Pitman 677
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like