100% found this document useful (7 votes)
708 views

(Original PDF) Algorithm Design and Applications by Michael T. Goodrich 2024 scribd download

Design

Uploaded by

jaffarzelkif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
708 views

(Original PDF) Algorithm Design and Applications by Michael T. Goodrich 2024 scribd download

Design

Uploaded by

jaffarzelkif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Visit https://ebookluna.

com to download the full version and


explore more ebooks

(Original PDF) Algorithm Design and Applications by


Michael T. Goodrich

_____ Click the link below to download _____


https://ebookluna.com/product/original-pdf-algorithm-
design-and-applications-by-michael-t-goodrich/

Explore and download more ebooks at ebookluna.com


Here are some recommended products that might interest you.
You can download now and explore!

(eBook PDF) Algorithm Design by Jon Kleinberg

https://ebookluna.com/product/ebook-pdf-algorithm-design-by-jon-
kleinberg/

ebookluna.com

(eBook PDF) A Guide to Algorithm Design: Paradigms,


Methods, and Complexity Analysis

https://ebookluna.com/product/ebook-pdf-a-guide-to-algorithm-design-
paradigms-methods-and-complexity-analysis/

ebookluna.com

(eBook PDF) Steel Design 6th Edition by William T. Segui

https://ebookluna.com/product/ebook-pdf-steel-design-6th-edition-by-
william-t-segui/

ebookluna.com

Endocrine Secrets 7th Edition Michael T. Mcdermott - eBook


PDF

https://ebookluna.com/download/endocrine-secrets-ebook-pdf-2/

ebookluna.com
Endocrine Secrets 7th Edition Michael T Mcdermott - eBook
PDF

https://ebookluna.com/download/endocrine-secrets-ebook-pdf/

ebookluna.com

Hands-On Ethical Hacking and Network Defense Third Edition


Michael T. Simpson - eBook PDF

https://ebookluna.com/download/hands-on-ethical-hacking-and-network-
defense-ebook-pdf/

ebookluna.com

Diabetes Secrets 1st Edition Michael T. Mcdermott Md


Author - eBook PDF

https://ebookluna.com/download/diabetes-secrets-ebook-pdf/

ebookluna.com

Deep Learning on Edge Computing Devices: Design Challenges


of Algorithm and Architecture 1st Edition Xichuan Zhou -
eBook PDF
https://ebookluna.com/download/deep-learning-on-edge-computing-
devices-design-challenges-of-algorithm-and-architecture-ebook-pdf/

ebookluna.com

Web design introductory. Sixth Edition / Jennifer T.


Campbell - eBook PDF

https://ebookluna.com/download/web-design-introductory-ebook-pdf/

ebookluna.com
vi Contents

6 Hash Tables 187


6.1 Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
6.2 Hash Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 192
6.3 Handling Collisions and Rehashing . . . . . . . . . . . . . . . 198
6.4 Cuckoo Hashing . . . . . . . . . . . . . . . . . . . . . . . . . 206
6.5 Universal Hashing . . . . . . . . . . . . . . . . . . . . . . . . 212
6.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

7 Union-Find Structures 219


7.1 Union-Find and Its Applications . . . . . . . . . . . . . . . . . 221
7.2 A List-Based Implementation . . . . . . . . . . . . . . . . . . 225
7.3 A Tree-Based Implementation . . . . . . . . . . . . . . . . . . 228
7.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

Part II: Sorting and Selection

8 Merge-Sort and Quick-Sort 241


8.1 Merge-Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.2 Quick-Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
8.3 A Lower Bound on Comparison-Based Sorting . . . . . . . . 257
8.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

9 Fast Sorting and Selection 265


9.1 Bucket-Sort and Radix-Sort . . . . . . . . . . . . . . . . . . . 267
9.2 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
9.3 Weighted Medians . . . . . . . . . . . . . . . . . . . . . . . . 276
9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

Part III: Fundamental Techniques

10 The Greedy Method 283


10.1 The Fractional Knapsack Problem . . . . . . . . . . . . . . . 286
10.2 Task Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 289
10.3 Text Compression and Huffman Coding . . . . . . . . . . . . 292
10.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

11 Divide-and-Conquer 303
11.1 Recurrences and the Master Theorem . . . . . . . . . . . . . 305
11.2 Integer Multiplication . . . . . . . . . . . . . . . . . . . . . . . 313
11.3 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . . . 315
11.4 The Maxima-Set Problem . . . . . . . . . . . . . . . . . . . . 317
11.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Contents vii

12 Dynamic Programming 323


12.1 Matrix Chain-Products . . . . . . . . . . . . . . . . . . . . . . 325
12.2 The General Technique . . . . . . . . . . . . . . . . . . . . . 329
12.3 Telescope Scheduling . . . . . . . . . . . . . . . . . . . . . . 331
12.4 Game Strategies . . . . . . . . . . . . . . . . . . . . . . . . . 334
12.5 The Longest Common Subsequence Problem . . . . . . . . . 339
12.6 The 0-1 Knapsack Problem . . . . . . . . . . . . . . . . . . . 343
12.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

13 Graphs and Traversals 353


13.1 Graph Terminology and Representations . . . . . . . . . . . . 355
13.2 Depth-First Search . . . . . . . . . . . . . . . . . . . . . . . . 365
13.3 Breadth-First Search . . . . . . . . . . . . . . . . . . . . . . . 370
13.4 Directed Graphs . . . . . . . . . . . . . . . . . . . . . . . . . 373
13.5 Biconnected Components . . . . . . . . . . . . . . . . . . . . 386
13.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

Part IV: Graph Algorithms

14 Shortest Paths 397


14.1 Single-Source Shortest Paths . . . . . . . . . . . . . . . . . . 399
14.2 Dijkstra’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 400
14.3 The Bellman-Ford Algorithm . . . . . . . . . . . . . . . . . . . 407
14.4 Shortest Paths in Directed Acyclic Graphs . . . . . . . . . . . 410
14.5 All-Pairs Shortest Paths . . . . . . . . . . . . . . . . . . . . . 412
14.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418

15 Minimum Spanning Trees 423


15.1 Properties of Minimum Spanning Trees . . . . . . . . . . . . 425
15.2 Kruskal’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 428
15.3 The Prim-Jarnı́k Algorithm . . . . . . . . . . . . . . . . . . . . 433
15.4 Barůvka’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . 436
15.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

16 Network Flow and Matching 443


16.1 Flows and Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . 445
16.2 Maximum Flow Algorithms . . . . . . . . . . . . . . . . . . . . 452
16.3 Maximum Bipartite Matching . . . . . . . . . . . . . . . . . . 458
16.4 Baseball Elimination . . . . . . . . . . . . . . . . . . . . . . . 460
16.5 Minimum-Cost Flow . . . . . . . . . . . . . . . . . . . . . . . 462
16.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
viii Contents

Part V: Computational Intractability

17 NP-Completeness 473
17.1 P and NP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
17.2 NP-Completeness . . . . . . . . . . . . . . . . . . . . . . . . 483
17.3 CNF-SAT and 3SAT . . . . . . . . . . . . . . . . . . . . . . . . 489
17.4 VERTEX-COVER, CLIQUE, and SET-COVER . . . . . . . . . . . . 492
17.5 SUBSET-SUM and KNAPSACK . . . . . . . . . . . . . . . . . . . 496
17.6 HAMILTONIAN-CYCLE and TSP . . . . . . . . . . . . . . . . . . 499
17.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502

18 Approximation Algorithms 507


18.1 The Metric Traveling Salesperson Problem . . . . . . . . . . 511
18.2 Approximations for Covering Problems . . . . . . . . . . . . . 515
18.3 Polynomial-Time Approximation Schemes . . . . . . . . . . . 518
18.4 Backtracking and Branch-and-Bound . . . . . . . . . . . . . . 521
18.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525

Part VI: Additional Topics

19 Randomized Algorithms 529


19.1 Generating Random Permutations . . . . . . . . . . . . . . . 531
19.2 Stable Marriages and Coupon Collecting . . . . . . . . . . . . 534
19.3 Minimum Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . 539
19.4 Finding Prime Numbers . . . . . . . . . . . . . . . . . . . . . 546
19.5 Chernoff Bounds . . . . . . . . . . . . . . . . . . . . . . . . . 551
19.6 Skip Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
19.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

20 B-Trees and External Memory 569


20.1 External Memory . . . . . . . . . . . . . . . . . . . . . . . . . 571
20.2 (2,4) Trees and B-Trees . . . . . . . . . . . . . . . . . . . . . 574
20.3 External-Memory Sorting . . . . . . . . . . . . . . . . . . . . 590
20.4 Online Caching Algorithms . . . . . . . . . . . . . . . . . . . 593
20.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600

21 Multidimensional Searching 603


21.1 Range Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
21.2 Priority Search Trees . . . . . . . . . . . . . . . . . . . . . . . 609
21.3 Quadtrees and k-d Trees . . . . . . . . . . . . . . . . . . . . 614
21.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Contents ix

22 Computational Geometry 623


22.1 Operations on Geometric Objects . . . . . . . . . . . . . . . . 625
22.2 Convex Hulls . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
22.3 Segment Intersection . . . . . . . . . . . . . . . . . . . . . . 638
22.4 Finding a Closest Pair of Points . . . . . . . . . . . . . . . . . 642
22.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646

23 String Algorithms 651


23.1 String Operations . . . . . . . . . . . . . . . . . . . . . . . . . 653
23.2 The Boyer-Moore Algorithm . . . . . . . . . . . . . . . . . . . 656
23.3 The Knuth-Morris-Pratt Algorithm . . . . . . . . . . . . . . . . 660
23.4 Hash-Based Lexicon Matching . . . . . . . . . . . . . . . . . 664
23.5 Tries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
23.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680

24 Cryptography 685
24.1 Greatest Common Divisors (GCD) . . . . . . . . . . . . . . . 687
24.2 Modular Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . 691
24.3 Cryptographic Operations . . . . . . . . . . . . . . . . . . . . 699
24.4 The RSA Cryptosystem . . . . . . . . . . . . . . . . . . . . . 703
24.5 The El Gamal Cryptosystem . . . . . . . . . . . . . . . . . . . 706
24.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708

25 The Fast Fourier Transform 711


25.1 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
25.2 Primitive Roots of Unity . . . . . . . . . . . . . . . . . . . . . 715
25.3 The Discrete Fourier Transform . . . . . . . . . . . . . . . . . 717
25.4 The Fast Fourier Transform Algorithm . . . . . . . . . . . . . 721
25.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727

26 Linear Programming 731


26.1 Formulating the Problem . . . . . . . . . . . . . . . . . . . . . 734
26.2 The Simplex Method . . . . . . . . . . . . . . . . . . . . . . . 739
26.3 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
26.4 Applications of Linear Programming . . . . . . . . . . . . . . 750
26.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753

A Useful Mathematical Facts 761


Bibliography 765
Index 774
Preface
This book is designed to provide a comprehensive introduction to the design and
analysis of computer algorithms and data structures. We have made each chapter to
be relatively independent of other chapters so as to provide instructors and readers
greater flexibility with respect to which chapters to explore. Moreover, the exten-
sive collection of topics we include provides coverage of both classic and emerging
algorithmic methods, including the following:

• Mathematics for asymptotic analysis, including amortization and random-


ization
• General algorithm design techniques, including the greedy method, divide-
and-conquer, and dynamic programming
• Data structures, including lists, trees, heaps, search trees, B-trees, hash ta-
bles, skip lists, union-find structures, and multidimensional trees
• Algorithmic frameworks, including NP-completeness, approximation algo-
rithms, and external-memory algorithms
• Fundamental algorithms, including sorting, graph algorithms, computational
geometry, numerical algorithms, cryptography, Fast Fourier Transform (FFT),
and linear programming.

Application-Motivated Approach
This is an exciting time for computer science. Computers have moved beyond their
early uses as computational engines to now be used as information processors,
with applications to every other discipline. Moreover, the expansion of the Inter-
net has brought about new paradigms and modalities for computer applications to
society and commerce. For instance, computers can be used to store and retrieve
large amounts of data, and they are used in many other application areas, such as
sports, video games, biology, medicine, social networking, engineering, and sci-
ence. Thus, we feel that algorithms should be taught to emphasize not only their
mathematical analysis but also their practical applications.
To fulfill this need, we have written each chapter to begin with a brief discus-
sion of an application that motivates the topic of that chapter. In some cases, this
application comes from a real-world use of the topic discussed in the chapter, and in
other cases it is a contrived application that highlights how the topic of the chapter
could be used in practice. Our intent in providing this motivation is to give readers
a conceptual context and practical justification to accompany their reading of each
chapter. In addition to this application-based motivation we include also detailed
pseudocode descriptions and complete mathematical analysis. Indeed, we feel that
mathematical rigor should not simply be for its own sake, but also for its pragmatic
implications.
xi
xii Preface

For the Instructor


This book is structured to allow an instructor a great deal of freedom in how to orga-
nize and present material. The dependence between chapters is relatively minimal,
which allows the instructor to cover topics in her preferred sequence. Moreover,
each chapter is designed so that it can be covered in 1–3 lectures, depending on the
depth of coverage.

Example Courses
This book has several possible uses as a textbook. It can be used, for instance,
for a core Algorithms course, which is classically known as CS7. Alternatively,
it could be used for an upper-division/graduate data structures course, an upper-
division/graduate algorithms course, or a two-course sequence on these topics. To
highlight these alternatives, we give an example syllabus for each of these possible
courses below.
Example syllabus for a core Algorithms (CS7) course:

1. Algorithm Analysis
(Skip, skim, or review Chapters 2–4 on fundamental data structures)1
5. Priority Queues and Heaps
6. Hash Tables
7. Union-Find Structures
8. Merge-Sort and Quick-Sort
9. Fast Sorting and Selection (if time permits)
10. The Greedy Method
11. Divide-and-Conquer
12. Dynamic Programming
13. Graphs and Traversals
14. Shortest Paths
15. Minimum Spanning Trees
16. Network Flow and Matching (if time permits)
17. NP-Completeness
18. Approximation Algorithms
Optional choices from Chapters 19–26, as time permits

The optional choices from Chapters 19–26 that could be covered at the end of the
course include randomized algorithms, computational geometry, string algorithms,
cryptography, Fast Fourier Transform (FFT), and linear programming.
1
These topics, and possibly even the topics of Chapters 5 and 6, are typically covered to at least a
basic level in a Data Structures course that could be a prerequisite to this course.
Preface xiii

Example syllabus for an upper-division/graduate Data Structures course:

1. Algorithm Analysis
2. Basic Data Structures
3. Binary Search Trees
4. Balanced Binary Search Trees
5. Priority Queues and Heaps
6. Hash Tables
7. Union-Find Structures
8. Merge-Sort and Quick-Sort
13. Graphs and Traversals
14. Shortest Paths
15. Minimum Spanning Trees
20. B-Trees and External-Memory
21. Multi-Dimensional Searching

Example syllabus for an upper-division/graduate Algorithms course:

(Skip, skim, or review Chapters 1–8)


9. Fast Sorting and Selection
10. The Greedy Method
11. Divide-and-Conquer
12. Dynamic Programming
16. Network Flow and Matching
17. NP-Completeness
18. Approximation Algorithms
19. Randomized Algorithms
22. Computational Geometry
23. String Algorithms
24. Cryptography
25. The Fast Fourier Transform (FFT)
26. Linear Programming

This course could be taught either as a stand-alone course or in conjunction with


an upper-division Data Structures course, such as that given above.
Of course, other options are also possible. Let us not belabor this point, how-
ever, leaving such creative arrangements to instructors.
xiv Preface

Three Kinds of Exercises


This book contains many exercises—over 800—which are divided between the fol-
lowing three categories:
• reinforcement exercises, which test comprehension of chapter topics
• creativity exercises, which test creative utilization of techniques from the
chapter
• application exercises, which test uses of the topics of the chapter for real-
world or contrived applications
The exercises are distributed so that roughly 35% are reinforcement exercises, 40%
are creativity exercises, and 25% are application exercises.

Web Added-Value Education


This book comes accompanied by an extensive website:
http://www.wiley.com/college/goodrich/
This site includes an extensive collection of educational aids that augment the topics
of this book. Specifically for students we include the following:
• Presentation handouts in PDF format for most topics in this book
• Hints on selected exercises.
The hints should be of particular interest for creativity and application problems
that may be quite challenging for some students.
For instructors using this book, there is a dedicated portion of the site just for
them, which includes the following additional teaching aids:
• Solutions to selected exercises in this book
• Editable presentations in PowerPoint format for most topics in this book.

Prerequisites
We have written this book assuming that the reader comes to it with certain knowl-
edge. In particular, we assume that the reader has a basic understanding of elemen-
tary data structures, such as arrays and linked lists, and is at least vaguely familiar
with a high-level programming language, such as C, C++, Java, or Python. Thus,
all algorithms are described in a high-level “pseudocode,” which avoids some de-
tails, such as error condition testing, but is suitable for a knowledgeable reader to
convert algorithm descriptions into working code.
In terms of mathematical background, we assume the reader is familiar with
exponents, logarithms, summations, limits, and elementary probability. Even so,
we review many of these concepts in Chapter 1, and we give a summary of other
useful mathematical facts, including elementary probability, in Appendix A.
Visit https://ebookluna.com
now to explore a diverse
collection of ebooks available
in formats like PDF, EPUB, and
MOBI, compatible with all
devices. Don’t miss the chance
to enjoy exciting offers and
quickly download high-quality
materials in just a few simple
steps!
Preface xv

About the Authors


Professors Goodrich and Tamassia are well-recognized researchers in algorithms
and data structures, having published many papers in this field, with applications
to computer security, cryptography, Internet computing, information visualization,
and geometric computing. They have served as principal investigators in several
joint projects sponsored by the National Science Foundation, the Army Research
Office, and the Defense Advanced Research Projects Agency. They are also active
in educational technology research.
Michael Goodrich received his Ph.D. in Computer Sciences from Purdue Uni-
versity in 1987. He is a Chancellor’s Professor in the Department of Computer
Science at University of California, Irvine. Previously, he was a professor at Johns
Hopkins University. His research interests include analysis, design, and implemen-
tation of algorithms, data security, cloud computing, graph drawing, and computa-
tional geometry. He is a Fulbright scholar and a fellow of the American Association
for the Advancement of Science (AAAS), Association for Computing Machinery
(ACM), and Institute of Electrical and Electronics Engineers (IEEE). He is a re-
cipient of the IEEE Computer Society Technical Achievement Award, the ACM
Recognition of Service Award, and the Pond Award for Excellence in Undergrad-
uate Teaching. He serves on the advisory boards of the International Journal of
Computational Geometry & Applications (IJCGA) and of the Journal of Graph
Algorithms and Applications (JGAA).
Roberto Tamassia received his Ph.D. in Electrical and Computer Engineering
from the University of Illinois at Urbana-Champaign in 1988. He is the Plastech
Professor of Computer Science in the Department of Computer Science at Brown
University. He is also the Director of Brown’s Center for Geometric Computing.
His research interests include data security, applied cryptography, cloud computing,
analysis, design, and implementation of algorithms, graph drawing and computa-
tional geometry. He is a fellow of the American Association for the Advancement
of Science (AAAS), Association for Computing Machinery (ACM), and Institute
for Electrical and Electronic Engineers (IEEE). He is also a recipient of the Tech-
nical Achievement Award from the IEEE Computer Society. He co-founded the
Journal of Graph Algorithms and Applications (JGAA) and the Symposium on
Graph Drawing. He serves as co-editor-in-chief of JGAA.

Acknowledgments
There are a number of individuals with whom we have collaborated on research
and educational projects about algorithms. Working with them helped us refine the
vision and content of this book. Specifically, we thank Jeff Achter, Vesselin Ar-
naudov, James Baker, Ryan Baker, Benjamin Boer, John Boreiko, Devin Borland,
Lubomir Bourdev, Ulrik Brandes, Stina Bridgeman, Bryan Cantrill, Yi-Jen Chiang,
xvi Preface

Robert Cohen, David Ellis, David Emory, Jody Fanto, Ben Finkel, Peter Fröhlich,
Ashim Garg, David Ginat, Natasha Gelfand, Esha Ghosh, Michael Goldwasser,
Mark Handy, Michael Horn, Greg Howard, Benoı̂t Hudson, Jovanna Ignatowicz,
James Kelley, Evgenios Kornaropoulos, Giuseppe Liotta, David Mount, Jeremy
Mullendore, Olga Ohrimenko, Seth Padowitz, Bernardo Palazzi, Charalampos Pa-
pamanthou, James Piechota, Daniel Polivy, Seth Proctor, Susannah Raub, Haru
Sakai, John Schultz, Andrew Schwerin, Michael Shapiro, Michael Shim, Michael
Shin, Galina Shubina, Amy Simpson, Christian Straub, Ye Sun, Nikos Triandopou-
los, Luca Vismara, Danfeng Yao, Jason Ye, and Eric Zamore.
We are grateful to our editor, Beth Golub, for her enthusiastic support of this
project. The production team at Wiley has been great. Many thanks go to people
who helped us with the book development, including Jayne Ziemba, Jennifer Wel-
ter, Debbie Martin, Chris Ruel, Julie Kennedy, Wanqian Ye, Joyce Poh, and Ja-
nis Soo.
We are especially grateful to Michael Bannister, Jenny Lam, and Joseph Si-
mons for their contributions to the chapter on linear programming. We would like
to thank Siddhartha Sen and Robert Tarjan for an illuminating discussion about
balanced search trees.
We are truly indebted to the outside reviewers, and especially to Jack Snoeyink,
for detailed comments and constructive criticism, which were extremely useful.
These other outside reviewers included John Donald, Hui Yang, Nicholas Tran,
John Black, My Thai, Dana Randall, Ming-Yang Kao, Qiang Cheng, Ravi Janar-
den, Fikret Ercal, Jack Snoeyink, S. Muthukrishnan, Elliot Anshelevich, Mukkai
Krishnamoorthy, Roxanne Canosa, Michael Cutler, Roger Crawfis, Glencora Bor-
radaile, and Jennifer Welch.
This manuscript was prepared primarily with LATEX for the text and Microsoft
PowerPoint R , Visio R , and Adobe FrameMaker R for the figures.
Finally, we warmly thank Isabel Cruz, Karen Goodrich, Giuseppe Di Battista,
Franco Preparata, Ioannis Tollis, and our parents for providing advice, encourage-
ment, and support at various stages of the preparation of this book. We also thank
them for reminding us that there are things in life beyond writing books.

Michael T. Goodrich
Roberto Tamassia
Chapter

1 Algorithm Analysis

Microscope: U.S. government image, from the N.I.H. Medical Instrument


Gallery, DeWitt Stetten, Jr., Museum of Medical Research. Hubble Space Tele-
scope: U.S. government image, from NASA, STS-125 Crew, May 25, 2009.

Contents

1.1 Analyzing Algorithms . . . . . . . . . . . . . . . . . . . 3


1.2 A Quick Mathematical Review . . . . . . . . . . . . . . . 19
1.3 A Case Study in Algorithm Analysis . . . . . . . . . . . 29
1.4 Amortization . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2 Chapter 1. Algorithm Analysis

Scientists often have to deal with differences in scale, from the microscopi-
cally small to the astronomically large, and they have developed a wide range of
tools for dealing with the differences in scale in the objects they study. Similarly,
computer scientists must also deal with scale, but they deal with it primarily in
terms of data volume rather than physical object size. In the world of information
technology, scalability refers to the ability of a system to gracefully accommodate
growing sizes of inputs or amounts of workload. Being able to achieve scalability
for a computer system can mean the difference between a technological solution
that can succeed in the marketplace or scientific application and one that becomes
effectively unusable as data volumes increase. In this book, we are therefore inter-
ested in the design of scalable algorithms and data structures.
Simply put, an algorithm is a step-by-step procedure for performing some task
in a finite amount of time, and a data structure is a systematic way of organiz-
ing and accessing data. These concepts are central to computing, and this book is
dedicated to the discussion of paradigms and principles for the design and imple-
mentation of correct and efficient data structures and algorithms. But to be able to
determine the degree to which algorithms and data structures are scalable, we must
have precise ways of analyzing them.
The primary analysis tool we use in this book is to characterize the running
time of an algorithm or data structure operation, with space usage also being of
interest. Running time is a natural measure for the purposes of scalability, since
time is a precious resource. It is an important consideration in economic and sci-
entific applications, since everyone expects computer applications to run as fast as
possible.
We begin this chapter by describing the basic framework needed for analyzing
algorithms, which includes the language for describing algorithms, the computa-
tional model that language is intended for, and the main factors we count when
considering running time. We also include a brief discussion of how recursive
algorithms are analyzed. In Section 1.1.5, we present the main notation we use to
characterize running times—the so-called “big-Oh” notation. These tools comprise
the main theoretical tools for designing and analyzing algorithms.
In Section 1.2, we take a short break from our development of the framework
for algorithm analysis to review some important mathematical facts, including dis-
cussions of summations, logarithms, proof techniques, and basic probability. Given
this background and our notation for algorithm analysis, we present a case study on
algorithm analysis in Section 1.3, focusing on a problem often used as a test ques-
tion during job interviews. We follow this case study in Section 1.4 by presenting
an interesting analysis technique, known as amortization, which allows us to ac-
count for the group behavior of many individual operations. Finally, we conclude
the chapter with some exercises that include several problems inspired by questions
commonly asked during job interviews at major software and Internet companies.
1.1. Analyzing Algorithms 3

1.1 Analyzing Algorithms

The running time of an algorithm or data structure operation typically depends on


a number of factors, so what should be the proper way of measuring it? If an
algorithm has been implemented, we can study its running time by executing it
on various test inputs and recording the actual time spent in each execution. Such
measurements can be taken in an accurate manner by using system calls that are
built into the language or operating system for which the algorithm is written. In
general, we are interested in determining the dependency of the running time on the
size of the input. In order to determine this, we can perform several experiments
on many different test inputs of various sizes. We can then visualize the results
of such experiments by plotting the performance of each run of the algorithm as
a point with x-coordinate equal to the input size, n, and y-coordinate equal to the
running time, t. (See Figure 1.1.) To be meaningful, this analysis requires that
we choose good sample inputs and test enough of them to be able to make sound
statistical claims about the algorithm.
In general, the running time of an algorithm or data structure method increases
with the input size, although it may also vary for distinct inputs of the same size.
Also, the running time is affected by the hardware environment (processor, clock
rate, memory, disk, etc.) and software environment (operating system, program-
ming language, compiler, interpreter, etc.) in which the algorithm is implemented,
compiled, and executed. All other factors being equal, the running time of the same
algorithm on the same input data will be smaller if the computer has, say, a much
faster processor or if the implementation is done in a program compiled into native
machine code instead of an interpreted implementation run on a virtual machine.
t (ms)
60

50

40

30

20

10

n
0 50 100

Figure 1.1: Results of an experimental study on the running time of an algorithm.


A dot with coordinates (n, t) indicates that on an input of size n, the running time
of the algorithm is t milliseconds (ms).
4 Chapter 1. Algorithm Analysis

Requirements for a General Analysis Methodology


Experimental studies on running times are useful, but they have some limitations:

• Experiments can be done only on a limited set of test inputs, and care must
be taken to make sure these are representative.
• It is difficult to compare the efficiency of two algorithms unless experiments
on their running times have been performed in the same hardware and soft-
ware environments.
• It is necessary to implement and execute an algorithm in order to study its
running time experimentally.

Thus, while experimentation has an important role to play in algorithm analysis,


it alone is not sufficient. Therefore, in addition to experimentation, we desire an
analytic framework that

• Takes into account all possible inputs


• Allows us to evaluate the relative efficiency of any two algorithms in a way
that is independent from the hardware and software environment
• Can be performed by studying a high-level description of the algorithm with-
out actually implementing it or running experiments on it.

This methodology aims at associating with each algorithm a function f (n) that
characterizes the running time of the algorithm in terms of the input size n. Typical
functions that will be encountered include n and n2 . For example, we will write
statements of the type “Algorithm A runs in time proportional to n,” meaning that
if we were to perform experiments, we would find that the actual running time of
algorithm A on any input of size n never exceeds cn, where c is a constant that
depends on the hardware and software environment used in the experiment. Given
two algorithms A and B, where A runs in time proportional to n and B runs in time
proportional to n2 , we will prefer A to B, since the function n grows at a smaller
rate than the function n2 .
We are now ready to “roll up our sleeves” and start developing our method-
ology for algorithm analysis. There are several components to this methodology,
including the following:

• A language for describing algorithms


• A computational model that algorithms execute within
• A metric for measuring algorithm running time
• An approach for characterizing running times, including those for recursive
algorithms.

We describe these components in more detail in the remainder of this section.


1.1. Analyzing Algorithms 5

1.1.1 Pseudo-Code
Programmers are often asked to describe algorithms in a way that is intended for
human eyes only. Such descriptions are not computer programs, but are more struc-
tured than usual prose. They also facilitate the high-level analysis of a data structure
or algorithm. We call these descriptions pseudocode.

An Example of Pseudo-Code
The array-maximum problem is the simple problem of finding the maximum el-
ement in an array A storing n integers. To solve this problem, we can use an
algorithm called arrayMax, which scans through the elements of A using a for
loop.
The pseudocode description of algorithm arrayMax is shown in Algorithm 1.2.

Algorithm arrayMax(A, n):


Input: An array A storing n ≥ 1 integers.
Output: The maximum element in A.
currentMax ← A[0]
for i ← 1 to n − 1 do
if currentMax < A[i] then
currentMax ← A[i]
return currentMax

Algorithm 1.2: Algorithm arrayMax.

Note that the pseudocode is more compact than an equivalent actual software
code fragment would be. In addition, the pseudocode is easier to read and under-
stand.

Using Pseudo-Code to Prove Algorithm Correctness


By inspecting the pseudocode, we can argue about the correctness of algorithm ar-
rayMax with a simple argument. Variable currentMax starts out being equal to the
first element of A. We claim that at the beginning of the ith iteration of the loop,
currentMax is equal to the maximum of the first i elements in A. Since we compare
currentMax to A[i] in iteration i, if this claim is true before this iteration, it will be
true after it for i + 1 (which is the next value of counter i). Thus, after n − 1 itera-
tions, currentMax will equal the maximum element in A. As with this example, we
want our pseudocode descriptions to always be detailed enough to fully justify the
correctness of the algorithm they describe, while being simple enough for human
readers to understand.
6 Chapter 1. Algorithm Analysis

What Is Pseudo-Code?
Pseudo-code is a mixture of natural language and high-level programming con-
structs that describe the main ideas behind a generic implementation of a data
structure or algorithm. There really is no precise definition of the pseudocode
language, however, because of its reliance on natural language. At the same time,
to help achieve clarity, pseudocode mixes natural language with standard program-
ming language constructs. The programming language constructs we choose are
those consistent with modern high-level languages such as Python, C++, and Java.
These constructs include the following:

• Expressions: We use standard mathematical symbols to express numeric


and Boolean expressions. We use the left arrow sign (←) as the assignment
operator in assignment statements (equivalent to the = operator in C, C++,
and Java) and we use the equal sign (=) as the equality relation in Boolean
expressions (equivalent to the “==” relation in C, C++, and Java).
• Method declarations: Algorithm name(param1, param2, . . .) declares a
new method “name” and its parameters.
• Decision structures: if condition then true-actions [else false-actions]. We
use indentation to indicate what actions should be included in the true-actions
and false-actions, and we assume Boolean operators allow for short-circuit
evaluation.
• While-loops: while condition do actions. We use indentation to indicate
what actions should be included in the loop actions.
• Repeat-loops: repeat actions until condition. We use indentation to indicate
what actions should be included in the loop actions.
• For-loops: for variable-increment-definition do actions. We use indentation
to indicate what actions should be included among the loop actions.
• Array indexing: A[i] represents the ith cell in the array A. We usually index
the cells of an array A of size n from 1 to n, as in mathematics, but sometimes
we instead such an array from 0 to n − 1, consistent with C, C++, and Java.
• Method calls: object.method(args) (object is optional if it is understood).
• Method returns: return value. This operation returns the value specified to
the method that called this one.

When we write pseudocode, we must keep in mind that we are writing for a
human reader, not a computer. Thus, we should strive to communicate high-level
ideas, not low-level implementation details. At the same time, we should not gloss
over important steps. Like many forms of human communication, finding the right
balance is an important skill that is refined through practice.
Now that we have developed a high-level way of describing algorithms, let
us next discuss how we can analytically characterize algorithms written in pseu-
docode.
1.1. Analyzing Algorithms 7

1.1.2 The Random Access Machine (RAM) Model


As we noted above, experimental analysis is valuable, but it has its limitations. If
we wish to analyze a particular algorithm without performing experiments on its
running time, we can take the following more analytic approach directly on the
high-level code or pseudocode. We define a set of high-level primitive operations
that are largely independent from the programming language used and can be iden-
tified also in the pseudocode. Primitive operations include the following:
• Assigning a value to a variable
• Calling a method
• Performing an arithmetic operation (for example, adding two numbers)
• Comparing two numbers
• Indexing into an array
• Following an object reference
• Returning from a method.
Specifically, a primitive operation corresponds to a low-level instruction with an
execution time that depends on the hardware and software environment but is nev-
ertheless constant. Instead of trying to determine the specific execution time of
each primitive operation, we will simply count how many primitive operations are
executed, and use this number t as a high-level estimate of the running time of the
algorithm. This operation count will correlate to an actual running time in a spe-
cific hardware and software environment, for each primitive operation corresponds
to a constant-time instruction, and there are only a fixed number of primitive opera-
tions. The implicit assumption in this approach is that the running times of different
primitive operations will be fairly similar. Thus, the number, t, of primitive opera-
tions an algorithm performs will be proportional to the actual running time of that
algorithm.

RAM Machine Model Definition


This approach of simply counting primitive operations gives rise to a computational
model called the Random Access Machine (RAM). This model, which should not
be confused with “random access memory,” views a computer simply as a CPU
connected to a bank of memory cells. Each memory cell stores a word, which can
be a number, a character string, or an address—that is, the value of a base type. The
term “random access” refers to the ability of the CPU to access an arbitrary memory
cell with one primitive operation. To keep the model simple, we do not place
any specific limits on the size of numbers that can be stored in words of memory.
We assume the CPU in the RAM model can perform any primitive operation in
a constant number of steps, which do not depend on the size of the input. Thus,
an accurate bound on the number of primitive operations an algorithm performs
corresponds directly to the running time of that algorithm in the RAM model.
Other documents randomly have
different content
Letterkenney in Ireland. Immediately on issuing from the convent
she eloped with Count Della Crusca, whose acquaintance she had
made in a casual manner in the coupé of one of the diligences
belonging to Messrs. Lafitte, Caillard et Cie. A very short time served
to prove to them that they had no tastes in common. Madame la
Comtesse did not care for natural history, which the Count loved,
and she did care for England, which the Count loathed. So he went
his way, in pursuit of specimens, and she went hers to England. She
arrived in London, and Marston Moor House being to let, she took it.

Some of us are yet alive who recollect the little saccharine poems,
the plaintive little sonnets, the--well, yes, to speak the truth--the
washy three-volume novels which were composed in that sturdy old
building and dated thence. Sturdy outside, but lovely within. Such
furniture: white satin and gold, black satin and red trimming; such
pictures, and statues, and busts; such looking-glasses let into the
walls at every conceivable place; such hanging baskets and ormolu
clocks, and Dresden and Sèvres china; such Chinese fans, and
Indian screens, and Turkish yataghans and Malay creeses; such
books--at least, such bindings; such a satinwood desk, at which the
Countess penned her inspirations; such a solemn-sounding library
clock, which had belonged to Marie Antoinette; such lion-skins and
leopard-skins for rugs; such despatch-boxes with the Della Cruscan
coronet and cipher; such waste-paper baskets always littered with
proof-sheets! The garden! never was anything seen like that! It was
not much more than half an acre, but Smiff, the great landscape
gardener, made it look more like a square mile. Delightfully rustic
and English here, quaintly Dutch there, Italian terraced a little lower
down, small avenue, vista broken by the fountain; might be a
thousand miles away from London, so everyone said. Everyone said
so, because everyone came there. Who was everyone? Well, the
Grand-Duke of Schweinerei was someone, at all events. Ex-Grand-
Duke, I should have said, recollecting that some years before, the
people of Schweinerei, although by no means a strait-laced people,
grew so disgusted at the "goings-on" of their reigning potentate,
that they rose in revolt, and incontinently kicked him out. Then he
came to England, where he has remained ever since, dwelling in a
big house, and occupying his spare time with fighting newspapers
for libelling him in a very blackguard and un-English manner. His
highness is an elderly, short, fat man, with admirably-fitting wig and
whiskers of the Tyrian purple. He has dull bleary eyes, pendulous
cheeks, and a great fat double chin. He is covered all over with
diamonds: his studs are diamonds; he wears a butterfly diamond
brooch on the knot of his white cravat; his waistcoat-buttons are
diamonds; his sleeve-links are diamonds; and he resembles the old
woman of Banbury Cross in having (diamond) rings on his fingers,
and probably, for all the historian knows to the contrary, on his toes.

Who else came there? A tall, thin, dark man, with a long face like
a sheep's head, a full dull eye, a long nose, a very long upper lip,
arid a retreating chin. Prince Bernadotte of the Lipari Isles, also an
exile, but one who has since been recalled to his kingdom. Nobody
thought much of Prince Bernadotte in those days. He lived in cheap
chambers in London, and used to play billiards with coiffeurs and
agents de change and commis voyageurs from the hotels in
Leicester Square; and who went into a very little English society,
where he always sat silent and reserved, and where they thought
very little of him. He must have been marvellously misunderstood
then, or must have grown into quite a different kind of man when he
sat smoking his cigar with his feet on the fender in the Elysée, and
to all inquiries made but the one reply, "Qu'on exécute mes orders!"-
-those "ordres" being fulfilled in the massacre of the Boulevards.

Who else? Savans, philosophers, barristers, poets, newspaper-


writers, novelists, caricaturists, eminent physicians and surgeons,
fiddlers, foreigners, anybody who had done anything which had
given him the merest temporary notoriety was welcome, so long as
he came at the time. And they never failed to do that. The society
was so delightful, the welcome was so warm, the eating and
drinking were so good, that there was never any chance of an
invitation to Marston Moor House being refused. Thither came
Fermez, the opera impresario, driving down a couple of lords in his
phaeton; and Tom Gilks, the scene-painter of Covent Garden, who
arrived per omnibus; and Whiston, who had just written that
tremendous pamphlet on the religious controversy of the day; and
Rupert Robinson, who had sat up all the previous night to finish his
burlesque, and who was so enchanted with the personal appearance
of the Grand-Duke of Schweinerei, that he wanted to carry him off
bodily--rings, diamonds, wig, whiskers, and all--to Madame
Tussaud's Exhibition. Dinners and balls, conversazioni and fêtes--
with the garden illuminated with Italian lamps, and supper served in
extemporised pavilions--two royal dukes, in addition to standard
celebrities, and foreign princes in town for the season--without end.
Vain transitory splendour! could not all Retain the tott'ring mansion from its fall?

Apparently not. One morning the servants at Marston Moor House


got up, to find their mistress had risen before them, or rather had
not been to bed at all, having decamped during the night with the
plate and all the portable valuables, and left an enormous army of
creditors behind her. There was weeping and wailing round the
neighbourhood for months; but tears and outcries did not pay the
defrauded tradespeople, and they never had any money. Nobody
ever knew who received the money realised by the sale of the
furniture, &c, though that ought to have been something
considerable, for there never was a sale so tremendously attended,
or at which things fetched such high prices. All the ladies of high
rank who combined frightful stupidity with rigid virtue, and who
would as soon have thought of walking into Tophet as of crossing
Madame Della Crusca's threshold, rushed to Marston Moor House so
soon as its proprietress had fled, and bought eagerly at the sale.
The large looking-glass which formed the back of the alcove in which
Madame Delia Crusca's bed was placed now figures in the boudoir,
or, as it is generally called, the work-room, of the Countess of
Textborough, and is scarcely so happy in its reflections as in former
days. The satinwood desk fell to the nod of Mrs. Quisby, who used to
follow the Queen's hounds in a deep-pink jacket and a short skirt,
and who now holds forth on Sunday afternoons at the infant schools
in Badger's Buildings, Mayfair, and is especially hard on the Scarlet
Woman. Many of the old habitués attended, and bought well-
remembered scraps for souvenirs. Finally everything, down to the
kitchen pots and pans, the stable buckets and the gardeners'
implements, were cleared off, and a big painted board frowned in
the great courtyard, informing the British public that that eligible
mansion was to let.

Not for long did that black-and-white board blossom in that flinty
soil. Within three weeks of the sale a rumour ran through London
that an al-fresco place of entertainment on a magnificent scale was
about to be opened on what had been the Della-Cruscan property,
and that Wuff, the great Wuff, the most enterprising man of his day,
was at the back of it. Straightway the board was pulled down, and
an army of painters, and decorators, and plumbers, and builders,
and Irish gentlemen in flannel jackets, and Italian gentlemen in
slouch wideawakes and paint-stained gaberdines, took possession of
the place. Big rooms were converted into supper and dining-rooms,
and small rooms into cabinets particuliers; a row of supper-boxes on
the old Vauxhall pattern sprang up in the grounds, which, moreover,
were tastefully planted with gas-lamps, with plaster-of-Paris statues,
with two or three sham fountains, and with grottos made of slag and
shiny-faced bricks. Then, on an Easter Monday, the place was
opened with a ballet, with dancing on the circular platform, with
Signor Simioso's performing monkeys, and with a grand display of
fireworks. Very good, all this; but somehow it didn't draw. The great
Wuff did all he could; sent an enormous power of legs into the
ballet; engaged the most excruciatingly funny comic singers, put
silver rosettes into the button-holes and silver-gilt wands into the
hands of all the masters of the ceremonies on the circular platform;
and had Guffino il Diavolo flying from the top of the pasteboard
Leaning Tower of Pisa into the canvas Lake of Geneva, down a wire,
with a squib in his cap, and one in each of his heels--and yet the
public would not come. The great Wuff tried it for two seasons, and
then gave it up in despair.
Up went the black-and-white board again; to be taken down at the
bidding of Mrs. Trimmer, who, having a very good boarding-school
for young ladies at Highgate, thought she might increase her
connection by establishing herself in a more eligible neighbourhood.
The board had been up so long, that the proprietor of the house was
willing, not merely to take a reduced rent, but to pull up the gas-
lamps, and pull down the supper-boxes, and restore the garden, not
indeed to its original state of beauty, but to decency and order. The
rooms were repapered (it must be owned that Wuff's taste in
decoration had been loud), and the name of the house changed
from Marston Moor to Cornelia. Then Mrs. Trimmer took possession,
and brought her young friends with her, and they throve and
multiplied exceedingly; and all went well until Mrs. Trimmer died,
and there was no one to carry on the business; and the board went
up, and remained up longer than ever.

No one knew exactly when or how the house was taken again.
The proprietor, hoping to get another school-keeper for a tenant, the
house being too large for ordinary domestic purposes, had bought
Mrs. Trimmer's furniture--the iron bedsteads and school fittings--for
a song, and had placed an old woman in charge. One day this old
woman put her luggage, consisting of a blue bundle, and herself into
a cab, and went away. A few carpenters had arrived from town in
the morning, and had occupied themselves in fitting iron bars to the
interior of some of the windows. During the greater portion of that
night carriages were heard rolling up the lane in which the back
entrance to the house was situated, and the next day smoke was
seen issuing from the chimneys; a big brass plate with the name of
"Dr. Bulph" was screwed on to the iron gates of the carriage-drive,
and two or three strong-built men were noticed going in and out of
the premises. Gradually it became known that Dr. Bulph was a
physician celebrated for his treatment of the insane, a "mad-doctor,"
as the neighbours called him; and women and children used to
skurry past the old red garden-walls as though they thought the
inmates were climbing over to get at them. But the house was so
thoroughly well-conducted, so quietly and with such excellent
discipline, that people soon thought nothing of it, any more than of
any other of the big mansions in the neighbourhood; and when Dr.
Bulph retired, and Dr. Wainwright succeeded him, the door-plate had
actually been changed for some days before the neighbours noticed
it.

Dr. Wainwright made many changes in the establishment. He was


a man of great fame for several specialities, and was constantly
being called away to patients in the country. He considerably
enlarged the old house, and brought to it a better and wealthier
class of patients, who were attended, under his supervision, by two
resident surgeons. Dr. Wainwright did not live in the house. In
addition to his practice he worked very hard with his pen,
contributing largely to the principal medical Scientific reviews and
journals, and corresponding with many continental savans. For all
this work he required solitude and silence; and, as he was a
widower, he was able to enjoy both in a set of chambers in the
Albany, where he could go in and out as he liked, and where no
unwelcome visitor could get at him. He had consulting-rooms in
Grosvenor Square; and when in town, was to be found there
between ten and one; but after those hours it was impossible to
know where to catch him.

But George Wainwright lived at the old house, or rather in an


outbuilding in the grounds, sole remainder of Mr. Wuff's erections;
which had been converted to his use, and which yielded him a large,
high-roofed, roomy studio, and a capital bedroom, both on the
ground floor. The studio was no misnomer for the living-room; for, in
addition to his Civil-Service work, George followed art with deep and
earnest devotion, and was known and recognised as one of the best
amateurs of the day. Men whose names stood very high in the art-
world were his friends; and on winter nights the studio would be
filled with members of that pleasant Bohemian society, discussing
their craft and its members and such cognate subjects. George was
a great reader also, and had a goodly store of books littering the
tables or ranged on common shelves, disputing possession of the
walls with choice bits of his friends' painting or half-finished attempts
of his own. In the middle of the room stood a quaintly-carved old
black-oak desk, ink-blotted and penknife-hacked, with some pages of
manuscript and some slips of proof lying on it--for George, who had
been educated in Germany, was in the habit of contributing essays
on abstruse questions of German philosophy and metaphysics to a
monthly review of very portentous weight--and in the corner was a
cabinet piano, covered with loose leaves of music, scraps from
oratorios, studenten-lieder, bits of Bach and Glück, glees of Purcell
and Arne, and even ballads by Claribel. Some of George's painter
friends had formed themselves into a singing-club and sang very
sweetly; and the greatest treat that could be offered to the inmates
of the house was these fellows' musical performances. The young
swells of the Stannaries Office wondered why George Wainwright
was never seen at casino, singing and supper-houses, or other of
those resorts which they specially affected. They looked upon him as
somewhat of a fogey, and could not understand what a bright,
genial, jolly fellow like Paul Derinzy could see to like in him. He was
kind and good-natured and all that, they owned, as indeed they had
often proved by loans of "sovs" and "fivers," when the end of the
quarter had left them dry; but he was an uncomfortable sort of
chap, they said, and was always by himself.

He was by himself the evening of the day after that on which he


had seen Paul Derinzy walking with Daisy in Kensington Gardens. He
had had a light dinner at his club, and thence walked straight away
home, where, on his arrival at his den, he had lit a big pipe and
thrown himself into an easy-chair, and sat watching the blue smoke
curling above his head, and pondering over the present and the
future of his friend. George Wainwright had a stronger feeling than
mere liking for Paul; there was a touch of romance in the regard
which the good-looking, bright, easy-going young man had aroused
in his steady, sober, practical senior. George was too much a man of
the world to thrill with horror because he had seen his friend in the
company of a pretty girl, and come across what was evidently a
lovers' meeting. But his knowledge of Paul's character was large and
well-founded; in the mere glance which he had got of the pair as
they stood together in the act of saying adieu, he had caught an
expression in his friend's face which intuitively led him to feel that
the woman who could call up such a look of intense earnest
devotion was no mere passing light-o'-love; and as George thought
over the scene, and reproduced it, time after time, from the
storehouse of his memory, he puffed fiercer blasts from his pipe, and
shook his head in an unsettled, not to say desponding manner.

While he was thus occupied he heard steps on the gravel-walk


outside, then a tap at the door. Opening it, Paul Derinzy stood before
him.

"Just the man I was thinking about, and come exactly in the nick
of time! Alma quies optata, veni! Not that you can be called alma
quies, you restless bird of the night! What's the matter? what are
you making signs about?" asked George.

"That idiot, Billy Dunlop, is with me," replied Paul, grinning; "he is
doing some of his pantomime nonsense outside;" and, indeed,
George Wainwright, peering out in the darkness, could make out a
stout figure approaching with cautious gestures, which, when it
emerged into the lamplight, proved to be Mr. Dunlop.

"Hallo, Billy! what are you at? Come in, man; light a pipe, and be
happy."

But Mr. Dunlop, true to his character of comic man, did not enter
the room quietly, but came in with a little rush, and then, his knees
knocking together in simulated abject terror, asked:

"Am I safe? Can none of them get at me?"

"None of whom?"

"None of the patients. I was in such a fright coming up that


garden, I could scarcely speak. I thought I saw eyes behind every
laurestinus; and--I suppose the staff of keepers is adequate, in case
any of 'em should prove rampagious?"

"Oh yes, it's all right. Have you never been here before?"

"Never, sir; and I don't think, provided I get safe away this time,
that I'm ever likely to come again."

"You're complimentary; but now you are here, sit down and have
a drink. Spirits there in that stand, soda-water here in the window-
seat, ice in that refrigerator by the door. Or stay, let me make you
the new Yankee drink that has just come up--a cobbler. There are
plenty of straws somewhere about."

"I should think so," said Billy, in a stage-whisper to Paul. "He gets
'em out of the patients' heads. Lunatics always stick straws in their
heads, vide the drama passim. I say, Wainwright, while you're
mixing the grog, may I run out and have a look at the night-watch?"

"The what?" asked George, raising his head.

"The night-watch, you know;" and Mr. Dunlop sat down at the
piano, squared his elbows, contorted his face, and with much
ludicrous exaggeration burst forth:
"Hush-sh-sh-sh! 'tis the NIGHT-WATCH!! he gy-ards my lonely cell!

"Now don't you say that he doesn't, you know, because I've Mr. Henry Russell's authority
that he does. So produce your night-watch!"

"Don't make such a row, Billy!" cried Paul; "there's no night-watch,


or anything else of the sort."

"What! do you mean to say that I did not see her dancing in the
hall? that I am not cold, bitter cold? that his glimmering lamp no
more I see? and that no, no, by hav-vens, I am not ma-a-ad?" With
these words, uttered in the wildest tones, Mr. Dunlop cast himself at
full length on the sofa, whence arising immediately with a placid
countenance, he said: "Gentlemen, if you wish thus to uproot and
destroy the tenderest associations of childhood, I shall be happy,
when I have finished my drink, to wish you a good-evening, and
return home."

"I can't think what the deuce you came for," said Paul, with a
smile. "He looked in at the club where I was dining, hoping to meet
you, and where I heard you had been and gone, and asked me
whether I wasn't going to evening service. When I told him 'yes,' he
said he would come with me; and all the way along he has done
nothing but growl at the pace I was walking, and the length of the
way."

"Don't mind me, Mr. Wainwright," said Billy, politely; "pray let the
gentleman go on. I am not the Stannaries Stag, sir, and I never laid
claim to the title; consequently it's no degradation to me to avow
that I can't keep on heeling and toeing it at the rate of seven miles
an hour for long. As it happens, I have a friend in the
neighbourhood, a fisherman, who has managed to combine a snack-
bend with a Kirby hook in a manner which he assures me--pardon
me, dear sirs, those imbecile grins remind me that I am speaking to
men who don't know a stone-fly from a gentle; that I have been
throwing my--I needn't finish the sentence. I have finished the drink.
Mr. Wainwright, have the goodness to see me off the premises, and,
in the words of the distraught Ophelia--to whom, by-the-way, I
daresay your talented father would have been called in, had he
happened to live in Denmark at the time--'let out the maid who'--
goodnight!"

When George Wainwright returned, alone, he found Paul, who had


lighted a cigar, walking up and down the room, his hands plunged in
his pockets, his chin down upon his chest. George went up to him,
and putting his hand affectionately on his shoulder, said:

"What brought you down here to-night, young 'un? The last rats
must have deserted the sinking ship of Fashion and Season when
you clear out of it to come down to Diogenes in his tub. Not but that
I'm delighted to see you; all I want to know is why?"

"I was nervous and restless, George; a little tired of fools and
frippery, and--and myself. I wanted you to blow a little of the ozone
of common sense into me, you know!"

"Oh yes, I know," said George Wainwright; but he uttered the


words in such deep solemn tones that Paul turned upon him
suddenly, saying:

"You know? Well, what do you know?"

"I know why you could not play tennis, or come to the Oval, or
walk to Hendon with me yesterday afternoon."

"The deuce you do! And why?"

"For a very sufficient reason to a young fellow of five-and-twenty!"


said George, with a rather melancholy grin. "Look here, Paul; I don't
think you'll imagine I'm a spy, or a meddling, impertinent busybody,
and I'm sure you'll believe it was by the merest accident that I was
crossing Kensington Gardens last evening, and there saw a friend of
mine in deep conversation with a very handsome young lady."

"The deuce you did!" cried Paul, turning very red. "What then?"

"Ah!" said George, filling his pipe, "that's exactly the point--what
then?"

"What a provoking old beggar you are! Why do you echo me?
Why don't you go on?"

"It's for you to go on, my boy! What are your relations--or what
are they to be--with this handsome girl?"

"She is handsome, is she not?"


"Beautiful!"

"'Gad! she must be to strike fire out of an old flint like you,
George!" cried Paul. "What are my relations with her? Strictly proper,
I give you my word."

"And you intend to marry her?"

"How the man jumps at an idea! Well, no; I don't know at all that
I intend that."

"Not the--the other thing, Paul? No; you're, to say the least of it,
too much of a gentleman. You don't intend that."

"I don't intend anything, I tell you. Can't a man talk to a pretty girl
without 'intention'?"

"I don't know, Paul. I'm quite incompetent to pronounce any


opinion on such matters; only--only see here: I look on you as on a
younger brother, and, prompted by my regard for you, I may say
many things which you may dislike."

"Well, say away, old George; you won't offend me."

"Well, then, if this is a good honest girl, and you don't intend to
marry her, you ought not to be meeting her, and walking with her,
and leading her to believe that she will attain to a position through
you which she never would otherwise; and if she isn't an honest girl
you ought never to have spoken to her."

Paul Derinzy laughed, the quiet easy chuckle of a man of the


world, as he replied to his simple senior:

"She is a good, honest girl, no doubt of that. But suppose the


question of marriage had never risen between us, and she still liked
to meet me and to walk with me, what then? In the gravel paths of
Kensington Gardens, Pamela herself might have strolled with Captain
Lovelace himself without fear. Why should not I with--with this
young lady?"

"Because, though you don't know it, you're deceiving yourself and
deceiving her; because the whole thing is incongruous and won't fit,
however you may try to make it do so; because it's wrong, however
much you may slur it over. Look here, Paul; suppose, just for the
sake of argument, that you wanted to marry this girl--you're as weak
as water, and there's no accounting for what you might wish--you
know your people would oppose it in the very strongest way, and----
"

"Oh, if I chose it, my 'people,' as you call them, must have it, or
leave it alone, which would be quite immaterial to me."

"Yes, yes, no doubt; but still----"

"Look here, George; let's bring this question to a practical issue.


I'm ten times more a man of the world than you, though you are an
old fogey, and clever and sensible and all that. What you are aiming
it is that I must give up this girl. Well, then, shortly, I won't!"

"And why won't you?"

"For a reason you can't understand, you old mole, burrowed down
here under your paintings, and your fugues, and your dreary old
German philosophers--because I love her; because I think of her
from morning till night, and from night till morning again; because
her bright face and her gay creamy skin come between me and
those beastly old minutes and memoranda that we have to write at
the shop; and when I'm lying awake in Hanover Street, or even
sitting surrounded by a lot of gabbling idiots in the smoking-room of
the club, I can see her gray eyes looking at me, and----"

"Oh Lord!" said George Wainwright, with a piteous smile; "I had
no idea I'd let myself in for this!"
"You have, my dear old George, and for a lot more at a future
time. Just now I came out to you because I was horribly restless,
and Billy fastened himself on to me at the club, and I could not
shake him off. But I want to talk to you about it seriously, George--
seriously, you understand!"

"Whenever you like, Paul; but I expect you'll only get one scrap of
advice out of me, repeated, as I fear, ad nauseam."

"And that is?"

"Give her up! give her up! give her up! Cato's powers of iteration
in the delenda est Carthago business will prove weak as compared
to mine in this."

"You'll find me stubborn, George."

"Buffon gives stubbornness as a characteristic of your class, Paul.


Goodnight, old man."

"Goodnight, God bless you! To-morrow as per usual, I suppose?"


and he was gone.

Alone once more, George Wainwright threw himself again into the
easy-chair and renewed his pipe; but he shook his head more than
ever, and when he did speak, it was only to mutter to himself:
"Worse than I thought! Don't see the way out of that. Must look into
this, and take care that Paul does not make a fool of himself."

When the clock struck midnight he rose, yawned, stretched, and


seemed more than half inclined to turn towards his cosy bedroom,
which opened from the studio; but he shook himself together, and
saying, "Poor dear, she would not sleep if I did not say goodnight to
her, I suppose!" lit a lamp, and took his way across the garden to
the house.
CHAPTER VIII.

CORRIDOR NO. 4.

Across the garden, and through an iron gate which he unlocked,


and which itself formed part of a railing shutting off one wing of the
house from the rest and from the grounds, George Wainwright
walked; then up a short flight of steps, topped by a heavy door,
which he also unlocked with a master key which he took from his
pocket, and which closed behind him with a heavy clang; through a
short stone passage, in a room leading off which, immediately inside
the door--a bright, snug, cheerful little room, with a handful of fire
alight in the grate, and the gas burning brightly over the
mantelpiece, and a tea-tray and appurtenances brightly shining on
the table--was a young woman--handsome, black-eyed, and rosy-
cheeked, tall, strongly built, and neatly dressed in a close-fitting
dark-gray gown--who started up at the sound of the approaching
footsteps, and presented herself at the door.

"You on duty, Miss Marshall?" said George, with a smile and a


bow.

"Yes, Mr. George, it's my night-turn again; comes round quicker


than one thinks for, or than one hopes for, indeed! Going to see your
sweetheart as usual, Mr. George?"

"Yes; I don't often miss; never, indeed, when I'm at home."


"Ah, if all other men were as thoughtful and as kind and as true to
their sweethearts as you are to yours, there would be less need for
these sort of houses in the world, Mr. George," said the young
woman, with a somewhat scornful toss of her head.

"Come, come, Miss Marshall," cried George, laughingly, "you've no


occasion to talk in that manner, I'm sure. Besides, I might retort,
and say that if all women were as kind and as loving and as pleased
to see their sweethearts as mine is to see me, if they remained true
to them for as many years as mine has remained true to me, if they
were as patient and as quiet--yes, and I think as silent--as mine is,
they would have a greater chance of retaining men's affections."

"Poor dear Madame!" said Miss Marshall. "Ah, you don't see many
like her!"

"I never saw one," said George. "But she will be keeping awake on
the chance of my coming to say goodnight to her."

And with another smile and bow he passed on.

First down another and a longer stone passage, the doors leading
from either side of which were wide open, showing bathrooms,
kitchens, and other domestic penetralia; then up a flight of stairs to
a landing covered with cocoa-nut matting, and giving on to a long
corridor, on the stone-coloured wall of which was painted in large
black letters, "Corridor No. 4." Closed doors here--doors of
dormitories, where the inmates were shut in for the night: some
tossing on their dream-haunted pillows; some haply--God knows--
enjoying a mental rest as soft and sweet as the slumber which
enchained them, borne away to the bygone days, when they
thought and felt and knew, ere the brain was distraught, and the
memory snapped, and the mind either warped or void. All was
perfectly quiet as George passed along, stopping at length before a
door which was closed but not locked, and at which he tapped
lightly. Lightly, but with a sound which was quickly heard, for a soft
voice cried immediately "Entrez!" and he opened the door, and went
in.

It was a pretty little room, considerably too lofty for its breadth--a
long narrow slip of a place, which some people with pleasant
development of mortuary tendencies might have rendered
unpleasantly like a grave. But it was tricked out with a pretty wall-
paper, all rosebuds and green leaves; some good photographs of
foreign scenery were framed on the walls; a wooden Swiss peasant
with a clock-face let into the centre of his waistcoat, and its works
ticking and running and whirring away in the centre of his anatomy,
stood on the mantelpiece; the fireplace was filled up with bright-
gilded shavings; and the bed, instead of being the mere ordinary
iron stump bedstead to be found in other dormitories of the house,
was gay with white hangings, and blue bows tastefully disposed here
and there.

On it lay a woman, who had risen on her elbow at George's knock,


and who remained in the same attitude, awaiting his approach. A
woman of small stature evidently, and delicately made, with small
well-cut features and small bones. Her hair, as snow-white as the
cap under which it was looped up, contrasted oddly with the deep
ruddy bronze of her complexion; such bronze as, travelling south,
you first begin to notice among the Lyonnaises, and afterwards find
so common along the shores of the Mediterranean. But Time,
though he had changed the colour of her locks--and to be so very
white now, they must necessarily have been raven black before--had
failed in dimming the lustre of her marvellous eyes; they remained
large, and dark, and appealing, as they must have been in earliest
youth. Full of liquid love and kindliness were they too, as they
beamed a welcome to George, a welcome seconded by her
outstretched hand, which rested on his head as he bent down beside
her.

"You are late, George," she said, with the faintest foreign accent;
"but I had not given you up."
"No, maman, you know better than that; you know that whenever
I am at home I never think of going to bed without saying goodnight
to maman. But I am late, dear; I have had friends sitting with me,
and they have only just gone."

"Friends, eh? Ah, that must be odd to see friends. And you took
them for a promenade on the Lac, and you---- Ah, bah! quelle
enfantillage! your friends were men, of course. Some of those who
sing so sweetly sometimes? No! but still men? Ah, no one else has
ever come here."

"No one else, maman?"

"See, George, come closer. She has not come?"

"No, maman," said the young man, rising, and regarding her with
a look of genuine affection and pity. "No, maman, not yet."

"Ah, not yet--always not yet," she said, letting her elbow relax,
and falling back in the bed--"always not yet!" And she covered her
face with her hands, removing them after a few minutes to say: "But
she will come? she will come?"

"Oh yes, dear, let us trust so," said George, quietly.

She looked at him, first earnestly, then wistfully, for several


minutes; then she dried the tears which, unseen by him, almost
unknown to her, had been trickling down her face, and said in a
trembling voice: "Goodnight, my boy."

"Goodnight, maman. God bless you!"

And he bent over her, and kissed her forehead.

"Dieu me bénisse!" she said, with a half-smile. "In time, George,


when she comes back! Meantime, Dieu te bénisse, my son!"
He bent his head again, and she encircled it with her arms,
brushed each of his cheeks with her lips, and kissed his hand; then
murmuring, "Goodnight," sank back on her pillow.

George took up his lamp, and crept silently from the room, and
down the corridor, down the stairs, and towards the outer door. As
he passed Miss Marshall's room he looked in, and saw her, bright,
brisk, and cheerful, sitting at her needlework, an epitome of
neatness and propriety. George could not refrain from stopping in his
progress, and saying:

"You don't look much like a 'keeper,' Miss Marshall. I had a friend
with me to-night, who laughingly asked me to show him the night-
watch of such places as these, of whom he had read in songs and
novels. I think he would have been rather astonished if I had
brought him across the garden and introduced him to you."

"Oh, they're not much 'count, those kind of trash, I think, Mr.
George," said Miss Marshall, who was eminently practical. "I read
about 'em often enough when I was a nursery-governess, and
before I came into the profession. I daresay he expected to see a
man with big whiskers, with a sword and a brace of pistols in his
belt, and perhaps two big dogs following him up and down the
passages! At least, I know that used to be my idea. You found
Madame Vaughan all well and quiet and comfortable, Mr. George?
And left her so, no doubt?"

"Oh yes. She was just the same as usual, poor dear."

"Oh, poor dear, indeed! If they were all like her, one need not
grumble about one's life here. There never was such a sweet
creature. I'm sure if one-half of the sane women, the sensible
creatures who expect one to possess all the cardinal virtues and to
look after four of their brats for sixteen pounds a-year, were
anything like as nice, or as sensible, or as sane, for the matter of
that, as Madame Vaughan, the world would be a much nicer place to
live in. She expected you, I suppose, sir?"

George Wainwright knew perfectly that Miss Marshall was, as the


phrase is, "making conversation;" that she cared little about the
patient whose state she was discussing; cared probably less about
him. But he knew also that in the discharge of her duty she had to
sit up all night, until relieved by one of the day-nurses at six o'clock
in the morning; that she naturally enough grasped at any chance of
making a portion, however small, of this time pass more pleasantly,
with somebody to look at and somebody's voice to listen to. And she
was a pretty girl and a good girl, and he was not particularly tired
and was particularly good-natured; so he thought he would stop and
chat with her for a few minutes.

"Oh yes, she expected me," he said; "so I should have been
horribly sorry if I had neglected to go to her. One must be selfish
indeed to deny anyone so much pleasure when it can be afforded by
merely stepping across the garden."

"Did she speak of the usual subject, sir?"

"The child? Oh, yes; asked if anyone had come, as usual; and
when I answered her, felt sure that her child would come speedily."

"I suppose there's no foundation for that idea of hers?"

"That the child will come, or, indeed, so far as we know, that she
ever had a child, is, I imagine, the merest hallucination. At all
events, from the number of years she has been here, her child, if
she ever had one, must be a tolerably well-grown young lady, and
not likely to be recognisable by, or to recognise her, poor thing!"

"Yes, indeed, Mr. George; and it's odd that of all our ladies, with
the exception of poor Mrs. Stoneycroft, who, I imagine, is just kept
here out of the Doctor's kindness and charity, Madame is the only
one who never has any friends come to see her."
"She has outlived all her friends; that is to say, she has outlived
their recollection of her. Nothing so easily forgotten as the trace of
people we once knew, but who can no longer be of use to us, or
administer to our vanity, our pleasure, or our amusement. I was at a
cemetery the other day, and saw there an enormous and
magnificent tombstone which a man had ordered to be erected over
his wife; but before the order had been executed the man had
married again, declined to pay for his extravagance in mortuary
sculpture, and contented himself with a simple headstone. And the
gardener told me that it is very seldom that the floral graves are
kept up beyond the first twelve months. So it is not likely that in this,
which, to such poor creatures as Madame Vaughan, is not much
better than a living tomb, the occupants should be held in any long
remembrance."

"I'm sure it's very kind of the Doctor to take such care of these
poor creatures, Mr. George; more especially when he's not paid for
it."

"That is not the case with Madame Vaughan. I think--in fact, I'm
sure--she was one of the patients of my father's predecessor, and
was made over to him on the transfer of the business; but though
she has no friends to come and see her, the sum for her
maintenance here is regularly discharged by a firm of solicitors who
have money in trust for the purpose, and by whom it has been paid
from the first."

"And is there nothing known of her history, Mr. George; who were
her friends, or where she came from?"

"Nothing now. Dr. Bulph, I suppose, had some sort of information;


but he was an odd man, and so long as his half-yearly bills were
paid, did not trouble himself much further, I fancy."

"Lord, what a life!" said Miss Marshall, casting a sidelong glance at


the little looking-glass over the mantelpiece, and smoothing her hair.
"And it will end here, I suppose? The Doctor does not think she will
ever be cured, Mr. George?"

"No, indeed!" said George, shaking his head. "And if she were,
what would become of her? She has been here for nearly twenty
years, and the outer world would be as strange and as impossible to
her as it was to the released prisoner of the Bastille, who prayed to
be taken back to his dungeon."

"Ah well, I should pray to be taken to my grave," said the practical


Miss Marshall, "if I thought no one cared for me----"

"Ah, now you're talking of an impossibility, Miss Marshall," said


George, rising. "If ever I have a necessity to expose the absurdity of
that saying which advances the necessity for 'beauty sleep,' I shall
bring you forward as my example; for you're never in bed by
midnight, and are often up all night; and yet I should like to see
anyone who could rival you in briskness or freshness. Goodnight,
Miss Marshall."

"Goodnight, Mr. George."

As he rose, shook hands, and taking up his lamp made his way
across the garden, the nurse looked after him with a pleased
expression, and said to herself:

"What a nice young man that is!--so pleasant and kind! Nice-
looking too, though a trifle old-fashioned and heavy; not like--ah,
well, never mind. But much too good to mope away his life in this
wretched old place, anyhow."

And when George reached his rooms he smiled to himself, and


said:

"Well, if that little talk, and those little compliments, have the
result of making Miss Marshall show any extra amount of kindness to
my poor maman, my time will not have been ill bestowed."
George Wainwright was tolerably correct in all he had said
regarding Madame Vaughan, though he had but an imperfect
knowledge of her history. At the time when her mental malady first
rendered it necessary that she should be placed under restraint, the
private lunatic asylums of England were in a very different condition
from what they are now. They were for the most part held by low-
born ignorant men, who derived their entire livelihood from the sums
of money paid for the maintenance of the unfortunate wretches
confided to their charge, and whose gains were consequently
greater in proportion to the manner in which they ignored or refused
the requirements of their inmates. A person calling himself a
physician, and perhaps in possession of some purchased degree,
hired at a small stipend and non-resident, looked in occasionally,
asked a few questions, and signed certificates destined to hoodwink
official eyes, which in those days never saw too clearly at the best of
times. But the staff of keepers, male and female, was always
numerous and efficient. Those were the merry days of the iron collar
and the broad leather bastinado, of the gag and the cold bath, of
the irons and the whipping-post. They did not care much about what
the Lunacy Commissioners did, or wrote, or exacted, in those days,
and each man did what he thought best for himself. The date of the
Commissioners' visits, which then were few and far between, were
accurately known long beforehand; the "medical attendant" was on
the spot; the patients, such as were visible, were tricked up into a
proper state of cleanliness and order; and the others were duly
hidden away until the authorities had departed. The licensing was a
farce, only to be exceeded in absurdity by the other regulations; and
villany, blackguardism, brutality, and chicanery reigned supreme.

For two years after Madame Vaughan was first received into the
asylum--God help us!--as it was called, the outer world was
mercifully a blank to her. She arrived in a settled state of stupor, in
which she remained, cowering in a corner of the room which she
shared with other afflicted creatures, but taking no heed of them, of
the antics which they played, of the yells and shrieks which they
uttered, of the fantastic illusions of which they were the victims, of
the punishment which their conduct brought upon them. Her face
covered by her hands, her poor body ever rocking to and fro, there
she remained for ever in the one spot until nightfall, when she crept
to the miserable couch allotted to her, and curling herself up as an
animal in its slumber, was unheard, almost unseen, until the next
day. The wretched food which they gave her, coarse in quality and
meagre in quantity, she ate in silence; in silence she bore the spoken
ribaldry, and the practical jokes which in the first few weeks after
her admission the guardians of the establishment, and indeed the
great proprietor himself, amused themselves by heaping upon her;
so that in a little time she was found incapable of administering to
their amusement, and was suffered to remain unmolested.

At the end of the time mentioned, a change took place in the


condition of the patient under the following circumstances. One of
the nurses had had her married sister and niece to visit her; and
after tea, by way of a cheerful amusement, the visitors were
conducted through the female ward. The child, a little girl of five or
six years old, frightened out of her life, hung back as she entered
the gloomy room, where women in every stage of mania, some
fierce and shrieking, some silent and moody, were collected. But her
aunt, the nurse, laughed at the child's fears; and the mother, who
through the hospitality of their entertainer had, after the clearing
away of the tea-equipage, been provided with a beverage which
both cheered and inebriated, bade the girl not to be a fool; and on
her still hanging back and evincing an intention of bursting into
tears, administered to her a severe thump on the back, which had
the effect of causing the little one to break forth at once into a howl.

From the first instant of the child's entrance into the room,
Madame Vaughan had roused herself from her usual attitude. The
sound of the child's pattering feet seemed to act on her with
electrical influence. She raised her head from out her hands; she sat
up erect, bright, observant. The corner in which she sat was dark,
and no one was in the habit of taking any notice of her. So she sat,
watching the shrinking child. She heard the mocking laugh with
which the nurse sneered at the little one's terror, she heard the
harsh tones in which the mother chid the child, and saw the blow
which followed on the words. Then she made two springs forward,
and the next minute had the woman on the ground, and was
grappling at her throat. The attendants sprang upon her, released
the woman from her grasp, and led her shrieking to her cell.

"My child, my child! why did she strike my child?" were the words
which she screamed forth; almost the first which those in the asylum
had ever heard her utter; so, at least, the nurse told the proprietor,
who, with other assistants, male as well as female, was speedily on
the spot.

"She used to sit as quiet as quiet, never opening her mouth, as


you know very well, sir," said the woman, "and was sittin' just as
usual, so far as I know, when my sister here, as I was showing
round, fetched her little gal a smack on the head because she
wouldn't come on; and then Vaughan springs at her like a wild-
beast, and wanted to tear the life out of her, she did, a murderin'
wretch!"

"Had she ever said anything about a child before?" asked the
proprietor.

"Never said nothing about anybody, and certingly nothing about a


child," replied the nurse.

"And it was because she saw this child struck that she burst out,
and she's hollerin' about the child now--is that it?"

"Jest so, sir," replied the nurse, looking at a mark of teeth on her
hand, and shaking her head viciously in the direction in which the
patient had been led away.

"That's it, Agar," said the proprietor; "I thought we should get at it
some day. Couldn't get anything out of the cove I first saw, and the
lawyers were as tight as wax. 'You'll get your money,' they says.
'We're responsible for that,' they says, 'and that ought to be enough
for you.' They wouldn't let on, any of 'em, what it was that had
upset her at first; but I knew it would come out sooner or later, and
it's come out now, though. She's gone off her head grievin' after a
kid, and no two ways about it."

"Ah!" said Mr. Agar, who was a man of few words; "shouldn't
wonder. Question is, what's to be done with her now? Mustn't be
allowed to kick up these wagaries, you know; we shall have the
neighbours complainin' again. Screamed and yelled and bit and
fisted away like a good un, she did. We ain't had such a rumpus
since the Tiger's time."

"She must be taught manners," said the proprietor, significantly.


"Tell your missus to look after her. This woman," indicating the nurse
with his elbow, "ain't any good when it comes to a rough and
tumble, and I'm doubtful if Vaughan won't give us some trouble
yet."

So Madame Vaughan was delivered over to the tender mercies of


Mrs. Agar, and underwent some of the tortures which she had seen
inflicted upon others. She was punished cruelly for her outbreak; but
that done, there was an end of it. The proprietor was wrong in his
surmise that she would give them further trouble. She lapsed back
into her old silent state, cowering in her old corner, rocking to and
fro after her old fashion; and thus she remained, when the
proprietor, having made sufficient money, and having had several
hints that certain malpractices of his, if further indulged in, would
probably bring him to the Old Bailey, handed over his business to Dr.
Bulph.

It was during Dr. Bulph's time that the poor lady had a severe
bodily illness, during which she was sedulously attended by Dr. Bulph
himself--a clever, hard man of the world, not unkind, but probably
prompted in his attention to his patient by the feeling that it would
be unwise to let a regularly-paid income of three hundred pounds a-
year slip through his fingers if a little trouble on his part could save
it. When she became convalescent, her mental condition seemed to
have altered. Instead of being dull and moping, she was bright and
restless, ever asking about her child, who, as it seemed to her poor
distraught fancy, had been with her just before her illness. Dr. Bulph
had had some idea, that when her bodily ailment left her, there was
a chance that her mind might have become at last clearer; but he
shook his head when he saw these new symptoms. Her child, her
child! what had been done with it? Why had they taken it away?
Why was it kept from her? That was the constant, incessant burden
of her cry, sometimes asked almost calmly, sometimes with piteous
wailings or fierce denunciations of their cruelty. Nothing satisfied her,
nothing appeased her. Madame Vaughan's case was evidently a very
bad one indeed: and when Dr. Bulph took Dr. Wainwright, who was
about purchasing his business, the round of his establishment, he
pointed Madame Vaughan out to him, and said: "That will be a noisy
one, I'm afraid, until the end."

The doctor was wrong in his prophecy. Dr. Wainwright, with as


much skill and far more savoir faire than his predecessor, adopted
very different tactics. Although since the departure of the first
proprietor of the asylum no cruelty had been inflicted on the
patients, all of them who were at all intractable or difficult to govern
had been kept in restraint. The first thing that Dr. Wainwright did,
when he took possession, was to give them an amount of liberty
which they had not previously enjoyed. Poor Madame Vaughan,
falling into one of her shrieking-fits of "My child! where's my child?"
was surprised on looking up to see the tall figure of the new doctor
in the open doorway of her room; and her screams died away as she
looked at his handsome smiling face, and heard his voice say in soft
tones: "Where is she? Come, let us look for her." Then he took her
gently by the arm and led her into the garden, round which they
walked together. The new sense of liberty, the air blowing on her
cheeks, the fresh smell of the flowers--these unaccustomed delights
had a wonderful influence on the poor sufferer. For a time, at least,
she forgot the main burden of her misery in the delight she
experienced in dwelling on them; and thenceforward, though she
recurred constantly, daily indeed, to her one theme of sorrow, it was
never with the poignant bitterness of former times. She grew
attached to the doctor, whose quiet interested manner suited her
wonderfully, and formed a singular attachment for George, then a
young man just entering on his office duties, looking forward to his
coming with a sweet motherly tenderness, which he seemed to
reciprocate in a most filial manner.

From that time forward Madame Vaughan's lot, as far as her


melancholy condition permitted, was a happy one. No acute return
of mania ever supervened; she remained in a state of harmless
quiet; and save for her invariable expectation of the arrival of her
child, a hope which she never failed to indulge in, it would have
been impossible to think that the quiet, well-dressed, white-haired
lady, who tended the flowers, and settled the ornaments of her little
room, or paced regularly up and down the garden, sometimes alone,
sometimes conversing with Dr. Wainwright, or leaning reliantly on
George's arm, was the inmate of a lunatic asylum, and had gone
through such tempestuous scenes as fall to her lot in the early days
of her residence there. The "noisy one" had indeed come to be the
gentlest member of that strange household; and one of the greatest
annoyances which Dr. Wainwright ever experienced was when one of
the members of the lawyers' firm who paid the annual stipend for
the poor lady's care happened to call with the cheque, and on the
doctor's wishing him to witness the comparative happy state to
which the patient had arrived, said shortly that "he had enough to
do in his business with people who were only sane enough to
prevent their being shut up, and that he didn't want to have
anything to do with those who were a stage further advanced in the
disease."

On the morning after the events recorded in the beginning of this


chapter, George Wainwright found a small pencil-note placed on the
huge can of cold water which was brought to him for his bath.
Opening it, he read:
"DEAR MR. GEORGE,--Madame hopes she shall see you before
you go into town this morning. She has something special to say to
you. I have told her I was sure you would not fail her.--Yours, L.
MARSHALL."

In compliance with this wish, George presented himself


immediately after breakfast at Madame Vaughan's room. He found
her ready dressed, and anxiously expecting him.

"Why, maman," he commenced, "already up and doing! Your


bright activity is an actual reproach to a sluggard like myself. But I
heard you wanted me, and I'm here."

"Would you mind taking a turn in the garden, George?" she asked.
"The morning looks very fine, and I've something to say to you that
I think should be said in the sunlight and among the flowers."

"Something pleasant, then, I argue from that," he said. "And you


know I'd do a great deal more than give up a few minutes from my
dry dull old office to be of any pleasant use to you; besides, work is
slack just now--it always is at this time of the year--and I can easily
be spared. Come, let us walk."

She threw a shawl over her head and shoulders with, as George
could not help remarking, all the innate grace and ease of a
Frenchwoman, took his arm, and descended the stairs into the
garden. It was indeed a lovely morning, just at that time when
Summer makes her last determined fight before gracefully
surrendering to Autumn. The turf was yet green and soft, though
somewhat faded here and there by the sun's long-continued power,
and the air was mild; but the paths were already flecked with leaves,
and ruddy tints were visible on the extreme outer foliage of the
trees. When they arrived in the grounds, they found several of the
patients already there; some chattering to each other, others walking
moodily apart. Many of them seemed to treat Madame Vaughan with
marked deference, and exhibited that deference in immediately
clearing out of the way, and leaving her and her companion
unmolested in their walk.

After a few turns up and down, George said:

"Well, maman, and the special business?"

"Ah yes, George, I had forgotten," said Madame, pressing her


hand to her head. "I dreamed about her last night, George--about
my child."

"Not an uncommon dream for you, surely, maman?" said George


kindly. "What you are always thinking of by day will most probably
not desert your mind at night."

"No, not at all uncommon; but I have never dreamed of her as I


dreamed last night. George, she is coming; you will see her very
soon."

"I! But you, maman--you will see her too?"

"I am not so sure of that, George. She was all dim and indistinct in
my dream. I think I shall be dead, George; but you will see her; I
shall have the comfort of knowing that, and--and of knowing that
you will love her, George."

"Why, maman, of course I shall love her, for your sake."

"No, George; for her own. You will love her for her own sake, and
you will marry her, my son."

"Maman, maman!" said George, taking her hand, and looking up


into her face with a loving smile. "But how do you know that she will
consent? You forget I am an old bachelor, and----"

"You will marry her, George," said Madame, her face clouding over
at once. "And yet--and yet she is but an infant, poor child!"
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!

ebookluna.com

You might also like