Algorithms Illuminated Part 3 Greedy Algorithms and Dynamic Programming Tim Roughgarden
Algorithms Illuminated Part 3 Greedy Algorithms and Dynamic Programming Tim Roughgarden
com
https://textbookfull.com/product/algorithms-illuminated-
part-3-greedy-algorithms-and-dynamic-programming-tim-
roughgarden/
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/algorithms-illuminated-part-3-greedy-
algorithms-and-dynamic-programming-1st-edition-tim-roughgarden/
textbookfull.com
https://textbookfull.com/product/beyond-the-worst-case-analysis-of-
algorithms-1st-edition-tim-roughgarden/
textbookfull.com
https://textbookfull.com/product/algorithms-for-competitive-
programming-1st-edition-david-esparza-alba/
textbookfull.com
https://textbookfull.com/product/twenty-lectures-on-algorithmic-game-
theory-1st-edition-tim-roughgarden/
textbookfull.com
Algorithms and Programs of Dynamic Mixture Estimation
Unified Approach to Different Types of Components Ivan
Nagy
https://textbookfull.com/product/algorithms-and-programs-of-dynamic-
mixture-estimation-unified-approach-to-different-types-of-components-
ivan-nagy/
textbookfull.com
https://textbookfull.com/product/programming-quantum-computers-
essential-algorithms-and-code-samples-1st-edition-eric-r-johnston/
textbookfull.com
https://textbookfull.com/product/art-of-computer-programming-the-
combinatorial-algorithms-volume-4b-1st-edition-donald-knuth/
textbookfull.com
Algorithms Illuminated
Part 3: Greedy Algorithms and Dynamic
Programming
Tim Roughgarden
c 2019 by Tim Roughgarden
All rights reserved. No portion of this book may be reproduced in any form
without permission from the publisher, except as permitted by U. S. copyright
law.
First Edition
Preface vii
14 Huffman Codes 23
14.1 Codes 23
14.2 Codes as Trees 28
14.3 Huffman’s Greedy Algorithm 32
*14.4 Proof of Correctness 41
Problems 49
v
vi Contents
Index 211
Preface
vii
viii Preface
This series of books has only one goal: to teach the basics of algorithms
in the most accessible way possible. Think of them as a transcript
of what an expert algorithms tutor would say to you over a series of
one-on-one lessons.
There are a number of excellent more traditional and encyclopedic
textbooks about algorithms, any of which usefully complement this
book series with additional details, problems, and topics. I encourage
you to explore and find your own favorites. There are also several
books that, unlike these books, cater to programmers looking for
ready-made algorithm implementations in a specific programming
language. Many such implementations are freely available on the Web
as well.
x Preface
Additional Resources
These books are based on online courses that are currently running
on the Coursera and Stanford Lagunita platforms. I’ve made several
resources available to help you replicate as much of the online course
experience as you like.
Videos. If you’re more in the mood to watch and listen than
to read, check out the YouTube video playlists available from
www.algorithmsilluminated.org. These videos cover all the topics
in this book series, as well as additional advanced topics. I hope they
exude a contagious enthusiasm for algorithms that, alas, is impossible
to replicate fully on the printed page.
Quizzes. How can you know if you’re truly absorbing the concepts
in this book? Quizzes with solutions and explanations are scattered
throughout the text; when you encounter one, I encourage you to
pause and think about the answer before reading on.
End-of-chapter problems. At the end of each chapter you’ll find
several relatively straightforward questions for testing your under-
Preface xi
Acknowledgments
These books would not exist without the passion and hunger supplied
by the hundreds of thousands of participants in my algorithms courses
over the years. I am particularly grateful to those who supplied
detailed feedback on an earlier draft of this book: Tonya Blust, Yuan
Cao, Carlos Guia, Jim Humelsine, Vladimir Kokshenev, Bayram
Kuliyev, and Daniel Zingaro.
I always appreciate suggestions and corrections from readers.
These are best communicated through the discussion forums men-
tioned above.
Tim Roughgarden
New York, NY
April 2019
Chapter 13
1
2 Introduction to Greedy Algorithms
The first half of this book is about the greedy algorithm design
paradigm. What is a greedy algorithm, exactly? Much blood and ink
have been spilled over this question, so we’ll content ourselves with
an informal definition.1
The best way to get a feel for greedy algorithms is through exam-
ples. We’ll see several over the next few chapters.2
Warning
Most greedy algorithms are not always correct.
Our first case study concerns scheduling, in which the goal is to sched-
ule tasks on one or more shared resources to optimize some objective.
For example, a resource could represent a computer processor (with
tasks corresponding to jobs), a classroom (with tasks corresponding
to lectures), or your calendar for the day (with tasks corresponding
to meetings).
Completion Times
Quiz 13.1
Consider a problem instance that has three jobs with `1 = 1,
`2 = 2, and `3 = 3, and suppose they are scheduled in this
order (with job 1 first). What are the completion times
of the three jobs in this schedule? (The job weights are
irrelevant for this question, so we have not specified them.)
a) 1, 2, and 3
b) 3, 5, and 6
c) 1, 3, and 6
d) 1, 4, and 6
3 · 1 + |{z}
|{z} 2 · 3 + |{z}
1 · 6 = 15.
job #1 job #2 job #3
6 Introduction to Greedy Algorithms
Greedy algorithms seem like a good fit for the problem of scheduling
jobs to minimize the weighted sum of completion times. The output
has an iterative structure, with jobs processed one by one. Why not
6
For example, n! is bigger than 3.6 million when n = 10, bigger than 2.4
quintillion when n = 20, and bigger than the estimated number of atoms in the
known universe when n 60. Thus no conceivable improvement in computer
technology would transmute exhaustive search into a useful algorithm.
13.3 Developing a Greedy Algorithm 7
job #3
time
3
job #2
1
job #1
0
Figure 13.1: The completion times of the three jobs are 1, 3, and 6.
Quiz 13.2
a) larger/shorter
b) smaller/shorter
c) larger/longer
d) smaller/longer
In the general case, jobs can have different weights and different
lengths. Whenever our two rules-of-thumb—to prefer shorter jobs
and higher-weight jobs—luckily coincide for a pair of jobs, we know
which one to schedule first (the shorter, higher-weight one). But what
if the two rules give conflicting advice? What should we do with one
short low-weight job and one long high-weight job?
What’s the simplest greedy algorithm that might work? Each
job has two parameters, and the algorithm must look at both. The
best-case scenario would be to come up with a formula that compiles
each job’s length and weight into a single score, so that scheduling
jobs from highest to lowest score is guaranteed to minimize the sum of
weighted completion times. If such a formula exists, our two special
cases imply that it must have two properties: (i) holding the length
fixed, it should be increasing in the job’s weight; and (ii) holding the
weight fixed, it should be decreasing in the job’s length. (Remember,
higher scores are better.) Take a minute to brainstorm some formulas
that have both of these properties.
* * * * * * * * * * *
There are plenty of other options. For example, the ratio of the
two parameters is another candidate:
wj
proposal #2 for score of job j: .
`j
These two scoring functions lead to two different greedy algo-
rithms.
GreedyDiff
Schedule the jobs in decreasing order of wj `j
(breaking ties arbitrarily).
GreedyRatio
wj
Schedule the jobs in decreasing order of `j
(breaking ties arbitrarily).
Thus, already, our first case study illustrates the first theme of the
greedy paradigm (Section 13.1.2): It is often easy to propose multiple
competing greedy algorithms for a problem.
Which of the two algorithms, if any, is correct? A quick way to
rule out one of them is to find an instance in which the two algorithms
output different schedules, with different objective function values.
For whichever algorithm fares worse in this example, we can conclude
that it is not always optimal.
Both algorithms do the right thing in our two special cases, with
equal-weight or equal-length jobs. The simplest possible example for
ruling out one of them would be a problem instance with two jobs,
having different weights and lengths, such that the two algorithms
schedule the jobs in opposite orders. That is, we seek two jobs whose
ordering by difference is the opposite of their ordering by ratio. One
simple example is:
Job #1 Job #2
Length `1 = 5 `2 = 2
Weight w1 = 3 w2 = 1.
The first job has the larger ratio ( 35 vs. 12 ) but the smaller (more
negative) difference ( 2 vs. 1). Thus the GreedyDiff algorithm
schedules the second job first, while GreedyRatio does the opposite.
10 Introduction to Greedy Algorithms
Quiz 13.3
What is the sum of weighted completion times in the sched-
ules output by the GreedyDiff and GreedyRatio algorithms,
respectively?
a) 22 and 23
b) 23 and 22
c) 17 and 17
d) 17 and 11
Correct answer: (a). First suppose that all n jobs have the same
length, say length 1. Then, every schedule has exactly the same
set of completion times—{1, 2, 3, . . . , n}—and the only question is
which job gets which completion time. Our semantics for job weights
certainly suggests that the higher-weight jobs should receive the
smaller completion times, and this is in fact the case. For example,
you wouldn’t want to schedule a job with weight 10 third (with
completion time 3) and one with weight 20 fifth (with completion
time 5); you’d be better off exchanging the positions of these two jobs,
which would decrease the sum of weighted completion times by 20 (as
you should check).
The second case, in which all jobs have equal weights, is a little
more subtle. Here, you want to favor shorter jobs. For example,
consider two unit-weight jobs with lengths 1 and 2. If you schedule
the shorter job first, the completion times are 1 and 3, for a total
of 4. In the opposite order, the completion times are 2 and 3, for
an inferior total of 5. In general, the job scheduled first contributes
to the completion times of all the jobs, as all jobs must wait for
the first one to finish. All else being equal, scheduling the shortest
job first minimizes this negative impact. The second job contributes
12 Introduction to Greedy Algorithms
to all the completion times other than that of the first job, so the
second-shortest job should be scheduled next, and so on.
w1 · C1 + w2 · C2 = 3 · 7 + 1 · 2 = 23.
3 · 5 + 1 · 7 = 22.
Two Assumptions
wi wj
(2) There are no ties between ratios: `i 6= `j whenever
i 6= j.
job #n
..........
job #3
time
job #2
job #1
σ
more more
stuff stuff
j i
exchange!
i j
time
time
stuff stuff
σ* σ’
(a) Before exchange (b) After exchange
Figure 13.3: Obtaining the new schedule 0 from the allegedly optimal
schedule ⇤ by exchanging the jobs in a consecutive inversion (with i > j).
Quiz 13.4
What effect does the exchange have on the completion time
of: (i) a job other than i or j; (ii) the job i; and (iii) the
job j?
Now is the time to use the fact that ⇤ scheduled i and j in the “wrong
order,” with i > j. Our standing assumptions (1) and (2) imply that
jobs are indexed in strictly decreasing order of weight-length ratio, so
wi wj
< .
`i `j
w i `j < wj `i .
|{z} |{z}
cost of exchange benefit of exchange
Because the benefit of the exchange exceeds the cost, equation (13.3)
tells us that
0 ⇤
objective function value of < objective function value of .
Thursday, the 2nd.—In the odds and ends sack I had found an
extra flannel shirt, and, fortified by this, was not much troubled by
the cold, though I was not too warm in spite of the thick vest, two
flannel shirts, leather waistcoat, Norfolk jacket, and macintosh, that
I put on before creeping into my blanket-bag. I had announced to
the Indians that we were going back, and their delight got them up
first for a wonder, though indeed as we returned they were generally
the first to move, in their eagerness to escape from the detested
country. At this camp they had been chanting the most doleful
ditties, and when I inquired what it was all about, they said, ‘Siwash
sick tum-tum, want go home.’ Among Indians the tummy is generally
regarded as the seat of the feelings.
To get everything into one load the packs had to be very heavy.
Billy had about a hundred pounds and Jimmy very little less, while in
addition to my own properties I had kettles, frying-pan, and tent-
poles. We left a small cache for the others, and our last goose, but
we hoped to get some more at H, and were off by about seven
o’clock. On the Daisy Glacier we found fresh bear-tracks, much
larger than those of the two who had paid us a visit, but we saw
nothing of the beast himself. Putting up lots of ptarmigan in the
hollow of the little stream by which we descended to cross the
ravine, we went on past H to the site of Schwatka’s last camp,
flushing more ptarmigan by the stream there. Altogether I fired five
pistol-shots at them, and got a young one with my last. It was well-
grown and about the size of a French partridge. We pitched camp at
the edge of the glacier, and after lunch the men went back to fetch
the things cached at H, and to try for geese, but they only got one
small one, all the rest being able to fly. Meanwhile I took my
ptarmigan on to the glacier, to avoid the flies, and tried to skin it.
This was not very easy, as the bullet had smashed both shoulders,
but I managed it in a sort of a way, and then went for a bit across
the glacier towards the Chaix Hills to get some idea of the lie of the
crevasses. We had an excellent supper, and the men displayed
marvellous appetites, eating the whole of their goose, the legs of my
bird, and two goes of rice-pudding, but I think they were then
tolerably crowded. After this I started to climb the last little hill,
which looks like an island from the opposite side of the glacier, but
coming on more ptarmigan, fired my last five cartridges and got an
old bird. I ought certainly to have had two more, but the pistol was
so foul that accuracy was impossible, while only three of the
chambers would work. Coming back, I drove two or three young
ones on to the moraine, and, shouting for Billy and Jimmy, we
pursued wildly for about half-an-hour, the men barefooted and I with
only moccasins on, so that it would have been amusing to observe
our skips and hops when we lighted on a sharper stone than usual.
At last the one we had selected was too beat to fly any more, and
Billy finally succeeded in knocking him over with a better aimed rock
than usual, most of their shots being awfully wild. Just as we were
going to turn in we heard a curious cry, something between the
bleat of a sheep and the mew of a cat. The men said, though rather
doubtfully, that it was a bear, and shouted vigorously to frighten it
away, but we heard it again afterwards, and I fancy it may have
been a lynx.
Friday, the 3rd.—I again woke several times in the night from the
cold, and could hear the ptarmigan calling quite close to the tent.
We did not get up till rather late, and got off about nine o’clock,
leaving sundry properties which I intended Mike and Matthew, who
had been luxuriating at the beach, to have the pleasure of fetching.
Thinking, from my survey of the previous day, that we could improve
on the way we had come, I struck right in nearly to the centre of the
glacier, and for a long way we had very good going with hardly any
crevasses; but as we approached the two conical mounds which
made such a land-mark on the Tyndall Glacier, we got some very bad
moraine indeed, and in one place I nearly succeeded in breaking my
leg by pulling a loosely-perched boulder on to myself. It came to an
end at last, and we got up to G about noon, where we found no sign
of the other men. After pitching the tent and examining the cache,
which, like all our others, had been left untouched by four-footed
prowlers, we lunched, and I then had a delicious bathe in the little
tarn. The men slept most of the afternoon while I skinned the
ptarmigan, a futile task, as it was found impossible to preserve the
skins by the time I got home. At supper-time the view was unusually
fine; a thin layer of cloud hid the many crevasses of the Guyot
Glacier, as a veil conceals the wrinkles of a faded beauty, while
above this the peaks to the west showed with unusual grandeur,
especially the long snow-clad mass which we had christened
Snowshoe Mountain. Later on the clouds thinned off a great deal,
and St. Elias, which had been banded with mist all day, came out
quite clear. The flowers on the hills, especially the violets, were
mostly over, but I found a fine rose-coloured lupin among the blue
ones at the edge of the lake.
Saturday, the 4th.—The day dawned brilliantly fine and hot. After
a bathe I mended my clothes, and then, putting my luncheon in my
pocket, wandered over the hills, taking a good many bearings with
the sextant. As I came leisurely back along the edge of the glacier
lake, which was very bad walking, I flushed sundry ptarmigan, one
of which, an old one, perched in the top of a dead fir-tree. Just as I
reached the end of the lake I heard shouts, and, hurrying to the
glacier, found H. and W. E. was behind with the men, and, as Shorty
had a bad ankle and the packs were very heavy, we sent the Indians
to help them. While they related their adventures I got supper ready
for them.
After leaving Camp I, they crossed the Tyndall Glacier for about
half-an-hour, and then put on the rope. The crevasses were very
bad, and covered with rotten snow, so that it was with difficulty that
they made their way to the foot of Mount St. Elias, and established a
camp on the last grassy slope that was visible. The scenery was very
grand, resembling the view up the Mer de Glace from the
Montanvert, but on a far larger scale. The double ice-fall of the
Tyndall Glacier was well seen, divided by a small island of rock;
further to the right were two very steep and narrow glaciers,
resembling frozen waterfalls. This camp had been reached at half-
past ten (three and a half hours’ going), and at twelve they sallied
forth to explore, and mounted round the camp hill, keeping it on the
right. Two hours up a rather steep ascent brought them to the top of
a snow col connecting the camp hill with one of the arêtes leading to
the rim of the crater which was then their object. The arête was of
loose shale, everything giving way directly it was touched, but, apart
from that, the climbing was not difficult, and after reaching a height
of about six thousand feet they turned back at 4.30 p.m., undecided
as to the morrow. Having left the stove and kerosene behind, they
expected to have to live on cold food, but found moss and shrubbery
enough to make a small fire.
Next morning they left at 8 a.m., with the intention of continuing
the same arête, but in half-an-hour they changed to the next one on
the left, and in two hours reached a height slightly greater than that
of the day before. The walking was terrible, over loose shale and
steep dirt giving no real foothold. They followed the edge of the
arête for the rest of the day, sending down quantities of stones.
Then came a little snow, part of which was solid ice, and H. had to
cut a hundred and fifty steps, which took the best part of an hour
and a half. At four o’clock they reached the summit of the arête, but,
though on the brink of the crater, could see nothing, owing to mist.
The height, 7,725 feet, was at all events better than Seton-Karr’s,
and they built a cairn and left the flag, hardly hoping to get any
higher. After a hasty lunch they descended, reaching camp at 10 p.m.
They could see that the Tyndall Glacier makes two long and beautiful
sweeps round the foot of St. Elias, full of tremendous crevasses, and
though, if time were no object, it might be possible to ascend it, it
could never be a practicable route to the summit.
The next day they made a day of rest, which was diversified by
Shorty and Lyons slaying in the morning with stones eight out of a
covey of ptarmigan, while in the evening they succeeded in smoking
out and killing four baby marmots.
On Wednesday they all came over to the Coal Glacier Camp in an
hour and a half, found me absent, and carried off the stove and
sundry stores, including the rice-pudding. In the evening they went
up to a bit of moraine east of, and just beneath, the snow col
connecting the camp hill with their first arête, and slept there,
leaving at 4.40 next morning, and keeping steadily up the arête till
their arrival at the top. There was no difficulty, it was only a sort of
treadmill over the loose shale and slate. They kept to the edge of
the arête the whole way, and at the point where it articulates with
the mountain they went first up loose débris, and then over a little
snow, whence they diverged to climb a nice bit of sandstone, and
reached the rim of the crater at 7.10.
After ten minutes’ halt they continued along the brink to the
summit of the arête climbed on the 30th of July, which was reached
at 7.40. They then steered north-west over the snow towards the
upper lip of the crater, having to double back considerably to avoid
some schrunds. Once above these, they ascended a little snow and
then a tedious slope of loose shale, while on their right was a steep
snow-slope, in too dangerous a condition for climbing. Near the top
of this they met with some more fine rocks of grey sandstone which
gave them their second ten minutes of real climbing, and they then
rested for lunch from 10.10 to 10.55. The aneroid gave a height of
9,500 feet, and to reach 10,000 they had to go a considerable
distance. Just above the sandstone rocks came the top of the snow-
slope alongside of which they had been climbing. It proved here to
be ice, and they had to cut up it, slanting to the right so as to reach
the top, where a sort of cornice was at its best. The last part was
dangerous, the ice being loose and granular, while the last few feet
were so steep that it was necessary to kneel in the steps. Above this
they found a snow-field stretching in waves round the brink of the
crater. The snow was very trying, being often above their knees,
while large crevasses separated the elevations from the depressions,
and wherever the grade was steep the snow changed to ice. They
kept on this till they were about due north of the crater, when they
had their second lunch at a height of 11,375 feet, as shown on
working out the boiling-point observations, and then went on to the
foot of the highest rocks that formed part of the eastern edge of the
crater. These were steep and mostly covered with snow, in which
were large crevasses. The snow mounted in sweeps and terraces to
the top of the rocks, which they estimated as about a thousand feet
above them. They would have much liked to have ascended these,
but the day was advanced, the wind rising, and the sun spoiling their
steps, so that they thought it more prudent to return.
At this point they were above the col joining Haydon Peak to
Mount St. Elias, but could not see the col itself. They could see,
however, that the final peak, which they then estimated as being
some six thousand feet above them, would be difficult and perhaps
impossible from this col. On the further side it would first be
necessary to climb east to avoid an overhanging glacier; then to
ascend over rocks, snow, and some green ice which might perhaps
be avoided by some steep rocks to the left, but all the climbing up
this first thousand feet would be very severe. Afterwards it would be
easier, up a snow-slope till above what appears as a mound from
below (1,500 to 2,000 feet above the col), then north over a
comparatively level snow-field; then up steep snow and rocks to the
edge of the true south arête which runs up for about four thousand
feet to the summit, chiefly consisting of snow and not steep. The
upper half is steeper, but there is no rock, and there would be no
difficulty there or on the south-east face, unless, as is very probable,
what seems to be snow is in reality ice. Lower down they could see
distinctly that this was so, and therefore abandoned all idea of
sleeping on the col.
The south-west face is a mass of hanging glaciers. The brow on
which they were is seen from below as a wall of snow fringing the
top of the crater; on the other side this snow falls away rapidly to
the glacier which winds down from the north-east to the head of the
Tyndall Glacier. From there no route to the col could be made, as the
ice is far too broken, and should any one force the Tyndall ice-fall his
best course would be to cross the glacier to a low rock arête, which
would take him to some snow-fields whence he might turn west and
gain the huge north-west arête of the mountain. By this he could
reach the west shoulder and the way would be simple. The weather
being perfect, their view was magnificent. To the north-west the
ranges were low, but the glaciers went winding out of sight. Mount
Wrangel could not be seen, but Fairweather was distinctly visible. On
their descent they found the snow and steps much worse. They left
Mrs. Haydon’s flag in a meat-tin under a pile of stones at the foot of
the sandstone rocks where they made their first lunch, as above this
there was no place of security, and got back to camp about nine
o’clock.
Next day they crossed over to Camp I, and on the Saturday
descended to G, going, at Shorty’s suggestion, all along the Tyndall
Glacier, but came to the conclusion that it was not an improvement.
As the other men had not turned up, Billy and Jimmy were informed,
to their great disgust, that they would have to go next morning and
fetch the cache left at J.
Sunday, the 5th.—W. woke us all up in the night by shouting in his
sleep, ‘Lyons, Lyons, a serac is falling on the tent!’ for which he was
unmercifully chaffed. The Indians arose at some unearthly hour and
went off to J, getting back at eight o’clock. At 6.30 a.m. W. went off
to try and turn the west end of the opposite range, which we had
christened the Ptarmigan Hills. He could persuade no one to go with
him as we all believed, first, that the hills could not be turned, owing
to the crevassed state of the Guyot Glacier, and secondly, that if he
did turn them he would only see another point beyond. We bathed
and sketched, and at about noon Ed. and Finn turned up, followed
half-an-hour later by Matthew and Gums, who had laudably
endeavoured to find a better way through the crevasses on the
Guyot Glacier, but had failed signally. Gums had come up in Mike’s
place, as the latter’s feet were very sore.
They had had rainy weather on the beach nearly the whole time.
A lot of the Yakutats had been there sea-otter hunting with
considerable success, and Jack Dalton had camped for one night. He
brought the news that the body of a white man had been found at
Point Manby, thrown up with a fishing dory. The poor fellow must
have got among the breakers at night, and he had thrown out a
drag to keep the boat head on to them, but must have swamped as
he reached the shore. From the tracks they saw that he was able to
crawl up the beach on his hands and knees into the bush, and
whether he died there from exhaustion or was killed by a bear no
one could say, but it is to be hoped he was dead before the bear got
him. No one recognised the boat or knew anything which might lead
to discovering his name. They buried what was left of him there, and
put the dory over his grave.
Our men had had a fair time among the flesh-pots on the shore,
as, though the Indians had got no more seals, they had shot several
swans and geese. The men came up in two days, making a camp as
before at the place where the river issues from the ice, but
succeeded in getting down in one day of sixteen hours. The water
was very high, and they had to make a raft before they could cross
one creek. After lunch Lyons and I went after ptarmigan with our
pistols; Shorty also started with the rifle which had been brought up
from the first cache, but his leg was too bad and he had to go back.
He looked for me to give me the rifle, but I had vanished down a
ravine. There were not very many ptarmigan, while the ground was
so broken that it was almost impossible to mark them. I only fired
two shots; Lyons was luckier, firing ten or twelve, and getting one
bird, which he nearly lost, for he fixed it in his belt by its head, and
looking down after a time found head et præterea nil. Retracing his
steps carefully he managed to find the corpse. We heard W. also
popping away vigorously on the other side of the glacier, but he
returned bredouille without having got round the end of the hills.
After supper Finn went out with the rifle and got two ptarmigan. He
hit a goose, but it escaped into the lake. We decided to make an
early start for the shore, so as to avail ourselves of the continued
fine weather and get back to Yakutat as soon as possible.
Monday, the 6th.—Moved by the hope of speedily leaving the
regions they so thoroughly loathed, the Indians were astir early, and
by four o’clock the whole party was up. Finn fried the two ptarmigan
for breakfast, but as it was discovered that the Indians had been
greasing their boots with the fat in the frying-pan, no one seemed
inclined to partake of the dish. We got off by 5.30, and went down
to the Guyot Glacier, along which we proceeded at a great pace as
the packs were pretty light. We got through the crevasses without
much difficulty, and, though we had some rather muddy bits near
Lake Castani, we cleared the Chaix Hills at nine o’clock, abandoning
to their fate a few stores which had been left in the cache made at
the point where our trail from F struck the glacier, Ed., Matthew, and
Mike having found more than they could bring up on July 26.
Keeping about half-a-mile to the west of the depression between the
glaciers, we reached the head of the river at eleven. The water boils
out finely from under the ice, but, though it was higher than when
the men had last come up, the gravel-flat on which they had then
slept being now covered, the volume was not as great as I had
expected, being perhaps equal to that of the Visp where it joins the
Rhone.
We rested a bit on the beach, and then came on in very scattered
order to the cache, the two miles taking about two hours, as the
alder-bush on the face of the moraine was very bad, and the stream
was too high for us to get along on the flats by wading every now
and then, as the men had generally been able to do. H., who
stopped to photograph, went all wrong, away from the river towards
Camp C, and as he came back fell foul of a wasp’s nest, and got
stung in two or three places. Jimmy, who was one of the first at the
cache, earned our high approval by coming back of his own accord
to help Shorty in with his load. We were all collected by half-past
two, and rested all the afternoon. Supper was at 4.30, and we at last
got hold of the dried vegetables, which the men had always
forgotten to bring up, and made some splendid soup. Just above the
cache E. found a white willow-herb, and I collected some seed of the
red kind to try in England.
While we were resting in the afternoon Matthew told us that the
Indians called the river Yahkhtze-tah-heen (Muddy Harbour River),
and Mount St. Elias Yahkhtze-tah-shah (Muddy Harbour Mountain).
George, the second chief of Yakutat, afterwards told us that there
used to be two villages, one on the sea and the other at the foot of
St. Elias, but that the glaciers came down and destroyed them,
according to him, in a single night. As the Alaska glaciers are all
rapidly receding, this must have been a very long time ago, for a
hundred years back, when the country was first visited, there was
far more ice than there is now, Vancouver having been unable to
enter Glacier Bay for the ice, while Icy Bay, even on modern charts,
is represented as being of a V-shape from the glaciers running out
on either side, whereas it now hardly deserves the name of a bay at
all.
Meaning to make an early start, we turned in at six o’clock, but
were driven wild by the millions of mosquitoes that invaded our tent.
By this time we were thoroughly inoculated against the effects of
their bites, but their continuous trumpeting destroyed all chance of
sleep; after a time we arose and drove out and slew as many as we
could, after which we endeavoured to close up every possible
aperture. Our success was but partial, but we managed to get a little
sleep.
Tuesday, the 7th.—We got up at 4 a.m., and were off by 5.45; an
hour’s steady going brought us down to Camp B, and we went on by
the old route to the point where Gums declared Schwatka had had a
camp. Here we turned to the left instead of keeping down the main
river. At first we had a good lot of wading, but presently reached
some flats, over which we made more satisfactory progress. At this
point some wild-geese were discovered far ahead, and Shorty set
forth to stalk them; as, however, he was unwilling to crawl over the
wet mud, his six-foot-four frightened them away while he was still
three or four hundred yards off. On these flats were a great many
small frogs, of which most of the Indians were much afraid, holding
some kind of superstition about them; but Matthew and Jimmy were
apparently sceptics, and the latter, with a sly look at us, put a frog
on the back of Billy, who, though his great friend, was perfectly
furious, and for a minute I thought we were going to have a first-
class row.
At last we approached the deep creek where the men had once
had to make a raft. Now the crossing appeared feasible, but it was
hard to be sure, as all the neighbouring land on our side was under
water. In the midst of this was a stranded log, where we rested and
took off our coats, fastening them on to our packs, which we carried
on our heads. H. planted the camera in the water, and prepared to
photograph the passage. Gums, of course, led; and at the second
attempt discovered a place where the water was hardly over his
armpits. This was all right for the taller ones of us, but E. went in
well up to his chin, as did Finn, who, losing his footing, vanished
with his pack. Great was the dismay till it was discovered that he
was only carrying the bacon. Jimmy also disappeared altogether, and
had eventually to be convoyed across by Gums and Matthew. Last of
all came W. and H., the latter bearing the camera. He chanced on a
deepish place, and nearly went under, but struggled on, quoting:
‘And nobly Father Tiber bare up his faltering chin’—which chin,
decked with a ruddy beard, had dipped beneath the icy wave before
he emerged on the other side.
Three-quarters of an hour through the trees, and then a little
wading, brought us to the mouth of the first river at eleven o’clock,
and we halted for a little lunch and a great many strawberries, which
were not yet over in shady places or long grass. We then pushed on
along the beach to camp, the packs being brought down the lagoon
in the small canoe, and arrived at 1.15, hoping to start at once for
Yakutat; but the other Indians had gone hunting, and we had to
await their return, which was not till five o’clock. After some supper
we got off at 6.20; it was perfectly calm, and we didn’t ship a drop
of water, or get wet above our knees. There was a five-gallon can of
kerosene which we said could be left on the beach; Mike, however,
wished to take it in the small canoe, but Gums, after a lively
argument, settled the question by driving an ice-axe into it. It was a
fair squeeze for twelve in the big canoe; I curled up just forward of
the bow oar, the other three were in the stern, and hardly so well
off. We rowed and paddled to Cape Sitkagi (10 p.m.), when a fresh
breeze from the west sprang up, and, towing the small canoe, we
sailed to Point Manby, which we passed at 4 a.m.
Wednesday, the 8th.—The breeze then began to die away, and
vanished at five, so we had to row again, and got to Yakutat at ten
o’clock. De Groff greeted us, and gave us four breakfast, which
included the unwonted luxuries of butter and honey; the men, who
were a little sulky after their night’s exertions, cooked theirs on his
stove. Then H. paid off Ed., Finn, and the Yakutats, and arranged to
leave our Indians in the village as before, after which we went over
to the Swedish Mission on the mainland opposite, and encamped in
the yard. Ed. came too, and Finn followed in the evening. We bathed
in the sea, which was decidedly cold; but the lake at the back was
too muddy, and also too near George’s ranche to be pleasant. De
Groff expected the ‘Alpha’ to arrive about the 10th.
CHAPTER VII
LIFE AT YAKUTAT
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com