Introduction to the Design and Analysis of Algorithms 3rd Edition Levitin Solutions Manualpdf download
Introduction to the Design and Analysis of Algorithms 3rd Edition Levitin Solutions Manualpdf download
https://testbankfan.com/product/introduction-to-the-design-and-
analysis-of-algorithms-3rd-edition-levitin-solutions-manual/
We believe these products will be a great fit for you. Click
the link to download now, or visit testbankfan.com
to discover even more!
https://testbankfan.com/product/introduction-to-algorithms-3rd-
edition-cormen-solutions-manual/
https://testbankfan.com/product/introduction-to-algorithms-2nd-
edition-cormen-solutions-manual/
https://testbankfan.com/product/analysis-synthesis-and-design-of-
chemical-processes-3rd-edition-turton-solutions-manual/
https://testbankfan.com/product/sociology-in-our-times-10th-
edition-kendall-test-bank/
Leadership Research Findings Practice and Skills 8th
Edition DuBrin Test Bank
https://testbankfan.com/product/leadership-research-findings-
practice-and-skills-8th-edition-dubrin-test-bank/
https://testbankfan.com/product/corporate-finance-core-
principles-and-applications-5th-edition-ross-test-bank/
https://testbankfan.com/product/criminal-investigation-3rd-
edition-brandl-test-bank/
https://testbankfan.com/product/auditing-and-assurance-services-
a-systematic-approach-11th-edition-messier-test-bank/
https://testbankfan.com/product/sexuality-now-embracing-
diversity-4th-edition-carroll-test-bank/
New Perspectives on Microsoft Office 2013 First Course
Enhanced Edition 1st Edition Shaffer Solutions Manual
https://testbankfan.com/product/new-perspectives-on-microsoft-
office-2013-first-course-enhanced-edition-1st-edition-shaffer-
solutions-manual/
This file contains the exercises, hints, and solutions for Chapter 6 of the
book ”Introduction to the Design and Analysis of Algorithms,” 3rd edition, by
A. Levitin. The problems that might be challenging for at least some students
are marked by B; those that might be difficult for a majority of students are
marked by I
Exercises 6.1
1. Consider the problem of finding the distance between the two closest num-
bers in an array of numbers. (The distance between two numbers and
is computed as | − |.)
a. You are given telephone bills and checks sent to pay the bills
1
( ≥ ) Assuming that telephone numbers are written on the checks,
find out who failed to pay. (For simplicity, you may also assume that
only one check is written for a particular bill and that it covers the bill in
full.)
P P
3 3
P P
1 1
P P
6 6
P P
2 2
=⇒
P P
4 4
P P5
5
a. Does the problem always have a solution? Does it always have a unique
solution?
2
For example, the numbers 4, 6, 3, 1, 8 can be placed in the five boxes as
shown below:
1 8 3 4 6
x
Design an efficient algorithm for finding all the maximum points of a given
set of points in the Cartesian plane. What is the time efficiency class
of your algorithm?
3
Hints to Exercises 6.1
1. This problem is similar to one of the examples in this section.
2. a. Compare every element in one set with all the elements in the other.
b. In fact, you can use presorting in three different ways: sort elements of
just one of the sets, sort elements of each of the sets separately, and sort
elements of the two sets together.
3. a. How do we find the smallest and largest elements in a sorted list?
b. How would you solve this problem if the student information were
written on index cards? Better yet, think how somebody else, who has
never taken a course on algorithms but possesses a good dose of common
sense, would solve this problem.
6. a. Many problems of this kind have exceptions for one particular config-
uration of points. As to the question about a solution’s uniqueness, you
can get the answer by considering a few small “random” instances of the
problem.
4
Solutions to Exercises 6.1
1. a. Sort the array first and then scan it to find the smallest difference
between two successive elements [] and [ + 1] (0 ≤ ≤ − 2).
Note that the efficiency formula implies that it is more efficient to sort the
smaller one of the two input sets.
( log ) + ( log ) + ( + ) = ( log ) where = max{ }
5
increment by two. If sorting is done with an log algorithm, the total
running time will be in
3. a. Sort the list and return its first and last elements as the values of
the smallest and largest elements, respectively. Assuming the efficiency
of the sorting algorithm used is in ( log ) the time efficiency of the
entire algorithm will be in
4. Let be the smallest number of searches needed for the sort—binary search
algorithm to make fewer comparisons than searches by sequential search
(for average successful searches). Assuming that a sorting algorithm
makes about log comparisons on the average and using the formulas
for the average number of key comparisons for binary search (about log2 )
and sequential search (about 2), we get the following inequality
Substituting = 103 into the right-hand side yields min = 21; substitut-
ing = 106 yields min = 40
Note: For large values of we can simplify the last inequality by elimi-
nating the relatively insignificant term log2 from the denominator of the
right-hand side to obtain
log2
≥ or ≥ 2 log2
2
This inequality would yield the answers of 20 and 40 for = 103 and
= 106 respectively.
6
to be done with respect to their telephone numbers, say, in increasing or-
der.) Then do a merging-like scan of the two sorted lists by comparing the
telephone numbers and on the current bill and check, respectively:
if , add to the list of unpaid telephone numbers and increment
; if , increment ; if = increment both and Stop as
soon as one of the two lists becomes empty and append all the remain-
ing telephone numbers on the bill list, if any, to the list of the unpaid ones.
b. Initialize 50 state counters to zero. Scan the list of student records and,
for a current student record, increment the corresponding state counter.
The algorithm’s time efficiency will be in Θ(), which is superior to any
algorithm that uses presorting of student records by a comparison-based
algorithm.
6. a. The problem has a solution if and only if all the points don’t lie on the
same line. And, if a solution exists, it may not be unique.
b. Find the lowest point ∗ i.e., the one with the smallest coordi-
nate. in the set. (If there is a tie, take, say, the leftmost among them,
i.e., the one with the smallest coordinate.) For each of the other − 1
points, compute its angle in the polar coordinate system with the origin
at ∗ and sort the points in increasing order of these angles, breaking ties
in favor of a point closer to ∗ (Instead of the angles, you can use the
line slopes with respect to the horizontal line through ∗ .) Connect the
points in the order generated, adding the last segment to return to ∗ .
P P
3 3
P P
1 1
P P
6 6
P P
2 2
=⇒
P P
4 4
P P5
5
7
Finding the lowest point ∗ is in Θ() computing the angles (slopes) is
in Θ() sorting the points according to their angles can be done with a
( log ) algorithm. The efficiency of the entire algorithm is in ( log )
7. Assume first that = 0 Then [] + [] = 0 if and only if [] = −[]
i.e., these two elements have the same absolute value but opposite signs.
We can check for presence of such elements in a given array in several dif-
ferent ways. If all the elements are known to be distinct, we can simply
replace each element [] by its absolute value |[]| and solve the element
uniqueness problem for the array of the absolute values in ( log ) time
with the presorting based algorithm. If a given array can have equal ele-
ments, we can modify our approach as follows: We can sort the array in
nondecreasing order of their absolute values (e.g., -6, 3, -3, 1, 3 becomes
1, 3, -3, 3, -6), and then scan the array sorted in this fashion to check
whether it contains a consecutive pair of elements with the same absolute
value and opposite signs (e.g., 1, 3, -3, 3, -6 does). If such a pair of
elements exists, the algorithm returns yes, otherwise, it returns no.
8
9. Start by sorting the list in increasing order. Then repeat the following
− 1 times: If the first inequality sign is "", place the first (smallest)
number in the first box; otherwise, place there the last (largest) number.
After that, delete the number from the list and the box it was put in.
Finally, when just a single number remains, place it in the remaining box.
Note: The problem was posted on a Web page of The Math Circle at
www.themathcircle.org/researchproblems.php (accessed Oct. 4, 2010).
x
Let (̄ ̄) be a point outputted by the algorithm. This means that it has
a larger -coordinate than any point previously encountered by the right-
to-left scan, i.e., any point with a larger coordinate. Hence, none of
those points can dominate (̄ ̄) No any point to be encountered later in
the scan can dominate this point either: all of them have either a smaller
coordinate or the same -coordinate but a smaller -coordinate. Con-
versely, if a point is not outputted by the algorithm, it is dominated by
another point in the set and hence is not a maximum point.
9
only if they have the same signature. Sort the records in alphabetical or-
der of their signatures. Scan the list to identify contiguous subsequences,
of length greater than one, of records with the same signature.
10
Exercises 6.2
1. Solve the following system by Gaussian elimination.
1 + 2 + 3 = 2
21 + 2 + 3 = 3
1 − 2 + 33 = 8
11
8. The Gauss-Jordan elimination method differs from Gaussian elimina-
tion in that the elements above the main diagonal of the coefficient matrix
are made zero at the same time and by the same use of a pivot row as the
elements below the main diagonal.
c.B In general, how many multiplications are made by this method while
solving a system of equations in unknowns? How does this compare
with the number of multiplications made by the Gaussian elimination
method in both its elimination and its back-substitution stages?
9. A system = of linear equations in unknowns has a unique solution
if and only if det 6= 0 Is it a good idea to check this condition before
applying Gaussian elimination to the system?
10. a. Apply Cramer’s rule to solve the system of Problem 1 of these exercises.
12
Hints to Exercises 6.2
1. Trace the algorithm as we did in solving another system in the section.
2. a. Use the Gaussian elimination results as explained in the text.
13
10. a. Apply Cramer’s rule to the system given.
b. How many distinct determinants are there in the Cramer’s rule for-
mulas?
11. a. If is the number of times the panel in the th row and th column
needs to be toggled in a solution, what can be said about ? After you
answer this question, show that the binary matrix representing an initial
state of the board can be represented as a linear combination (in modulo
2 arithmetic) of 2 binary matrices each representing the affect of toggling
an individual panel.
14
Solutions to Exercises 6.2
1. a. Solve the following system by Gaussian elimination
1 + 2 + 3 = 2
21 + 2 + 3 = 3
1 − 2 + 33 = 8
⎡ ⎤
1 1 1 2
⎣ 2 1 1 3 ⎦ row 2 - 21 row 1
1 −1 3 8 row 3 - 11 row 1
⎡ ⎤
1 1 1 2
⎣ 0 −1 −1 −1 ⎦
−2
0 −2 2 6 row 3 - −1 row 2
⎡ ⎤
1 1 1 2
⎣ 0 −1 −1 −1 ⎦
0 0 4 8
2. a. Repeating the elimination stage (or using its results obtained in Prob-
lem 1), we get the following matrices and :
⎡ ⎤ ⎡ ⎤
1 0 0 1 1 1
= ⎣ 2 1 0 ⎦ = ⎣ 0 −1 −1 ⎦
1 2 1 0 0 4
Its solution is
15
yields the following solution to the system given:
3. Solving simultaneously the system with the three right-hand side vectors:
⎡ ⎤
1 1 1 1 0 0
⎣ 2 1 1 0 1 0 ⎦ row 2 - 21 row 1
1 −1 3 0 0 1 row 3 - 11 row 1
⎡ ⎤
1 1 1 1 0 0
⎣ 0 −1 −1 −2 1 0 ⎦
−2
0 −2 2 −1 0 1 row 3 - −1 row 1
⎡ ⎤
1 1 1 1 0 0
⎣ 0 −1 −1 −2 1 0 ⎦
0 0 4 3 −2 1
yields the following values of the first column of the inverse matrix:
⎡ ⎤
−1
⎣ 5 ⎦
4
3
4
yields the following values of the second column of the inverse matrix:
⎡ ⎤
1
⎣ −1 ⎦
2
− 12
16
yields the following values of the third column of the inverse matrix:
⎡ ⎤
0
⎣ −1 ⎦
4
1
4
4. In general, the fact that 1 () ∈ Θ(3 ) 2 () ∈ Θ(3 ) and 3 () ∈ Θ(3 )
does not necessarily imply that 1 ()−2 () +3 () ∈ Θ(3 ) because the
coefficients of the highest third-degree terms can cancel each other. As a
specific example, consider 1 () = 3 + 2 () = 23 and 3 () = 3
Each of this functions is in Θ(3 ) but 1 ()− 2 () + 3 () = ∈ Θ()
17
6. Let () () and () () be the numbers of divisions and multiplications
made by GaussElimination, respectively. Using the count formula derived
in Section 6.2, we obtain the following approximate counts:
−1
X +1
X X 1 3
() () = () () ≈ 1≈
=1 =+1 =
3
Let () () and () () be the numbers of divisions and multiplica-
tions made by BetterGaussElimination, respectively. We have the follow-
ing approximations:
−1
X
X 1 2 1
() () ≈ 1≈ and () () = () () ≈ 3
=1 =+1
2 3
b. The elimination stage should yield a 2-by-2 matrix whose second row
is 0 0 where 6= 0.
c. The elimination stage should yield a 2-by-2 matrix whose second row
is 0 0 0.
8. a. Solve the following system by the Gauss-Jordan method
1 + 2 + 3 = 2
21 + 2 + 3 = 3
1 − 2 + 33 = 8
⎡ ⎤ ⎡ ⎤ 1
1 1 1 2 1 1 1 2 row 1 − −1 row 2
⎣ 2 1 1 3 ⎦ row 2 − 1 row 1 ⎣ 0 −1 −1 −1 ⎦
2
18
We obtain the solution by dividing the right hand side values by the cor-
responding elements of the diagonal matrix:
1 = 11 = 1 2 = 1 − 1 = −1 3 = 84 = 2
b. The Gauss-Jordan method is also an example of an algorithm based
on the instance simplification idea. The two algorithms differ in the kind
of a simpler instance to which they transfer a given system: Gaussian
elimination transforms a system to an equivalent system with an upper-
triangular coefficient matrix whereas the Gauss-Jordan method transforms
it to a system with a diagonal matrix.
X
X
= ( + 2 − )( − 1) = ( − 1) ( + 2 − )
=1 =1
= ( − 1)[( + 1) + + · · · + 2] = ( − 1)[( + 1) + + · · · + 1 − 1]
( + 1)( + 2) ( − 1)( + 3) 1
= ( − 1)[ − 1] = ≈ 3
2 2 2
The total number of multiplications made in both elimination and back-
ward substitution stages of the Gaussian elimination method is equal to
( − 1)(2 + 5) ( − 1) ( − 1)( + 4) 1
+ = ≈ 3
6 2 3 3
which is about 1.5 smaller than in the Gauss-Jordan method.
19
Note: The Gauss-Jordan method has an important advantage over Gaussian
elimination: being more uniform, it is more suitable for efficient implemen-
tation on a parallel computer.
9. Since the time needed for computing the determinant of the system’s coef-
ficient matrix is about the same as the time needed for solving the system
(or detecting that the system does not have a unique solution) by Gaussian
elimination, computing the determinant of the coefficient matrix to check
whether it is equal to zero is not a good idea from the algorithmic point
of view.
1 + 2 + 3 = 2
21 + 2 + 3 = 3
1 − 2 + 33 = 8
¯ ¯
¯ 1 1 1¯
¯ ¯
|| = ¯¯ 2 1 1¯ = 1 · 1 · 3 + 1 · 1 · 1 + 2 · (−1) · 1 − 1 · 1 · 1 − 2 · 1 · 3 − (−1) · 1 · 1 = −4,
¯
¯ 1 −1 3¯
¯ ¯
¯ 2 1 1 ¯¯
¯
|1 | = ¯¯ 3 1 1 ¯¯ = 2 · 1 · 3 + 1 · 1 · 8 + 3 · (−1) · 1 − 8 · 1 · 1 − 3 · 1 · 3 − (−1) · 1 · 2 = −4
¯ 8 −1 3 ¯
¯ ¯
¯ 1 2 1 ¯¯
¯
|2 | = ¯¯ 2 3 1 ¯¯ = 1 · 3 · 3 + 2 · 1 · 1 + 2 · 8 · 1 − 1 · 3 · 1 − 2 · 2 · 3 − 8 · 1 · 1 = 4
¯ 1 8 3 ¯
¯ ¯
¯ 1 1 2 ¯¯
¯
|3 | = ¯¯ 2 1 3 ¯¯ = 1 · 1 · 8 + 1 · 3 · 1 + 2 · (−1) · 2 − 1 · 1 · 2 − 2 · 1 · 8 − (−1) · 3 · 1 = −8
¯ 1 −1 8 ¯
Hence,
20
11. a. Any feasible state of the board can be described by an × binary
matrix, in which the element in the th row and th column is equal to
1 if and only if the corresponding panel is lit. Let and be such
matrices representing the initial and final (all-zeros) boards, respectively.
The impact of toggling the panel at ( ) on a board represented by a
binary matrix can be interpreted as the modulo-2 matrix addition
+ , where is the matrix in which the only entries equal to 1 are
those that are in the ( ) and adjacent to it positions. For example, if
is a 3-by-3 all-ones matrix representing a 3-by-3 board of all-lit panels,
then the impact of turning off the (2,2) panel can be represented as
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
1 1 1 0 1 0 1 0 1
+ 22 = ⎣ 1 1 1 ⎦ + ⎣ 1 1 1 ⎦ = ⎣ 0 0 0 ⎦
1 1 1 0 1 0 1 0 1
Let is the number of times the ( ) panel is toggled in a solution that
transforms the board from a starting state to a final state Since the
ultimate impact of toggling this panel depends only on whether is even
or odd, we can assume with no loss in generality that is either 0 or 1.
Then a solution to the puzzle can be expressed by the matrix equation
X
+ =
=1
(The last equation can also be interpreted as transforming the final all-
zero board to the initial board )
Note: This solution follows Eric W. Weisstein et al. "Lights Out Puzzle"
from MathWorld—A Wolfram Web Resource at http://mathworld.wolfram.com/LightsOutPuzzle.html
b. The system of linear equations for the instance in question (see part a)
is
∙ ¸ ∙ ¸ ∙ ¸ ∙ ¸ ∙ ¸
1 1 1 1 1 0 0 1 1 1
11 + 12 + 21 + 22 =
1 0 0 1 1 1 1 1 1 1
or
1 · 11 + 1 · 12 + 1 · 21 + 0 · 22 = 1
1 · 11 + 1 · 12 + 0 · 21 + 1 · 22 = 1
1 · 11 + 0 · 12 + 1 · 21 + 1 · 22 = 1
0 · 11 + 1 · 12 + 1 · 21 + 1 · 22 = 1
21
Solving this system in modulo-2 arithmetic by Gaussian elimination pro-
ceeds as follows:
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
1 1 1 0 1 1 1 1 0 1 1 1 1 0 1
⎢ 1 1 0 1 1 ⎥ ⎢ 0 0 1 1 0 ⎥ ⎢ 0 1 0 1 0 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ 1 0 1 1 1 ⎦ ⎣ 0 1 0 1 0 ⎦ ⎣ 0 0 1 1 0 ⎦
0 1 1 1 1 0 1 1 1 1 0 1 1 1 1
⎡ ⎤ ⎡ ⎤
1 1 1 0 1 1 1 1 0 1
⎢ 0 1 0 1 0 ⎥ ⎢ 0 1 0 1 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣ 0 0 1 1 0 ⎦ ⎣ 0 0 1 1 0 ⎦
0 0 1 0 1 0 0 0 1 1
The backward substitutions yield the solution: 11 = 1 12 = 1 21 = 1
22 = 1 i.e., each of the four panel switches should be toggled once (in
any order).
22
Exercises 6.3
1. Which of the following binary trees are AVL trees?
5 5 5
3 6 4 6 3 6
2 8 2 8 1 2 7 9
1 3 7 9
(a) ( b) (c)
2. a. For = 1 2 3 4 and 5, draw all the binary trees with nodes that
satisfy the balance requirement of AVL trees.
b. Draw a binary tree of height 4 that can be an AVL tree and has
the smallest number of nodes among all such trees.
3. Draw diagrams of the single L-rotation and of the double RL-rotation in
their general form.
4. For each of the following lists, construct an AVL tree by inserting their
elements successively, starting with the empty tree.
a. 1, 2, 3, 4, 5, 6
b. 6, 5, 4, 3, 2, 1
c. 3, 6, 5, 1, 2, 4
5. a. For an AVL tree containing real numbers, design an algorithm for
computing the range (i.e., the difference between the largest and smallest
numbers in the tree) and determine its worst-case efficiency.
b.B True or false: The smallest and the largest keys in an AVL tree
can always be found on either the last level or the next-to-last level?
6. Write a program for constructing an AVL tree for a given list of distinct
integers.
7. a. Construct a 2-3 tree for the list C, O, M, P, U, T, I, N, G. Use the
alphabetical order of the letters and insert them successively starting with
the empty tree.
b. Assuming that the probabilities of searching for each of the keys (i.e.,
the letters) are the same, find the largest number and the average number
of key comparisons for successful searches in this tree.
23
8. Let and 2-3 be, respectively, a classical binary search tree and a 2-3
tree constructed for the same list of keys inserted in the corresponding
trees in the same order. True or false: Searching for the same key in 2-3
always takes fewer or the same number of key comparisons as searching
in ?
9. For a 2-3 tree containing real numbers, design an algorithm for computing
the range (i.e., the difference between the largest and smallest numbers in
the tree) and determine its worst-case efficiency.
10. Write a program for constructing a 2-3 tree for a given list of integers.
24
Hints to Exercises 6.3
1. Use the definition of AVL trees. Do not forget that an AVL tree is a
special case of a binary search tree.
2. For both questions, it is easier to construct the required trees bottom up,
i.e., for smaller values of first.
3. The single -rotation and the double -rotation are the mirror images
of the single -rotation and the double -rotation, whose diagrams can
be found in the section.
4. Insert the keys one after another doing appropriate rotations the way it
was done in the section’s example.
5. a. An efficient algorithm immediately follows from the definition of the
binary search tree of which the AVL tree is a special case.
25
Random documents with unrelated
content Scribd suggests to you:
That year, at the approach of summer, Nietzsche suffered severely from
his head and eyes. The malady was uncertain in its nature, but possibly
had its origin in the nerves. His holidays were spoilt. But he arranged to
be able to stay at Naumburg until the end of August, and the joys of a
prolonged leisure compensated him for previous vexations.
CHAPTER II
YEARS OF YOUTH
The second year which he passed at Leipsic was perhaps the happiest
of his life. He enjoyed to the full that intellectual security which his
adhesion to his master Schopenhauer assured him. "You ask me for a
vindication of Schopenhauer," he wrote to his friend Deussen; "I will
simply say this to you: I look life in the face, with courage and liberty,
since my feet have found firm soil. The waters of trouble, to express
myself in images, do not sweep me out of my road, because they come
no higher than my head; I am at home in those obscure regions."
It was a year of composure and of comradeship. He did not worry
himself about public affairs. Prussia, on the morrow of her victory, fell
back to the low level of everyday life. The babblings of the tribune and
the press succeeded the action of great men, and Nietzsche turned
away from it all. "What a multitude of mediocre brains are occupied
with things of real importance and real effect!" he writes. "It is an
alarming thought." Perhaps he regretted having allowed himself to be
seduced by a dramatic incident. Nevertheless he knew—Schopenhauer
had taught him—that history and politics are illusory games. He had not
forgotten; he wrote in order to affirm his thought, and to define the
mediocre meaning and value of human agitations.
"What is history but the endless struggle for existence of innumerable
and diverse interests? The great 'ideas' in which many people believe
that they find the directing forces of this combat are but reflections
which pass across the surface of the swelling sea. They have no action
on the sea; but it often happens that they embellish the waves and thus
deceive him who contemplates them. It matters little whether this light
emanates from a moon, a sun, or a lighthouse; the waves will be a little
more or a little less lit up—that is all."
His enthusiasm had no other object but art and thought, the study of
the genius of antiquity. He conceived a passion for his master Ritschl:
"That man is my scientific conscience," said he. He took part in the
friendly soirées of the Verein, spoke, and discussed. He planned more
undertakings than he had time for, and then proposed them to his
friends. He elected to study the sources of Diogenes Laertius—that
compiler who has preserved for us such precious information with
regard to the philosophers of Greece. He dreamed of composing a
memoir which should be sagacious and rigorous, but also beautiful: "All
important work," he wrote to Deussen, "you must have felt it yourself,
exercises a moral influence. The effort to concentrate a given material,
and to find a harmonious form for it, I compare to a stone thrown into
our inner life: the first circle is narrow, but it multiplies itself, and other
more ample circles disengage themselves from it."
In April Nietzsche collected and systematised his notes, wholly
preoccupied with this concern for beauty. He did not wish to write in the
manner of scholars who misunderstand the savour of words, the
equilibrium of phrases. He wished to write, in the difficult and classical
sense of the word.
"The scales fall from my eyes," he wrote; "I have lived too long in a
state of innocence as regards style. The categorical imperative, 'Thou
shalt write, it is necessary that thou writest,' has awakened me. I have
tried to write well It is a thing which I had forgotten since leaving
Pforta, and all at once my pen lost its shape between my fingers. I was
impotent, out of temper. The principles of style enunciated by Lessing,
Lichtenberger, Schopenhauer were scolding in my ears. At least I
remembered, and it was my consolation, that these three authorities
agreed in saying that it is difficult to write well, that no man naturally
writes well, and that one must, in order to acquire a style, work
strenuously, hew blocks of hard wood.... Above all, I wish to imprison in
my style some joyous spirits; I shall apply myself to it as I apply myself
upon the keyboard, and I hope to play at length, not only the pieces
that I have learnt, but free fantasies, free as far as possible, though
always logical and beautiful."
A sentimental joy completed his happiness: he found a friend. Nietzsche
had long been faithful to the comrades of his early childhood: one was
dead, and the other, their lives and occupations having been separate
for ten years, was becoming a stranger to him. At Pforta he had been
fond of the studious Deussen, the faithful Gersdorff: the one was
studying at Tübingen, the other at Berlin. He wrote to them with much
zeal, but an exchange of letters could not satisfy that need for
friendship which was an instinct of his soul. Finally, he made the
acquaintance of Erwin Rohde, a vigorous and perspicacious spirit; he
liked him at once; he admired him, for he was incapable of loving
without admiring; he adorned him with the sublime qualities with which
his soul overflowed. Every evening, after laborious hours, the young
men came together. They walked or rode, talking incessantly. "I
experience for the first time," wrote Nietzsche, "the pleasure of a
friendship founded on a moral and philosophic groundwork. Ordinarily,
we dispute strongly, for we are in disagreement on a multitude of
points. But it suffices for our conversation to take a more profound turn;
and then at once our dissonant thoughts are silenced, and nothing
resounds between us but a peaceable and total accord."
They had promised each other that they would spend their first holiday
weeks together. At the beginning of August, being both free, they left
Leipsic and sought isolation in walks in a tramp on the frontiers of
Bohemia. It is a region of wooded heights, which recalls, with less
grandeur, the Vosges. Nietzsche and Rohde led the life of wandering
philosophers. Their luggage was light, they had no books, they walked
from inn to inn, and, throughout the days unspoilt by a care, they
talked about Schopenhauer, about Beethoven, about Germany, about
Greece. They judged and condemned, with youthful promptitude; they
were never weary of defaming their science. "Oh childishness of
erudition!" they said. "It was a poet, it was Goethe, who discovered the
genius of Greece. He it was who held it up to the Germans, absorbed
always on the confines of a dream, as an example of rich and clear
beauty, a model of perfect form. The professors followed him. They
have explained the ancient world, and, under their myopic eyes, that
wonderful work of art has become the object of a science. What is there
that they have not studied? In Tacitus, the ablative case, the evolution
of the gerund in the Latin authors of Africa; they have analysed to the
last detail the language of the Iliad, determined in what respect it is
connected with this other and that other Aryan language. What does it
all signify? The beauty of the Iliad is unique; it was felt by Goethe, and
they ignore it. We shall stop this game; that will be our task. We shall
go back to the tradition of Goethe; we shall not dissect the Greek
genius, we shall revitalise it, and teach men to feel it. For long enough
the scholars have carried out their minute enquiries. It is time to make
an end. The work of our generation shall be definitive; our generation
shall enter into possession of the grand legacy transmitted by the past.
And science, too, must serve progress."
After a month of conversation, the young men left the forest and went
to Meiningen, a little town in which the musicians of the Pessimist
school were giving a series of concerts. A letter of Friedrich Nietzsche's
has preserved a chronicle of the performance. "The Abbé Liszt
presided," he wrote. "They played a symphonic poem by Hans von
Bülow, Nirvana, an explanation of which was given on the programme
in maxims from Schopenhauer. But the music was awful. Liszt, on the
contrary, succeeded remarkably in finding the character of the Indian
Nirvana in some of his religious compositions; for example, in his
Beatitudes." Nietzsche and Rohde separated on the morrow of these
festivals, and returned to their families.