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

Algorithms on Trees and Graphs: With Python Code 2nd Edition Gabriel Valiente instant download

The document is about the second edition of 'Algorithms on Trees and Graphs: With Python Code' by Gabriel Valiente, which has been extensively revised and includes detailed pseudocode and Python implementations of algorithms. It covers various graph and tree algorithms, including isomorphism problems, traversal methods, and applications in computational biology. The book serves as a resource for graduate-level courses and includes updated bibliographic references and an enhanced index.

Uploaded by

hummusrotash
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 (2 votes)
46 views

Algorithms on Trees and Graphs: With Python Code 2nd Edition Gabriel Valiente instant download

The document is about the second edition of 'Algorithms on Trees and Graphs: With Python Code' by Gabriel Valiente, which has been extensively revised and includes detailed pseudocode and Python implementations of algorithms. It covers various graph and tree algorithms, including isomorphism problems, traversal methods, and applications in computational biology. The book serves as a resource for graduate-level courses and includes updated bibliographic references and an enhanced index.

Uploaded by

hummusrotash
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/ 46

Algorithms on Trees and Graphs: With Python Code

2nd Edition Gabriel Valiente download

https://ebookmeta.com/product/algorithms-on-trees-and-graphs-
with-python-code-2nd-edition-gabriel-valiente/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Applied Cryptography Protocols Algorithms and Source


Code in C 2nd Edition Bruce Schneier

https://ebookmeta.com/product/applied-cryptography-protocols-
algorithms-and-source-code-in-c-2nd-edition-bruce-schneier/

Learn OpenCV with Python by Examples Implement Computer


Vision Algorithms Provided by OpenCV with Python for
Image Processing Object Detection and Machine Learning
2nd Edition James Chen
https://ebookmeta.com/product/learn-opencv-with-python-by-
examples-implement-computer-vision-algorithms-provided-by-opencv-
with-python-for-image-processing-object-detection-and-machine-
learning-2nd-edition-james-chen/

Practical Channel-Aware Resource Allocation: With


MATLAB and Python Code Michael Ghorbanzadeh

https://ebookmeta.com/product/practical-channel-aware-resource-
allocation-with-matlab-and-python-code-michael-ghorbanzadeh/

Dewey for Artists 1st Edition Mary Jane Jacob

https://ebookmeta.com/product/dewey-for-artists-1st-edition-mary-
jane-jacob/
Oblivious A Contemporary M M Best Friends to Lovers Gay
Romance Novel 1st Edition Leslie Mcadam

https://ebookmeta.com/product/oblivious-a-contemporary-m-m-best-
friends-to-lovers-gay-romance-novel-1st-edition-leslie-mcadam/

Treatment of Voice Disorders Second Edition Robert


Thayer Sataloff

https://ebookmeta.com/product/treatment-of-voice-disorders-
second-edition-robert-thayer-sataloff/

Potential Exports and Nontariff Barriers to Trade


Maldives National Study 1st Edition Asian Development
Bank

https://ebookmeta.com/product/potential-exports-and-nontariff-
barriers-to-trade-maldives-national-study-1st-edition-asian-
development-bank/

Death Notice Zhou Haohui

https://ebookmeta.com/product/death-notice-zhou-haohui/

Come to Papa A Man of the Month Club Novella A Small


Town Age Gap Romance 1st Edition Matilda Martel

https://ebookmeta.com/product/come-to-papa-a-man-of-the-month-
club-novella-a-small-town-age-gap-romance-1st-edition-matilda-
martel/
Valiant Indian Warriors Philosophies, Approaches, and
Victories First Edition C. B. Bhange

https://ebookmeta.com/product/valiant-indian-warriors-
philosophies-approaches-and-victories-first-edition-c-b-bhange/
Texts in Computer Science

Gabriel Valiente

Algorithms
on Trees
and Graphs
With Python Code
Second Edition
Texts in Computer Science

Series Editors
David Gries, Department of Computer Science, Cornell University, Ithaca, NY,
USA
Orit Hazzan , Faculty of Education in Technology and Science, Technion—Israel
Institute of Technology, Haifa, Israel
More information about this series at http://www.springer.com/series/3191
Gabriel Valiente

Algorithms on Trees
and Graphs
With Python Code
Second Edition

123
Gabriel Valiente
Department of Computer Science
Technical University of Catalonia
Barcelona, Spain

ISSN 1868-0941 ISSN 1868-095X (electronic)


Texts in Computer Science
ISBN 978-3-030-81884-5 ISBN 978-3-030-81885-2 (eBook)
https://doi.org/10.1007/978-3-030-81885-2

1st edition: © Springer-Verlag Berlin Heidelberg 2002


2nd edition: © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Switzerland AG 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To my child Aleksandr,
six years old,
who is eager to grow
and read it all
Preface to the Second Edition

The first edition of this book has been extensively used for graduate teaching and
research all over the world in the last two decades. We have listed hundreds of
citing publications in Appendix C, including books, scientific articles in journals
and conference proceedings, M.Sc. and Ph.D. theses, and even United States
patents.
In this new edition, we have substituted detailed pseudocode for both the literate
programming description and the implementation of the algorithms using the
LEDA library of efficient data structures and algorithms. Although the pseudocode
is detailed enough to allow for a straightforward implementation of the algorithms
in any modern programming language, we have added a proof-of-concept imple-
mentation in Python of all the algorithms in Appendix A. This is, therefore, a
thoroughly revised and extended edition.
Regarding new material, we have added an adjacency map representation of
trees and graphs, and both maximum cardinality and maximum weight bipartite
matching as an additional application of graph traversal techniques. Further, we
have revised the end-of-chapter problems and exercises and have included solutions
to all the problems in Appendix B.
It has been a pleasure for the author to work out editorial matters together with
Sriram Srinivas and, especially, Wayne Wheeler of Springer Nature, whose
standing support and encouragement have made this new edition possible.
Last, but not least, any minor errors found so far have been corrected in this
second edition, the bibliographic notes and references have been updated, and the
index has been substantially enhanced. Even though the author and the publisher
have taken much care in the preparation of this book, they make no representation,
express or implied, with regard to the accuracy of the information contained herein
and cannot accept any legal responsibility or liability for incidental or consequential
damages arising out of the use of the information, algorithms, or program code
contained in this book.

Barcelona, Spain Gabriel Valiente


June 2021

vii
Preface to the First Edition

Graph algorithms, a long-established subject in mathematics and computer science


curricula, are also of much interest to disciplines such as computational molecular
biology and computational chemistry. This book goes beyond the classical graph
problems of shortest paths, spanning trees, flows in networks, and matchings in
bipartite graphs, and addresses further algorithmic problems of practical application
on trees and graphs. Much of the material presented on the book is only available in
the specialized research literature.
The book is structured around the fundamental problem of isomorphism. Tree
isomorphism is covered in much detail, together with the related problems of
subtree isomorphism, maximum common subtree isomorphism, and tree compari-
son. Graph isomorphism is also covered in much detail, together with the related
problems of subgraph isomorphism, maximal common subgraph isomorphism, and
graph edit distance. A building block for solving some of these isomorphism
problems are algorithms for finding maximal and maximum cliques.
Most intractable graph problems of practical application are not even approx-
imable to within a constant bound, and several of the isomorphism problems
addressed in this book are no exception. The book can thus be seen as a companion
to recent texts on approximation algorithms [1, 16], but also as a complement to
previous texts on combinatorial and graph algorithms [2–15, 17].
The book is conceived on the ground of first, introducing simple algorithms for
these problems in order to develop some intuition before moving on to more
complicated algorithms from the research literature and second, stimulating grad-
uate research on tree and graph algorithms by providing together with the under-
lying theory, a solid basis for experimentation and further development.
Algorithms are presented on an intuitive basis, followed by a detailed exposition
in a literate programming style. Correctness proofs are also given, together with a
worst-case analysis of the algorithms. Further, full C++ implementation of all the
algorithms using the LEDA library of efficient data structures and algorithms is
given along the book. These implementations include result checking of imple-
mentation correctness using correctness certificates.
The choice of LEDA, which is becoming a de-facto standard for graduate
courses on graph algorithms throughout the world is not casual, because it allows
the student, lecturer, researcher, and practitioner to complement algorithmic graph

ix
x Preface to the First Edition

theory with actual implementation and experimentation, building upon a thorough


library of efficient implementations of modern data structures and fundamental
algorithms.
An interactive demonstration including animations of all the algorithms using
LEDA is given in an appendix. The interactive demonstration also includes visual
checkers of implementation correctness.
The book is divided into four parts. Part I has an introductory nature and consists
of two chapters. Chapter 1 includes a review of basic graph-theoretical notions and
results used along the book, a brief primer of literate programming, and an expo-
sition of the implementation correctness approach by result checking using cor-
rectness certificates. Chapter 2 is devoted exclusively to the fundamental
algorithmic techniques used in the book: backtracking, branch-and-bound,
divide-and-conquer, and dynamic programming. These techniques are illustrated by
means of a running example: algorithms for the tree edit distance problem.
Part II also consists of two chapters. Chapter 3 addresses the most common
methods for traversing general, rooted trees: depth-first prefix leftmost (preorder),
depth-first prefix rightmost, depth-first postfix leftmost (postorder), depth-first
postfix rightmost, breadth-first leftmost (top-down), breadth-first rightmost, and
bottom-up traversal. Tree drawing is also discussed as an application of tree
traversal methods. Chapter 4 addresses several isomorphism problems on ordered
and unordered trees: tree isomorphism, subtree isomorphism, and maximum
common subtree isomorphism. Computational molecular biology is also discussed
as an application of the different isomorphism problems on trees.
Part III consists of three chapters. Chapter 5 addresses the most common
methods for traversing graphs: depth-first and breadth-first traversal, which
respectively generalize depth-first prefix leftmost (preorder) and breadth-first left-
most (top-down) tree traversal. Leftmost depth-first traversal of an undirected
graph, a particular case of depth-first traversal, is also discussed. Isomorphism of
ordered graphs is also discussed as an application of graph traversal methods.
Chapter 6 addresses the related problems of finding cliques, independent sets, and
vertex covers in trees and graphs. Multiple alignment of protein sequences in
computational molecular biology is also discussed as an application of clique
algorithms. Chapter 7 addresses several isomorphism problems on graphs: graph
isomorphism, graph automorphism, subgraph isomorphism, and maximal common
subgraph isomorphism. Chemical structure search is also discussed as an applica-
tion of the different graph isomorphism problems.
Part IV consists of two appendices, followed by bibliographic references and an
index. Appendix A gives an overview of LEDA, including a simple C++ repre-
sentation of trees as LEDA graphs, and a C++ implementation of radix sort using
LEDA. The interactive demonstration of graph algorithms presented along the book
is put together in Appendix B. Finally, Appendix C contains a complete index to all
program modules described in the book.
This book is suitable for use in upper undergraduate and graduate level courses
on algorithmic graph theory. This book can also be used as a supplementary text in
basic undergraduate and graduate level courses on algorithms and data structures,
Preface to the First Edition xi

and in computational molecular biology and computational chemistry courses as


well. Some basic knowledge of discrete mathematics, data structures, algorithms,
and programming at the undergraduate level is assumed.
This book is based on lectures taught at the Technical University of Catalonia,
Barcelona between 1996 and 2002, and the University of Latvia, Riga between
2000 and 2002. Numerous colleagues at the Technical University of Catalonia have
influenced the approach to data structures and algorithms on trees and graphs
expressed in this book. In particular, the author would like to thank José L. Bal-
cázar, Rafel Casas, Jordi Cortadella, Josep Daz, Conrado Martnez, Xavier Mes-
seguer, Roberto Nieuwenhuis, Fernando Orejas, Jordi Petit, Salvador Roura, and
Maria Serna, to name just a few. It has been a pleasure to share teaching and
research experiences with them over the last several years.
The author would also like to thank Ricardo Baeza-Yates, Francesc Rosselló,
and Steven Skiena, for their standing support and encouragement, and Hans-Jörg
Kreowski, for supporting basic and applied research on graph algorithms within the
field of graph transformation. It has been a pleasure for the author to work out
editorial matters together with Alfred Hofmann, Ingeborg Mayer, and Peter Straßer
of Springer-Verlag. Special thanks are debt to the Technical University of Catalonia
for funding the sabbatical year during which this book was written, and to the
Institute of Mathematics and Computer Science, University of Latvia, in particular
to Jānis Bārzdiņš and Rūsiņš Freivalds, for hosting the sabbatical visit.

Barcelona, Spain Gabriel Valiente


July 2002

References

1. G. Ausiello, P. Crescenzi, G. Gambosi, V. Kahn, A. MarchettiSpaccamela, and M. Protasi.


Complexity and Approximation: Combinatorial Optimization Problems and their Approx-
imability Properties. Springer-Verlag, Berlin Heidelberg, 1999.
2. G. Chartrand and O. R. Oellermann. Applied and Algorithmic Graph Theory. McGraw-Hill,
New York, 1993.
3. N. Christofides. Graph Theory: An Algorithmic Approach. Academic Press, New York, 1975.
4. S. Even. GraphAlgorithms. Computer Science Press, Rockville MD,1979.
5. A. Gibbons. Algorithmic Graph Theory. Cambridge University Press, Cambridge, 1985.
6. M. C. Golumbic. Algorithmic Graph Theory and Perfect Graphs. Academic Press, New York,
1980.
7. D. L. Kreher and D. R. Stinson. Combinatorial Algorithms: Generation, Enumeration, and
Search. CRC Press, Boca Raton FL, 1999.
8. J. van Leeuwen. Graph algorithms. In Handbook of Theoretical Computer Science, volume A,
chapter 10, pages 525-631. Elsevier, Amsterdam, 1990.
9. J. A. McHugh. Algorithmic Graph Theory. Prentice Hall, Englewood Cliffs NJ, 1990.
10. K. Mehlhorn. Graph Algorithms and NP-Completeness, volume 2 of Data Structures and
Algorithms. Springer-Verlag, Berlin Heidelberg, 1984.
11. K. Mehlhorn and S. Naher. The LEDA Platform of Combinatorial and Geometric Computing.
Cambridge University Press, Cambridge, 1999.
xii Preface to the First Edition

12. C. H. Papadimitriou and K. Steiglitz. CombinatorialOptimization: Algorithms and Com-


plexity. Dover, Mineola, New York, 1998.
13. E. M. Reingold, 1. Nievergelt, and N. J. Deo. Combinatorial Algorithms: Theory and
Practice. Prentice Hall, Englewood Cliffs NJ, 1977.
14. S. Skiena. The Algorithm Design Manual. Springer-Verlag, Berlin Heidelberg, 1998.
15. R. E. Tarjan. Space-efficient Implementations of Graph Search Methods. ACM Transactions
on Mathematical Software. 1983 9(3), 326–339
16. V. V. Vazirani. Approximation Algorithms. Springer-Verlag, Berlin Heidelberg, 2001.
17. H. S. Wilf. Combinatorial Algorithms: An Update. SIAM, Philadelphia PA, 1989.
Contents

Part I Introduction
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Trees and Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Basic Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3 Representation of Trees and Graphs . . . . . . . . . . . . . . . . . . . . . . 23
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2 Algorithmic Techniques . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 45
2.1 The Tree Edit Distance Problem . . . . . . . . . . . . . . . . . . . . . . . . 45
2.2 Backtracking . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 55
2.3 Branch-and-Bound . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 61
2.4 Divide-and-Conquer . . ........ . . . . . . . . . . . . . . . . . . . . . . . 64
2.5 Dynamic Programming ........ . . . . . . . . . . . . . . . . . . . . . . . 70
Summary . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 77
Bibliographic Notes . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 77
Problems . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 78
Exercises . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 79
References . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . 80

Part II Algorithms on Trees


3 Tree Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.1 Preorder Traversal of a Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.2 Postorder Traversal of a Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.3 Top-Down Traversal of a Tree . . . . . . . . . . . . . . . . . . . . . . . . . 94
3.4 Bottom-Up Traversal of a Tree . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

xiii
xiv Contents

Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4 Tree Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4.1 Tree Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4.1.1 Ordered Tree Isomorphism . . . . . . . . . . . . . . . . . . . . . . 113
4.1.2 Unordered Tree Isomorphism . . . . . . . . . . . . . . . . . . . . 116
4.2 Subtree Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
4.2.1 Top-Down Subtree Isomorphism . . . . . . . . . . . . . . . . . . 125
4.2.2 Top-Down Unordered Subtree Isomorphism . . . . . . . . . 127
4.2.3 Bottom-Up Subtree Isomorphism . . . . . . . . . . . . . . . . . 135
4.2.4 Bottom-Up Unordered Subtree Isomorphism . . . . . . . . . 138
4.3 Maximum Common Subtree Isomorphism . . . . . . . . . . . . . . . . . 144
4.3.1 Top-Down Maximum Common Subtree
Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
4.3.2 Top-Down Unordered Maximum Common Subtree
Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4.3.3 Bottom-Up Maximum Common Subtree
Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.3.4 Bottom-Up Unordered Maximum Common Subtree
Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Part III Algorithms on Graphs


5 Graph Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
5.1 Depth-First Traversal of a Graph . . . . . . . . . . . . . . . . . . . . . . . . 183
5.1.1 Leftmost Depth-First Traversal of a Graph . . . . . . . . . . . 190
5.2 Breadth-First Traversal of a Graph . . . . . . . . . . . . . . . . . . . . . . . 193
5.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Contents xv

6 Clique, Independent Set, and Vertex Cover . . . . . . . . . . . . . . . . . . . 219


6.1 Cliques, Maximal Cliques, and Maximum Cliques . . . . . . . . . . . 219
6.2 Maximal and Maximum Independent Sets . . . . . . . . . . . . . . . . . 234
6.3 Minimal and Minimum Vertex Covers . . . . . . . . . . . . . . . . . . . . 239
6.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7 Graph Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.1 Graph Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.1.1 An Algorithm for Graph Isomorphism . . . . . . . . . . . . . . 257
7.2 Graph Automorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
7.3 Subgraph Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
7.3.1 An Algorithm for Subgraph Isomorphism . . . . . . . . . . . 266
7.4 Maximal Common Subgraph Isomorphism . . . . . . . . . . . . . . . . . 270
7.4.1 An Algorithm for Maximal Common Subgraph
Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
7.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Bibliographic Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

A: Implementation of the Algorithms in Python . . . . . . . . . . . . . . . . . . . . 287


B: Solutions to All Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
C: Citing Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Part I
Introduction
Other documents randomly have
different content
once by the city gate to look back at the house which I had left. A
picture came into my eye of the relentless woman who had told me
news that was bitter as wormwood; yet she was kind and
considerate withal. I turned away and set my face towards the
sighing woodland.
I threw myself down on my back beneath an oak tree. There was
a small patch of blue sky visible, and now and then a bird swam
lazily across it. Did I fall asleep and dream, or did I rise and walk
about unconsciously? I do not know much of what I did; but soon I
was walking. I was not aware of the exact moment when I began to
move, nor how long I had been winding my way in and out among
the trees when the sound of sobbing grew upon my ears. It startled
me and I began to look around and to follow the sound without
knowing just where I went, in that vague way one is so used to in
dreams. Soon I came upon a woman kneeling in the grass. She was
very beautiful and my heart went out to her for she was weeping
bitterly and seemed in great distress. My appearance must have
scared her for she hastily covered something upon the ground and
then sprang up in great alarm. She was dressed in a white robe that
floated about her like an angel. For just a moment she let me see
her sweet tear-stained face; then she was gone. Her dark hair and
sorrowful expression made such a lifelike impression upon me that I
almost thought it could not be a dream. Yet in a moment she had
vanished like a breeze. Near the spot where she had stood the grass
curved upward over a small mound. I drew near to examine what
from its appearance I thought should be a grave.
When I first came upon the woman she made a hasty move to
cover something upon the ground. At the head of the grave I spied a
loose sod which I lifted. Beneath it was a flat stone inscribed with
the one word “Ruth.” I fell on my knees and wept. Surely God had
sent me a vision! I lay full length on the grave, kissing the cold stone
and plucking blades of grass to strew upon it in place of flowers.
How I thanked God for this dream! He had led me into green
pastures. Thy rod and Thy staff, O God, they comfort me!
Suddenly the visitant reappeared.
“Sir,” she said. “You are in sore trouble.”
I pointed to the grave. “She was my sister.”
She was startled by this and eyed me with a doubtful anxious
look. I cannot recall what she said to me, but after a while she
opened the bosom of her robe, whence she drew forth a small ivory
miniature enclosed in a gold rim.
“See; your sister wore it before she died.”
I looked. It contained the counterfeit of my own face, like one I
had given Ruth upon the ocean. God is merciful, but His mercies are
quick to come and go. The vision disappeared; yet its blessed
presence had made me feel that I had stood close in Ruth’s heart to
the very end of her life even as she had stood in mine.
There follows a blank space in my memory during which I can
remember nothing. The trees at last seemed to force themselves
into my consciousness again. They tramped by me in an endless
procession. I grew cold and began to shiver. A sharp pricking
attacked my legs. I looked down to discover the cause of this
sensation and saw that I was standing in water up to my knees. Like
a flash it all came over me; I had been walking in my sleep.
I waded back to the shore and sat down to think. The place was
all new to me, I had not the least idea where I was. A narrow rim of
gravely beach encircled the little lake into which I had stumbled; but
this told me nothing, nor could I see the least sign of a path. So,
after a few moments, I got up to walk around in the hope of
discovering some beaten path that would lead me out of the woods.
As I walked I kept dwelling upon what I had seen in my dream. It
never occurred to me that perhaps I had seen a real person. To be
sure, my memory was so vivid that I was tempted to say: “How
could it be a dream?” For all that, I never doubted that it was a
supernatural appearance. My only thought was that our Heavenly
Father had sent me this in my distress to comfort me, and to assure
me that Ruth’s last thoughts were of me, and that she still watched
over me in heaven as on earth.
As I said, when I came to myself in the water I was in full
possession of my wits though I did not recognize where I was. I had
wandered into a narrow lake whose cold water had chilled me into
consciousness. I waded back to the shore and set out along the
ribbon of pebbly beach, hoping to find a path. The trees were close
together, overhanging the steep bank. By this time I must have been
abroad in the woods for some hours for it had now become dark and
the moon was up. It was not long before I discovered an ascending
footpath, very narrow, and cut in steps up the bank. From the top of
the cliff to which this path led, the ground sloped gently through the
woods towards the north. The trees became more and more thinly
scattered as I went forward. Soon I was aware of a reddish glow in
the branches ahead of me. As I drew near the light became brighter
and flickered like a fire. Sharp sounds of clanking metal fell upon my
ears and, from time to time, a quick word or two of command in a
ringing voice.
Twenty steps farther brought me to where I could see the source
of the light and sound. The woodland ended at a level, grassy plain
that extended a quarter of a mile towards a towered building, a
huge pile of shadows and dim walls. At regular intervals before it
were planted burning cressets. They were arranged in a large square
on the lawn so as to send their vagrant lights and shadows dancing
over its gloomy walls. A company of men stood motionless within
the square of torches, like troops in regular order. Suddenly another
sharp word of command broke the stillness. A sparkling flash from
every man showed, what I had not noticed before, that each man
was armed with a sword. I looked close for the commander; but not
till he spoke a second time could I make out his position on a terrace
in front of the house. I started violently when my eyes fell upon him.
The leader of this band of troopers was Kilian Van Volkenberg. I had
come upon the Red Band at drill in the dark woods at night. “The
patroon and his Red Band will ruin this city yet,” the dominie had
said to me. A hundred or more of his armed men were now before
me. Surely this was a dangerous gathering! They were well-armed
and perfectly drilled like the regular soldiers of the king.
The host at Gravesoon had spoken of Van Volkenberg as the
Armed Patroon. Now I understood the meaning of the term, though
I did not know till later that he was the only patroon in New York
who had organized his retainers into a regular military band. No
wonder the authorities looked askance upon this new departure in
the province, and feared a serious clash between him and the
governor. How just these fears were will soon become apparent; but
at that time I was so ignorant of affairs that I thought this company
—so suggestive of European customs—quite an ordinary sight.
While I stood in the shadow of the trees, gazing upon this group
of soldiers, a woman came out of the house upon the platform.
Though I could not see her face at first because of the shadow
where she stood, most of her body was in the compass of the light.
She was dressed in white and, like me, watching the drilling of the
Red Band. After ten minutes had elapsed, she stepped forward and
touched the patroon upon the arm. When the light fell upon her face
I was startled into a cry of recognition that would have betrayed my
presence had the troopers been alert for signs of intrusion. She was
the woman who had appeared to me in my dream.
The patroon turned to her and made an angry gesture to depart.
She withdrew into the house immediately and I saw no more of her.
When the company of soldiers broke up for the night, they
disappeared right and left, passing around and behind the house.
Van Volkenberg entered the manor-house by the same door through
which the woman had retreated. From what I had been told about
the position of the manor I was able to find without difficulty the
road that led to New York. As I walked along it my mind was full of
the mystery of the strange woman I had seen upon the terrace, and
of her I had seen in my dream. Had I really met some one, and had
I been but partly conscious of the fact? I could not tell. Of one thing,
however, I was aware. My spirit had returned to me. As Lady
Marmaduke would have said, I was a man again. I was now firm
with determination. I had been through the valley of the shadow. I
had come out with new strength ready to fight the good fight. I felt
myself to be God’s avenging minister, destined to bring punishment
upon my sister’s murderer. I knelt down in the dusty road, where I
prayed to God for power and guidance. I rose from my prayer
buoyant and eager in spirit.
Still I could not get my mind away from the woman. Were they
one and the same person or had I made a mistake? The woman
upon the terrace must have been the person Captain Tew had
spoken of as Miriam Van Volkenberg. But if she was the patroon’s
daughter, how came she to figure in my dream? What trick of fate
had coupled her and Ruth and me together in this fashion? Then I
recalled what Pierre had said: That the patroon’s daughter had loved
Ruth and had been treated badly on account of her affection. That
seemed to explain the fitness of it all, but it did not reconcile the
reality with the dream.
In this frame of mind I approached New York. I continued to
ponder that sweet, wistful face. Gradually, as I walked along in the
dust and dark, I became aware of a narrow pressure about my neck.
I put up my hand and touched a strange piece of ribbon. I caught at
it in surprise. My fingers closed on a small locket. I held it before me
in the moonlight. It was the ivory miniature in a gold rim; the very
picture of myself that the woman had shown me in my dream. Then
I understood. I had met Miriam Van Volkenberg in the woods. She
had recognized me from the picture in the locket and had given me
this keepsake from my sister.
CHAPTER X
MY FIRST COMMISSION

When I returned to Marmaduke Hall I found every one in bed


asleep except a lad who had been left to attend me to my room. He
informed me that his mistress had been impatient at my absence,
had inquired again and again where I could be, and at last had given
up waiting for me, very much vexed at my failure to return.
“She was in a great state to see you,” said the lad, “and she left
word for you to be at her breakfast table early, by nine o’clock.”
In spite of the fatigue of my wanderings, I was awake betimes.
While the clock was still striking nine I entered the dining hall. Lady
Marmaduke sat alone at a table in an alcove that opened out of the
main room. When she rose to greet me, which she did cordially, I
noticed that she held a sheet of paper in her hand.
“If this letter from his Excellency,” she said, pointing to the paper
in her hand, “had not arrived before you did, you would have tasted
of my tongue. I had a round scolding ready for you, but this letter
shall give you a chance to explain yourself.”
She was playful in her manner, yet I could see that she had been
considerably put out by my absence the night before. I made haste
to acquaint her with my story, though I said nothing of the
mysterious woman I had seen.
“Ah, Michael,” she said when I was done. “I forgive you and you
must forgive me for being angry with you. Yet I had better cause
than you think. Listen to this passage from the governor’s note
which came to me less than an hour ago.
“‘Fortune seems to smile graciously upon us. The ship came no
nearer shore, nor did any of its crew condescend to visit the town.
Perhaps they have concluded to wait till to-night.’
“Do you understand that, my Michael? A strange ship has
anchored in the lower bay. It is probably a pirate ship and Earl
Richard and I had planned to have you watch it; but when I came
home you were not to be found. However, it has turned out all right
after all.”
She glanced out of the window, but soon resumed her speech.
“You know of course that the buccaneers are forbidden the use of
the port. Van Volkenberg has much dealing with them. This fact I
know but we cannot prove it. Oh, if we could only trap him once in a
secret meeting! We want a handle against him.” She brought her fist
down on the table with a blow that made the dishes rattle. “I tell
you we must have a handle against the scoundrel or we can do
nothing. You need not look so amazed; but I forget how ignorant
you are. We are to meet the Earl at eleven o’clock. I must give you a
lesson in affairs so that you will know what we are talking about.
You remember Fletcher? He was the man you saw with the patroon
at the coffee-house. He was the former governor and a worse
wretch never walked the streets of Yorke. The pirates bribed him,
and the merchants bribed him, and he bribed them back for he was
sore in need of friends. Then, to curry himself into further favor, he
began to deal out the land of the province. He gave a hundred
square miles to William Pinhorne to make him a patroon in the
Mohawk valley. He sold both sides of the Hudson River as far north
as Albany. There is hardly a square mile in the whole province that
can be bought honestly for love or money.”
I interrupted her to ask information concerning the geography of
the province, for I was as ignorant of that as of affairs. When she
had satisfied my curiosity she continued.
“That is why the king appointed another governor. As soon as
Fletcher heard of this check upon his practices, he showed his
knavery in a new light. He leased the King’s farm, which should by
right go to the support of Earl Richard’s household. He gave the
center of the island to Van Volkenberg so as to have a friend near at
hand. The dog had the impudence to title the patroon with this very
house. This estate was deeded to my husband during his lifetime,
and Fletcher gave it to the patroon from the day of his death,
notwithstanding the fact that Sir Evelin was alive at the time of the
grant. Earl Bellamont has reversed the grant and only yesterday, the
first day of the new Assembly, this estate was given to me and my
heirs forever. Van Volkenberg swears he will have it yet if he has to
fight for it. We shall see about that.”
A servant came to the door to take orders for my lady’s coach.
She told him to have it ready before eleven, as she intended to wait
upon the Earl at that hour.
“Bellamont prides himself on his gentle blood,” she continued as
soon as the servant had left us alone. “But it is a great clog to him at
times. It was all I could do to get him to permit you to watch
secretly upon the strange ship that has come into the bay. He is
greatly addicted to open means and he said that it would be taking
an unfair advantage to spy on people of whom we knew no absolute
harm. But I urged necessity and told him flatly that if he did not I
should commission you to do it myself. That fetched him. In spite of
his fine blood he is jealous withal. The very idea of someone plotting
without his help sets him on end with curiosity. Mark my word,
before we are done with this affair we shall have to jog our own gait
if we are to jog at all. You must fight a rogue with a rogue’s tricks.
Never forget that. However, we must be careful not to ruffle the Earl
and not to set his jealousy agog.”
A little later I was booted and spurred and ready to ride at the
side of my mistress’s coach. We set out, accompanied by her
numerous retinue of state. At every street corner we were greeted
with cheers, for the common people loved her well. I noticed that
more than one of the persons we passed on the way showed
surprise in his face at seeing a well-mounted stranger in the place of
honor by the coach. We passed the Jacobite Coffee-House and
among those who stood upon the upper balcony to see us pass was
the patroon. He frowned sullenly in answer to Lady Marmaduke’s
dignified bow of recognition, which sign of displeasure caused her to
break into merry laughter.
“I shall drive the old fox into his hole yet,” she said in an
undertone, when we had passed the tavern. “But he is a crafty old
fox. No one can deny that.”
At the outer entrance of the fort I dismounted and led Lady
Marmaduke through the stone arch and across the paved court to
the governor’s mansion.
“The Earl was struck with your hatred of the patroon yesterday,
even before I told him the story about Ruth,” whispered Lady
Marmaduke. “Do not be too nice about accepting his commissions.
He will be glad of whatever you do, though he may not altogether
approve in advance. His great fault is in delay. Sometimes he gets
stirred up and acts like a whirlwind, but generally he wastes time by
waiting for a better chance. I have persuaded him this time; that is,
if he has not cooled over night.”
Lady Marmaduke explained to the Earl in a few words whatever
was necessary to account for my non-appearance the night before.
He then proceeded to interrogate me closely about all that had
passed between me and Captain Tew.
“You see, Monsieur Le Bourse, these enormous tracts of land that
have been granted by my predecessor in office must be annulled or
the proper revenues cannot be forwarded to my royal master, his
majesty, the King.”
“Your own table cannot be furnished either,” added Lady
Marmaduke, “unless you get back the King’s farm.”
“Quite true, but that is a small matter compared with what is due
to my beloved King and master. I well remember the day on which
he informed me of the high honor he had conferred upon my
unworthy self, which fact he graciously made known to me with his
own royal lips. ‘Richard,’ he said, 'you have used your sword well for
me. Now, I want you to use your head. These enormous grants by
Fletcher must be annulled. But it must be done legally; I will not
have a bad example set in the use of the law. I have implicit trust in
you.'”
“Indeed, your Excellency,” broke in Lady Marmaduke. “I wish he
had shown that trust to a little more practical advantage. He might
have given you more power to act for yourself.”
“I am somewhat restricted,” replied the Earl. “Beshrew me! That is
an ungracious reflection. The King has planned all for the best.
Though I must report to his council for approval, the delay gives me
all the more opportunity to make certain, to collect more weighty
evidence. I wish I could utilize this matter with Tew. I shall not,
however, lest I compromise Monsieur Le Bourse.”
“The transaction is so old I don’t believe it would do us much
good,” said Lady Marmaduke.
“I have no doubt but that we shall soon stand on firmer ground,”
continued the governor. “Has Lady Marmaduke informed you of what
I intend you to do?”
“In part,” I answered.
“The matter as it stands at present is as follows. At noon
yesterday a ship was sighted coming into the bay. As is our custom
always upon the arrival of a ship, a welcome gun was fired from the
Battery. Instead of coming up to the city like an honest trader, the
ship cast anchor and has remained in one place ever since. She is a
suspicious looking craft, probably a buccaneer who is afraid to enter
the port now that the laws are so stringent against them. It may be
one chance in a hundred—”
“I should say one in ten or two,” interrupted Lady Marmaduke.
“By your gracious leave,” answered the Earl with a courtly bow.
“The chances are even that the ship is here to communicate with
Patroon Van Volkenberg. If you are willing to help me, what I want
you to do is this: To be ready at a moment’s notice to keep an eye
on any sailors who may put off from the ship, for the purpose of
coming into the town. I shall cause a sharp lookout to be kept and
send you instant notice of their arrival.”
We soon made all the necessary arrangements in order to carry
out this plan. The Earl did not expect any one to come ashore from
the stranger ship before night. He knew, however, that I should be
prepared to act quickly when the moment for action came. He gave
me a key that would enable me to come and go in the fort at will,
but told me not to make use of it unless in absolute necessity. He
also gave me another key to the private postern that opened
through the wall of palisades on the west side of the city next the
Hudson River. I had a few additional preparations to make on my
own account and engaged, when they were done, to remain at
Marmaduke Hall till sent for by the Earl. I attended Lady Marmaduke
back to her coach and bade her farewell for the time being at the
gate of the fort.
“I have business on the Slip,” I said when she was seated.
Her eyebrows lifted in curiosity. “What is it?” she asked.
I wondered to myself who was jealous now of plotting without her
knowledge.
“I must learn my way about the city.”
“Nothing else?”
“And obtain some sort of disguise.”
“Anything else?”
“That is all I think of.”
“Ah, very well. Be back in time to dine with me. I do not like to sit
alone when there is news in the air.”
We set out on our several ways. I had not felt in such good spirits
for many a day. The likelihood of danger, the opportunity to do
something, above all, a good horse between my legs, put me in
countenance again and joyed me in spite of fate.

Pierre, my acquaintance of the day before, was a barber. I set out


for his shop immediately upon leaving Lady Marmaduke. I found him
alone and explained to him that I was employed on important
business, and that he must make haste to procure me a suit of
clothes in which I could disguise myself as a sailor. Instead of setting
about the task which I thus imposed upon him, he made a comical
gesture of dismay and stood fast where he was.
“It’s of no use,” he said. “The Red Band will see me. They watch
everywhere. If they see me buying clothes and get a look at what
they are like, where will be the use of the disguise?”
I reflected a moment, for what he said had some show of truth in
it. After a moment’s thought, however, I concluded that his fears
were idle.
“Pish, Pierre! You are too cautious. Do as I tell you.”
“I tell you it cannot be done. They have their eye on you; and now
that you have come here they will have their eye on me. What did I
tell you?”
At that moment, a sailor of the Red Band entered the shop and
asked to be shaved. Pierre tried not to look surprised as he set about
the task. Once, when he stood with his razor in the air, I saw the
fellow’s cheek go white as the lather itself. Perhaps he was thinking
of what might happen if Pierre suspected what had really brought
him into the shop. A person while being shaved is in an ill position to
defend himself if the barber is murderously inclined. For all that, I
set the fellow down as a bully and a coward. The change in his face
convinced me beyond a doubt that he had come there to spy. It
confirmed what Pierre had said a moment before concerning the
watchfulness of the Red Band; and it was not to be long before I
should have another example of their alert interest in my affairs.
When Pierre had finished shaving his customer, the man arose and
adjusted his neckband slowly. Then he tossed a coin into the corner.
I soon saw that this was but a ruse to get Pierre out of the way for
the visitor had a word to say to me. Pierre went after the coin, which
rolled into the farthest corner. The sailor, as he passed me on the
way to the door, said in a low voice,
“The Red Band is not asleep. Beware.”
“Ay, beware!” I flung back into his teeth as he went out of the
shop.
“I told you it would not do,” said Pierre, when I informed him of
this little episode. He put the coin into his mouth and bit it. “This is
good money. That is more than I expected. Now what do you intend
to do?”
I confessed that I was wholly at a loss and should depend upon
his judgment this time.
“Then I shall help you out. I have the very thing you want up
stairs.”
“Why did you not say so at first?”
Pierre laughed. “You said that I must go out and buy it and I
wanted to convince you that you were wrong first.”
It was now my turn to laugh at Pierre’s manner of doing things. I
bade him take his own way of procuring what I wanted. He wrapped
up some clothes and a couple of pistols in a bundle, telling me that,
as a rule, sailors did not wear cutlasses when they came ashore. The
custom was falling out of use now that the laws against the
buccaneers had become so strict.
“The Red Band always wear swords,” added Pierre. “That is
another reason why I wouldn’t if I were you.”
Pierre promised to take the clothes to Marmaduke Hall within the
hour. I left him engaged busily in his shop, and rode forth into the
town in order to acquaint myself as perfectly as possible with the
crooked streets. I had occupied enough time in this examination of
the city when I turned my steps homeward. I was walking my horse
slowly up the steep hill of Petticoat Lane when I heard a cry of
distress ahead of me. Three men were having a sharp scuffle over
the possession of a bundle. One of the men was Pierre, and I knew
the bundle must be my disguise. I must protect it at all hazards, for
each of the other two wore the red band upon his sleeve. I dashed
spurs into my horse’s side. In two minutes I had ridden down one of
the men, and with a blow of my fist sent the other sprawling in the
mud. Pierre caught up the bundle and scuttled away so quickly that I
hardly knew which way he had gone. I drew my sword and
dismounted.
“Get up,” I said sharply to the fellow I had knocked down—the
other had already stumbled to his feet, but he was not good for
much. “Get up,” I repeated, “or someone will think he has found the
Red Band asleep.” He got upon his legs, grumbling and looking
sourly at me. “Beware,” I said, as they turned away. “Eat your own
word, beware.” This fellow was the very one who had defied me in
Pierre’s shop. “Beware,” I called after him again, for they made such
good use of their legs that by this time they were the width of the
street away from me.
When they were gone I continued my journey, much impressed by
this example of their watchfulness. I was not cast down by it,
however, though I mused so deeply on the event that I lost my way.
Before I knew it, I found myself again in the center of the town. I
took my bearings afresh and started back, this time meeting with no
further confusions on the way. While passing the Ferry-House, I
remembered that I had not returned there the night before to
occupy the room I had engaged. I dismounted and entered the
ordinary to find the landlord and settle my score. I was surprised to
see Pierre at one of the tables drinking. As soon as I had settled the
reckoning I went across the room to speak to him.
“They didn’t see it,” he said significantly. “It is in your room and
you can wear it safely”. He told me how he had been surprised and
set upon suddenly in the street. “You were just like Lady Marmaduke
coming along when I was ducked. That wine! Don’t tell me there is
no such thing as luck!”
I told Pierre that for the rest of the day he must hold himself in
readiness to do my bidding. “Yes,” I answered to a question he
asked. “Yes, it is against him, and you must keep yourself sober.”
Pierre tilted up his tankard and began to pour the beer in a small
stream upon the sanded floor.
“I hate to let it go,” he said, disconsolately. “But if it is against
him, I had rather keep sober.”
He looked wistfully at the floor where the beer had drained off into
a thick layer of sand, leaving on the surface only a shrunken mass of
breaking bubbles.
“Ah me!” sighed Pierre, rising. “I’ll wait in the Marmaduke kitchen.
I hope they won’t offer me wine. It would bring tears to my eyes.
But I’ll keep sober, never fear.”
I was sitting in my little gable room late that afternoon when I
received a summons from Lady Marmaduke to attend her. She
wanted to know whether I should like to go with her on her daily
round of inspection of the offices. I was indeed glad of the
opportunity. We visited the kitchens first, which were large and well
appointed. Marmaduke Hall, from top to bottom, contained fully two
score of people, and all the cooking for this numerous household
was done here. Beyond the kitchen, in a bare, clay-floored
outbuilding was a row of great iron pots, each one of which was
large enough to boil an ox whole. Into one of them, beneath which
roared a huge fire of logs, the servants were lowering some bags of
food that were to be boiled for the live stock. I watched the process
with interest. When the ponderous iron lid, which rose and fell by
means of a pulley and chain, was put in place, the steam jetted out
on all sides of it, rocking the lid with a loud clatter, and spurting from
under the edge like the spokes of a wheel.
We passed thence to the dairy. Then we examined the stables and
various other offices in succession till we reached the kennels. The
thirty or more hounds barked and yelped at the appearance of their
mistress. She patted them in turn and then we passed on.
“You may wonder at my attending to such things myself,” she said
to me when we had returned to the Hall. Then she sighed. “I try to
do everything myself just as Sir Evelin used to do.”
She fell into a reverie and did not seem to notice when I left her.
With one thing and another I whiled away the time till dinner was
over, and it had fallen quite dark outside. Then, just as I was
beginning to grow impatient, came the summons from the Earl. It
was but a line and was dated from the fort at half past seven.
“Four suspicious looking sailors have just proceeded to the Ferry-
House. I think they are the men we spoke of. You will watch them
and report as soon as possible.—Bellamont.”
I slipped on my disguise, thrust the two pistols Captain Tew had
given me into my belt, and, taking Pierre with me, set out through
the dark streets to the tavern.
CHAPTER XI
THE ESCAPE FROM THE RATTLE-WATCH

Within a few minutes after leaving Marmaduke Hall I arrived at the


Ferry-House alone, having stationed Pierre in a dark court-yard
across the street. I looked in through the door and saw the four
sailors huddled close together around one of the tables. They talked
in careful whispers with their heads close together as men are wont
to do when they are engaged in underhand business. From time to
time they glanced uneasily about the room, as if they thought that
someone should be watching. When I came near them, they seemed
to suspect my presence in the first breath. I tried to draw them into
conversation, but succeeded no better than if I had spoken in a
foreign tongue. One after another of them, as he could find an
opportunity, managed to slip away to some other part of the room;
soon I was sitting quite lonely and deserted at the table where I had
joined them. They, however, had their heads close together again
and were in conversation in another part of the room. I made a feint
at yawning, put my feet on the table, folded my hands, and in five
minutes, for all they knew, I was fast asleep. In reality, I was
listening with both my ears and squinting through my half shut eyes
to see what they were doing.
They took care at first that I should not hear a word of what they
said; but by degrees, thinking, I suppose, that I was asleep, they
grew more careless in their speech. For all that, I could learn only
that they were to keep an appointment somewhere at nine o’clock
that night. They glanced often and so anxiously at the clock that I
knew the meeting must be of considerable importance. Before long
they ceased talking altogether; then they fell to dozing in their
chairs.
When I saw that they were not likely to notice my absence, I left
the room. I walked along Garden Street towards the new Dutch
church for the distance of fifty yards; then I crossed to the shadow
side of the thoroughfare and retraced my steps. Opposite the Ferry-
House is a narrow alley that leads into a court-yard. It was in this
passage, dark as pitch, that I had stationed Pierre. I turned in when
I reached the entrance along which I groped my way with one hand
on the wall and the other raised to shield my face.
“St,” I said cautiously. Pierre answered with the same signal. I
took two more steps in the dark, and then my outstretched hand
touched him.
“Pierre,” I said. “They are in there, but I cannot make them say a
word. Go quickly and rouse the rattle-watch. These fellows must be
taken up. I’ll make some sort of disturbance against your coming
back to color the arrest with. As soon as the watchmen have started,
run as fast as your legs will carry you and let me know that they are
on the way.”
When Pierre set out along Broad Street, I returned to my seat in
the ordinary where I intended to resume my watch till his return. My
absence, I thought, had not been noticed by the sailors. I settled
myself quietly, well satisfied with the way things were going.
Nothing, however, was further from my intention than my proposal
to arrest these men. In fact, I intended to outwit the rattle-watch,
notwithstanding the fact that I had summoned it.
By the time Pierre returned all out of breath to announce the
approach of the watch, the clock had crept round to half past eight.
The officers of the watch, Pierre informed me, were not more than
the space of two streets away. I rose instantly and approached the
sailors.
“May I speak to you a moment?” I said in feigned excitement to
him who seemed to be their leader. He arose, rather fearful, as if he
shared my assumed alarm, and stepped with me towards the corner
of the room. I said to him: “You come from the ship that anchored in
the lower bay yesterday?”
“Who told you?” he blurted out. Then, seeing that he had made a
mistake, he blundered still further in his attempt to contradict
himself. “No, by God, we don’t!”
“I thought so,” I answered, for his manner said “Yes,” though his
words said “No.” I continued: “Is it a free-trader?”
The fellow turned white, his lips quivered, and his hand sought the
butt of his pistol.
“Softly, friend, you have no enemy to deal with,” I said. “I have
been in the jolly trade myself. Look at this.”
I threw open my blouse part way and gave him a glimpse of one
of the richly mounted pistols that Captain Tew had presented to me.
“Have you ever seen that name before?”
His eyes gleamed recognition as he read the buccaneer’s name
engraved in big letters on the hilt. “Ay, we sighted him two days
ago.”
“Quite true. Bound for Martinique. I thought you would know the
name. Now will you trust me? You have been suspected and even
now the city officers are almost here to arrest you and your
companions.”
At that moment the shrill rattle of the watchman’s whistle sounded
from the street outside. The person who blew it may have meant to
give them some chance to escape, for the free-booters were prime
favorites with all who were not strictly addicted to honorable
practices. However good the guard’s intention might be, I was not
willing to allow my new acquaintances to profit by it. I was bound to
have for myself the credit of saving the buccaneers. Their gratitude
might be of service to me.
“Hurry,” I said. “We must barricade this corner of the room.”
Quick as thought I overturned two of the tables. All five of us
began to pile up the other furniture. The landlord gaped in open-
mouthed amazement at our proceeding. Whatever leniency may
have been in the watchman’s mind at the moment he blew his
warning whistle in the street, it all vanished as soon as he entered
the room. For he and his men had no sooner crowded through the
door than I hurled a heavy pewter tankard at the leader’s portly
belly. It struck well and sent him sprawling on the floor.
“Quick,” I said to the pirates. “Follow me.”
The corner of the room that was enclosed by our barricade
contained a door that opened on Garden Street near the church. We
made our way out in this way and then set out across the town
towards the North River. We had hardly cleared the front of the
tavern when we heard the rapid steps of the watchmen coming after
us pell-mell. We ran on till the high wall of palisades along the river
bank rose in front of us. They seemed to cut off all escape in that
direction, and I do not wonder that the sailors thought I had
betrayed them.
“You have trapped us,” hissed one of them between his teeth. At
the same moment he drew his pistol.
“Go on,” I shouted. “Turn to the left. There is a gate.”
We continued our way along the ditch behind the wall, running at
the top of our speed. The steps of the watchmen sounded closer
and closer behind us. My companions, being sailors, and
consequently poor runners, were continually losing ground. I feared
we should be caught up with and I had no mind for a fight. That
was more than I had bargained for. But luck favored us. We soon
reached the postern that opens through the palisades to the rocky
bank of the river. Our pursuers were scarce fifty feet behind us. If
the key would not fit we were lost. But all happened to our
advantage. In a moment I had thrust in the key that Governor
Bellamont had given me. The lock clicked. We sprang through the
open gateway and managed to relock the gate just as the officers
dashed against it. But the door was of solid oak and held fast.
“That was a good turn,” said the leader, mopping his face. “I’m
sweating in every inch of me.”
“This chill wind will soon stop that,” I answered. “Where did you
leave your boat?”
Fortunately they had left it afloat in the care of one of their
comrades. They whistled to him and in a few minutes I heard the
squeaking of oars as the boat approached. The leader of the band
put out his hand, saying all sorts of things in gratitude for what I
had done. It made me feel ashamed to hear his profuse thanks, for,
after all, I had played him a trick in my own interest; but I steeled
my heart by thinking of the patroon.
“I don’t know who you are,” continued the sailor. “But now that
you have done me one good turn perhaps you will do me another.
We must be at Wolfert Webber’s tavern by nine o’clock to-night. Can
we get there?”
It was well for the success of my plans that I had spent a large
part of the afternoon studying a map of Manhattan Island.
I knew, therefore, that a stream of water of depth sufficient to
float a long-boat connected the small lake known as the Collect with
the North River. I told the pirate of this stream and that, after having
crossed the lake, a short walk would bring him to Webber’s tavern.
Meanwhile the long-boat was approaching the shore. Soon we
were all seated—I going along to point out the way—and four of the
sailors were pulling sturdily at the oars. We shot quickly over the
water. The half moon gleamed in a flickering path behind us.
Between the narrow banks of the stream by which we made our way
into the Collect scarcely a ray of light could penetrate. We had much
ado to evade the overhanging branches, which, in spite of all our
care, struck us in the face time and again. Then everything changed
like scenery on the stage as we shot into the shadow-rimmed lake,
smooth as glass, reflecting the moon like the half of a broken plate,
lying upon the bottom.
“Dip easy, men,” whispered the leader, who had seated himself
next to me in the stern of the boat. “No need to let anyone know
that we are coming.”
He and I had fallen into conversation while the others rowed. I
tried cautiously to win from him some information as to what his
errand was about. I succeeded, however, no better than when I had
made the like attempt earlier in the evening. He was as mum as a
stone concerning his own business. When we landed on a narrow
beach of pebbles, he commanded his followers to remain with the
boat while he went forward under my guidance. On the way I was of
two minds. At one moment I wanted to strike him down, rob him of
his letters, and take to my heels. At the next, I was much ashamed
of such a dishonorable impulse. My hesitation, however, was soon
overcome in an unexpected way. When I saw the light of Webber’s
tavern twinkling a hundred yards ahead of us, I informed my
companion that his destination was in sight. He put out a great
clumsy hand and took mine cordially.
“Thanks, mate, whatever your name is. Here you and I must part
company. You’ve done us a good turn, and I’d do the same by you if
I had the chance. But I must go on alone, for what I’ve got to say is
very secret and must be said alone. It ain’t as if I had some writing
that I could just hand over before your eyes and you none the wiser
for looking at the outside. It doesn’t look handsome, does it? But I’m
on other people’s business, and honor is honor, as you know
yourself.”
Since there was nothing to be gained by staying with him against
his will, I shook hands in a friendly way, saying that I should go back
to New York by land, it being nearer for me than the way we had
come. The moment he was gone, however, I took after him and set
myself to watch the tavern door. The person he had come to meet
had evidently arrived before him. In two minutes the sailor came out
again, accompanied by a boy. As they passed through a patch of
moonlight I caught a glimpse of this second person. He was not a
boy at all, but Van Volkenberg’s dwarf, Louis Van Ramm.
They passed close to me and I followed them a short way into the
woods, where they held a long whispered consultation; but I could
not catch a word of what they said. At the end of their talk they
parted company without returning to the tavern. The pirate went
back to the boat the way he had come; the dwarf set out towards
Van Volkenberg manor. I had no further interest in the sailor, and,
though I expected little gain from following Van Ramm, I resolved to
dog his footsteps.
CHAPTER XII
VAN VOLKENBERG’S WINDOW

Louis Van Ramm continued his way towards the manor-house,


walking rapidly, I following on the turf at the roadside. Suddenly I
came upon the place where I had joined the high road in my retreat
from the park the night before. Knowing that the path that led to
this point was a short cut through the woods, I ran along it in the
hope of finding some place of vantage, whence I could observe what
went on outside the manor-house. When I reached the edge of the
wood I saw the shadowy building, its front all shot with lighted
windows. One of these windows was on the lower floor near the
ground. I wondered whether it would offer me any advantage as a
means of discovering what was going on inside the building. Some
high bushes grew near it and in these I managed to conceal myself
so near the window that I could see inside quite well. I presume that
the fire of logs within made the room too hot, for the window was
open, in spite of the chill wind that bit me to the bone. The patroon
was sitting at a table in plain sight of the window. Between him and
the door and facing him was the woman I had seen the night before
on the terrace, evidently his daughter.
“Go to your room, Miriam,” I heard him say to her. “I have no use
for you here. As for this man Le Bourse, if you have any dealings
with him I shall lock you up. Go. Do you hear me?”
The girl did not move. She folded her arms across her breast, at
the same time drawing herself up proudly. She was tall and slender,
and of a fine, dignified figure.
“Father,” she replied, “there is no use threatening me. You know
that I am not a coward. If you do not intend to make some
reparation to this man who has come to seek his sister, I shall. You
can at least be kind to him. You know only too well that unkindness
here hastened, perhaps caused, the poor girl’s unhappy death.”
She brushed her hand across her eyes. I blessed her in my heart
for that little act. The patroon, however, grew angry. He lifted a wine
glass from the table and held it in his hand, as if he intended to
throw it at her.
“Do not talk to me of her,” he burst out. “Not a word of her or you
shall repent it. Now go. You have already seen too much of this
man. I shall not tolerate it.”
The girl bowed with proper dignity, but she did not move. She had
still a word of protest that must be said.
“I shall obey you, sir, but I must say what I feel. I shall not act
behind your back. You shall know exactly what I intend to do. I shall
see him again and tell him all I can of the miserable fate of his sister
and I shall do all in my power to sooth his sorrow. I loved Ruth even
if she was but—”
Her words were cut short by the crash of breaking glass. She had
sprung to one side just in time to evade the flying goblet which her
father hurled at her.
“Will you not obey me? Are you not my daughter?”
“I am you daughter, but for all that, father—”
She stopped speaking and left the room abruptly, for at that
moment another door was opened, which I could not see, though I
heard the latch click distinctly. Then Louis Van Ramm entered the
room and came to his master’s side. I heard the patroon say
something to him about the “Wench, my daughter.” Then he and the
dwarf fell to talking in tones so low that I could only hear now and
then an excited exclamation of surprise.
I can hardly express the feelings that I experienced at that
moment. From where I crouched in the shrubbery, shivering with
cold, I could look upon the wide space where I had seen the Red
Band drilling the night before, surrounded by the jumping shadows
of the torches. The picture of the girl dressed in white, standing
upon the platform while the troopers obeyed the commands of their
chief, and the impatient gesture with which she had been dismissed
by her father, were all clear in my mind’s eye. I had not thought then
that within a day I should have found a friend within the walls of the
manor. Yet such was the case. The girl was disposed to treat me
kindly. I did not care so much for that. My heart was drawn towards
her because she had loved Ruth, and because she was now suffering
for that affection. I could not but admire her spirit, and the quiet
dignity with which she stood to her convictions before the hot anger
of her parent; nor could I observe without still greater admiration
the noble pride that prompted her to be silent the moment another
person entered the room. Of course I did not know then as I knew
later how unlike her usual manner this severity towards her father
was. But I soon learned that there were moments when his peculiar
infirmity demanded such firmness and that this was one of them.
While I mused upon the scene before me and all it stood for, the
patroon and his retainer sat at the table in busy conversation. At last
Van Volkenberg leaned back in his chair and fitted the palms of his
hands together, tapping the finger tips slightly.
“Good news, Louis,” he said, for the first time raising his voice so
that I could hear him distinctly. “This time we trip the Earl, God’s
curse upon him.”
For a moment they sat silent, the master lost in thought. Evidently
the news communicated to Louis in the meeting by Webber’s tavern
was vitally connected with the welfare of the Earl of Bellamont. At
last Van Volkenberg was roused by some question from his
companion that I could not hear.
“You are right,” the patroon answered. “On my life we must not let
this chance slip. Before day-light—” I lost what followed, for he bent
over the table with a pen in his hand and began to write.
For some time I watched the end of the quill nodding back and
forth as he wrote, evidently in great haste and excitement. Twice he
tore the paper across several times and began to write upon a new
sheet. When he had finished, he rose, folding what he had written
carefully as he did so. He took a step or two away from the table
towards the window. This movement brought him so close to me
that I overheard what followed without difficulty.
“This must be printed and posted before day-light, Louis. Take it
to Bradford. Rout him out of bed. Give him good reasons. It must be
done at once. Do not take no from him. Hurry, Louis, my gay hawk.
We shall peck the fine Earl to the bone by noon to-morrow.”
At that both men left the apartment. I set out immediately along
the footpath that joined with the road to the city. I had not far to go
in order to reach the main road, but the distance was far enough to
bring me for a moment in peril of my life. I was still within hail of the
house when I heard dull, heavy thuds falling in quick succession
behind me, and growing louder with every step. I turned to look
back. A hound was making towards me in great leaps across the
moonlight. The next moment he sprang upon me. Though I braced
myself for the shock, I fell heavily to the ground. In this moment of
danger, I had enough presence of mind to thrust my hand into the
brute’s mouth and to grip tight hold of his lower jaw. We writhed
and twisted about the ground for several minutes. Once I was
knocked so violently against the trunk of a tree that it was a miracle
that I did not lose my hold. We rolled back together and in some
way, I know not how, I fell uppermost with the point of my knee on
the dog’s side. Quick as a flash, I gripped my free hand on his
throat. He gasped for breath till his whole body shook and I with it.
But I had won the fall and did not rise till he lay motionless at my
feet.
Such an escape as that makes a man sober. I continued along the
road, thinking of many things; above all, of how it might have
ended. By what a slender thread and how tenaciously we cling to
life! Yesterday, when my sorrow first fell upon me with its full
weight, there was nothing terrible about the face of death; but to-
night, with his grim features close before me, I felt that heedless
courage which even the most miserable always feel, though they
would thank God for cowardice. With this thought came another:
How Ruth must have felt! She had crossed the gulf that I had fought
to draw back from. Not till then did my thoughts return to the work
in hand—the paper and the dwarf’s errand. Almost immediately I
heard the clatter of horse hoofs breaking the silence behind me.
In a moment Louis Van Ramm dashed by me at full gallop, raising
a cloud of dust as he rode, and sending a flaw of wind into the
roadside bushes where I had concealed myself at the first sound of
his approach.
“So you will trap the Earl, will you?” thought I. “Do not reckon
without me, Louis Van Ramm.”
Then I set out running, and was soon at the fort.
It had been scarce six years since William Bradford had come from
Philadelphia to set up his printing press in New York. As I passed the
mouth of the street where Bradford lived I could hear Louis kicking
and pounding at the printer’s door, for what reason beyond his
master’s hest I was soon to learn.
At the fort I found some difficulty in gaining access to the Earl;
but, by means of the password which he had communicated to me,
and a little threat and bluster on my own account, I was soon inside
the walls. The Earl heard my fragmentary tale with interest.
“I can easily imagine what has been communicated to him,” said
Bellamont. “But what Bradford has to do with it is beyond my
penetration.”
He rang a bell upon the table. A man-at-arms appeared, whom he
bade summon the captain of the guard.
“Take a squad of men,” commanded the Earl as soon as the man
had appeared for duty. “Take a squad of men and arrest William
Bradford and anyone else whom you may find at his shop. At once.
To your duty.”
The Earl at a pinch, as Lady Marmaduke had said, was no man to
bandy words, though, to be sure, he said to me as soon as the
soldiers had set out that he wished I had got my information in any
other way than spying. I did not remind him that he had set me to
watch, or that there was no other way on earth by which I could
have followed his instructions, for I knew that if I said anything his
conscience would suggest some kind of harmless watchfulness from
a distance.
“Your Excellency’s welfare is always above my own,” I said humbly,
though I shared none of his scruples.

You might also like