100% found this document useful (3 votes)
14 views

Data Structures And Problem Solving Using Java 4th Edition by Mark Weiss 0321541405 9780321541406 pdf download

The document provides information about the 4th edition of 'Data Structures and Problem Solving Using Java' by Mark Weiss, including its ISBN numbers and links for digital downloads. It outlines the book's purpose for a two-semester computer science course, covering data structures, algorithms, and software development principles. Additionally, it highlights changes made in the fourth edition and the organization of the text, emphasizing the use of the Java Collections API and the flexibility for instructors in course coverage.

Uploaded by

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

Data Structures And Problem Solving Using Java 4th Edition by Mark Weiss 0321541405 9780321541406 pdf download

The document provides information about the 4th edition of 'Data Structures and Problem Solving Using Java' by Mark Weiss, including its ISBN numbers and links for digital downloads. It outlines the book's purpose for a two-semester computer science course, covering data structures, algorithms, and software development principles. Additionally, it highlights changes made in the fourth edition and the organization of the text, emphasizing the use of the Java Collections API and the flexibility for instructors in course coverage.

Uploaded by

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

Data Structures And Problem Solving Using Java

4th Edition by Mark Weiss 0321541405


9780321541406 install download

https://ebookball.com/product/data-structures-and-problem-
solving-using-java-4th-edition-by-mark-
weiss-0321541405-9780321541406-17186/

Explore and download more ebooks or textbooks


at ebookball.com
Get Your Digital Files Instantly: PDF, ePub, MOBI and More
Quick Digital Downloads: PDF, ePub, MOBI and Other Formats

Data Structures and Problem Solving Using Java 4th edition by Mark
Allen Weiss ISBN 0321541405 978-0321541406

https://ebookball.com/product/data-structures-and-problem-
solving-using-java-4th-edition-by-mark-allen-weiss-
isbn-0321541405-978-0321541406-16342/

Data Structures and Problem Solving Using C++ 2nd edition by MALIK
ISBN 0324782012 978-0324782011

https://ebookball.com/product/data-structures-and-problem-
solving-using-c-2nd-edition-by-malik-
isbn-0324782012-978-0324782011-16350/

Data Structures And Algorithm Analysis in C 4th Edition by Mark Weiss


013284737X 9780132847377

https://ebookball.com/product/data-structures-and-algorithm-
analysis-in-c-4th-edition-by-mark-
weiss-013284737x-9780132847377-15292/

Problem Solving in Data Structures and Algorithms Using C 1st Edition


by Hemant Jain ISBN 9352655915 9789352655915

https://ebookball.com/product/problem-solving-in-data-structures-
and-algorithms-using-c-1st-edition-by-hemant-jain-
isbn-9352655915-9789352655915-15768/
Problem Solving in Data Structures and Algorithms Using C 1st Edition
by Hemant Jain ISBN 1540407306 9781540407306

https://ebookball.com/product/problem-solving-in-data-structures-
and-algorithms-using-c-1st-edition-by-hemant-jain-
isbn-1540407306-9781540407306-15866/

Data Structures and Algorithm Analysis in JavaTM 3rd edition by Mark


Weiss 9780133465013 0133465012

https://ebookball.com/product/data-structures-and-algorithm-
analysis-in-javatm-3rd-edition-by-mark-
weiss-9780133465013-0133465012-18710/

Programming and Problem Solving With Java 1st Edition by Nell Dale,
Chip Weems, Mark Headington ISBN 0763730696 9780763730697

https://ebookball.com/product/programming-and-problem-solving-
with-java-1st-edition-by-nell-dale-chip-weems-mark-headington-
isbn-0763730696-9780763730697-15872/

Outlines and Highlights for Data Structures and Algorithm Analysis in


C++ 3rd edition by Mark Allen Weiss ISBN 032144146X 9780321441461

https://ebookball.com/product/outlines-and-highlights-for-data-
structures-and-algorithm-analysis-in-c-3rd-edition-by-mark-allen-
weiss-isbn-032144146x-9780321441461-16464/

Data Structures Abstraction and Design Using Java 2rd Edition by


Elliot Koffman, Paul Wolfgang 9781119239147

https://ebookball.com/product/data-structures-abstraction-and-
design-using-java-2rd-edition-by-elliot-koffman-paul-
wolfgang-9781119239147-15300/
Data Structures &
Problem Solving
Using Java
fourth edition
This page intentionally left blank
Data Structures &
Problem Solving
Using Java
fourth edition

mark allen weiss


florida international university
Editor-in-Chief Michael Hirsch
Editorial Assistant Stephanie Sellinger
Managing Editor Jeffrey Holcomb
Senior Production Supervisor Marilyn Lloyd
Marketing Manager Erin Davis
Marketing Coordinator Kathryn Ferranti
Media Producer Katelyn Boller
Senior Manufacturing Buyer Carol Melville
Project Coordination Rebecca Lazure/Laserwords Maine
Composition and Illustration Laserwords Private Ltd.
Cover Designer Elena Sidorova/Suzanne Heiser of Night & Day Design
Cover Image © Whole artichoke: iStockphoto; Inside slice:
Sabine Scheckel/Getty Images
Access the latest information about Addison-Wesley Computer Science titles from our World
Wide Web site: http://www.pearsonhighered.com/cs
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and Addison-Wesley was
aware of a trademark claim, the designations have been printed in initial caps or all caps.
The programs and applications presented in this book have been included for their instructional
value. They have been tested with care but are not guaranteed for any particular purpose. The
publisher does not offer any warranty or representation, nor does it accept any liabilities with
respect to the programs or applications.
The interior of this book was composed in FrameMaker. The basal text font is set in Times;
the chapter titles, headings, running heads, and folios are all set in Akzidenz-Grotesk_BE; the
programming code is set in Lucida Sans Typewriter.
Library of Congress Cataloging-in-Publication Data
Weiss, Mark Allen.
Data structures & problem solving using Java / Mark Allen Weiss.-- 4th
ed.
p. cm.
ISBN-13: 978-0-321-54140-6
ISBN-10: 0-321-54140-5
1. Java (Computer program language) 2. Data structures (Computer science)
3. Problem solving--Data processing. I. Title.
QA76.73.J38W45 2010
005.13'3--dc22
2009032662
Copyright © 2010 Pearson Education, Inc. All rights reserved. No part of this publication may
be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, elec-
tronic, mechanical, photocopying, recording, or otherwise, without the prior written permission
of the publisher. Printed in the United States of America.
For information on obtaining permission for use of material in this work, please submit a written
request to Pearson Education, Inc., Rights and Contracts Department, 501 Boylston Street, Suite
900, Boston, MA 02116, fax your request to 617-671-3447, or e-mail at http://www.pearsoned.com/
legal/permissions.htm.

ISBN-13: 9780321541406
ISBN-10: 0321541405
1 2 3 4 5 6 7 8 9 10⎯CRS⎯12 11 10 09
To David and David.
This page intentionally left blank
preface

preface
T his book is designed for a two-semester sequence in computer science,
beginning with what is typically known as Data Structures and continuing
with advanced data structures and algorithm analysis. It is appropriate for the
courses from both the two-course and three-course sequences in “B.1 Intro-
ductory Tracks,” as outlined in the final report of the Computing Curricula
2001 project (CC2001)—a joint undertaking of the ACM and the IEEE.
The content of the Data Structures course has been evolving for some
time. Although there is some general consensus concerning topic coverage,
considerable disagreement still exists over the details. One uniformly
accepted topic is principles of software development, most notably the con-
cepts of encapsulation and information hiding. Algorithmically, all Data
Structures courses tend to include an introduction to running-time analysis,
recursion, basic sorting algorithms, and elementary data structures. Many uni-
versities offer an advanced course that covers topics in data structures, algo-
rithms, and running-time analysis at a higher level. The material in this text
has been designed for use in both levels of courses, thus eliminating the need
to purchase a second textbook.
Although the most passionate debates in Data Structures revolve around
the choice of a programming language, other fundamental choices need to be
made:

n Whether to introduce object-oriented design or object-based


design early
n The level of mathematical rigor
viii preface

n The appropriate balance between the implementation of data struc-


tures and their use
n Programming details related to the language chosen (for instance,
should GUIs be used early)

My goal in writing this text was to provide a practical introduction to data


structures and algorithms from the viewpoint of abstract thinking and prob-
lem solving. I tried to cover all the important details concerning the data
structures, their analyses, and their Java implementations, while staying away
from data structures that are theoretically interesting but not widely used. It is
impossible to cover all the different data structures, including their uses and
the analysis, described in this text in a single course. So I designed the text-
book to allow instructors flexibility in topic coverage. The instructor will need
to decide on an appropriate balance between practice and theory and then
choose the topics that best fit the course. As I discuss later in this Preface, I
organized the text to minimize dependencies among the various chapters.

summary of changes
in the fourth edition
1. This edition provides additional discussion on using classes (Chapter 2),
writing classes (Chapter 3), and interfaces (Chapter 4).
2. Chapter 6 contains additional material discussing the running time of
lists, the use of maps, and the use of views in the Java Collections API.
3. The Scanner class is described, and code throughout the text makes use
of the Scanner class.
4. Chapter 9 describes and implements the 48-bit linear congruential gener-
ator that is part of both the Java and many C++ libraries.
5. Chapter 20 has new material on separate chaining hash tables and the
String hashCode method.
6. There are numerous revisions to the text that improve on the prose in the
previous edition.
7. Many new exercises are provided in Parts I, II, and IV.

a unique approach
My basic premise is that software development tools in all languages come with
large libraries, and many data structures are part of these libraries. I envision an
eventual shift in emphasis of data structures courses from implementation to
preface ix

use. In this book I take a unique approach by separating the data structures into
their specification and subsequent implementation and taking advantage of an
already existing data structures library, the Java Collections API.
A subset of the Collections API suitable for most applications is discussed
in a single chapter (Chapter 6) in Part Two. Part Two also covers basic analy-
sis techniques, recursion, and sorting. Part Three contains a host of applica-
tions that use the Collections API’s data structures. Implementation of the
Collections API is not shown until Part Four, once the data structures have
already been used. Because the Collections API is part of Java, students can
design large projects early on, using existing software components.
Despite the central use of the Collections API in this text, it is neither a book
on the Collections API nor a primer on implementing the Collections API spe-
cifically; it remains a book that emphasizes data structures and basic problem-
solving techniques. Of course, the general techniques used in the design of data
structures are applicable to the implementation of the Collections API, so sev-
eral chapters in Part Four include Collections API implementations. However,
instructors can choose the simpler implementations in Part Four that do not dis-
cuss the Collections API protocol. Chapter 6, which presents the Collections
API, is essential to understanding the code in Part Three. I attempted to use only
the basic parts of the Collections API.
Many instructors will prefer a more traditional approach in which each
data structure is defined, implemented, and then used. Because there is no
dependency between material in Parts Three and Four, a traditional course can
easily be taught from this book.

prerequisites
Students using this book should have knowledge of either an object-oriented
or procedural programming language. Knowledge of basic features, including
primitive data types, operators, control structures, functions (methods), and
input and output (but not necessarily arrays and classes) is assumed.
Students who have taken a first course using C++ or Java may find the first
four chapters “light” reading in some places. However, other parts are definitely
“heavy” with Java details that may not have been covered in introductory courses.
Students who have had a first course in another language should begin at
Chapter 1 and proceed slowly. If a student would like to use a Java reference
book as well, some recommendations are given in Chapter 1.
Knowledge of discrete math is helpful but is not an absolute prerequi-
site. Several mathematical proofs are presented, but the more complex
proofs are preceded by a brief math review. Chapters 7 and 19–24 require
x preface

some degree of mathematical sophistication. The instructor may easily elect


to skip mathematical aspects of the proofs by presenting only the results.
All proofs in the text are clearly marked and are separate from the body of
the text.

java
This textbook presents material using the Java programming language. Java
is a language that is often examined in comparison with C++. Java offers
many benefits, and programmers often view Java as a safer, more portable,
and easier-to-use language than C++.
The use of Java requires that some decisions be made when writing a text-
book. Some of the decisions made are as follows:

1. The minimum required compiler is Java 5. Please make sure you are
using a compiler that is Java 5-compatible.
2. GUIs are not emphasized. Although GUIs are a nice feature in Java,
they seem to be an implementation detail rather than a core Data
Structures topic. We do not use Swing in the text, but because many
instructors may prefer to do so, a brief introduction to Swing is pro-
vided in Appendix B.
3. Applets are not emphasized. Applets use GUIs. Further, the focus of
the course is on data structures, rather than language features. Instruc-
tors who would like to discuss applets will need to supplement this
text with a Java reference.
4. Inner classes are used. Inner classes are used primarily in the imple-
mentation of the Collections API, and can be avoided by instructors
who prefer to do so.
5. The concept of a pointer is discussed when reference variables are
introduced. Java does not have a pointer type. Instead, it has a refer-
ence type. However, pointers have traditionally been an important
Data Structures topic that needs to be introduced. I illustrate the
concept of pointers in other languages when discussing reference
variables.
6. Threads are not discussed. Some members of the CS community
argue that multithreaded computing should become a core topic in the
introductory programming sequence. Although it is possible that this
will happen in the future, few introductory programming courses dis-
cuss this difficult topic.
preface xi

7. Some Java 5 features are not used. Including:


n Static imports, not used because in my opinion it actually makes
the code harder to read.
n Enumerated types, not used because there were few places to
declare public enumerated types that would be usable by clients. In
the few possible places, it did not seem to help the code’s readability.

text organization
In this text I introduce Java and object-oriented programming (particularly
abstraction) in Part One. I discuss primitive types, reference types, and some
of the predefined classes and exceptions before proceeding to the design of
classes and inheritance.
In Part Two, I discuss Big-Oh and algorithmic paradigms, including
recursion and randomization. An entire chapter is devoted to sorting, and a
separate chapter contains a description of basic data structures. I use the Col-
lections API to present the interfaces and running times of the data structures.
At this point in the text, the instructor may take several approaches to present
the remaining material, including the following two.
1. Discuss the corresponding implementations (either the Collections
API versions or the simpler versions) in Part Four as each data struc-
ture is described. The instructor can ask students to extend the classes
in various ways, as suggested in the exercises.
2. Show how each Collections API class is used and cover implementa-
tion at a later point in the course. The case studies in Part Three can
be used to support this approach. As complete implementations are
available on every modern Java compiler, the instructor can use the
Collections API in programming projects. Details on using this
approach are given shortly.
Part Five describes advanced data structures such as splay trees, pairing
heaps, and the disjoint set data structure, which can be covered if time permits
or, more likely, in a follow-up course.

chapter-by-chapter text organization


Part One consists of four chapters that describe the basics of Java used
throughout the text. Chapter 1 describes primitive types and illustrates how to
write basic programs in Java. Chapter 2 discusses reference types and illustrates
xii preface

the general concept of a pointer—even though Java does not have pointers—so
that students learn this important Data Structures topic. Several of the basic
reference types (strings, arrays, files, and Scanners) are illustrated, and the use
of exceptions is discussed. Chapter 3 continues this discussion by describing
how a class is implemented. Chapter 4 illustrates the use of inheritance in
designing hierarchies (including exception classes and I/O) and generic com-
ponents. Material on design patterns, including the wrapper, adapter, and dec-
orator patterns can be found in Part One.
Part Two focuses on the basic algorithms and building blocks. In
Chapter 5 a complete discussion of time complexity and Big-Oh notation
is provided. Binary search is also discussed and analyzed. Chapter 6 is
crucial because it covers the Collections API and argues intuitively what
the running time of the supported operations should be for each data struc-
ture. (The implementation of these data structures, in both Collections
API-style and a simplified version, is not provided until Part Four). This
chapter also introduces the iterator pattern as well as nested, local, and
anonymous classes. Inner classes are deferred until Part Four, where they
are discussed as an implementation technique. Chapter 7 describes recur-
sion by first introducing the notion of proof by induction. It also discusses
divide-and-conquer, dynamic programming, and backtracking. A section
describes several recursive numerical algorithms that are used to imple-
ment the RSA cryptosystem. For many students, the material in the second
half of Chapter 7 is more suitable for a follow-up course. Chapter 8
describes, codes, and analyzes several basic sorting algorithms, including
the insertion sort, Shellsort, mergesort, and quicksort, as well as indirect
sorting. It also proves the classic lower bound for sorting and discusses the
related problems of selection. Finally, Chapter 9 is a short chapter that dis-
cusses random numbers, including their generation and use in randomized
algorithms.
Part Three provides several case studies, and each chapter is organized
around a general theme. Chapter 10 illustrates several important techniques
by examining games. Chapter 11 discusses the use of stacks in computer lan-
guages by examining an algorithm to check for balanced symbols and the
classic operator precedence parsing algorithm. Complete implementations
with code are provided for both algorithms. Chapter 12 discusses the basic
utilities of file compression and cross-reference generation, and provides a
complete implementation of both. Chapter 13 broadly examines simulation by
looking at one problem that can be viewed as a simulation and then at the
more classic event-driven simulation. Finally, Chapter 14 illustrates how data
preface xiii

structures are used to implement several shortest path algorithms efficiently


for graphs.
Part Four presents the data structure implementations. Chapter 15 dis-
cusses inner classes as an implementation technique and illustrates their use
in the ArrayList implementation. In the remaining chapters of Part Four,
implementations that use simple protocols (insert, find, remove variations)
are provided. In some cases, Collections API implementations that tend to
use more complicated Java syntax (in addition to being complex because of
their large set of required operations) are presented. Some mathematics is
used in this part, especially in Chapters 19–21, and can be skipped at the dis-
cretion of the instructor. Chapter 16 provides implementations for both
stacks and queues. First these data structures are implemented using an
expanding array, then they are implemented using linked lists. The Collec-
tions API versions are discussed at the end of the chapter. General linked lists
are described in Chapter 17. Singly linked lists are illustrated with a simple
protocol, and the more complex Collections API version that uses doubly
linked lists is provided at the end of the chapter. Chapter 18 describes trees
and illustrates the basic traversal schemes. Chapter 19 is a detailed chapter
that provides several implementations of binary search trees. Initially, the
basic binary search tree is shown, and then a binary search tree that supports
order statistics is derived. AVL trees are discussed but not implemented, but
the more practical red–black trees and AA-trees are implemented. Then the
Collections API TreeSet and TreeMap are implemented. Finally, the B-tree is
examined. Chapter 20 discusses hash tables and implements the quadratic
probing scheme as part of HashSet and HashMap, after examination of a simpler
alternative. Chapter 21 describes the binary heap and examines heapsort and
external sorting.
Part Five contains material suitable for use in a more advanced course or for
general reference. The algorithms are accessible even at the first-year level.
However, for completeness, sophisticated mathematical analyses that are almost
certainly beyond the reach of a first-year student were included. Chapter 22
describes the splay tree, which is a binary search tree that seems to perform
extremely well in practice and is competitive with the binary heap in some
applications that require priority queues. Chapter 23 describes priority queues
that support merging operations and provides an implementation of the pairing
heap. Finally, Chapter 24 examines the classic disjoint set data structure.
The appendices contain additional Java reference material. Appendix A
lists the operators and their precedence. Appendix B has material on Swing,
and Appendix C describes the bitwise operators used in Chapter 12.
xiv preface

chapter dependencies
Generally speaking, most chapters are independent of each other. However,
the following are some of the notable dependencies.

n Part One (Tour of Java): The first four chapters should be covered in their
entirety in sequence first, prior to continuing on to the rest of the text.
n Chapter 5 (Algorithm Analysis): This chapter should be covered prior
to Chapters 6 and 8. Recursion (Chapter 7) can be covered prior to
this chapter, but the instructor will have to gloss over some details
about avoiding inefficient recursion.
n Chapter 6 (The Collections API): This chapter can be covered prior to
or in conjunction with material in Part Three or Four.
n Chapter 7 (Recursion): The material in Sections 7.1–7.3 should be
covered prior to discussing recursive sorting algorithms, trees, the
Tic-Tac-Toe case study, and shortest-path algorithms. Material such
as the RSA cryptosystem, dynamic programming, and backtracking
(unless Tic-Tac-Toe is discussed) is otherwise optional.
n Chapter 8 (Sorting Algorithms): This chapter should follow Chapters
5 and 7. However, it is possible to cover Shellsort without Chapters 5
and 7. Shellsort is not recursive (hence there is no need for Chapter 7),
and a rigorous analysis of its running time is too complex and is not
covered in the book (hence there is little need for Chapter 5).
n Chapter 15 (Inner Classes and Implementations of ArrayLists):
This material should precede the discussion of the Collections API
implementations.
n Chapters 16 and 17 (Stacks and Queues/Linked Lists): These chapters
may be covered in either order. However, I prefer to cover Chapter 16
first because I believe that it presents a simpler example of linked lists.
n Chapters 18 and 19 (Trees/ Binary Search Trees): These chapters can
be covered in either order or simultaneously.

separate entities
The other chapters have little or no dependencies:

n Chapter 9 (Randomization): The material on random numbers can be


covered at any point as needed.
preface xv

n Part Three (Applications): Chapters 10–14 can be covered in con-


junction with or after the Collections API (in Chapter 6) and in
roughly any order. There are a few references to earlier chapters.
These include Section 10.2 (Tic-Tac-Toe), which refers to a discus-
sion in Section 7.7, and Section 12.2 (cross-reference generation),
which refers to similar lexical analysis code in Section 11.1 (balanced
symbol checking).
n Chapters 20 and 21 (Hash Tables/A Priority Queue): These chapters
can be covered at any point.
n Part Five (Advanced Data Structures): The material in Chapters
22–24 is self-contained and is typically covered in a follow-up course.

mathematics
I have attempted to provide mathematical rigor for use in Data Structures
courses that emphasize theory and for follow-up courses that require more
analysis. However, this material stands out from the main text in the form of
separate theorems and, in some cases, separate sections or subsections. Thus
it can be skipped by instructors in courses that deemphasize theory.
In all cases, the proof of a theorem is not necessary to the understanding
of the theorem’s meaning. This is another illustration of the separation of an
interface (the theorem statement) from its implementation (the proof). Some
inherently mathematical material, such as Section 7.4 (Numerical Applica-
tions of Recursion), can be skipped without affecting comprehension of the
rest of the chapter.

course organization
A crucial issue in teaching the course is deciding how the materials in Parts
Two–Four are to be used. The material in Part One should be covered in
depth, and the student should write one or two programs that illustrate the
design, implementation, testing of classes and generic classes, and perhaps
object-oriented design, using inheritance. Chapter 5 discusses Big-Oh nota-
tion. An exercise in which the student writes a short program and compares
the running time with an analysis can be given to test comprehension.
In the separation approach, the key concept of Chapter 6 is that different
data structures support different access schemes with different efficiency. Any
case study (except the Tic-Tac-Toe example that uses recursion) can be used
xvi preface

to illustrate the applications of the data structures. In this way, the student can
see the data structure and how it is used but not how it is efficiently imple-
mented. This is truly a separation. Viewing things this way will greatly
enhance the ability of students to think abstractly. Students can also provide
simple implementations of some of the Collections API components (some
suggestions are given in the exercises in Chapter 6) and see the difference
between efficient data structure implementations in the existing Collections
API and inefficient data structure implementations that they will write. Stu-
dents can also be asked to extend the case study, but again, they are not
required to know any of the details of the data structures.
Efficient implementation of the data structures can be discussed after-
ward, and recursion can be introduced whenever the instructor feels it is
appropriate, provided it is prior to binary search trees. The details of sorting
can be discussed at any time after recursion. At this point, the course can con-
tinue by using the same case studies and experimenting with modifications to
the implementations of the data structures. For instance, the student can
experiment with various forms of balanced binary search trees.
Instructors who opt for a more traditional approach can simply discuss a
case study in Part Three after discussing a data structure implementation in
Part Four. Again, the book’s chapters are designed to be as independent of
each other as possible.

exercises
Exercises come in various flavors; I have provided four varieties. The basic In
Short exercise asks a simple question or requires hand-drawn simulations of an
algorithm described in the text. The In Theory section asks questions that either
require mathematical analysis or asks for theoretically interesting solutions to
problems. The In Practice section contains simple programming questions,
including questions about syntax or particularly tricky lines of code. Finally,
the Programming Projects section contains ideas for extended assignments.

pedagogical features
n Margin notes are used to highlight important topics.
n The Key Concepts section lists important terms along with definitions
and page references.
preface xvii

n The Common Errors section at the end of each chapter provides a list
of commonly made errors.
n References for further reading are provided at the end of most chapters.

supplements
A variety of supplemental materials are available for this text. The following
resources are available at http://www.aw.com/cssupport for all readers of this
textbook:

n Source code files from the book. (The On the Internet section at the
end of each chapter lists the filenames for the chapter’s code.)

In addition, the following supplements are available to qualified instructors.


To access them, visit http://www.pearsonhighered.com/cs and search our cata-
log by title for Data Structures and Problem Solving Using Java. Once on the cat-
alog page for this book, select the link to Instructor Resources.

n PowerPoint slides of all figures in the book.


n Instructor’s Guide that illustrates several approaches to the material.
It includes samples of test questions, assignments, and syllabi.
Answers to select exercises are also provided.

acknowledgments
Many, many people have helped me in the preparation of this book. Many
have already been acknowledged in the prior edition and the related C++ ver-
sion. Others, too numerous to list, have sent e-mail messages and pointed out
errors or inconsistencies in explanations that I have tried to fix in this edition.
For this edition I would like to thank my editor Michael Hirsch, editorial
assistant Stephanie Sellinger, senior production supervisor Marilyn Lloyd,
and project manager Rebecca Lazure and her team at Laserwords. Thanks
also go to Allison Michael and Erin Davis in marketing and Elena Sidorova
and Suzanne Heiser of Night & Day Design for a terrific cover.
Some of the material in this text is adapted from my textbook Efficient C
Programming: A Practical Approach (Prentice Hall, 1995) and is used with
xviii preface

permission of the publisher. I have included end-of-chapter references where


appropriate.
My World Wide Web page, http://www.cs.fiu.edu/~weiss, will contain
updated source code, an errata list, and a link for receiving bug reports.

M. A. W.
Miami, Florida
contents

part one Tour of Java


chapter 1 primitive java 3

1.1 the general environment 4


1.2 the first program 5
1.2.1 comments 5
1.2.2 main 6
1.2.3 terminal output 6
1.3 primitive types 6
1.3.1 the primitive types 6
1.3.2 constants 7
1.3.3 declaration and initialization of primitive types 7
1.3.4 terminal input and output 8
1.4 basic operators 8
1.4.1 assignment operators 9
1.4.2 binary arithmetic operators 10
1.4.3 unary operators 10
1.4.4 type conversions 10
1.5 conditional statements 11
1.5.1 relational and equality operators 11
1.5.2 logical operators 12
1.5.3 the if statement 13
1.5.4 the while statement 14
1.5.5 the for statement 14
1.5.6 the do statement 15
xx contents

1.5.7 break and continue 16


1.5.8 the switch statement 17
1.5.9 the conditional operator 17
1.6 methods 18
1.6.1 overloading of method names 19
1.6.2 storage classes 20
summary 20
key concepts 20
common errors 22
on the internet 23
exercises 23
references 25

chapter 2 reference types 27

2.1 what is a reference? 27


2.2 basics of objects and references 30
2.2.1 the dot operator (.) 30
2.2.2 declaration of objects 30
2.2.3 garbage collection 31
2.2.4 the meaning of = 32
2.2.5 parameter passing 33
2.2.6 the meaning of == 33
2.2.7 no operator overloading for objects 34
2.3 strings 35
2.3.1 basics of string manipulation 35
2.3.2 string concatenation 35
2.3.3 comparing strings 36
2.3.4 other String methods 36
2.3.5 converting other types to strings 37
2.4 arrays 37
2.4.1 declaration, assignment, and methods 38
2.4.2 dynamic array expansion 40
2.4.3 ArrayList 42
2.4.4 multidimensional arrays 45
2.4.5 command-line arguments 45
2.4.6 enhanced for loop 46
contents xxi

2.5 exception handling 47


2.5.1 processing exceptions 48
2.5.2 the finally clause 48
2.5.3 common exceptions 49
2.5.4 the throw and throws clauses 51
2.6 input and output 51
2.6.1 basic stream operations 52
2.6.2 the Scanner type 53
2.6.3 sequential files 56
summary 59
key concepts 60
common errors 61
on the internet 62
exercises 62
references 68

chapter 3 objects and classes 69

3.1 what is object-oriented programming? 69


3.2 a simple example 71
3.3 javadoc 73
3.4 basic methods 76
3.4.1 constructors 76
3.4.2 mutators and accessors 76
3.4.3 output and toString 78
3.4.4 equals 78
3.4.5 main 78
3.5 example: using java.math.BigInteger 78
3.6 additional constructs 79
3.6.1 the this reference 81
3.6.2 the this shorthand for constructors 82
3.6.3 the instanceof operator 82
3.6.4 instance members versus static members 83
3.6.5 static fields and methods 83
3.6.6 static initializers 86
3.7 example: implementing a BigRational class 86
xxii contents

3.8 packages 90
3.8.1 the import directive 91
3.8.2 the package statement 93
3.8.3 the CLASSPATH environment variable 94
3.8.4 package visibility rules 95
3.9 a design pattern: composite (pair) 95
summary 96
key concepts 97
common errors 100
on the internet 100
exercises 101
references 107

chapter 4 inheritance 109

4.1 what is inheritance? 110


4.1.1 creating new classes 110
4.1.2 type compatibility 115
4.1.3 dynamic dispatch and polymorphism 116
4.1.4 inheritance hierarchies 117
4.1.5 visibility rules 117
4.1.6 the constructor and super 118
4.1.7 final methods and classes 119
4.1.8 overriding a method 121
4.1.9 type compatibility revisited 121
4.1.10 compatibility of array types 124
4.1.11 covariant return types 124
4.2 designing hierarchies 125
4.2.1 abstract methods and classes 126
4.2.2 designing for the future 130
4.3 multiple inheritance 131
4.4 the interface 134
4.4.1 specifying an interface 134
4.4.2 implementing an interface 135
4.4.3 multiple interfaces 135
4.4.4 interfaces are abstract classes 136
contents xxiii

4.5 fundamental inheritance in java 136


4.5.1 the Object class 136
4.5.2 the hierarchy of exceptions 137
4.5.3 i/o: the decorator pattern 138
4.6 implementing generic components using inheritance 142
4.6.1 using Object for genericity 142
4.6.2 wrappers for primitive types 143
4.6.3 autoboxing/unboxing 145
4.6.4 adapters: changing an interface 146
4.6.5 using interface types for genericity 147
4.7 implementing generic components using java 5 generics 150
4.7.1 simple generic classes and interfaces 150
4.7.2 wildcards with bounds 151
4.7.3 generic static methods 152
4.7.4 type bounds 153
4.7.5 type erasure 154
4.7.6 restrictions on generics 154
4.8 the functor (function objects) 157
4.8.1 nested classes 161
4.8.2 local classes 161
4.8.3 anonymous classes 163
4.8.4 nested classes and generics 164
4.9 dynamic dispatch details 164
summary 168
key concepts 168
common errors 171
on the internet 171
exercises 173
references 183

part two Algorithms and


Building Blocks
chapter 5 algorithm analysis 187

5.1 what is algorithm analysis? 188


5.2 examples of algorithm running times 192
xxiv contents

5.3 the maximum contiguous subsequence sum problem 193


5.3.1 the obvious O ( N 3 ) algorithm 194
5.3.2 an improved O ( N 2 ) algorithm 197
5.3.3 a linear algorithm 197
5.4 general big-oh rules 201
5.5 the logarithm 205
5.6 static searching problem 207
5.6.1 sequential search 207
5.6.2 binary search 208
5.6.3 interpolation search 211
5.7 checking an algorithm analysis 212
5.8 limitations of big-oh analysis 213
summary 214
key concepts 214
common errors 215
on the internet 216
exercises 216
references 227

chapter 6 the collections api 229

6.1 introduction 230


6.2 the iterator pattern 231
6.2.1 basic iterator design 232
6.2.2 inheritance-based iterators and factories 234
6.3 collections api: containers and iterators 236
6.3.1 the Collection interface 237
6.3.2 Iterator interface 240
6.4 generic algorithms 242
6.4.1 Comparator function objects 243
6.4.2 the Collections class 243
6.4.3 binary search 246
6.4.4 sorting 246
6.5 the List interface 248
6.5.1 the ListIterator interface 249
6.5.2 LinkedList class 251
contents xxv

6.5.3 running time for Lists 253


6.5.4 removing from and adding to the middle of a List 256
6.6 stacks and queues 258
6.6.1 stacks 258
6.6.2 stacks and computer languages 259
6.6.3 queues 260
6.6.4 stacks and queues in the collections api 261
6.7 sets 261
6.7.1 the TreeSet class 263
6.7.2 the HashSet class 264
6.8 maps 268
6.9 priority queues 274
6.10 views in the collections api 277
6.10.1 the subList method for Lists 277
6.10.2 the headSet, subSet, and tailSet methods for SortedSets 277
summary 278
key concepts 279
common errors 280
on the internet 281
exercises 281
references 292

chapter 7 recursion 293

7.1 what is recursion? 294


7.2 background: proofs by mathematical induction 295
7.3 basic recursion 297
7.3.1 printing numbers in any base 299
7.3.2 why it works 301
7.3.3 how it works 302
7.3.4 too much recursion can be dangerous 304
7.3.5 preview of trees 305
7.3.6 additional examples 306
7.4 numerical applications 311
7.4.1 modular arithmetic 311
7.4.2 modular exponentiation 312
xxvi contents

7.4.3 greatest common divisor and multiplicative inverses 314


7.4.4 the rsa cryptosystem 317
7.5 divide-and-conquer algorithms 319
7.5.1 the maximum contiguous subsequence sum problem 320
7.5.2 analysis of a basic divide-and-conquer recurrence 323
7.5.3 a general upper bound for divide-and-conquer running times 327
7.6 dynamic programming 329
7.7 backtracking 333
summary 336
key concepts 338
common errors 339
on the internet 339
exercises 340
references 348

chapter 8 sorting algorithms 351

8.1 why is sorting important? 352


8.2 preliminaries 353
8.3 analysis of the insertion sort and other simple sorts 353
8.4 shellsort 357
8.4.1 performance of shellsort 358
8.5 mergesort 361
8.5.1 linear-time merging of sorted arrays 361
8.5.2 the mergesort algorithm 363
8.6 quicksort 364
8.6.1 the quicksort algorithm 367
8.6.2 analysis of quicksort 369
8.6.3 picking the pivot 372
8.6.4 a partitioning strategy 374
8.6.5 keys equal to the pivot 376
8.6.6 median-of-three partitioning 376
8.6.7 small arrays 377
8.6.8 java quicksort routine 378
8.7 quickselect 380
8.8 a lower bound for sorting 381
contents xxvii

summary 383
key concepts 384
common errors 385
on the internet 385
exercises 385
references 391

chapter 9 randomization 393

9.1 why do we need random numbers? 393


9.2 random number generators 394
9.3 nonuniform random numbers 402
9.4 generating a random permutation 404
9.5 randomized algorithms 406
9.6 randomized primality testing 409
summary 412
key concepts 412
common errors 413
on the internet 414
exercises 414
references 417

part three Applications


chapter 10 fun and games 421

10.1 word search puzzles 421


10.1.1 theory 422
10.1.2 java implementation 423
10.2 the game of tic-tac-toe 427
10.2.1 alpha–beta pruning 428
10.2.2 transposition tables 431
10.2.3 computer chess 435
summary 438
key concepts 438
xxviii contents

common errors 438


on the internet 438
exercises 439
references 441

chapter 11 stacks and compilers 443

11.1 balanced-symbol checker 443


11.1.1 basic algorithm 444
11.1.2 implementation 445
11.2 a simple calculator 454
11.2.1 postfix machines 456
11.2.2 infix to postfix conversion 457
11.2.3 implementation 459
11.2.4 expression trees 468
summary 469
key concepts 470
common errors 470
on the internet 471
exercises 471
references 472

chapter 12 utilities 473

12.1 file compression 474


12.1.1 prefix codes 475
12.1.2 huffman’s algorithm 477
12.1.3 implementation 479
12.2 a cross-reference generator 495
12.2.1 basic ideas 495
12.2.2 java implementation 495
summary 499
key concepts 500
common errors 500
on the internet 500
exercises 500
references 506
contents xxix

chapter 13 simulation 507

13.1 the josephus problem 507


13.1.1 the simple solution 509
13.1.2 a more efficient algorithm 509
13.2 event-driven simulation 513
13.2.1 basic ideas 513
13.2.2 example: a call bank simulation 514
summary 522
key concepts 522
common errors 523
on the internet 523
exercises 523

chapter 14 graphs and paths 527

14.1 definitions 528


14.1.1 representation 530
14.2 unweighted shortest-path problem 539
14.2.1 theory 539
14.2.2 java implementation 545
14.3 positive-weighted, shortest-path problem 545
14.3.1 theory: dijkstra’s algorithm 546
14.3.2 java implementation 550
14.4 negative-weighted, shortest-path problem 552
14.4.1 theory 552
14.4.2 java implementation 553
14.5 path problems in acyclic graphs 555
14.5.1 topological sorting 555
14.5.2 theory of the acyclic shortest-path algorithm 557
14.5.3 java implementation 557
14.5.4 an application: critical-path analysis 560
summary 562
key concepts 563
common errors 564
on the internet 565
xxx contents

exercises 565
references 569

part four Implementations


chapter 15 inner classes and implementation of ArrayList 573

15.1 iterators and nested classes 574


15.2 iterators and inner classes 576
15.3 the AbstractCollection class 580
15.4 StringBuilder 584
15.5 implementation of ArrayList with an iterator 585
summary 590
key concepts 591
common errors 591
on the internet 591
exercises 591

chapter 16 stacks and queues 595

16.1 dynamic array implementations 595


16.1.1 stacks 596
16.1.2 queues 600
16.2 linked list implementations 605
16.2.1 stacks 606
16.2.2 queues 609
16.3 comparison of the two methods 613
16.4 the java.util.Stack class 613
16.5 double-ended queues 615
summary 615
key concepts 615
common errors 615
on the internet 616
exercises 616
contents xxxi

chapter 17 linked lists 619

17.1 basic ideas 619


17.1.1 header nodes 621
17.1.2 iterator classes 622
17.2 java implementation 624
17.3 doubly linked lists and circularly linked lists 630
17.4 sorted linked lists 633
17.5 implementing the collections api LinkedList class 635
summary 646
key concepts 646
common errors 647
on the internet 647
exercises 647

chapter 18 trees 651

18.1 general trees 651


18.1.1 definitions 652
18.1.2 implementation 653
18.1.3 an application: file systems 654
18.2 binary trees 658
18.3 recursion and trees 665
18.4 tree traversal: iterator classes 667
18.4.1 postorder traversal 671
18.4.2 inorder traversal 675
18.4.3 preorder traversal 675
18.4.4 level-order traversals 678
summary 679
key concepts 680
common errors 681
on the internet 682
exercises 682
xxxii contents

chapter 19 binary search trees 687

19.1 basic ideas 687


19.1.1 the operations 688
19.1.2 java implementation 690
19.2 order statistics 697
19.2.1 java implementation 698
19.3 analysis of binary search tree operations 702
19.4 avl trees 706
19.4.1 properties 707
19.4.2 single rotation 709
19.4.3 double rotation 712
19.4.4 summary of avl insertion 714
19.5 red–black trees 715
19.5.1 bottom-up insertion 716
19.5.2 top-down red–black trees 718
19.5.3 java implementation 719
19.5.4 top-down deletion 726
19.6 aa-trees 728
19.6.1 insertion 730
19.6.2 deletion 732
19.6.3 java implementation 733
19.7 implementing the collections api TreeSet and
TreeMap classes 738
19.8 b-trees 756
summary 762
key concepts 763
common errors 764
on the internet 764
exercises 765
references 769

chapter 20 hash tables 773

20.1 basic ideas 774


20.2 hash function 775
20.2.1 headCode in java.lang.String 777
contents xxxiii

20.3 linear probing 779


20.3.1 naive analysis of linear probing 780
20.3.2 what really happens: primary clustering 781
20.3.3 analysis of the find operation 782
20.4 quadratic probing 784
20.4.1 java implementation 788
20.4.2 analysis of quadratic probing 797
20.5 separate chaining hashing 797
20.6 hash tables versus binary search trees 798
20.7 hashing applications 800
summary 800
key concepts 801
common errors 802
on the internet 802
exercises 802
references 805

chapter 21 a priority queue: the binary heap 807

21.1 basic ideas 808


21.1.1 structure property 808
21.1.2 heap-order property 810
21.1.3 allowed operations 811
21.2 implementation of the basic operations 814
21.2.1 insertion 814
21.2.2 the deleteMin operation 816
21.3 the buildHeap operation: linear-time heap construction 818
21.4 advanced operations: decreaseKey and merge 823
21.5 internal sorting: heapsort 823
21.6 external sorting 826
21.6.1 why we need new algorithms 826
21.6.2 model for external sorting 827
21.6.3 the simple algorithm 827
21.6.4 multiway merge 829
21.6.5 polyphase merge 830
21.6.6 replacement selection 832
xxxiv contents

summary 833
key concepts 834
common errors 834
on the internet 835
exercises 835
references 839

part five Advanced Data


Structures
chapter 22 splay trees 843

22.1 self-adjustment and amortized analysis 844


22.1.1 amortized time bounds 845
22.1.2 a simple self-adjusting strategy (that does not work) 845
22.2 the basic bottom-up splay tree 847
22.3 basic splay tree operations 850
22.4 analysis of bottom-up splaying 851
22.4.1 proof of the splaying bound 854
22.5 top-down splay trees 857
22.6 implementation of top-down splay trees 860
22.7 comparison of the splay tree with other search trees 865
summary 866
key concepts 866
common errors 867
on the internet 867
exercises 867
references 868

chapter 23 merging priority queues 871

23.1 the skew heap 871


23.1.1 merging is fundamental 872
23.1.2 simplistic merging of heap-ordered trees 872
Other documents randomly have
different content
The Project Gutenberg eBook of El Sabor de la

Venganza
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: El Sabor de la Venganza

Author: Pío Baroja

Release date: March 6, 2017 [eBook #54285]


Most recently updated: October 23, 2024

Language: Spanish

Credits: Produced by Carlos Colón, University of Toronto and the


Online Distributed Proofreading Team at
http://www.pgdp.net
(This file was produced from images generously made
available by The Internet Archive/Canadian Libraries)

*** START OF THE PROJECT GUTENBERG EBOOK EL SABOR DE LA


VENGANZA ***
Nota del Transcriptor:

Se ha respetado la ortografía y la acentuación del


original.

Errores obvios de imprenta han sido corregidos.

Páginas en blanco han sido eliminadas.

La portada fue diseñada por el transcriptor y se


considera dominio público.

PÍO BAROJA
MEMORIAS DE UN HOMBRE DE ACCIÓN

El aprendiz de conspirador.
El escuadrón del Brigante.
Los caminos del mundo.
Con la pluma y con el sable.
Los recursos de la astucia.
La ruta del aventurero.
Los contrastes de la vida.
La veleta de Gastizar.
Los caudillos de 1830.
La Isabelina.
El sabor de la venganza.

MEMORIAS DE UN HOMBRE

DE ACCIÓN
EL SABOR DE LA VENGANZA

ES PROPIEDAD
DERECHOS RESERVADOS
PARA TODOS LOS PAÍSES

COPYRIGHT BY
RAFAEL CARO RAGGIO
1921
Establecimiento tipográfico
de Rafael Caro Raggio

PÍO BAROJA

MEMORIAS DE UN HOMBRE DE ACCIÓN

EL SABOR DE LA VENGANZA

SEGUNDA EDICIÓN
RAFAEL CARO RAGGIO
EDITOR
MENDIZÁBAL, 34
MADRID
PRÓLOGO

Hablemos un poco.
Goethe.
Estas historias violentas de sangre—dice nuestro amigo Leguía—me
las contó Aviraneta en San Leonardo, un pueblo de la provincia de
Soria, adonde don Eugenio iba a veranear los últimos años de su
vida. Yo solía ir a ver a Aviraneta con frecuencia cuando estaba en
Madrid y vivía en la calle del Barco. Aviraneta era ya viejo en este
tiempo: andaba cerca de los ochenta años; y yo, aunque más joven
que él, sentía que también para mí había pasado la época de la
acción y del entusiasmo. Los dos, solitarios y olvidados,
recordábamos nuestros tiempos, que nos parecían mejores que
aquellos en que vivíamos.
Josefina, la mujer de don Eugenio, una francesa de Toulouse, con la
que se había casado, ya viejo, me decía que no dejara de visitar a su
marido.
—El pobre se aburre y a usted le quiere como a un hijo—me
indicaba la francesa.
—Yo voy a verle siempre que puedo.
—¡Está tan abandonado!—añadía ella.
En la época de la guerra francoprusiana, Josefina me escribió que
don Eugenio estaba en San Leonardo, un poco delicado de salud, y
que se quedaba allí hasta reponerse.
Fuí a verle a don Eugenio al pueblo y lo encontré ya bien.
Pensaba volver en seguida a Madrid; pero me sorprendió una gran
borrasca de frío y nieve y tuve que quedarme allí unos días hasta
que pasara.
San Leonardo es un pueblo entre pinares, al lado de un cerro
coronado por las ruinas de un castillo. Don Eugenio vivía en casa del
nieto de un guerrillero del Cura Merino, a quien llamaban el tío
Chaparro.
El tío Chaparro era dueño de grandes rebaños y tenía una hermosa
casa de piedra con una cocina ancha, que cogía casi la mitad del
piso bajo.
El hijo del guerrillero miraba a don Eugenio como a un héroe, y más
que como a un héroe, como a un sabio: le escuchaba
religiosamente, mandaba que todo el mundo le obedeciese y le
ponía un gran sillón de cuero al lado de la lumbre. De noche, en la
cocina, solía haber gran reunión de cabreros y de zagales que, por
sus indumentarias toscas, sus túnicas como dalmáticas y sus capotes
de lana cruda con capucha, me parecían pastores de nacimiento.
Aviraneta y yo solíamos tener largas charlas al lado del fuego, en las
que recordábamos sucesos políticos, y nuestras conversaciones las
escuchaban con gran curiosidad los pastores.
Aviraneta se entretenía escribiendo una relación de sus aventuras de
guerrillero de la guerra de la Independencia, las que pensaba
cándidamente ofrecer como ejemplo a los franceses, para que viesen
la manera de rechazar la invasión alemana.
Yo, entonces, estaba leyendo por primera vez la Biblia, en la
traducción de Cipriano de Valera, y hacía comentarios acerca de sus
máximas y de sus reflexiones, y, a pesar de que soy un espíritu muy
poco bíblico, me entretenía la lectura, aunque muchas veces me
repugnaba.
Un día le dije a don Eugenio:
—No me ha contado usted nunca con detalles su vida en la Cárcel
de Corte el año 1834.
—¿Qué voy a contar de allí? Era la mía una vida monótona y siempre
igual. En la cárcel los días se parecen demasiado uno a otro. Se vive
recordando lo que ha pasado y pensando en lo que se va a hacer al
salir de la prisión.
—Cuénteme usted con detalles todo cuanto recuerde de la cárcel y
de su vida en ella.
—No creo que sea muy interesante, pero te lo contaré.
Los datos que me dió Aviraneta de su estancia en la Cárcel de Corte
no fueron ni muy nuevos ni de gran interés.
Si los menciono aquí es porque la Cárcel de Corte sirve de marco a
las historias sangrientas que siguen después.

Y ahora una advertencia:


Como los chicos cuando terminan un castillo de arena le adornan
con unas banderolas vistosas para que tengan más apariencia, así
he hecho yo poniendo después de acabada mi obra frases literarias
de escritores célebres al frente de los capítulos.
Así he pretendido dar a éstos cierto aire de pompa y de solemnidad
que, naturalmente, no tienen; porque yo nunca he sido ni pomposo
ni solemne. De esta manera, al que no le guste el texto se puede
entretener con las banderolas.
LA CÁRCEL DE CORTE

I.
EL CALAMAR

Sobre mi cabeza,
¡escuchad! Escuchad los
gritos prolongados y
frenéticos de aquellos
cuyo cuerpo y cuya alma
son igualmente cautivos.
Lord Byron: La
lamentación del Taso.

Denunciado por Francisco Civat y preso por el inspector Luna—


comenzó diciendo Aviraneta—ingresé el 24 de julio de 1834 en la
Cárcel de Corte.
Martínez de la Rosa, que me tenía por un hombre peligroso, tomó
precauciones para impedir que me escapara. A mi ingreso en la
cárcel fueron destituídos el alcaide, un llavero y otros carceleros
considerados como liberales y que pertenecían a la Milicia Urbana, y
reemplazados por ex voluntarios realistas. El poeta granadino no era
torpe, y comprendió que nada mejor para guardar a un conspirador
liberal que unos carceleros absolutistas.
A poco de entrar en la cárcel se comenzó mi proceso en el juzgado
del teniente corregidor don Pedro Balsera.
Martínez de la Rosa eligió para juez de la causa a un tal Regio,
absolutista exaltado, y le previno que estaba entendiendo en un
proceso de alta traición; y de fiscal nombró a don Laureano de Jado,
antiguo afrancesado del tiempo del rey José, después protegido de
Calomarde y, por último, amigo de Rosita la pastelera.
Don Laureano era un lechugino muy peripuesto. Se hallaba
indignado contra mí porque entre los papeles que me cogió la policía
había dos circulares, en una de las cuales decía que el Estatuto Real
estaba formado por una amalgama de afrancesados, anilleros y
desertores del carlismo, y en la otra recomendaba la prisión y el
destierro en bloque del gran Consistorio de abates renegados
formado por Hermosilla, Lista, Miñano y sus amigos, que se
entendían con Luis Felipe para impedir toda tentativa liberal en
España.
A don Laureano, que había formado parte de la Comisión Militar de
Madrid en tiempo del terror de Calomarde y Chaperón, le parecía
mucha severidad la nuestra con la Junta de abates afrancesados,
que siempre, vanagloriándose de su cultura, tenían que influír a
favor de la rutina y del absolutismo.
Para escribano de la causa eligieron a don Juan José García, ex
sargento realista, que pasados unos años figuró como secretario de
la Junta facciosa de Morella.
Así, un liberal como yo, preso por un Gobierno liberal, estaba
vigilado por furibundos absolutistas.
Al entrar en la cárcel se dijo que yo me había comido la lista de los
comprometidos en la Isabelina, cosa absurda, porque una lista de
dos mil nombres no se la come uno por buen estómago que tenga.
Me batí con el juez y con el fiscal y les mareé con declaraciones
contradictorias. Hice como el calamar, que enturbia el agua para
escaparse.
Tan pronto aparecía la Isabelina como una sociedad secreta, de la
que formaban parte la infanta Luisa Carlota, el infante don
Francisco, Palafox y el conde de Parcent, como era un proyecto que
no había pasado de utopía acariciada en mi imaginación.
Entre otras cosas le dije al juez que tenía guardados documentos
importantísimos, y que si moría en la cárcel estos documentos se
publicarían inmediatamente en París después de mi muerte.
La amenaza dió grandes resultados.
El juez me decía:
—Pruebe usted sus asertos, presente usted esos documentos.
—No presentaré documento alguno si no me dejan libre.
—¿Qué miedo puede usted tener?
—Miedo de que me quiten los documentos para poderme aplastar
impunemente.
Le dije también al juez, en confianza, que el infante don Francisco y
su mujer pretendían la expulsión de María Cristina y de sus hijas
para quedarse ellos con la Regencia de España. Que después
pensaban elevar al trono al infante don Francisco, y que se habían
acuñado monedas con esta leyenda: «Francisco I, rey por la gracia
de Dios y de la Constitución».
—¿Estos proyectos no se los habrán contado a usted los mismos
infantes?—me dijo el juez con sorna.
—Sí.
—¿Es que ha hablado usted con ellos?
—Sí, señor.
—¡Bah!
—¡No lo crea usted! El ex ministro don Javier de Burgos y el
inspector de policía Luna me encontraron en la antecámara de
Palacio la primera vez que fuí a ver a los infantes, llamado por ellos.
Pregúnteles usted a Burgos y a Luna: lo podrá usted comprobar.
El juez no sabía a qué carta quedarse. Yo le daba mezcladas la
mentira y la verdad, y él no sabía separarlas. Indignado el hombre,
en uno de sus escritos me llamó malvado y miserable, y dijo
públicamente que yo acusaba al infante don Francisco y a Palafox.
Estas declaraciones mías, que se conocieron en Palacio, me valieron
el odio de la infanta Luisa Carlota y de su marido, y luego la amistad
de María Cristina, porque llegaron las dos hermanas a odiarse de tal
modo, que los amigos de una eran sólo por esto enemigos de la
otra.
El general Palafox se debió ver en un apuro; afirmó que no tenía
relación alguna con la Isabelina y que no me conocía a mí, aunque
por otra parte me creía persona de honor e incapaz de una
impostura. Dijo que el plan revolucionario mío era una fantasía, y
aseguró que el capitán Civat era un agente carlista que me había
engañado a mí, sin decir que el primer engañado había sido él.
El mismo día Palafox envió a su sobrino a casa de mi hermana con el
encargo de decirla que él pondría en juego sus altas influencias para
sacarme lo más pronto posible de la cárcel.
A Palafox se le ordenó que quedara arrestado en un cuartel, y luego,
con la benevolencia que se tiene siempre con los poderosos, se le
dejó detenido en su propia casa, en comunicación con su familia y
sus amigos.
Después, cuando se supo que yo no acusaba a nadie, sino que
afirmaba que el único conspirador de la Isabelina era yo, y que, por
lo tanto, no había conspiración, los que tenían miedo de aparecer
complicados se tranquilizaron. El conde de las Navas, en las Cortes,
interpeló al Gobierno por la prisión de Palafox; y Martínez de la Rosa
contestó dando a entender que lo sabía todo.
Al mismo tiempo que yo fueron presos varios otros individuos que
formaban parte de la Isabelina: Nogueras, Beraza, Calvo de Rozas,
Olavarría, Romero Alpuente, Espronceda, García Villalta. Todos ellos
ingresaron en la Cárcel de Corte. En provincias se hicieron también
muchas prisiones.
A las dos o tres semanas no quedábamos allí mas que Beraza,
Romero Alpuente y yo. Beraza no sé cómo se las arregló para salir
pronto.
Espronceda y García Villalta, a pesar de su fachenda byroniana,
cantaron la palinodia de una manera humilde, y se les sacó de la
prisión y se les llevó desterrados a Badajoz.
Me quedé con el compañero peor, Romero Alpuente, viejo decrépito
y sin ánimo.
Romero Alpuente se quejaba de la Soledad, de la tristeza, de la falta
de aseo y de los parásitos de la cárcel; después, cuando invadió el
cólera la prisión, el pobre hombre se pasaba la vida en la cama
escribiendo memoriales a la Reina.
II.

SOLO

Desgracia al hombre solo.


El Eclesiastés.

Poco a poco todos los complicados en aquella causa, por entonces


célebre, quedaron libres. Yo solo permanecí en la cárcel vigilado
estrechamente durante meses y meses, hasta que pude escapar,
gracias a un pronunciamiento.
Nadie fué castigado en serio, y el denunciador de la Isabelina, don
Francisco Civat, fué agraciado poco después por el ministerio, contra
el dictamen del ministro, Moscoso de Altamira, con el empleo de
vista de la aduana de Barcelona. Lo disfrutó poco tiempo, porque en
el primer movimiento revolucionario que hubo allí tuvo que
esconderse y fugarse a Francia, en donde tomó partido por Don
Carlos.
Después de muchas declaraciones mías, el fiscal don Laureano de
Jado declaró inocentes a todos los procesados, y consideró que el
único culpable era yo. Mientras el proceso duró, la preocupación por
lo que tenía que decir y que contestar me tuvo en tensión el
espíritu; luego pasé una temporada aburrido y desesperado.
Se comenzó a olvidar mi causa. De tarde en tarde se hablaba de mí
en los periódicos. Don Fermín Caballero, que no era de mi cuerda, y
que tenía cierta rabia por los que nos sentíamos capaces de
jugarnos la vida en una conspiración como la fraguada en julio, dijo
que la Isabelina era una sociedad formada por calaveras y gente del
trueno, que no tenía más misión que la de alborotar.
Cuando me nombraba a mí en el Eco del Comercio me llamaba el
atolondrado Aviraneta. ¡Atolondrado! Claro es, porque yo había
expuesto el pellejo y él no lo había expuesto nunca.
Hay demócratas—y al decir esto don Eugenio sonreía con cierto
desprecio—, que creen que el mundo puede hacer desaparecer con
el tiempo a los héroes y a los aventureros.
Esta idea me parece una idea falsa y ridícula. Siempre habrá un
desequilibrio entre la realidad y la utopía que permita una aventura
al que tenga fondo de aventurero.
¿Además, es apetecible que desaparezca todo lo que sea esfuerzo,
improvisación y energía? No veo por qué el ideal de la vida haya de
ser llegar a una existencia mecanizada y ordenada como una oficina
de comercio. No creo que se pueda alcanzar esto. ¿Cuándo se han
hecho cosas admirables sin esfuerzo y sin heroísmo? ¿Se harán
alguna vez? Yo creo que nunca.
Por más que quieran cerrar, alambrar el recinto social, siempre habrá
boquetes libres para escaparse; por más que los Gobiernos decreten
que los hombres deben ser unos buenos cerdos tranquilos cuyo ideal
sea el pesar muchas arrobas, siempre habrá jabalíes entre ellos.
Por esta época del cólera, el partido cristino tuvo el primer
quebranto, al hacerse público que la Reina se había enredado con
Muñoz y que había tenido un hijo. Todo Madrid debía estar
comentando con fruición el caso, y la noticia llegó hasta la cárcel.
Se habló de las citas, en la Granja de Quitapesares, entre María
Cristina y el guardia de Corps; se habló de la tía Eusebia, del
estanquero de Tarancón, de la niña Gertrudis Magna Victoria, que,
según los chuscos, podía poner con el tiempo en su escudo los lirios
de los Borbones al lado de las cajetillas de tabaco de los Muñoces.
Se contó que estando de caza en el Pardo María Cristina con la
Corte, la Reina le dijo a Muñoz, al ver saltar una pieza: «Para ti,
Muñoz»; y que él contestó: «No; para ti, Cristina».
Se contó también que se había reunido el Gabinete con el objeto de
discutir la cuestión de los amores de la Reina, y se habló en broma
de lo que habían aconsejado los unos y los otros. Se decía que los
más conspicuos del partido moderado estaban de acuerdo en
aconsejar moderación a aquella italiana, ardiente y fogosa.
Martínez de la Rosa decía que Zarco del Valle, como militar galante,
era el más a propósito para llevar a buen término, y de una manera
delicada, esta gestión de índole moderada; Toreno aseguraba que
Garelly era el más insinuante y jesuítico, y Garelly objetaba que el
más indicado de todos era el duque de Rivas, puesto que podía dar
a la observación un aire de poesía y de lirismo.
III.

LA CÁRCEL

Allí están los alegres y los


tristes; allí hay hombres
muriendo; allí hay
hombres nacidos, hay
hombres orando; al lado
de un tabique de ladrillo
hay hombres maldiciendo,
y, en torno de todos ellos,
está la noche inmensa y
vacía.
Carlyle: Sartor Resartus.

La Cárcel de Corte de Madrid estaba formada, en parte, por ese


edificio de la plaza de Santa Cruz, que luego ha sido Ministerio de
Ultramar, y, en parte, por otro, anejo a él, que fué en tiempo pasado
hospedería de los Padres del Salvador.
La Cárcel de Corte, con sus dos cuerpos, formaba un paralelogramo
largo y estrecho. Los lados cortos los componían: uno, la fachada de
la plaza de Santa Cruz, en donde había entonces una fuente, la
fuente de Orfeo, y el otro, varias casuchas que daban a la calle de la
Concepción Jerónima. Por los lados largos pasaban, casi paralelas, la
calle del Salvador y la de Santo Tomás.
Una parte estaba dedicada a cárcel de mujeres, y muchas de éstas
tenían sus hijos pequeños con ellas. Era muy difícil darse cuenta
clara de la topografía de la cárcel, porque todo el edificio se hallaba
dividido con tabiques, que formaban rincones y pasillos, y en
aquellos recovecos se desorientaba uno en seguida.
En la cárcel había mucha más gente que la que buenamente cabía
en ella; faltaba luz y ventilación, y, sobre todo en el verano, no se
podía respirar por el mal olor. Cuando entraban los magistrados de la
Audiencia solían quemar incienso y plantas aromáticas.
Los pobres lo pasaban horriblemente; muchos no tenían ropas ni
mantas, y dormían en pleno invierno sobre el suelo, de piedra. Los
alcaides solían arrendar los distintos servicios a pequeños
industriales, que explotaban a los presos de una manera miserable.
El día de Jueves Santo se asomaban los presos a las rejas que daban
a la plaza de Santa Cruz, y pedían limosna a los transeúntes,
gimoteando y haciendo sonar sus cadenas.
El domingo y los días de fiesta los ladrones se exhibían en los patios
de la cárcel y se daban tono. Había cantos, guitarreo y a veces riñas,
en las cuales salían a relucir navajas y estoques.
Los empleados de la cárcel eran: un alcaide, un capellán, tres
porteros, seis demandaderos, una demandadera, un llavero, un
escribiente, un enfermero, un cocinero, un mayordomo, un médico y
un cirujano. Los cuartos costaban: los de primera, siete reales al día;
los de segunda, cuatro, y los de tercera, dos. La sección de políticos
era más limpia y más cuidada que el resto. Yo tenía un cuarto
bastante regular, con una mesa, una cama y una butaca. A los pies
de la cama ponía cuatro cacharritos llenos de agua para que no
subieran las chinches, porque a estos huéspedes no había manera
de exterminarlos.
Al principio no quisieron dejarme tener libros, ni papel, ni tinta; pero
luego, sí.
En los primeros días de cárcel, el alcaide me vigilaba de una manera
molesta; no me permitía hablar con nadie sin estar él delante. Me
trataba con gran consideración y me decía que no hacía mas que
cumplir con su deber.
Don Paco, el alcaide, era uno de los mayores bribones de España:
robaba a los presos y los explotaba de una manera inicua. Eso sí, lo
hacía todo con una gran finura: no se le oía jamás un insulto o una
palabra soez.
Don Paco había sido lego en un convento y tambor de una partida
realista.
Era el tal don Paco, por entonces, hombre de unos cuarenta años,
muy alto, muy encorvado, muy flaco, un verdadero espectro. Tenía
la nariz aguileña, los dientes muy blancos, los ojos negrísimos, de
extraña expresión; la piel obscura, y el pelo, como decían los autores
románticos, del color del ala del cuervo. Iba siempre muy pulcro,
muy bien afeitado, y tenía la costumbre de restregarse las manos
haciendo un ruido como de huesos.
Su vigilancia sonriente me llegó a exasperar.
Al principio, iracundo por verme tan vigilado, para encontrarme solo
comencé a no salir de mi calabozo.
Con aquella vida sedentaria y la humedad del cuarto se me
exacerbaron los dolores reumáticos y tuve que guardar cama. El
médico me visitó, y dijo que era indispensable para mí el hacer
ejercicio, pues si no mi enfermedad se agravaría. Esta prescripción
facultativa me obligó a salir al patio con frecuencia, y a dar vueltas y
más vueltas, y a conocer a los detenidos.
La mayoría de los presos políticos de la Cárcel de Corte eran
furibundos realistas; había también algunos liberales, sospechosos
de haber tomado parte en la matanza de frailes. Los realistas eran
casi todos de fuera de Madrid: curas, frailes, abogados, guerrilleros
de la Mancha llevados a la corte para declarar en procesos de
conspiración.
La sección de políticos rebosaba, y su personal era el más extraño y
heterogéneo: había allí, desde carbonarios hasta absolutistas
rabiosos; desde apóstoles hasta asesinos.
Por ser los carlistas presos gente de más fuste que los liberales, y
por tener la protección decidida del alcaide y de los principales
celadores, los absolutistas disfrutaban en la Cárcel de Corte de
preeminencias y de ventajas que no disfrutábamos los demás.
El abogado carlista Selva, y algunos frailes amigos suyos, llevaban
allí la voz cantante y dirigían y mandaban no sólo en el patio de los
políticos, sino también en el de los detenidos por delitos comunes.
En éstos se verificó una división parecida a la de los políticos, y hubo
un grupo liberal y otro carlista, con sus pasiones, sus odios, su
intolerancia y su fanatismo. Unos cuantos carlistas valencianos,
capitaneados por un arriero, llamado el Roch, y por un esterero de
Crevillente, apodado el Tate, entraron por instigación de los frailes y
de Selva en el segundo patio, con el asentimiento del alcaide don
Paco, y se dedicaron a hacer prosélitos.
Mis dos ayudantes en la cárcel eran Román, el hijo del librero de
viejo de la calle de la Paz, y Gasparito, un zapatero remendón,
hombre de muy buen sentido.
Además de estos dos tenía como compañeros y correligionarios al
Mingo y al señor Bruno, que eran albañiles; al Mulato, que era
albeitar, y al Sanguijuelero, que tenía esta profesión unida a la de
sangrador y la de herbolario. Todos estos habían sido detenidos
durante la matanza de frailes por excitaciones al pueblo.
Entre los carlistas presos, la mayoría eran campesinos, y tenían, en
general, buen aspecto.
Había gran diferencia entre los carlistas, casi todos del campo, y los
revolucionarios madrileños. Eran mejores tipos aquéllos, más
fuertes, más nobles, más enteros; daban una impresión de mayor
energía.
—Hoy lo mejor del pueblo es carlista—pensaba yo—; pero dentro de
cincuenta años no pasará lo mismo.
Había también gran diferencia entre los presos políticos y los
ladrones. Sólo a primera vista, por su aspecto, podían distinguirse
los unos de los otros; los políticos tenían un aire más recogido, más
ensimismado; los otros alardeaban de la fanfarronería y del cinismo
que caracterizan a los criminales de profesión. Como estábamos los
liberales en minoría, yo pensé que me convendría frecuentar el patio
de los presos de delitos comunes para hacer prosélitos.
Un día encontré en la cárcel al célebre ladrón Candelas, a quien
conocía y había tenido como agente de la Isabelina. Reconocimos
ambos que estábamos metidos en un callejón sin salida. Candelas
abrigaba la esperanza de escaparse. Me propuso un plan de fuga,
pero no tenía condiciones para llevarlo a la práctica.
El alcaide, que vió que charlábamos Candelas y yo, no sospechó que
pudiéramos conocernos de antemano; Candelas me indicó que me
dirigiera a Francisco Villena (Paco el Sastre), por ser éste amigo suyo
y hombre de recursos; y, efectivamente, me vi con él y conseguí que
él intrigara en el patio de presos de delitos comunes para impedir
que los absolutistas se hicieran dueños de la cárcel.
Poco después Candelas fué trasladado a otra prisión.
IV.

El PADRE ANSELMO

Feliz el que nunca ha visto


más río que el de su
patria, y duerme, anciano,
a la sombra do
pequeñuelo jugaba.
Alberto Lista: Entre las
cimas del Alpe.

Entre los clérigos y frailes que estaban en la cárcel había un cura de


pueblo, viejo, sordo, de sotana raída, que se llamaba don Anselmo
Adelantado. Yo, al principio de conocerle, desconfié de él; se me
acercaba, me saludaba y me mareaba a preguntas.
Yo pensé: éste es un espía, un echadizo. Y, naturalmente, con esa
idea le daba informes falsos.
Luego empecé a sospechar que el padre Anselmo era un simple, un
pobre de espíritu; sus compañeros y correligionarios presos le daban
siempre de lado.
Cuando intimé más con él me convencí de que el padre Anselmo era
un hombre de esos de espíritu angelical que pasan por la vida sin
enterarse de las miserias de la Humanidad.
El padre Anselmo era un hombre sin ninguna malicia, y, a pesar de
esto, se creía muy malicioso. Tomaba al pie de la letra todo lo que le
decían.
Era de un pueblo próximo a Molina de Aragón.
Su historia se podría contar en pocas palabras. Le habían hecho
cura, le habían nombrado párroco de un pueblo y había estado allí
cuarenta años viviendo, primero con una hermana y luego con una
sobrina. Al comenzar la guerra, los carlistas le habían hablado de
que era indispensable que él les favoreciese y se pusiera de su lado;
y como él estaba convencido de que los liberales tenían pacto con el
demonio y de que la Reina Cristina era una masona, había ofrecido
su concurso. Luego le habían denunciado y le habían traído a
Madrid, a la Cárcel de Corte.
El padre Adelantado era un hombre de más de sesenta años, con
una cara tosca y terrosa; la boca grande, las cejas, como pinceles
blancos, caídas sobre los ojos, y las manos cuadradas y fuertes.
Tenía una manera de hablar un poco ruda, entre castellana y
aragonesa. Usaba en la cárcel una sotanilla raída, de color de ala de
mosca, y un bonete.
Tenía una sotana nueva y un manteo, que guardaba en su maleta,
que le parecían a él el colmo del lujo.
Las observaciones del padre Anselmo me regocijaban lo indecible.
Una vez había dos mujeronas de la vida airada en el locutorio
esperando a alguno.
—¡Pobres muchachas!—dijo el padre Anselmo—; habrán venido a
ver a sus padres o quizá a sus novios.
—Sí, seguramente.
Yo, cuando le oía alguna de estas cosas, hacía un gesto para no
echarme a reír, y él se reía también, porque decía que, aunque cura,
era muy malicioso.
Al padre Anselmo le gustaba fumar y yo le daba cigarros; pero él no
quería.
—Un cigarrito, bien; pero nada más. Ya sería vicio.
Un día, después de muchas vacilaciones, me dijo:
—Don Eugenio.
—¿Qué?
—Me han dicho una cosa muy grave.
—¿Qué le han dicho a usted?
—Que usted es liberal.
—¡Ah!; ¿pero no lo sabía usted?
—No. ¡Así que usted es liberal! ¡Ave María Purísima! ¡Y yo que le
creía a usted una buena persona!
—Y lo soy.
—Pero, bueno, dígame usted la verdad. ¿Usted ha hecho pacto con
el Demonio?
—No, no; puede usted creerme, padre Anselmo: no he hecho pacto
con él.
—¡Ah, vamos! Así que usted sigue siendo cristiano.
—Sí, sí.
—Porque hay otros, ¿sabe usted?, que van a las logias masónicas, y
allí creo que hacen horrores. ¡Ave María Purísima!
El padre Anselmo me entretenía con su conversación, cándida e
inocente.
Muchas veces me hablaba del campo, de lo que estarían haciendo
por aquellos días en su pueblo. Su charla tenía un sabor de aldea
que me encantaba. No hay sitio, ciertamente, en donde los
recuerdos del campo tengan más valor, ni más encanto, que en la
cárcel; así que yo le oía al cura viejo entretenidísimo.
V.

LUCHAS

Tienen dos madres, las


dos madrastras: la
ignorancia y la miseria.
Víctor Hugo: Los
Miserables.

La Cárcel de Corte tenía tres patios, que servían para que pasearan
los presos. El primero se hallaba dentro del edificio actual, y tenía
alrededor oficinas y cuartos para nosotros los políticos; el segundo
estaba entre los dos cuerpos del edificio, el que queda y el
derribado, que daba a la calle de la Concepción Jerónima.
A los lados de éste se levantaban unos pabellones abovedados,
horriblemente sucios y siniestros. A uno de ellos lo llamaban la
Grillera. Allí solían estar encerrados los ladrones, y, en una especie
de jaula, se metían todas las noches a los muchachos jóvenes y a
los niños, jaula que se llamaba la Gallinería. De este patio central se
pasaba a otro, pequeño y profundo, que daba hacia la calle de la
Concepción Jerónima, y que había sido el antiguo cementerio de los
Padres del Salvador. Cortando el edificio había un callejón estrecho,
el callejón del Verdugo, por el cual entraba el ejecutor de la Justicia
cuando tenía que acompañar a algún reo a la horca.
Hacia la Concepción Jerónima había calabozos irregulares, obscuros,
que se destinaban a los grandes criminales y asesinos, y más atrás,
una pequeña capilla para los condenados a muerte, en la cual se les
tenía tres días.
Los presos del segundo patio vivían horriblemente: a muchos no les
llegaba el rancho; si tenían algún dinero podían recurrir a una
cantina, donde estaba todo carísimo; si no, se quedaban sin comer.
Un preso murió de hambre en un calabozo. Aquel calabozo se le
llamó el del Olvido.
Era el tercer calabozo célebre de la cárcel; había otros dos que
tenían nombre: el de La Sed y el del Dragón.
Cuando yo visité el segundo patio, en el calabozo del Olvido había
un idiota vagabundo a quien tenían que traspasar al hospital. Este
idiota chillaba y cantaba y hacía reír a los presos, que le
consideraban como un hombre feliz.
Los criminales audaces conseguían allí lo que querían: comían bien,
bebían, tenían armas y hacían que les visitasen las mujeres del otro
departamento.
Paco el Sastre, a quien, como digo, Candelas me había
recomendado, me hizo conocer a dos raterillos a quienes exigió que
me obedecieran como a su jefe. Uno de éstos era el Gacetilla, un
chico que llamaban así porque sabía todo cuanto ocurría dentro y
fuera de la cárcel, y el otro, el Mambrú, un gimnasta que andaba
con las manos y daba saltos mortales.
Por estos muchachos pude comunicarme libremente con mis amigos
de fuera. Uno de los procedimientos que tenían era cantar. Un preso
cantaba una copla, en la que decía disimuladamente lo que quería, y
al día siguiente se ponía un ciego con la guitarra en la Concepción
Jerónima, y en la canción que entonaba venía la respuesta.
Con Paco el Sastre comencé a organizar una campaña contra el
alcaide y los carceleros carlistas. Los presos del segundo patio se
dividieron también en liberales y carlistas; pero aquí las fuerzas
estaban equilibradas.
Entre aquellos bandidos y estafadores, la influencia de un
lugarteniente de Candelas, como Paco el Sastre, era decisiva. Yo les
ayudé lo que pude a los que se vinieron al campo liberal.
Con motivo de la división entre carlistas y liberales se producían
riñas constantes; un día hubo en el segundo patio una gran pelea
entre un bandido que llamaban el Raspa, que había sido procesado a
raíz de la matanza de frailes, y un guerrillero carlista, el Ausell.
Se desafiaron: el Raspa le tiró una navajada y le cortó la cara,
mientras el otro le dió una cuchillada en el pecho que le dejó medio
muerto.
Yo hice un padrón de los presos liberales, de los carlistas y de los
indefinidos, y como prefacio al padrón, un ligero estudio acerca de la
psicología de los tipos desde el punto de vista del mayor o menor
valor que podían tener para una conspiración.
Aviraneta me confesó que en su tiempo pensó hacer, más o menos
en broma, el manual del perfecto conspirador.
VI.

EL SEGUNDO PATIO

En el patio de la cárcel
hay escrito con carbón:
«Aquí el bueno se hace
malo, y el malo se hace
peor».
Carcelera.

Yo no soy precisamente un sentimental, ni un poeta de delicadezas


ni de ternuras, y, sin embargo, la perspectiva del segundo patio, la
primera vez que entré en él, me hizo un efecto terrible. Era un
cuadrado con paredes altas y lleno de gente.
Aquel patio tenía algo de plazuela, de casa de juego, de manicomio,
de foro, de plaza de toros y de hospital.
Todas las aglomeraciones de hombres solos son, indudablemente,
malsanas, repugnantes; huelen a sentina, ya sean cárceles,
cuarteles, seminarios o conventos; pero la cárcel es la cloaca
máxima.
Allí se reúne la basura humana, los detritos de la sociedad. Lo que
no está podrido se pudre pronto, y la infección envenena el
ambiente con sus miasmas.
La cárcel es como la imagen negativa de la vida moral. Allí la bajeza,
la fealdad, la maldad, el odio, todo lo más horrendamente humano,
se muestra a lo vivo.
Es un pantano en una fermentación constante que exhala vapores
fétidos bastantes para envenenar toda la atmósfera.
La cárcel es la universidad de lo perverso. La Naturaleza se divierte,
a veces, en formar monstruos con lo físico o con lo moral. Los
monstruos físicos vagan por el mundo; los monstruos morales
tienden a reunirse en la cárcel. Aquí se completan, se complican, se
hacen más perfectos en su monstruosidad.
En la Cárcel de Corte, por entonces, había de todo: políticos,
homicidas, lechuguinos, jovencitos elegantes y bien puestos, viejos
barbudos y enfermos, locos desnudos que lanzaban horribles
lamentos, reñidores desesperados que pasaban la vida entre gritos y
blasfemias.
Allí el robo, el asesinato, la estafa, la locura, el cinismo, la
enfermedad, la miseria, la matonería, la sodomía se daban la mano
y bailaban una terrible danza macabra.
Esta fermentación de la cárcel, que acaba con los sentimientos
nobles del hombre, no sólo no acaba, sino que deja el egoísmo, el
instinto de vivir más ágil que nunca. Nada se parece tanto a un
gallinero, a una casa de fieras, a una selva virgen, a un bosque de
bestias feroces, como una cárcel. El preso vive allí como un piel roja,
siempre en acecho, dispuesto a destrozar al prójimo por la fuerza,
por la malicia o por el engaño.
Lo característico de la cárcel es esto: que no hay piedad. El valiente
allí muere o vence, el tímido sucumbe; para el desdichado sin
energía son todas las miserias, todos los horrores, todas las groseras
mixtificaciones.
El fuerte manda y gallea; el cobarde adula y se envilece. Allí no hay
que hacerse ilusiones. Hay que dejar toda esperanza; no hay mas
que miradas de odio, de rabia, de desesperación o de desprecio. El
que teme caer, sabe que si cae todos pasarán por encima de su
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookball.com

You might also like