PDF Problems on Algorithms: A Comprehensive Exercise Book for Students in Software Engineering 1st Edition Habib Izadkhah download
PDF Problems on Algorithms: A Comprehensive Exercise Book for Students in Software Engineering 1st Edition Habib Izadkhah download
com
https://ebookmeta.com/product/problems-on-algorithms-a-
comprehensive-exercise-book-for-students-in-software-
engineering-1st-edition-habib-izadkhah/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/calculus-for-engineering-students-
fundamentals-real-problems-and-computers-jesus-martin-vaquero/
ebookmeta.com
https://ebookmeta.com/product/tidy-first-a-personal-exercise-in-
empirical-software-design-1st-edition-kent-beck/
ebookmeta.com
https://ebookmeta.com/product/lab-reports-and-projects-in-sport-and-
exercise-science-a-guide-for-students-second-edition-mike-price/
ebookmeta.com
https://ebookmeta.com/product/change-1st-edition-allie-york/
ebookmeta.com
https://ebookmeta.com/product/the-routledge-handbook-of-philosophy-of-
agency-1st-edition-luca-ferrero-editor/
ebookmeta.com
ebookmeta.com
https://ebookmeta.com/product/the-cooking-with-kids-cookbook-1st-
edition-lynn-walters/
ebookmeta.com
Rayner Hoff The Life of a Sculptor 1st Edition Deborah
Beck
https://ebookmeta.com/product/rayner-hoff-the-life-of-a-sculptor-1st-
edition-deborah-beck/
ebookmeta.com
Habib Izadkhah
Problems
on Algorithms
A Comprehensive Exercise Book
for Students in Software Engineering
Problems on Algorithms
Habib Izadkhah
Problems on Algorithms
A Comprehensive Exercise Book for Students
in Software Engineering
Habib Izadkhah
Faculty of Mathematics, Statistics,
and Computer Science
University of Tabriz
Tabriz, Iran
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Switzerland AG 2022
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
Preface
Learning is a mysterious process. No one can say what the precise rules of learning
are. However, it is an agreed upon fact that the study of good examples plays a
fundamental role in learning. In the short span of a semester, it is difficult to cover
enough material to give students the confidence that they have mastered some portion
of the subject. Consequently, it is well known that problem-solving helps one acquire
routine skills in designing and analyzing of algorithms. The salient features of the
theory are presented in class along with a few examples, and then the students are
expected to teach themselves the finer aspects of the theory through worked examples.
The book aims at presenting a lot of problems, aiming to improve the learning process
of students.
With approximately 2500 problems, this supplement provides a collection of
practical problems on the basic and advanced data structures, design, and analysis
of algorithms. To make this book suitable for self-instruction, about one-third of the
algorithms are supported by solutions, and some other are supported by hints and
comments. This book is intended for students wishing to deepen their knowledge
of algorithm design in an undergraduate or beginning graduate class on algorithms,
for those teaching courses in this area, for use by practicing programmers who wish
to hone and expand their skills, and as a self-study text for graduate students who
are preparing for the qualifying examination on algorithms for a Ph.D. program in
Computer Science or Computer Engineering. About all, it’s a good source for exam
problems for those who teach algorithms and data structure. The format of each
chapter is just a little bit of instruction followed by lots of problems.
This book is intended to augment the problem sets found in any standard algorithm
textbook. In this book, three levels of difficulty, simple or relatively simple, moderate
level or slightly difficult. This book, also, emphasizes the creative aspects of algorithm
design.
This book
• begins with four chapters on background material that most algorithm instructors
would like their students to have mastered before setting foot in an algorithm class.
v
vi Preface
1 Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Summations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 Inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Floors and Ceilings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.4 Divisibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.5 Postage Stamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.6 Fibonacci Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.7 Binomial Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.8 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Growth of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1.1 Orders of Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1.2 Useful Theorems Involving the Asymptotic
Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.1.3 Applying Limits for Analyzing Orders of Growth . . . . 44
2.1.4 Iterated Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.2.1 Size of Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.2.2 True or False? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2.3 Rank the Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.2.4 Prove Using the Definition of Notation . . . . . . . . . . . . . . 52
2.2.5 Find Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.2.6 Property of Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.2.7 More Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
2.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
vii
viii Contents
3 Recurrence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.1.1 Catalog of Recurrence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.1.2 Solving Recurrence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
3.1.3 Linear Homogeneous Recurrences . . . . . . . . . . . . . . . . . 95
3.1.4 Nonhomogeneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.1.5 Recurrence Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.1.6 Master Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
3.2.1 The Iteration Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
3.2.2 Homogeneous Linear Recurrence Equation
with Constant Coefficients . . . . . . . . . . . . . . . . . . . . . . . . 110
3.2.3 Nonhomogeneous Recurrences Equation
with Constant Coefficients . . . . . . . . . . . . . . . . . . . . . . . . 112
3.2.4 General Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.2.5 Changing Variables in Recurrence Relations . . . . . . . . . 115
3.2.6 More Difficult Recurrences . . . . . . . . . . . . . . . . . . . . . . . 116
3.2.7 Recurrence with Full History . . . . . . . . . . . . . . . . . . . . . . 118
3.2.8 Recurrence with Floors and Ceilings . . . . . . . . . . . . . . . 119
3.2.9 The Master Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.2.10 Recursion Tree Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.2.11 Recurrence Relations with More Than One
Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.2.12 Generating Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
3.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
4 Algorithm Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.2.1 Iterative Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.2.2 What is Returned? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
4.2.3 Recursive Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
4.2.4 Recurrence Relations for Recursive Functions . . . . . . . 165
4.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
5 Basic Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
5.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
5.1.1 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
5.1.2 Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
5.1.3 Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
5.1.4 Linked List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
5.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
5.2.1 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
5.2.2 Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
5.2.3 Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
5.2.4 Linked List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
5.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Contents ix
6 Hash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
6.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
6.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
6.2.1 Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
6.2.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
6.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
7 Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
7.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
7.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
7.2.1 Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
7.2.2 Binary Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
7.2.3 Binary Search Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
7.2.4 Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
7.2.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
8 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
8.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
8.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
8.2.1 Preliminary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
8.2.2 Linear Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
8.2.3 Binary Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.2.4 Ternary Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
8.2.5 Binary Search Tree (BST) . . . . . . . . . . . . . . . . . . . . . . . . 275
8.2.6 Fibonacci Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
8.2.7 Exponential Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
8.2.8 Interpolation Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
8.2.9 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
8.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
9 Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
9.1 Lecture Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
9.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
9.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
9.2.2 Selection Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
9.2.3 Bubble Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
9.2.4 Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
9.2.5 Heapsort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
9.2.6 Shell Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
9.2.7 Introsort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
9.2.8 Tim Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
9.2.9 Binary Tree Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
9.2.10 Counting Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
9.2.11 Radix Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
9.2.12 Mergesort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
x Contents
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Chapter 1
Mathematical Induction
1 + 2 + 3 + · · · + n = n(n + 1)/2
Solution:
Let the statement P(n) be
1 + 2 + 3 + · · · + n = n(n + 1)/2
1 + 2 + 3 + · · · + k = k(k + 1)/2
and show that P(k + 1) is true by adding k + 1 to both sides of the above statement
1 + 2 + 3 + · · · + k + (k + 1) = k(k + 1)/2 + (k + 1)
= (k + 1)(k/2 + 1)
= (k + 1)(k + 2)/2
1 + 2 + 3 + · · · + k + (k + 1) = (k + 1)(k + 2)/2
Solution:
Let the statement P(n) be
and show that P(k + 1) is true by adding (k + 1)2 to both sides of the above statement
= (k + 1)[2k 2 + 7k + 6]/6
We have started from the statement P(k) and have shown that
Example 3 Using mathematical induction, prove that for any positive integer num-
ber n
n 3 + 2n is divisible by 3
Solution:
Let the statement P(n) be
n 3 + 2n is divisible by 3
13 + 2(1) = 3
= [k 3 + 2k] + [3k 2 + 3k + 3]
= 3M + 3[k 2 + k + 1] = 3[M + k 2 + k + 1]
He was far however from thinking that those who are born to all the
advantages, as they are commonly esteemed, of rank and fortune,
are better placed for the improvement of their moral and intellectual
nature, than those in a lower grade. “Fortunatos nimium sua si bona
nôrint,” he used to say of this class, but this is a knowledge that they
seldom possess; and it is rare indeed to find an instance in which
the high privileges which hereditary wealth conveys are understood
by the possessors, and rightly appreciated and put to their proper
use. The one, and the two talents are
in general more profitably occupied than the five; the five indeed are
not often tied up in a napkin, but still less often are they faithfully
employed in the service of that Lord from whom they are received in
trust, and to whom an account of them must be rendered.
2 COWPER.
3 TASSO RINALDO.
il figlio
Del tale, ed il nipote del cotale,
Natò per madre della tale.4
Naboth has been named in relating this, but the reader will not
suppose that I have any intention of comparing the great proprietor
to Ahab,—or to William the Conqueror. There was nothing unjust in
his proceedings, nothing iniquitous; and (though there may have
been a great want of proper feeling) nothing cruel. I am not aware
that any hardship was inflicted upon the families who were ejected,
farther than the inconvenience of a removal. He acted as most
persons in the same circumstances probably would have acted, and
no doubt he thought that his magnificent habitation was greatly
improved by the demolition of the poor dwellings which had
neighboured it so closely. Farther it may be said in his justification
(for which I would leave nothing unsaid) that very possibly the
houses had not sufficient appearance of neatness and comfort to
render them agreeable objects, that the people may have been in no
better state of manners and morals than villagers commonly are,
which is saying that they were bad enough; that the filth of their
houses was thrown into the road, and that their pigs, and their
children who were almost as unclean, ran loose there. Add to this if
you please that though they stood in fear of their great neighbour,
there may have been no attachment to him, and little feeling of
good will. But I will tell you how Dr. Dove would have proceeded if
he had been the hereditary Lord of that Castle and that domain.
it was out of the root of Christian humility that all his virtues grew,—
but his consolation and his delight to know that nowhere in Great
Britain was there a neater, a more comfortable village than close to
his own mansion; no where a more orderly, a more moral, a more
cheerful, or a happier people. And if his castle had stood upon an
elevation commanding as rich a survey as Belvoir or Shobden, that
village when he looked from his windows, would still have been the
most delightful object in the prospect.
5 BEAUMONT AND FLETCHER.
I have not mentioned the name of the old Quaker in my story; but I
will preserve it in these pages because the story is to his honour. It
was Joshua Dickson. If Quakers have (and certainly they have) the
quality which is called modest assurance in a superlative degree that
distinguishes them from any other class of men, (it is of the men
only that I speak) they are the only sect, who as a sect, cultivate the
sense of conscience. This was not a case of conscience, but of
strong feeling assuming that character under a tendency to
madness.
When Lord Harcourt about the same time removed the village of
Nuneham, an old widow Barbara Wyat by name, earnestly intreated
that she might be allowed to remain in her old habitation. The
request which it would have been most unfeeling to refuse, was
granted; she ended her days there, and then the cottage was pulled
down: but a tree which grew beside it, and which she had planted in
her youth, is still shown on the terrace at Nuneham, and called by
her name. Near it is placed the following Inscription by that amiable
man the Laureate Whitehead. Like all his serious poems it may be
read with pleasure and profit,—though the affecting circumstance
which gives the anecdote its highest interest is related only in a
note.
This Tree was planted by a female hand,
In the gay dawn of rustic beauty's glow;
And fast beside it did her cottage stand,
When age had clothed the matron's head with snow.
CHAPTER CCXXXIII.
TACITUS.
“We have long been accustomed to laugh at the pride and poverty of
petty German Princes,” says one of the most sensible and right
minded travellers that ever published the result of his observations
in Germany;1 “but nothing,” he proceeds, “can give a higher idea of
the respectability which so small a people may assume, and the
quantity of happiness which one of these insignificant monarchs may
diffuse around him, than the example of the little state of Weimar,
with a Prince like the present2 Grand Duke at its head. The mere
pride of sovereignty frequently most prominent where there is only
the title to justify it, is unknown to him; he is the most affable man
in his dominions, not simply with the condescension which any
prince can learn to practise as a useful quality, but from goodness of
heart.” The whole population of his state little if at all exceeds that of
Leicestershire; his capital is smaller than a third or fourth rate county
town; so in fact it scarcely deserves the name of a town; and the
inhabitants, vain as they are of its well earned reputation as the
German Athens, take a pride in having it considered merely a large
village: his revenue is less than that of many a British Peer, great
Commoner, or commercial Millionist. Yet “while the treasures of more
weighty potentates were insufficient to meet the necessities of their
political relations, his confined revenues could give independence
and careless leisure to the men who were gaining for Germany its
intellectual reputation.” It is not too much to say that for that
intellectual reputation, high as it is, and lasting as it will be,
Germany is little less beholden to the Duke of Weimar's well-
bestowed patronage, than to the genius of Wieland, and Schiller and
Goëthe. “In these little principalities, the same goodness of
disposition can work with more proportional effect than if it swayed
the sceptre of an empire; it comes more easily and directly into
contact with those towards whom it should be directed: the artificial
world of courtly rank and wealth has neither sufficient glare nor
body to shut out from the prince the more chequered world that lies
below.”
1 RUSSELL.
2 A. D. 1822.
Alas no Prince either petty or great has followed the Duke of Saxe
Weimar's example! “He dwells,” says Mr. Downes, “like an estated
gentleman, surrounded by his tenantry.” Alas no British Peer, great
Commoner, or commercial Millionist has given to any portion of his
ampler revenues a like beneficent direction.
A good old Bishop3 quoting the text “not many wise men after the
flesh, not many mighty, not many noble are called,” cautions us
against distorting the Scripture as if it pronounced nothing but
confusion to the rulers of the earth, “let not the honourable person,”
said he, “hang down his head, as if power and wisdom, and noble
blood, and dignity were causes of rejection before God: no beloved!
Isaiah foretold that Kings should be nursing fathers, and Queens
should be nursing mothers of the Church, but it is often seen that
the benignity of nature and the liberality of fortune are made
impediments to a better life; and therefore Nobles and Princes are
more frequently threatened with judgment. I adjoin moreover that
the Scriptures speak more flatly against illustrious Magistrates, than
the common sort; for if God had left it to men, whose tongues are
prostituted to flattery, they had scarce been told that their
abominable sins would bring damnation.”
3 BISHOP HACKET.
There would be more and higher advantages in high birth than Mr.
Boyle apprehended, if the Dean of Chalon, Pierre de St. Julien, were
right when he maintained contre l'opinion des Philosophes, et
l'ordinaire des Predicamants,—que la vraye Noblesse a sa source du
sang, et est substancielle.
et aillieurs,
Sir Robert Cotton once met with a man driving the plough, who was
a true and undoubted Plantagenet. “That worthy Doctor,” (Dr.
Hervey) says that worthy Fuller (dignissimus of being so styled
himself,) “hath made many converts in physic to his seeming
paradox, maintaining the circulation of blood running round about
the body of man. Nor is it less true that gentle blood fetcheth a
circuit in the body of a nation, running from Yeomanry, through
Gentry to Nobility, and so retrograde, returning through Gentry to
Yeomanry again.”
Et pour vous donner à entendre de moy qui vous parle, je cuide que
suis descendu de quelque riche Roy, ou Prince, au temps jadis; car
oncques ne vistes homme qui eust plus grande affection d'estre Roy
ou riche que moy, afin de faire grand chere, pas ne travailler, point
ne me soucier et bien enrichir mes amis, et tous gens de bien et de
sçavoir.”
CHAPTER CCXXXIV.
Je sçay qu'il y a plusieurs qui diront que je fais beaucoup de petits fats contes, dont
je m'en passerois bien. Ouy, bien pour aucuns,—mais non pour moy, me contentant
de m'en renouveller le souvenance, et en tirer autant de plaisir.
BRANTÔME.
In his speculations the separation of soul from body is total, till their
re-union at the day of judgment; and this unquestionably is the
christian belief. The fablers of all religions have taken a different
view, because at all times and in all countries they have
accommodated their fictions to the notions of the people. The grave
is with them a place of rest, or of suffering. If Young had been a
Jew, a Mahommedan, or a Roman Catholic, he might be understood
as speaking literally when he says,
The fable which St. Augustine seems to have believed, was either
parent or child of the story told under the name of Abdias, that
when the Beloved Disciple had attained the postdiluvian age of
ninety seven, our Lord appeared to him, said unto him, “come unto
me, that thou mayest partake at my feast with thy brethren,” and
fixed the next Sunday, being Easter, for his removal from this world.
On that Sunday accordingly, the Evangelist after having performed
service in his own temple at Ephesus, and exhorted the people, told
some of his chosen disciples to take with them two mattocks and
spade, and accompany him therewith. They went to a place near the
city, where he had been accustomed to pray, there he bade them dig
a grave, and when they would have ceased from the work, he bade
them dig it still deeper. Then taking off all his garments except a
linen vestment, he spread them in the grave, laid himself down upon
them, ordered his disciples to cover him up, and forthwith fell asleep
in the Lord. Abdias proceeds no farther with the story; but other
ecclesiastic romancers add that the evangelist enjoined them to
open the grave on the day following; they did so and found nothing
but his garments, for the blessed virgin in recompence for the filial
piety which he had manifested towards her in obedience to our
Lord's injunctions from the cross, had obtained for him the privilege
of an Assumption like her own. Baronius has no objection to believe
this, but that St. John actually died is, he says more than certain,—
certo certius; and that his grave at Ephesus was proof of it, for certe
non nisi mortuorum solent esse sepulchra.
Yet the Cardinal knew that the historian of his Church frequently
represented the dead as sentient in their graves. The Jews have
some remarkable legends founded upon the same notion. It is
written in the book of Zohar, say the Rabbis, how when Abraham
had made a covenant with the people of the land, and was about to
make a feast for them, a calf which was to be slaughtered on the
occasion, broke loose and ran into the cave of Machpelah. Abraham
followed, and having entered the cave in pursuit, there he
discovered the bodies of Adam and Eve, each on a bed, with lamps
burning between them. They were sleeping the sleep of death, and
there was a good odour around them, like the odour of repose. In
consequence of having made this discovery it was that he desired to
purchase the cave for his own burial place; and when the sons of
Jebus refused to sell it, he fell upon his knees, and bowed himself
before them, till they were entreated. When he came to deposit the
body of Sarah there, Adam and Eve rose up, and refused their
consent. The reason which they gave for this unexpected prohibition
was, that they were already in a state of reproach before the Lord,
because of their transgression, and a farther reproach would be
brought upon them by a comparison with his good deeds, if they
allowed such company to be introduced into their resting place. But
Abraham took upon himself to answer for that; upon this they were
satisfied with his assurances, and composed themselves again to
their long sleep.
The Rabbis may be left to contend for the authority of the book of
Zohar in this particular against the story of the Cabalists that Adam's
bones were taken into the Ark, and divided afterwards by Noah
among his sons. The skull fell to Shem's portion; he burnt it on the
mountain which for that reason obtained the name of Golgotha, or
Calvary,—being interpreted, the place of a skull, and on that spot,
for mystical signification the cross whereon our Saviour suffered was
erected;—a wild legend, on which as wild a fiction has been grafted,
that a branch from the Tree of Life had been planted on Adam's
grave, and from the wood which that branch had produced the cross
was made.
And against either of these the authority of Rabbi Judas Bar Simon is
to be opposed, for he affirms that the dust of Adam was washed
away by the Deluge, and utterly dispersed.
The Rabbis have also to establish the credit of their own tradition
against that of the Arabs who at this time shew Eve's grave near
Jeddah;—about three days journey east from that place, according
to Bruce. He says, it is covered with green sods, and about fifty
yards in length. The Cashmerian traveller Abdulkurreem who visited
it in 1742, says that it measured an hundred and ninety-seven of his
footsteps, which would make the mother of mankind much taller
than Bruce's measurement. He likens it to a flower-bed; on the
middle of the grave there was then a small dome, and the ends of it
were enclosed with wooden pales. Burckhardt did not visit it; he was
told that it was about two miles only, northward of the town, and
that it was a rude structure of stone, some four feet in length, two
or three in height and as many in breadth, thus resembling the tomb
of Noah, which is shewn in the valley of Bekaa, in Syria. Thus widely
do these modern travellers, on any one of whom reasonable reliance
might have been placed, differ in the account of the same thing.
CHAPTER CCXXXV.
We have got from the West Riding of Yorkshire, to the Eastern shore
of the Red Sea, without the assistance of mail-coach, steam-packet,
or air-balloon, the magical carpet, the wishing-cap, the shoes of
swiftness, or the seven-leagued boots. From Mr. Bacon's vicarage we
have got to Eve's grave, not per saltum, by any sudden, or violent
transition; but by following the stream of thought. We shall get back
in the same easy manner to that vicarage, and to the quiet
churchyard wherein the remains of one of the sweetest and for the
few latter years of her short life, one of the happiest of Eve's
daughters, were deposited in sure and certain hope. If you are in
the mood for a Chapter upon Churchyards, go reader to those which
Caroline Bowles has written;—you will find in them every thing that
can touch the heart, every thing that can sanctify the affections,
unalloyed by anything that can offend a pure taste and a masculine
judgement.
But before we find our way back we must tarry awhile among the
tombs, and converse with the fablers of old.
A young and lovely Frenchwoman after visiting the Columbarium
near the Villa Albani, expressed her feeling strongly upon our custom
of interring the dead, as compared with the non-burial of the
ancients, usage odieux, said she, qui rend la mort horrible! Si les
anciens en avaient moins d'effroi, c'est que la coutume de brûler les
corps dérobait au trépas tout ce qu'il a de hideux. Qu'il était
consolant et doux de pouvoir pleurer sur des cendres chéries! Qu'il
est épouvantable et déchirant aujourd'hui de penser que celui qu'on
a tant aimé n'offre plus qu'une image affreuse et décharnée dont on
ne pourrait supporter la vue.
The lady in whose journal these lines were written lies buried in the
Campo Santo at Milan, with the following inscription on her tomb;
Priez pour une jeune Française que la mort a frappée à vingt ans,
comme elle allait, après un voyage de huit mois avec un epoux chéri,
revoir son enfant, son pere et sa mere, qui venaient joyeux au-
devant d'elle. Her husband wished to have her remains burnt, in
conformity to her own opinion respecting the disposal of the dead,
and to his own feelings at the time, that he might have carried her
ashes to his own country, and piously have preserved them there, to
weep over them, and bequeath them to his son; mais les amis qui
m'entouraient, he says, combatterent mon desir, comme une
inspiration insensée de la douleur.
The custom evidently implies an opinion that though soul and body
were disunited by death, they kept close company together till after
the burial; otherwise a passport which the Soul was to present at
Heaven's gate, would not have been placed in the hands of the
corpse. In the superstitions of the Romish church a re-union is
frequently supposed, but that there is an immediate separation upon
death is an article of faith, and it is represented by Sir Thomas More
as one of the punishments for a sinful soul to be brought from
Purgatory and made to attend, an unseen spectator, at the funeral of
its own body, and feel the mockery of all the pomps and vanities
used upon that occasion. The passage is in his Supplycacyon of
Soulys. One of the Supplicants from Purgatory speaks:
* * * * *
EVLIA EFFENDI.
Once in their life time, the Jews say, they are bound by the Law of
Moses to go to the Holy Land, if they can, or be able, and the bones
of many dead Jews are carried there, and there burnt. We were
fraughted with wools from Constantinople to Sidon, in which sacks,
as most certainly was told to me, were many Jew's bones put into
little chests, but unknown to any of the ship. The Jews our
Merchants told me of them at my return from Jerusalem to Saphet,
but earnestly intreated me not to tell it, for fear of preventing them
another time.
Going on, one of my companions said, if you will take the trouble of
going a little out of the way, you will see a most remarkable thing.
Well, said I, what should be the object of all pains taken in
travelling, if it were not to admire the works of God. So we went on
for an hour to the north, but not taking the great road leading to the
Plain of Moosh, we advanced to a high rock that is a quarter of an
hour out of the road. To this rock, high like a tower, a man was
formerly chained, whose bones are yet preserved in the chains. Both
bones and chains are in a high state of preservation. The bones of
the arms are from seven to eight cubits in length, of an astonishing
thickness. The skull is like the cupola of a bath, and a man may
creep in and out without pain through the eye-holes. Eagles nestle in
them. These bones are said to be those of a faithful man who in
Abraham's time was chained by Nimrod to this rock, in order to be
burnt by fire. The fire calcined part of his body, so that it melted in
one part with the rock; but the arms and legs are stretching forth to
the example of posterity. We have no doubt that they will rise again
into life at the sound of the trumpet on the day of judgement.
EVLIA EFFENDI.
HASSELQUIST.
At the time of the deluge the wife of Noah being pregnant, was
through the hardships of the voyage delivered of a dead child to
which the name of Tarh was given, because the letters of this word
form the number 217 which was the number of days he was carried
by his mother instead of the full time of 280 days, or nine months.
This child was buried in the district now called Djezere Ibn Omar, the
Island or Peninsula of the son of Omar, and this was the first burial
on earth after the deluge. And Noah prayed unto the Lord, saying,
Oh God thou hast given me a thousand years of life, and this child is
dead before it began to live on earth! And he begged of the Lord as
a blessing given to the burial-place of his child, that the women of
this town might never miscarry, which was granted; so that since
that time women, and female animals of every kind in this town are
all blessed with births in due time and long living. The length of the
grave of this untimely child of Noah is 40 feet and it is visited by
pilgrims.
EVLIA EFFENDI.
They suppose that a few souls are peculiarly gifted with the power
of quitting their bodies, of mounting into the skies, visiting distant
countries, and again returning and resuming them; they call the
mystery or prayer by which this power is obtained, the Mandiram.
CRAUFURD.
The plain of Kerbela is all desert, inhabited by none but by the dead,
and by roving wild hounds, the race of the dogs which licked the
blood of the martyrs, and which since are doomed to wander
through the wilderness.
EVLIA EFFENDI.
DU HALDE.
A curious story concerning the power which the Soul has been
supposed to possess of leaving the body, in a visible form, may be
found in the notes to the Vision of the Maid of Orleans. A more
extraordinary one occurs in the singularly curious work of Evlia
Effendi.
The same anecdote of the Soul coming out of the mouth to relish a
most desired dish, had already happened to the Sheik Bajazet
Bostaumi, who had much longed to eat Mohallebi (a milk-dish) but
Bajazet Bostaumi permitted it to re-enter, and Sultan Bajazet killed
it; notwithstanding which he continued to live for some time longer.
When Mohammed took his journey upon Alborach, Gabriel (said he)
led me to the first Heaven, and the Angels in that Heaven graciously
received me, and they beheld me with smiles and with joy,
beseeching for me things prosperous and pleasant. One alone
among the Angels there sat, who neither prayed for my prosperity,
nor smiled; and Gabriel when I enquired of him who he was, replied,
never hath that Angel smiled, nor will smile, he is the Keeper of the
Fire, and I said to him is this the Angel who is called the well
beloved of God? and he replied, this is that Angel. Then said I bid
him that he show me the Fire, and Gabriel requesting him, he
removed the cover of the vessel of Fire, and the Fire ascending I
feared lest all things whatever that I saw should be consumed, and I
besought Gabriel that the Fire again might be covered. And so the
fire returned to its place, and it seemed then as when the Sun sinks
in the West, and the gloomy Angel, remaining the same, covered up
the Fire.