Instant Access To (Ebook PDF) A Guide To Algorithm Design: Paradigms, Methods, and Complexity Analysis Ebook Full Chapters
Instant Access To (Ebook PDF) A Guide To Algorithm Design: Paradigms, Methods, and Complexity Analysis Ebook Full Chapters
com
https://ebookluna.com/product/ebook-pdf-a-guide-to-
algorithm-design-paradigms-methods-and-complexity-analysis/
OR CLICK HERE
DOWLOAD NOW
https://ebookluna.com/product/ebook-pdf-research-methods-design-and-
analysis-13th-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-algorithm-design-by-jon-
kleinberg/
ebookluna.com
https://ebookluna.com/product/original-pdf-algorithm-design-and-
applications-by-michael-t-goodrich/
ebookluna.com
https://ebookluna.com/download/modern-control-state-space-analysis-
and-design-methods-ebook-pdf/
ebookluna.com
(eBook PDF) Handbook of Research Methods in Complexity
Science: Theory and Applications
https://ebookluna.com/product/ebook-pdf-handbook-of-research-methods-
in-complexity-science-theory-and-applications/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-data-structures-algorithm-
analysis-in-c-4th-edition/
ebookluna.com
https://ebookluna.com/product/data-structures-algorithm-analysis-
in-c-4th-edition-ebook-pdf/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-qualitative-psychology-a-
practical-guide-to-research-methods-3rd-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-research-design-and-methods-a-
process-approach-11th-edition/
ebookluna.com
Computer Science/Computer Engineering/Computing Chapman & Hall/CRC
Applied Algorithms and Data Structures Series
ALGORITHM DESIGN
“This book is a great technical arsenal for every graduate student and post-
graduate researcher. By providing a treasure trove of concrete algorithmic A GUIDE TO
ALGORITHM
examples, the book trains the reader to recognize clues that indicate the
complexity of a broad range of algorithmic problems, while supplying
A GUIDE TO
a battery of techniques for solving a particular problem in hand. …”
—Umit Catalyurek, Professor, Ohio State University
Benoit, Robert,
Analysis provides a roadmap for readers to determine the difficulty of an
and
algorithmic problem by finding an optimal solution or proving complexity
results. It gives a practical treatment of algorithmic complexity and guides Vivien
readers in solving algorithmic problems. The book offers a comprehensive
set of problems with solutions as well as in-depth case studies that
demonstrate how to assess the complexity of a new problem.
4 Dynamic programming 81
4.1 The coin changing problem . . . . . . . . . . . . . . . . . . . 81
4.2 The knapsack problem . . . . . . . . . . . . . . . . . . . . . 84
4.3 Designing dynamic-programming algorithms . . . . . . . . . 86
4.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Exercise 4.1: Matrix chains . . . . . . . . . . . . . . . . . . . 87
Exercise 4.2: The library . . . . . . . . . . . . . . . . . . . . . 88
Exercise 4.3: Polygon triangulation . . . . . . . . . . . . . . . 88
Exercise 4.4: Square of ones . . . . . . . . . . . . . . . . . . . 89
Exercise 4.5: The wind band . . . . . . . . . . . . . . . . . . 89
Exercise 4.6: Ski rental . . . . . . . . . . . . . . . . . . . . . . 89
Exercise 4.7: Building set . . . . . . . . . . . . . . . . . . . . 90
4.5 Solutions to exercises . . . . . . . . . . . . . . . . . . . . . . 90
Solution to Exercise 4.1: Matrix chains . . . . . . . . . . . . . 90
Solution to Exercise 4.2: The library . . . . . . . . . . . . . . 91
Solution to Exercise 4.3: Polygon triangulation . . . . . . . . 93
Solution to Exercise 4.4: Square of ones . . . . . . . . . . . . 96
Solution to Exercise 4.5: The wind band . . . . . . . . . . . . 98
Solution to Exercise 4.6: Ski rental . . . . . . . . . . . . . . . 98
Solution to Exercise 4.7: Building set . . . . . . . . . . . . . . 102
4.6 Bibliographical notes . . . . . . . . . . . . . . . . . . . . . . 103
References 349
Index 359
xiii
Objective
YABA? Yet Another Book on Algorithms?
No thanks. There are so many good books on the design of algorithms that
it is hard to choose and pick one. If asked to name our two favorite refer-
ences, we would recommend Introduction to Algorithms by Cormen, Leiserson,
Rivest, and Stein [27] and Algorithms by Dasgupta, Papadimitriou, and Vazi-
rani [30]. For sure, this book does not intend to compete with such established
monuments.
Instead, this book proposes a complementary perspective. It aims at guid-
ing students and researchers who need to solve problems, either by finding
optimal algorithms or by assessing new complexity results. In a nutshell, the
main objective of this book is to outline the roadmap to follow, and to prac-
tice all the corresponding steps, in order to determine the complexity of a
problem.
xv
extensive material so that the readers can assess their skills by solving the
many exercises in Part I.
Part II of this book can be used to teach an undergraduate or graduate class
on NP-completeness, with a focus on polynomial reductions, and a survey of
approaches that go beyond NP-completeness.
Part III of this book can be used to teach a graduate class on advanced
algorithms, either in the form of a series of classes presenting the case studies,
or in the form of projects assigned to students.
Part III constitutes the main originality of the book. It is devoted to case
studies whose goal is to provide the reader with tools and techniques to assess
problem complexity: which instances are polynomial, and which are NP-hard,
and what do to for the latter. Part III consists of an introduction summarizing
how to assess the complexity of a new problem, and it is illustrated with five
case studies:
1. Chains-on-chains partitioning
2. Replica placement in tree networks
3. Packet routing
4. Matrix product, or tiling the unit square
5. Online scheduling
Thanks
The content of this book, or at least preliminary versions of it, has been
used to teach courses at École Normale Supérieure de Lyon. We are grate-
ful to the students for their feedback and suggestions. We also thank all
our colleagues who helped gather the problems of Part I. The teaching assis-
tants when Yves Robert was teaching the Algorithms course were (ordering by
year) Odile Millet-Botta, Tanguy Risset, Alain Darte, Bruno Durand, Frédéric
Vivien, Jean-Christophe Dubacq, Olivier Bodini, Daniel Hirschkoff, Matthieu
Exbrayat, Natacha Portier, Emmanuel Hyon, Eric Thierry, Michel Morvan,
and Yves Caniou. The teaching assistants when Anne Benoit took over were
(ordering by year) Victor Poupet, Damien Regnault, Benjamin Depardon,
Jean-François Pineau, Clément Rezvoy, Christophe Mouilleron, Fanny Du-
fossé, and Anne-Cécile Orgerie.
We also wish to thank the following people who have contributed to some
of the content by their insightful suggestions, their own previously published
work, or their help reviewing draft chapters: Guillaume Aupy, Marin Bougeret,
Jean-Yves l’Excellent, Arnaud Legrand, Loris Marchal, Paul Renaud-Goud,
Veronika Sonigo, and Bora Uçar.
Finally, a word of caution on bibliographical notes: Some exercises have ap-
peared in many sources, and the references that we give may well not be the
original ones. Also, the absence of any reference is not a claim for originality!
However, all solutions are ours, and they have been tested and verified by the
students at ENS Lyon, the teaching assistants, and ourselves (but we keep the
sole responsibility for errors). We welcome comments and suggestions to our
e-mail addresses.
Polynomial-time
algorithms: Exercises
Footnotes:
[1] Tutton's researches (1894) upon the analogy of the crystalline
forms of K2SO4, Rb2SO4 and Cs2SO4 may be taken as a typical example
of the comparison of analogous compounds. We cite the following data
from these excellent researches: the sp. gr. at 20°/4° of K2SO4 is 2·6633
of Rb2SO4, 3·6113, and of Cs2SO4, 4·2434. The coefficient of cubical
expansion (the mean between 20° and 60°) for the K salt is 0·0053, for
the Rb salt 0·0052, for the Cs salt 0·0051. The linear expansion (the
maximum for the vertical axis) along the axis of crystallisation is the
same for all three salts, within the limits of experimental error. The
replacement of potassium by rubidium causes the distance between the
centres of the molecules in the direction of the three axes of
crystallisation to increase equally, and less than with the replacement of
rubidium by cæsium. The index of refraction for all rays and for every
crystalline path (direction) is greater for the rubidium salt than for the
potassium salt, and less than for the cæsium salt, and the differences
are nearly in the ratio 2 : 5. The lengths of the rhombic crystalline axes
for K2SO4 are in the ratio 0·5727 : 1 : 0·7418, for Rb2SO4, 0·5723 : 1 :
0·7485, and for Cs2SO4, 0·5712 : 1 : 0·7521. The development of the
basic and brachy-pinacoids gradually increases in passing from K to Rb
and Cs. The optical properties also follow the same order both at the
ordinary and at a higher temperature. Tutton draws the general
conclusion that the crystallographic properties of the isomorphic rhombic
sulphates R2SO4 are a function of the atomic weight of the metals
contained in them (see Chapter XV.) Such researches as these should do
much towards hastening the establishment of a true molecular
mechanics of physico-chemical phenomena.
[1 bis] The origin of the primary rocks has been mentioned in Chapter
X., Note 2.
[2] Carnallite belongs to the number of double salts which are directly
decomposed by water, and it only crystallises from solutions which
contain an excess of magnesium chloride. It may be prepared artificially
by mixing strong solutions of potassium and magnesium chlorides, when
colourless crystals of sp. gr. 1·60 separate, whilst the Stassfurt salt is
usually of a reddish tint, owing to traces of iron. At the ordinary
temperature sixty-five parts of carnallite are soluble in one hundred
parts of water in the presence of an excess of the salt. It deliquesces in
the air, forming a solution of magnesium chloride and leaving potassium
chloride. The quantity of carnallite produced at Stassfurt is now as much
as 100,000 tons a year.
[3] The method of separating sodium chloride from potassium chloride
has been described in Chapter I. On evaporation of a mixture of the
saturated solutions, sodium chloride separates; and then, on cooling,
potassium chloride separates, owing to the difference of rate of variation
of their solubilities with the temperature. The following are the most
trustworthy figures for the solubility of potassium chloride in one
hundred parts of water (for sodium chloride, see Chapter X., Note 13):—
10° 20° 40° 60° 100°
32 35 40 46 57
When mixed with solutions of other salts the solubility of potassium
chloride naturally varies, but not to any great extent.
[3 bis] The specific gravity of the solid salt is 1·99—that is, less than
that of sodium chloride. All the salts of sodium are specifically heavier
than the corresponding salts of potassium, as are also their solutions for
equal percentage compositions. If the specific gravity of water at 4° =
10,000, then at 15° the specific gravity of a solution of p p.c. potassium
chloride = 9,992 + 63·29p + 0·226p2, and therefore for 10 p.c. =
1·0647, 20 p.c. = 1·1348, &c.
Potassium chloride combines with iodine trichloride to form a
compound KCl + ICl3 = KICl4, which has a yellow colour, is fusible, loses
iodine trichloride at a red heat, and gives potassium iodate and
hydrochloric acid with water. It is not only formed by direct combination,
but also by many other methods; for instance, by passing chlorine into a
solution of potassium iodide so long as the gas is absorbed, KI + 2Cl2 =
KCl,ICl3. Potassium iodide, when treated with potassium chlorate and
strong hydrochloric acid, also gives this compound; another method for
its formation is given by the equation KClO3 + I + 6HCl = KCl,ICl3 + 3Cl
+ 3H2O. This is a kind of salt corresponding with KIO2 (unknown) in
which the oxygen is replaced by chlorine. If valency be taken as the
starting-point in the study of chemical compounds, and the elements
considered as having a constant atomicity (number of bonds)—that is, if
K, Cl, and I be taken as univalent elements—then it is impossible to
explain the formation of such a compound because, according to this
view, univalent elements are only able to form dual compounds with
each other; such as, KCl, ClI, KI, &c., whilst here they are grouped
together in the molecule KICl4. Wells, Wheeler, and Penfield (1892)
obtained a large number of such poly-haloid salts. They may all be
divided into two large classes: the tri-haloid and the penta-haloid salts.
They have been obtained not only for K but also for Rb and Cs, and
partially also for Na and Li. The general method of their formation
consists in dissolving the ordinary halogen salt of the metal in water, and
treating it with the requisite amount of free halogen. The poly-haloid salt
separates out after evaporating the solution at a more or less low
temperature. In this manner, among the tri-haloid salts, may be
obtained: KI3, KBr2I, KCl2I, and the corresponding salts of rubidium and
cæsium, for instance, CsI3, CsBrI2, CsBr2I, CsClBrI,CsCl2I, CsBr3,
CsClBr2, CsCl2Br, and in general MX3 where X is a halogen. The colour of
the crystals varies according to the halogen, thus CsI3 is black, CrBr3
yellowish red, CrBrI2 reddish brown, CsBr2I red, CsCl2Br yellow. The
cæsium salts are the most stable, and those of potassium least so, as
also those which contain Br and I separately or together; for cæsium no
compounds containing Cl and I were obtained. The penta-haloid salts
form a smaller class; among these salts potassium forms KCl4I, rubidium
RbCl4I, cæsium CsI5, CsBr, CsCl4I, lithium LiCl4I (with 4H2O) and sodium
NaCl4I (with 2H2O). The most stable are those salts containing the
metal with the greatest atomic weight—cæsium (see Chapter XI., Note
63).
[4] It is possible to extract the compounds of potassium directly from
the primary rocks which are so widely distributed over the earth's
surface and so abundant in some localities. From a chemical point of
view this problem presents no difficulty; for instance, by fusing
powdered orthoclase with lime and fluor spar (Ward's method) and then
extracting the alkali with water (on fusion the silica gives an insoluble
compound with lime), or by treating the orthoclase with hydrofluoric acid
(in which case silicon fluoride is evolved as a gas) it is possible to
transfer the alkali of the orthoclase to an aqueous solution, and to
separate it in this manner from the other insoluble oxides. However, as
yet there is no profit in, nor necessity for, recourse to this treatment, as
carnallite and potash form abundant materials for the extraction of
potassium compounds by cheaper methods. Furthermore, the salts of
potassium are now in the majority of chemical reactions replaced by
salts of sodium, especially since the preparation of sodium carbonate
has been facilitated by the Leblanc process. The replacement of
potassium compounds by sodium compounds not only has the
advantage that the salts of sodium are in general cheaper than those of
potassium, but also that a smaller quantity of a sodium salt is needed
for a given reaction than of a potassium salt, because the combining
weight of sodium (23) is less than that of potassium (39).
[5] It has been shown by direct experiment on the cultivation of
plants in artificial soils and in solutions that under conditions (physical,
chemical, and physiological) otherwise identical plants are able to thrive
and become fully developed in the entire absence of sodium salts, but
that their development is impossible without potassium salts.
[6] If herbaceous plants contain much sodium salts, it is evident that
these salts mainly come from the sodium compounds in the water
absorbed by the plants.
[7] As plants always contain mineral substances and cannot thrive in a
medium which does not contain them, more especially in one which is
free from the salts of the four basic oxides, K2O, CaO, MgO, and Fe2O3,
and of the four acid oxides, CO2, N2O5, P2O5, and SO3, and as the
amount of ash-forming substances in plants is small, the question
inevitably arises as to what part these play in the development of plants.
With the existing chemical data only one answer is possible to this
question, and it is still only a hypothesis. This answer was particularly
clearly expressed by Professor Gustavson of the Petroffsky Agricultural
Academy. Starting from the fact (Chapter XI., Note 55) that a small
quantity of aluminium renders possible or facilitates the reaction of
bromine on hydrocarbons at the ordinary temperature, it is easy to
arrive at the conclusion, which is very probable and in accordance with
many data respecting the reactions of organic compounds, that the
addition of mineral substances to organic compounds lowers the
temperature of reaction and in general facilitates chemical reactions in
plants, and thus aids the conversion of the most simple nourishing
substances into the complex component parts of the plant organism.
The province of chemical reactions proceeding in organic substances in
the presence of a small quantity of mineral substances has as yet been
but little investigated, although there are already several disconnected
data concerning reactions of this kind, and although a great deal is
known with regard to such reactions among inorganic compounds. The
essence of the matter may be expressed thus—two substances, A and B,
do not react on each other of their own accord, but the addition of a
small quantity of a third particularly active substance, C, produces the
reaction of A on B, because A combines with C, forming AC, and B reacts
on this new compound, which has a different store of chemical energy,
forming the compound AB or its products, and setting C free again or
retaining it.
It may here be remarked that all the mineral substances necessary for
plants (those enumerated at the beginning of the note) are the highest
saline compounds of their elements, that they enter into the plants as
salts, that the lower forms of oxidation of the same elements (for
instance, sulphites and phosphites) are harmful to plants (poisonous),
and that strong solutions of the salts assimilated by plants (their osmotic
pressure being great and contracting the cells, as De Vries showed, (see
Chapter I., Note 19)) not only do not enter into the plants but kill them
(poison them).
[8] Besides which, it will be understood from the preceding paragraph
that the salts of potassium may become exhausted from the soil by long
cultivation, and that there may therefore be cases when the direct
fertilisation by salts of potassium may be profitable. But manure and
animal excrements, ashes, and, in general, nearly all refuse which may
serve for fertilising the soil, contain a considerable quantity of potassium
salts, and therefore, as regards the natural salts of potassium
(Stassfurt), and especially potassium sulphate, if they often improve the
crops, it is in all probability due to their action on the properties of the
soil. The agriculturist cannot therefore be advised to add potassium
salts, without making special experiments showing the advantage of
such a fertiliser on a given kind of soil and plant.
The animal body also contains potassium compounds, which is
natural, since animals consume plants. For example, milk, and especially
human milk, contains a somewhat considerable quantity of potassium
compounds. Cow's milk, however, does not contain much potassium salt.
Sodium compounds generally predominate in the bodies of animals. The
excrement of animals, and especially of herbivorous animals, on the
contrary, often contains a large proportion of potassium salts. Thus
sheep's dung is rich in them, and in washing sheep's wool salts of
potassium pass into the water.
The ash of tree stems, as the already dormant portion of the plant
(Chapter VIII., Note 1), contains little potash. For the extraction of
potash, which was formerly carried on extensively in the east of Russia
(before the discovery of the Stassfurt salt), the ash of grasses, and the
green portions of potatoes, buckwheat, &c., are taken and treated with
water (lixiviated), the solution is evaporated, and the residue ignited in
order to destroy the organic matter present in the extract. The residue
thus obtained is composed of raw potash. It is refined by a second
dissolution in a small quantity of water, for the potash itself is very
soluble in water, whilst the impurities are sparingly soluble. The solution
thus obtained is again evaporated, and the residue ignited, and this
potash is then called refined potash, or pearlash. This method of
treatment cannot give chemically pure potassium carbonate. A certain
amount of impurities remain. To obtain chemically pure potassium
carbonate, some other salt of potassium is generally taken and purified
by crystallisation. Potassium carbonate crystallises with difficulty, and it
cannot therefore be purified by this means, whilst other salts, such as
the tartrate, acid carbonate, sulphate, or nitrate, &c., crystallise easily
and may thus be directly purified. The tartrate is most frequently
employed, since it is prepared in large quantities (as a sediment from
wine) for medicinal use under the name of cream of tartar. When ignited
without access of air, it leaves a mixture of charcoal and potassium
carbonate. The charcoal so obtained being in a finely-divided condition,
the mixture (called ‘black flux’), is sometimes used for reducing metals
from their oxides with the aid of heat. A certain quantity of nitre is
added to burn the charcoal formed by heating the cream of tartar.
Potassium carbonate thus prepared is further purified by converting it
into the acid salt, by passing a current of carbonic anhydride through a
strong solution. KHCO3 is then formed, which is less soluble than the
normal salt (as is also the case with the corresponding sodium salts),
and therefore crystals of the acid salt separate from the solution on
cooling. When ignited, they part with their water and carbonic
anhydride, and pure potassium carbonate remains behind. The physical
properties of potassium carbonate distinguish it sufficiently from sodium
carbonate; it is obtained from solutions as a powdery white mass,
having an alkaline taste and reaction, and, as a rule, shows only traces
of crystallisation. It also attracts the moisture of the air with great
energy. The crystals do not contain water, but absorb it from the air,
deliquescing into a saturated solution. It melts at a red heat (1045°),
and at a still higher temperature is even converted into vapour, as has
been observed at glass works where it is employed. It is very soluble. At
the ordinary temperature, water dissolves an equal weight of the salt.
Crystals containing two equivalents of water separate from such a
saturated solution when strongly cooled (Morel obtained K2CO33H2O in
well-formed crystals at +10°). There is no necessity to describe its
reactions, because they are all analogous to those of sodium carbonate.
When manufactured sodium carbonate was but little known, the
consumption of potassium carbonate was very considerable, and even
now washing soda is frequently replaced for household purposes by
‘lye’—i.e. an aqueous solution obtained from ashes. It contains
potassium carbonate, which acts like the sodium salt in washing tissues,
linen, &c.
A mixture of potassium and sodium carbonates fuses with much
greater ease than the separate salts, and a mixture of their solutions
gives well-crystallised salts—for instance (Marguerite's salt),
K2CO3,6H2O,2Na2CO3,6H2O. Crystallisation also occurs in other multiple
proportions of K and Na (in the above case 1 : 2, but 1 : 1 and 1 : 3 are
known), and always with 6 mol. H2O. This is evidently a combination by
similarity, as in alloys, solutions, &c.
[8 bis] About 25,000 tons of potash annually are now prepared from
KCl by this method at Stassfurt.
[9] Potassium sulphate, K2SO4, crystallises from its solutions in an
anhydrous condition, in which respect it differs from the corresponding
sodium salt, just as potassium carbonate differs from sodium carbonate.
In general, it must be observed that the majority of sodium salts
combine more easily with water of crystallisation than the potassium
salts. The solubility of potassium sulphate does not show the same
peculiarities as that of sodium sulphate, because it does not combine
with water of crystallisation; at the ordinary temperature 100 parts of
water dissolve about 10 parts of the salt, at 0° 8·3 parts, and at 100°
about 26 parts. The acid sulphate, KHSO4, obtained easily by heating
crystals of the normal salt with sulphuric acid, is frequently employed in
chemical practice. On heating the mixture of acid and salt, fumes of
sulphuric acid are at first given off; when they cease to be evolved, the
acid salt is contained in the residue. At a higher temperature (of above
600°) the acid salt parts with all the acid contained in it, the normal salt
being re-formed. The definite composition of this acid salt, and the ease
with which it decomposes, render it exceedingly valuable for certain
chemical transformations accomplished by means of sulphuric acid at a
high temperature, because it is possible to take, in the form of this salt,
a strictly definite quantity of sulphuric acid, and to cause it to act on a
given substance at a high temperature, which it is often necessary to do,
more especially in chemical analysis. In this case, the acid salt acts in
exactly the same manner as sulphuric acid itself, but the latter is
inefficient at temperatures above 400°, because it all evaporates, while
at that temperature the acid salt still remains in a fused state, and acts
with the elements of sulphuric acid on the substance taken. Hence by its
means the boiling-point of sulphuric acid is raised. Thus the acid
potassium sulphate is employed, where for conversion of certain oxides,
such as those of iron, aluminium, and chromium, into salts, a high
temperature is required.
Weber, by heating potassium sulphate with an excess of sulphuric acid
at 100°, observed the formation of a lower stratum, which was found to
contain a definite compound containing eight equivalents of SO3 per
equivalent of K2O. The salts of rubidium, cæsium, and thallium give a
similar result, but those of sodium and lithium do not. (See Note 1.)
[10] The bromide and iodide of potassium are used, like the
corresponding sodium compounds, in medicine and photography.
Potassium iodide is easily obtained in a pure state by saturating a
solution of hydriodic acid with caustic potash. In practice, however, this
method is rarely had recourse to, other more simple processes being
employed although they do not give so pure a product. They aim at the
direct formation of hydriodic acid in the liquid in the presence of
potassium hydroxide or carbonate. Thus iodine is thrown into a solution
of pure potash, and hydrogen sulphide passed through the mixture, the
iodine being thus converted into hydriodic acid. Or a solution is prepared
from phosphorus, iodine, and water, containing hydriodic and phosphoric
acid; lime is then added to this solution, when calcium iodide is obtained
in solution, and calcium phosphate as a precipitate. The solution of
calcium iodide gives, with potassium carbonate, insoluble calcium
carbonate and a solution of potassium iodide. If iodine is added to a
slightly-heated solution of caustic potash (free from carbonate—that is,
freshly prepared), so long as the solution is not coloured from the
presence of an excess of iodine, there is formed (as in the action of
chlorine on a solution of caustic potash) a mixture of potassium iodide
and iodate. On evaporating the solution thus obtained and igniting the
residue, the iodate is destroyed and converted into iodide, the oxygen
being disengaged, and potassium iodide only is left behind. On
dissolving the residue in water and then evaporating, cubical crystals of
the anhydrous salt are obtained, which are soluble in water and alcohol,
and on fusion give an alkaline reaction, owing to the fact that when
ignited a portion of the salt decomposes, forming potassium oxide. The
neutral salt may be obtained by adding hydriodic acid to this alkaline salt
until it gives an acid reaction. It is best to add some finely-divided
charcoal to the mixture of iodate and iodide before igniting it, as this
facilitates the evolution of the oxygen from the iodate. The iodate may
also be converted into iodide by the action of certain reducing agents,
such as zinc amalgam, which when boiled with a solution containing an
iodate converts it into iodide. Potassium iodide may also be prepared by
mixing a solution of ferrous iodide (it is best if the solution contain an
excess of iodine) and potassium carbonate, in which case ferrous
carbonate FeCO3, is precipitated (with an excess of iodine the precipitate
is granular, and contains a compound of the suboxide and oxide of iron),
while potassium iodide remains in solution. Ferrous iodide, FeI2, is
obtained by the direct action of iodine on iron in water. Potassium iodide
considerably lowers the temperature (by 24°), when it dissolves in water,
100 parts of the salt dissolve in 73·5 parts of water at 12·5°, in 70 parts
at 18°, whilst the saturated solution which boils at 120° contains 100
parts of salt per 45 parts of water. Solutions of potassium iodide dissolve
a considerable amount of iodine; strong solutions even dissolving as
much or more iodine than they contain as potassium iodide (see Note 3
bis and Chapter XI., Note 64).
[11] Caustic potash is not only formed by the action of lime on dilute
solutions of potassium carbonate (as sodium hydroxide is prepared from
sodium carbonate), but by igniting potassium nitrate with finely-divided
copper (see Note 15), and also by mixing solutions of potassium
sulphate (or even of alum, KAlS2O8) and barium hydroxide, BaH2O2. It is
sometimes purified by dissolving it in alcohol (the impurities, for
example, potassium sulphate and carbonate, are not dissolved) and then
evaporating the alcohol.
The specific gravity of potassium hydroxide is 2·04, but that of its
solutions (see Chapter XII., Note 18) at 15° S = 9,992 + 90·4p + 0·28p2
(here p2 is +, and for sodium hydroxide it is -). Strong solutions, when
cooled, yield a crystallo-hydrate, KHO,4H2O, which dissolves in water,
producing cold (like 2NaHO,7H2O), whilst potassium hydroxide in
solution develops a considerable amount of heat.
[12] When the yellow prussiate is heated to redness, all the cyanogen
which was in combination with the iron is decomposed into nitrogen,
which is evolved as gas, and carbon, which combines with the iron. In
order to avoid this, potassium carbonate is added to the yellow prussiate
while it is being fused. A mixture of 8 parts of anhydrous yellow
prussiate and 3 parts of pure potassium carbonate is generally taken.
Double decomposition then takes place, resulting in the formation of
ferrous carbonate and potassium cyanide. But by this method, as by the
first, a pure salt is not obtained, because a portion of the potassium
cyanide is oxidised at the expense of the iron carbonate and forms
potassium cyanate, FeCO3 + KCN = CO2 + Fe + KCNO; and the
potassium cyanide very easily forms oxide, which acts on the sides of
the vessel in which the mixture is heated (to avoid this iron vessels
should be used). By adding one part of charcoal powder to the mixture
of 8 parts of anhydrous yellow prussiate and 3 parts of potassium
carbonate a mass is obtained which is free from cyanate, because the
carbon absorbs the oxygen, but in that case it is impossible to obtain a
colourless potassium cyanide by simple fusion, although this may be
easily done by dissolving it in alcohol. Cyanide of potassium may also be
obtained from potassium thiocyanate, which is formed from ammonium
thiocyanate obtained by the action of ammonia upon bisulphide of
carbon (see works upon Organic Chemistry). Potassium cyanide is now
prepared in large quantities from yellow prussiate for gilding and
silvering. When fused in large quantities the action of the oxygen of the
air is limited, and with great care the operation may be successfully
conducted, and therefore, on a large scale, very pure salt is sometimes
obtained. When slowly cooled, the fused salt separates in cubical
crystals like potassium chloride.
Pure KCN is obtained by passing CNH gas into an alcoholic solution of
KHO. The large amount of potassium cyanide which is now required for
the extraction of gold from its ores, is being replaced by a mixture
(Rossler and Gasslaker, 1892) of KCN and NaCN, prepared by heating
powdered and dried yellow prussiate with metallic sodium: K4Fe(CN)6 +
2Na = 4KCN + 2NaCN + Fe. This method offers two advantages over
the above methods: (1) the whole of the cyanide is obtained, and does
not decompose with the formation of N2; and (2) no cyanates are
formed, as is the case when carbonate of potash is heated with the
prussiate.
[13] A considerable quantity of potassium cyanide is used in the arts,
more particularly for the preparation of metallic solutions which are
decomposed by the action of a galvanic current; thus it is very
frequently employed in electro-silvering and gilding. An alkaline solution
is prepared, which is moderately stable owing to the fact that potassium
cyanide in the form of certain double salts—that is, combined with other
cyanides—is far more stable than when alone (yellow prussiate, which
contains potassium cyanide in combination with ferrous cyanide, is an
example of this).
[13 bis] A dilute solution of KCN is taken, not containing more than 1
per cent. KCN. MacLaurin explains this by the fact that strong solutions
dissolve gold less rapidly, owing to their dissolving less air, whose
oxygen is necessary for the reaction.
[14] Besides which Schloesing and Müntz, by employing similar
methods to Pasteur, showed that the formation of nitre in the
decomposition of nitrogenous substances is accomplished by the aid of
peculiar micro-organisms (ferments), without which the simultaneous
action of the other necessary conditions (alkalis, moisture, a
temperature of 37°, air, and nitrogenous substances) cannot give nitre.
[14 bis] Before fusing, the crystals of potassium nitrate change their
form, and take the same form as sodium nitrate—that is, they change
into rhombohedra. Nitre crystallises from hot solutions, and in general
under the influence of a rise of temperature, in a different form from
that given at the ordinary or lower temperatures. Fused nitre solidifies to
a radiated crystalline mass; but it does not exhibit this structure if
metallic chlorides be present, so that this method may be taken
advantage of to determine the degree of purity of nitre.
Carnelley and Thomson (1888) determined the fusing point of
mixtures of potassium and sodium nitrates. The first salt fuses at 339°
and the second at 316°, and if p be the percentage amount of
potassium nitrate, then the results obtained were—
p = 10 20 30 40 50 60 70 80 90
298° 283° 268° 242° 231° 231° 242° 284° 306°
which confirms Shaffgotsch's observation (1857) that the lowest
fusing point (about 231°) is given by mixing molecular quantities (p =
54·3) of the salts—that is, in the formation of the alloy, KNO3,NaNO3.
A somewhat similar result was discovered by the same observers for
the solubility of mixtures of these salts at 20° in 100 parts of water.
Thus, if p be the weight of potassium nitrate mixed with 100 - p parts by
weight of sodium nitrate taken for solution, and c be the quantity of the
mixed salts which dissolves in 100, the solubility of sodium nitrate being
85, and of potassium nitrate 34, parts in 100 parts of water, then—
p = 10 20 30 40 50 60 70 80 90
c = 110 136 136 138 106 81 73 54 41
The maximum solubility proved not to correspond with the most
fusible mixture, but to one much richer in sodium nitrate.
Both these phenomena show that in homogeneous liquid mixtures the
chemical forces that act between substances are the same as those that
determine the molecular weights of substances, even when the mixture
consists of such analogous substances as potassium and sodium
nitrates, between which there is no direct chemical interchange. It is
instructive to note also that the maximum solubility does not correspond
with the minimum fusing point, which naturally depends on the fact that
in solution a third substance, namely water, plays a part, although an
attraction between the salts, like that which exists between sodium and
potassium carbonates (Note 8), also partially acts.
[15] Fused nitre, with a further rise of temperature, disengages
oxygen and then nitrogen. The nitrite KNO2 is first formed and then
potassium oxide. The admixture of certain metals—for example, of
finely-divided copper—aids the last decomposition. The oxygen in this
case naturally passes over to the metal.