Dive Into Algorithms: A Pythonic Adventure For The Intrepid Beginner 1st Edition Bradford Tuckfield
Dive Into Algorithms: A Pythonic Adventure For The Intrepid Beginner 1st Edition Bradford Tuckfield
com
https://textbookfull.com/product/dive-into-algorithms-a-
pythonic-adventure-for-the-intrepid-beginner-1st-edition-
bradford-tuckfield-2/
OR CLICK BUTTON
DOWLOAD EBOOK
https://textbookfull.com/product/dive-into-algorithms-a-pythonic-
adventure-for-the-intrepid-beginner-1st-edition-bradford-
tuckfield-2/
https://textbookfull.com/product/a-deep-dive-into-nosql-
databases-the-use-cases-and-applications-first-edition-raj/
https://textbookfull.com/product/deep-dive-into-power-automate-
learn-by-example-1st-edition-mishra/
https://textbookfull.com/product/windows-security-internals-a-
deep-dive-into-windows-authentication-authorization-and-auditing-
for-true-epub-1st-edition-james-forshaw/
Kubernetes Up and Running Dive into the Future of
Infrastructure 1st Edition Kelsey Hightower
https://textbookfull.com/product/kubernetes-up-and-running-dive-
into-the-future-of-infrastructure-1st-edition-kelsey-hightower/
https://textbookfull.com/product/database-internals-a-deep-dive-
into-how-distributed-data-systems-work-alex-petrov/
https://textbookfull.com/product/practical-modern-javascript-
dive-into-es6-and-the-future-of-javascript-nicolas-bevacqua/
https://textbookfull.com/product/windows-security-internals-a-
deep-dive-into-windows-authentication-authorization-and-
auditing-1-converted-edition-james-forshaw/
https://textbookfull.com/product/programming-ios-12-dive-deep-
into-views-view-controllers-and-frameworks-1st-edition-matt-
neuburg/
DIVE INTO
ALGORITHMS
A P Y T H O N I C A D V E N T U R E
F O R T H E I N T R E P I D B E G I N N E R
BRADFORD TUCKFIELD
DIVE INTO
ALGORITHMS
A Pythonic Adventure for
the Intrepid Beginner
Br a d for d Tu c kf i e ld
DIVE INTO ALGORITHMS. Copyright © 2021 by Bradford Tuckfield
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900; [email protected]
www.nostarch.com
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other
product and company names mentioned herein may be the trademarks of their respective owners. Rather
than use a trademark symbol with every occurrence of a trademarked name, we are using the names only
in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution
has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in it.
Dedicated to my parents, David and Becky
Tuckfield, for believing in me and for
teaching me la pipopipette.
About the Author
Bradford Tuckfield is a data scientist and writer. He runs a data science con-
sulting firm called Kmbara (https://kmbara.com/) and a fiction website called
Dreamtigers (http://thedreamtigers.com/).
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
CONTE NT S IN DE TA IL
ACKNOWLEDGMENTS xiii
INTRODUCTION xv
Who Is This Book For? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Setting Up the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Install Python on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Install Python on macOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Install Python on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Installing Third-Party Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
1
PROBLEM-SOLVING WITH ALGORITHMS 1
The Analytic Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The Galilean Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The Solve-for-x Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Inner Physicist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The Algorithmic Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Thinking with Your Neck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Applying Chapman’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Solving Problems with Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2
ALGORITHMS IN HISTORY 13
Russian Peasant Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Doing RPM by Hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Implementing RPM in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Euclid’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Doing Euclid’s Algorithm by Hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Implementing Euclid’s Algorithm in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Japanese Magic Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Creating the Luo Shu Square in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Implementing Kurushima’s Algorithm in Python . . . . . . . . . . . . . . . . . . . . . . . . 24
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3
MAXIMIZING AND MINIMIZING 35
Setting Tax Rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Steps in the Right Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Turning the Steps into an Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Objections to Gradient Ascent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The Problem of Local Extrema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Education and Lifetime Income . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Climbing the Education Hill—the Right Way . . . . . . . . . . . . . . . . . . . . . . . . . 44
From Maximization to Minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Hill Climbing in General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
When Not to Use an Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4
SORTING AND SEARCHING 51
Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Putting the Insertion in Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Sorting via Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Measuring Algorithm Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Why Aim for Efficiency? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Measuring Time Precisely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Counting Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Comparing to Well-Known Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Adding Even More Theoretical Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Using Big O Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Merge Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Merging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
From Merging to Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Sleep Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
From Sorting to Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Binary Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Applications of Binary Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5
PURE MATH 77
Continued Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Compressing and Communicating Phi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
More about Continued Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
An Algorithm for Generating Continued Fractions . . . . . . . . . . . . . . . . . . . . . 82
From Decimals to Continued Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
From Fractions to Radicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Square Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
The Babylonian Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Square Roots in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Random Number Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
The Possibility of Randomness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Linear Congruential Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Judging a PRNG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
The Diehard Tests for Randomness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Linear Feedback Shift Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
x Contents in Detail
6
ADVANCED OPTIMIZATION 101
Life of a Salesman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Setting Up the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Brains vs. Brawn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
The Nearest Neighbor Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Implementing Nearest Neighbor Search . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Checking for Further Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Algorithms for the Avaricious . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Introducing the Temperature Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Tuning Our Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Avoiding Major Setbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Allowing Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Testing Our Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
7
GEOMETRY 125
The Postmaster Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Triangles 101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Advanced Graduate-Level Triangle Studies . . . . . . . . . . . . . . . . . . . . . . . . . 130
Finding the Circumcenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Increasing Our Plotting Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Delaunay Triangulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Incrementally Generating Delaunay Triangulations . . . . . . . . . . . . . . . . . . . . 136
Implementing Delaunay Triangulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
From Delaunay to Voronoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8
LANGUAGE 149
Why Language Algorithms Are Hard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Space Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Defining a Word List and Finding Words . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Dealing with Compound Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Checking Between Existing Spaces for Potential Words . . . . . . . . . . . . . . . . . 153
Using an Imported Corpus to Check for Valid Words . . . . . . . . . . . . . . . . . . 154
Finding First and Second Halves of Potential Words . . . . . . . . . . . . . . . . . . . 156
Phrase Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Tokenizing and Getting N-grams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Our Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Finding Candidate n + 1-grams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Selecting a Phrase Based on Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Contents in Detail xi
9
MACHINE LEARNING 165
Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Building a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Downloading Our Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Looking at the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Splitting Our Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Smarter Splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Choosing Splitting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Adding Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Evaluating Our Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
The Problem of Overfitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Improvements and Refinements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Random Forests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10
ARTIFICIAL INTELLIGENCE 185
La Pipopipette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Drawing the Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Representing Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Scoring Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Game Trees and How to Win a Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Building Our Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Winning a Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Adding Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
11
FORGING AHEAD 201
Doing More with Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Building a Chatbot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Text Vectorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Vector Similarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Becoming Better and Faster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Algorithms for the Ambitious . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Solving the Deepest Mysteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
INDEX 215
“A word is not the same with one writer as it is with another. One tears it
from his guts. The other pulls it out of his overcoat pocket.” This is how
Charles Peguy described writing individual words. The same thing is true
of chapters and whole books. At times, it felt like I was pulling this book
out of my overcoat pocket. At other times, it felt like I was tearing it from
my guts. It seems appropriate to acknowledge everyone who contributed to
the long process, either by loaning me an overcoat or by helping me clean
up my spilled guts.
Many kind people helped me on the long path I took to gain the expe-
rience and skills required to write this book. My parents, David and Becky
Tuckfield, gave me so many gifts, starting with life and education, and con-
tinued to believe in me, encourage me, and help me in many other ways too
numerous to list here. Scott Robertson gave me my first job writing code,
even though I was unqualified and not very good. Randy Jenson gave me my
first data science job, again despite my inexperience and limitations. Kumar
Kashyap gave me my first chance to lead a development team to implement
algorithms. David Zou was the first person to pay me for writing an article
($10 minus PayPal fees for 10 short movie reviews), and that felt so good, it
put me on a path to writing more. Aditya Date was the first person to sug-
gest that I write a book and gave me my first chance to do so.
I also received encouragement from many teachers and mentors. David
Cardon gave me my first chance to collaborate on academic research,
and taught me many things during that process. Bryan Skelton and
Leonard Woo showed me examples of what I wanted to grow up to be. Wes
Hutchinson taught me crucial algorithms, like k-means clustering, and
helped me better understand how algorithms work. Chad Emmett taught
me how to think about history and culture, and Chapter 2 is dedicated to
him. Uri Simonsohn showed me how to think about data.
Some people helped to make the process of writing this book a joy.
Seshu Edala helped me adjust my work schedule to be able to write, and
provided constant encouragement. Alex Freed was a joy to work with dur-
ing the editing process. Jennifer Eagar, via Venmo transfer months before
initial publication, unofficially became the first person to buy a copy of the
book; that was appreciated during a difficult time. Hlaing Hlaing Tun was
supportive, helpful, sweet, and encouraging at every step.
I cannot repay all of these debts of gratitude, but at least I can say thank
you. Thank you!
xiv Acknowledgments
Another random document with
no related content on Scribd:
fierce bark; but Juliet being absolutely fearless of animals,
spoke soothingly to him and patted his broad head,
whereupon his bark subsided into a whine, and he wagged
his stump of a tail.
CHAPTER III
A PEEP INTO BOHEMIA
"You are not going till you have had some tea, so
there," said Flossie imperiously. "Excuse me one moment."
And she disappeared.
"This is not the first time that I have had the pleasure of
seeing you, Miss Tracy," remarked Algernon Chalcombe.
"Flossie pointed you out to me at your school concert."
"Yes, so she told me," said Juliet hurriedly, blushing
deeply the next moment, as she remembered all Flossie had
said when she told her.
"Do you really mean it? And yet I am sure you are
musical."
"Oh yes, yes," said Juliet; "I have heard people play like
that."
"I will try, if you like," she faltered; "but you must
please go to the other end of the room and promise not to
listen."
"I think you must be, when you prophesy such things as
that for me," said Juliet, with a merry laugh.
"I have heard nothing," said Juliet. "I have never been
to the theatre or the opera in my life."
"No, thank you, my dear, no, thank you. Tea is all very
well for women-folks, but I like something stronger. Oh
dear, I am forgetting my letters! I must bid you good-day,
Miss Tracy. Now think over what I've said, and when you've
made up your mind, you come to me, and I'll put you in the
way of things. It's my belief that with proper training you
might soon be earning your thirty guineas a night, and
that's not a sum to be sniffed at, let me tell you."
CHAPTER IV
CONTRITION
It was always Salome who made the tea, and her tea
was excellent. She, indeed, attended generally to the
housekeeping. Carefully trained by the Scotch cousin in
whose home she had passed so many years, Salome had
developed into as notable a housekeeper as her teacher.
She was well versed in the niceties belonging to every
department of domestic management. Her jams were
always clear, her cakes light; her store cupboard never
seemed to get out of order, and it was a pleasure to look
into the linen-press, for Salome was a first-rate
needlewoman also, and prided herself on the way she
marked and kept the household linen.
"In one moment, dear," said her mother; "I must finish
this, now it is so nearly done."
Juliet was seated on her little bed. She had not removed
her hat, but it was thrust far back from the flossy curly
mass of sunny hair above her forehead. Dusty shoes still
covered the little feet, which she was swinging to and fro in
undesirable proximity to the spotless counterpane.
"Of course not. How could I know that you were sitting
on the bed till I opened the door? I came to ask if you really
would have nothing to eat. There are some nice fresh
scones downstairs."
"It would be a very good thing for her to leave home for
a time," said Hannah quietly. "It seems the only way of
withdrawing her from undesirable connections."
"Juliet," said Mrs. Tracy, when she had closed the door,
"I think you will break my heart."
"My dear, after what I said to you only the other day,
you must have known that I should very much dislike the
idea of your entering the Chalcombes' house."
"I don't agree with you, dear. The idea is not at all to
my mind."
"I daresay," said Mrs. Tracy, with a faint smile; "but you
are a long way from that at present, my child. I expect he
only said it to flatter you. You must not dream of being a
public singer, Juliet. I hate the idea of a public career for a
woman. The quieter and simpler her life, the happier she is,
as a rule."
"I don't think so," said Juliet, vexed that her mother did
not share her elation. "I know I am sick to death of the
quietness and simplicity of my life. Oh! what is the matter,
mother?"
"My head!" she moaned. "It has been aching all day, but
now the pain has grown almost unendurable. I believe I
shall have to go to bed."
"How did you manage to get all the things?" Mrs. Tracy
asked, with pleased curiosity.
CHAPTER V
A DISAGREEABLE PROSPECT
"AT last I have heard of the very thing for Juliet," said
Hannah, in tones of extreme satisfaction.
Mrs. Tracy looked up quickly from her needlework, her
face expressing some anxiety. Hannah had just returned
from an afternoon visit to the high school. It was a busy
time with the teachers, for the school year was drawing to
its close and the examinations were being held.
"I wonder what Juliet will say to it!" said Mrs. Tracy,
thinking aloud.
"Dear me! How very warm you all look!" she remarked
with the utmost sang-froid. "What agitating topic has
excited you so? You should really, from sanitary
considerations, avoid such discussions when the
thermometer stands at eighty degrees in the shade. I am
not surprised at you, mother darling; but I do wonder to
find Hannah and Salome showing so little good sense."