100% found this document useful (4 votes)
22 views

[Ebooks PDF] download Graphs algorithms and optimization 2nd ed Edition Kocay full chapters

The document promotes various ebooks available for download on ebookgate.com, including titles on graph algorithms, optimization, and combinatorial mathematics. It features specific books such as 'Graphs, Algorithms, and Optimization' by Kocay and Kreher, and provides links to additional resources. The document also includes a list of related academic texts in discrete mathematics and their applications.

Uploaded by

evezahha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
22 views

[Ebooks PDF] download Graphs algorithms and optimization 2nd ed Edition Kocay full chapters

The document promotes various ebooks available for download on ebookgate.com, including titles on graph algorithms, optimization, and combinatorial mathematics. It features specific books such as 'Graphs, Algorithms, and Optimization' by Kocay and Kreher, and provides links to additional resources. The document also includes a list of related academic texts in discrete mathematics and their applications.

Uploaded by

evezahha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Get the full ebook with Bonus Features for a Better Reading Experience on ebookgate.

com

Graphs algorithms and optimization 2nd ed Edition


Kocay

https://ebookgate.com/product/graphs-algorithms-and-
optimization-2nd-ed-edition-kocay/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookgate.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Optimization Algorithms In Physics 1st ed Edition


Alexander K. Hartmann

https://ebookgate.com/product/optimization-algorithms-in-physics-1st-
ed-edition-alexander-k-hartmann/

ebookgate.com

Optimization algorithms on matrix manifolds P.-A. Absil

https://ebookgate.com/product/optimization-algorithms-on-matrix-
manifolds-p-a-absil/

ebookgate.com

Bandit Algorithms for Website Optimization 1st Edition


John Myles White

https://ebookgate.com/product/bandit-algorithms-for-website-
optimization-1st-edition-john-myles-white/

ebookgate.com

Support Vector Machines Optimization Based Theory


Algorithms and Extensions 1st Edition Naiyang Deng

https://ebookgate.com/product/support-vector-machines-optimization-
based-theory-algorithms-and-extensions-1st-edition-naiyang-deng/

ebookgate.com
Inherently Parallel Algorithms in Feasibility and
Optimization and their Applications 1st Edition Dan
Butnariu
https://ebookgate.com/product/inherently-parallel-algorithms-in-
feasibility-and-optimization-and-their-applications-1st-edition-dan-
butnariu/
ebookgate.com

Precalculus functions and graphs 12th ed Edition Earl


William Swokowski

https://ebookgate.com/product/precalculus-functions-and-graphs-12th-
ed-edition-earl-william-swokowski/

ebookgate.com

Optimization of chemical processes 2nd ed Edition Thomas


F. Edgar

https://ebookgate.com/product/optimization-of-chemical-processes-2nd-
ed-edition-thomas-f-edgar/

ebookgate.com

Applications of Combinatorial Optimization 2nd ed Edition


Vangelis Th. Paschos

https://ebookgate.com/product/applications-of-combinatorial-
optimization-2nd-ed-edition-vangelis-th-paschos/

ebookgate.com

Handbook of Product Graphs 2nd Edition Richard Hammack

https://ebookgate.com/product/handbook-of-product-graphs-2nd-edition-
richard-hammack/

ebookgate.com
GRAPHS,
ALGORITHMS,
AND OPTIMIZATION
Second edition
DISCRETE
MATHEMATICS
ITS APPLICATIONS
R. B. J. T. Allenby and Alan Slomson, How to Count: An Introduction to Combinatorics,
Third Edition
Craig P. Bauer, Secret History: The Story of Cryptology
Jürgen Bierbrauer, Introduction to Coding Theory, Second Edition
Katalin Bimbó, Combinatory Logic: Pure, Applied and Typed
Katalin Bimbó, Proof Theory: Sequent Calculi and Related Formalisms
Donald Bindner and Martin Erickson, A Student’s Guide to the Study, Practice, and Tools of
Modern Mathematics
Francine Blanchet-Sadri, Algorithmic Combinatorics on Partial Words
Miklós Bóna, Combinatorics of Permutations, Second Edition
Miklós Bóna, Handbook of Enumerative Combinatorics
Miklós Bóna, Introduction to Enumerative and Analytic Combinatorics, Second Edition
Jason I. Brown, Discrete Structures and Their Interactions
Richard A. Brualdi and Dragos̆ Cvetković, A Combinatorial Approach to Matrix Theory and Its
Applications
Kun-Mao Chao and Bang Ye Wu, Spanning Trees and Optimization Problems
Charalambos A. Charalambides, Enumerative Combinatorics
Gary Chartrand and Ping Zhang, Chromatic Graph Theory
Henri Cohen, Gerhard Frey, et al., Handbook of Elliptic and Hyperelliptic Curve Cryptography
Charles J. Colbourn and Jeffrey H. Dinitz, Handbook of Combinatorial Designs, Second Edition
Abhijit Das, Computational Number Theory
Matthias Dehmer and Frank Emmert-Streib, Quantitative Graph Theory:
Mathematical Foundations and Applications
Martin Erickson, Pearls of Discrete Mathematics
Martin Erickson and Anthony Vazzana, Introduction to Number Theory
Titles (continued)

Steven Furino, Ying Miao, and Jianxing Yin, Frames and Resolvable Designs: Uses,
Constructions, and Existence
Mark S. Gockenbach, Finite-Dimensional Linear Algebra
Randy Goldberg and Lance Riek, A Practical Handbook of Speech Coders
Jacob E. Goodman and Joseph O’Rourke, Handbook of Discrete and Computational Geometry,
Second Edition
Jonathan L. Gross, Combinatorial Methods with Computer Applications
Jonathan L. Gross and Jay Yellen, Graph Theory and Its Applications, Second Edition
Jonathan L. Gross, Jay Yellen, and Ping Zhang Handbook of Graph Theory, Second Edition
David S. Gunderson, Handbook of Mathematical Induction: Theory and Applications
Richard Hammack, Wilfried Imrich, and Sandi Klavžar, Handbook of Product Graphs,
Second Edition
Darrel R. Hankerson, Greg A. Harris, and Peter D. Johnson, Introduction to Information Theory
and Data Compression, Second Edition
Darel W. Hardy, Fred Richman, and Carol L. Walker, Applied Algebra: Codes, Ciphers, and
Discrete Algorithms, Second Edition
Daryl D. Harms, Miroslav Kraetzl, Charles J. Colbourn, and John S. Devitt, Network Reliability:
Experiments with a Symbolic Algebra Environment
Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words
Leslie Hogben, Handbook of Linear Algebra, Second Edition
Derek F. Holt with Bettina Eick and Eamonn A. O’Brien, Handbook of Computational Group Theory
David M. Jackson and Terry I. Visentin, An Atlas of Smaller Maps in Orientable and
Nonorientable Surfaces
Richard E. Klima, Neil P. Sigmon, and Ernest L. Stitzinger, Applications of Abstract Algebra
with Maple™ and MATLAB®, Second Edition
Richard E. Klima and Neil P. Sigmon, Cryptology: Classical and Modern with Maplets
Patrick Knupp and Kambiz Salari, Verification of Computer Codes in Computational Science
and Engineering
William L. Kocay and Donald L. Kreher, Graphs, Algorithms, and Optimization, Second Edition
Donald L. Kreher and Douglas R. Stinson, Combinatorial Algorithms: Generation Enumeration
and Search
Hang T. Lau, A Java Library of Graph Algorithms and Optimization
C. C. Lindner and C. A. Rodger, Design Theory, Second Edition
San Ling, Huaxiong Wang, and Chaoping Xing, Algebraic Curves in Cryptography
Nicholas A. Loehr, Bijective Combinatorics
Toufik Mansour, Combinatorics of Set Partitions
Titles (continued)

Toufik Mansour and Matthias Schork, Commutation Relations, Normal Ordering, and Stirling
Numbers
Alasdair McAndrew, Introduction to Cryptography with Open-Source Software
Elliott Mendelson, Introduction to Mathematical Logic, Fifth Edition
Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone, Handbook of Applied
Cryptography
Stig F. Mjølsnes, A Multidisciplinary Introduction to Information Security
Jason J. Molitierno, Applications of Combinatorial Matrix Theory to Laplacian Matrices of Graphs
Richard A. Mollin, Advanced Number Theory with Applications
Richard A. Mollin, Algebraic Number Theory, Second Edition
Richard A. Mollin, Codes: The Guide to Secrecy from Ancient to Modern Times
Richard A. Mollin, Fundamental Number Theory with Applications, Second Edition
Richard A. Mollin, An Introduction to Cryptography, Second Edition
Richard A. Mollin, Quadratics
Richard A. Mollin, RSA and Public-Key Cryptography
Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of Integers
Gary L. Mullen and Daniel Panario, Handbook of Finite Fields
Goutam Paul and Subhamoy Maitra, RC4 Stream Cipher and Its Variants
Dingyi Pei, Authentication Codes and Combinatorial Designs
Kenneth H. Rosen, Handbook of Discrete and Combinatorial Mathematics
Yongtang Shi, Matthias Dehmer, Xueliang Li, and Ivan Gutman, Graph Polynomials
Douglas R. Shier and K.T. Wallenius, Applied Mathematical Modeling: A Multidisciplinary
Approach
Alexander Stanoyevitch, Introduction to Cryptography with Mathematical Foundations and
Computer Implementations
Jörn Steuding, Diophantine Analysis
Douglas R. Stinson, Cryptography: Theory and Practice, Third Edition
Roberto Tamassia, Handbook of Graph Drawing and Visualization
Roberto Togneri and Christopher J. deSilva, Fundamentals of Information Theory and Coding
Design
W. D. Wallis, Introduction to Combinatorial Designs, Second Edition
W. D. Wallis and J. C. George, Introduction to Combinatorics
Jiacun Wang, Handbook of Finite State Based Models and Applications
Lawrence C. Washington, Elliptic Curves: Number Theory and Cryptography, Second Edition
DISCRETE MATHEMATICS AND ITS APPLICATIONS

GRAPHS,
ALGORITHMS,
AND OPTIMIZATION
Second edition

William l. Kocay
University of Manitoba
Winnipeg, Canada

DonalD l. Kreher
Michigan Technological University
Houghton, USA
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2017 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper


Version Date: 20160727

International Standard Book Number-13: 978-1-4822-5116-6 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information stor-
age or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copy-
right.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222
Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that pro-
vides licenses and registration for a variety of users. For organizations that have been granted a photo-
copy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
The authors would like to take this opportunity to express their appreciation and
gratitude to the following people who have had a very significant effect on their
mathematical development:
Adrian Bondy, Earl Kramer, Spyros Magliveras, Ron Read, and Ralph Stanton.

This book is dedicated to the memory of


William T. Tutte, (1917–2002)
“ the greatest of the graphmen ”
Contents

Preface xvii

1 Graphs and Their Complements 1


1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Degree sequences . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.1 Havel-Hakimi theorem . . . . . . . . . . . . . . . . . 14
1.2.2 Erdös-Gallai theorem . . . . . . . . . . . . . . . . . . 15
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2 Paths and Walks 23


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2 Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.3 Walks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 The shortest-path problem . . . . . . . . . . . . . . . . . . . 29
2.5 Weighted graphs and Dijkstra’s algorithm . . . . . . . . . . . 33
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.6 Data structures . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.7 Floyd’s algorithm . . . . . . . . . . . . . . . . . . . . . . . . 41
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.8 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3 Subgraphs 45
3.1 Counting subgraphs . . . . . . . . . . . . . . . . . . . . . . . 45
3.1.1 Möbius inversion . . . . . . . . . . . . . . . . . . . . 46
3.1.2 Counting triangles . . . . . . . . . . . . . . . . . . . 49
3.2 Multiplying subgraph counts . . . . . . . . . . . . . . . . . . 50
3.3 Mixed subgraphs . . . . . . . . . . . . . . . . . . . . . . . . 52
3.4 Graph reconstruction . . . . . . . . . . . . . . . . . . . . . . 53
3.4.1 Nash-Williams’ lemma . . . . . . . . . . . . . . . . . 54
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

ix
x Contents

3.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

4 Some Special Classes of Graphs 57


4.1 Bipartite graphs . . . . . . . . . . . . . . . . . . . . . . . . . 57
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.2 Line graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3 Moore graphs . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.4 Euler tours . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.4.1 An Euler tour algorithm . . . . . . . . . . . . . . . . . 68
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

5 Trees and Cycles 73


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.2 Fundamental cycles . . . . . . . . . . . . . . . . . . . . . . . 74
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.3 Co-trees and bonds . . . . . . . . . . . . . . . . . . . . . . . 76
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4 Spanning tree algorithms . . . . . . . . . . . . . . . . . . . . 80
5.4.1 Prim’s algorithm . . . . . . . . . . . . . . . . . . . . 81
5.4.1.1 Data structures . . . . . . . . . . . . . . . . 83
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.4.2 Kruskal’s algorithm . . . . . . . . . . . . . . . . . . . 85
5.4.2.1 Data structures and complexity . . . . . . . 85
5.4.3 The Cheriton-Tarjan algorithm . . . . . . . . . . . . . 86
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.4.4 Leftist binary trees . . . . . . . . . . . . . . . . . . . 88
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

6 The Structure of Trees 97


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.2 Non-rooted trees . . . . . . . . . . . . . . . . . . . . . . . . . 98
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.3 Read’s tree encoding algorithm . . . . . . . . . . . . . . . . . 100
6.3.1 The decoding algorithm . . . . . . . . . . . . . . . . . 103
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.4 Generating rooted trees . . . . . . . . . . . . . . . . . . . . . 105
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.5 Generating non-rooted trees . . . . . . . . . . . . . . . . . . . 113
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.6 Prüfer sequences . . . . . . . . . . . . . . . . . . . . . . . . 114
6.7 Spanning trees . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Contents xi

6.8 The matrix-tree theorem . . . . . . . . . . . . . . . . . . . . . 118


Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7 Connectivity 125
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
7.2 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
7.3 Finding the blocks of a graph . . . . . . . . . . . . . . . . . . 131
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
7.4 The depth-first search . . . . . . . . . . . . . . . . . . . . . . 134
7.4.1 Complexity . . . . . . . . . . . . . . . . . . . . . . . 140
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.5 Sections and modules . . . . . . . . . . . . . . . . . . . . . . 141
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
7.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

8 Graphs and Symmetry 147


8.1 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8.2 Cayley graphs . . . . . . . . . . . . . . . . . . . . . . . . . . 150
8.3 Coset diagrams . . . . . . . . . . . . . . . . . . . . . . . . . 152
8.3.1 Double cosets . . . . . . . . . . . . . . . . . . . . . . 154
8.4 Conjugation, Sylow subgroups . . . . . . . . . . . . . . . . . 156
8.5 Homomorphisms . . . . . . . . . . . . . . . . . . . . . . . . 158
8.6 Primitivity and block systems . . . . . . . . . . . . . . . . . . 159
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
8.7 Self-complementary graphs . . . . . . . . . . . . . . . . . . . 161
8.8 Pseudo-similar vertices . . . . . . . . . . . . . . . . . . . . . 163
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
8.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

9 Alternating Paths and Matchings 169


9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
9.2 The Hungarian algorithm . . . . . . . . . . . . . . . . . . . . 173
9.2.1 Complexity . . . . . . . . . . . . . . . . . . . . . . . 176
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
9.3 Edmonds’ algorithm, blossoms . . . . . . . . . . . . . . . . . 177
9.3.1 Complexity . . . . . . . . . . . . . . . . . . . . . . . 182
9.4 Perfect matchings and 1-factorizations . . . . . . . . . . . . . 182
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
9.5 The subgraph problem . . . . . . . . . . . . . . . . . . . . . 185
9.6 Coverings in bipartite graphs . . . . . . . . . . . . . . . . . . 187
9.7 Tutte’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . 188
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
9.8 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
xii Contents

10 Network Flows 193


10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
10.2 The Ford-Fulkerson algorithm . . . . . . . . . . . . . . . . . 197
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
10.3 Matchings and flows . . . . . . . . . . . . . . . . . . . . . . 206
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
10.4 Menger’s theorems . . . . . . . . . . . . . . . . . . . . . . . 208
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
10.5 Disjoint paths and separating sets . . . . . . . . . . . . . . . . 210
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
10.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

11 Hamilton Cycles 217


11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
11.2 The crossover algorithm . . . . . . . . . . . . . . . . . . . . . 220
11.2.1 Complexity . . . . . . . . . . . . . . . . . . . . . . . 223
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
11.3 The Hamilton closure . . . . . . . . . . . . . . . . . . . . . . 226
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
11.4 The extended multi-path algorithm . . . . . . . . . . . . . . . 229
11.4.1 Data structures for the segments . . . . . . . . . . . . 232
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
11.5 Decision problems, NP-completeness . . . . . . . . . . . . . 233
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
11.6 The traveling salesman problem . . . . . . . . . . . . . . . . 242
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
11.7 The ∆TSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
11.8 Christofides’ algorithm . . . . . . . . . . . . . . . . . . . . . 246
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
11.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

12 Digraphs 251
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
12.2 Activity graphs, critical paths . . . . . . . . . . . . . . . . . . 251
12.3 Topological order . . . . . . . . . . . . . . . . . . . . . . . . 253
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
12.4 Strong components . . . . . . . . . . . . . . . . . . . . . . . 256
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
12.4.1 An application to fabrics . . . . . . . . . . . . . . . . 262
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
12.5 Tournaments . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
12.5.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . 265
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
12.6 2-Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Contents xiii

12.7 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

13 Graph Colorings 271


13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.1.1 Intersecting lines in the plane . . . . . . . . . . . . . . 273
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.2 Cliques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.3 Mycielski’s construction . . . . . . . . . . . . . . . . . . . . 278
13.4 Critical graphs . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
13.5 Chromatic polynomials . . . . . . . . . . . . . . . . . . . . . 281
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
13.6 Edge colorings . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
13.7 Graph homomorphisms . . . . . . . . . . . . . . . . . . . . . 291
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
13.8 NP-completeness . . . . . . . . . . . . . . . . . . . . . . . . 297
13.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

14 Planar Graphs 305


14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
14.2 Jordan curves . . . . . . . . . . . . . . . . . . . . . . . . . . 306
14.3 Graph minors, subdivisions . . . . . . . . . . . . . . . . . . . 307
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
14.4 Euler’s formula . . . . . . . . . . . . . . . . . . . . . . . . . 311
14.5 Rotation systems . . . . . . . . . . . . . . . . . . . . . . . . 313
14.6 Dual graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
14.7 Platonic solids, polyhedra . . . . . . . . . . . . . . . . . . . . 319
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
14.8 Triangulations . . . . . . . . . . . . . . . . . . . . . . . . . . 321
14.9 The sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
14.10 Whitney’s theorem . . . . . . . . . . . . . . . . . . . . . . . 325
14.11 Medial digraphs . . . . . . . . . . . . . . . . . . . . . . . . . 329
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.12 The 4-color problem . . . . . . . . . . . . . . . . . . . . . . 332
14.13 Nowhere-zero flows . . . . . . . . . . . . . . . . . . . . . . 335
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
14.14 Straight-line drawings . . . . . . . . . . . . . . . . . . . . . 337
14.15 Coordinate averaging . . . . . . . . . . . . . . . . . . . . . . 340
14.16 Kuratowski’s theorem . . . . . . . . . . . . . . . . . . . . . 342
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
14.17 The Hopcroft-Tarjan algorithm . . . . . . . . . . . . . . . . . 346
14.17.1 Bundles . . . . . . . . . . . . . . . . . . . . . . . . . 349
14.17.2 Switching bundles . . . . . . . . . . . . . . . . . . . . 350
14.17.3 The general Hopcroft-Tarjan algorithm . . . . . . . . . 353
xiv Contents

14.18 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

15 Graphs and Surfaces 359


15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
15.2 Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
15.2.1 Handles and crosscaps . . . . . . . . . . . . . . . . . 367
15.2.2 The Euler characteristic and genus of a surface . . . . 368
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
15.3 Isometries of surfaces . . . . . . . . . . . . . . . . . . . . . . 372
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
15.4 Graph embeddings, obstructions . . . . . . . . . . . . . . . . 376
15.5 Graphs on the torus . . . . . . . . . . . . . . . . . . . . . . . 377
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
15.5.1 Platonic maps on the torus . . . . . . . . . . . . . . . 387
15.5.2 Drawing torus maps, triangulations . . . . . . . . . . . 389
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
15.6 Coordinate averaging . . . . . . . . . . . . . . . . . . . . . . 394
15.7 Graphs on the projective plane . . . . . . . . . . . . . . . . . 395
15.7.1 The facewidth . . . . . . . . . . . . . . . . . . . . . . 402
15.7.2 Double covers . . . . . . . . . . . . . . . . . . . . . . 405
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
15.8 Embedding algorithms . . . . . . . . . . . . . . . . . . . . . 412
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
15.9 Heawood’s map coloring theorem . . . . . . . . . . . . . . . 421
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
15.10 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

16 The Klein Bottle and the Double Torus 425


16.1 The Klein bottle . . . . . . . . . . . . . . . . . . . . . . . . . 425
16.1.1 Rotation systems . . . . . . . . . . . . . . . . . . . . 426
16.1.2 The double cover . . . . . . . . . . . . . . . . . . . . 435
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
16.2 The double torus . . . . . . . . . . . . . . . . . . . . . . . . . 437
16.2.1 Isometries of the hyperbolic plane . . . . . . . . . . . 440
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
16.2.2 The double torus as an octagon . . . . . . . . . . . . . 441
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
16.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448

17 Linear Programming 451


17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
17.1.1 A simple example . . . . . . . . . . . . . . . . . . . . 451
17.1.2 Simple graphical example . . . . . . . . . . . . . . . 452
17.1.3 Slack and surplus variables . . . . . . . . . . . . . . . 455
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
17.2 The simplex algorithm . . . . . . . . . . . . . . . . . . . . . 458
Contents xv

17.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . 458


17.2.2 Some notation . . . . . . . . . . . . . . . . . . . . . . 458
17.2.3 Phase 0: finding a basis solution . . . . . . . . . . . . 459
17.2.4 Obtaining a basis feasible solution . . . . . . . . . . . 460
17.2.5 The tableau . . . . . . . . . . . . . . . . . . . . . . . 461
17.2.6 Phase 2: improving a basis feasible solution . . . . . . 462
17.2.7 Unbounded solutions . . . . . . . . . . . . . . . . . . 466
17.2.8 Conditions for optimality . . . . . . . . . . . . . . . . 467
17.2.9 Phase 1: initial basis feasible solution . . . . . . . . . 469
17.2.10 An example . . . . . . . . . . . . . . . . . . . . . . . 472
17.3 Cycling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
17.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

18 The Primal-Dual Algorithm 479


18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
18.2 Alternate form of the primal and its dual . . . . . . . . . . . . 484
18.3 Geometric interpretation . . . . . . . . . . . . . . . . . . . . 485
18.3.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . 486
18.4 Complementary slackness . . . . . . . . . . . . . . . . . . . . 490
18.5 The dual of the shortest-path problem . . . . . . . . . . . . . 491
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
18.6 The primal-dual algorithm . . . . . . . . . . . . . . . . . . . 494
18.6.1 Initial feasible solution . . . . . . . . . . . . . . . . . 498
18.6.2 The shortest-path problem . . . . . . . . . . . . . . . 500
18.6.3 Maximum flow . . . . . . . . . . . . . . . . . . . . . 503
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
18.7 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

19 Discrete Linear Programming 507


19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
19.2 Backtracking . . . . . . . . . . . . . . . . . . . . . . . . . . 508
19.3 Branch and bound . . . . . . . . . . . . . . . . . . . . . . . . 511
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
19.4 Totally unimodular matrices . . . . . . . . . . . . . . . . . . 523
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
19.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525

Bibliography 527

Index 539
Preface

Our objective in writing this book is to present the theory of graphs from an al-
gorithmic viewpoint. We present the graph theory in a rigorous, but informal style
and cover most of the main areas of graph theory. The ideas of surface topology are
presented from an intuitive point of view. We have also included a discussion on lin-
ear programming that emphasizes problems in graph theory. The text is suitable for
students in computer science or mathematics programs.
Graph theory is a rich source of problems and techniques for programming and
data structure development, as well as for the theory of computing, including NP-
completeness and polynomial reduction.
This book could be used a textbook for a third or fourth year course on graph
algorithms which contains a programming content, or for a more advanced course
at the fourth year or graduate level. It could be used in a course in which the pro-
gramming language is any major programming language (e.g., C, C++, Java). The
algorithms are presented in a generic style and are not dependent on any particular
programming language.
The text could also be used for a sequence of courses like “Graph Algorithms I”
and “Graph Algorithms II”. The courses offered would depend on the selection of
chapters included. A typical course will begin with Chapters 1, 2, 4, and 5. At this
point, a number of options are available.
A possible first course would consist of Chapters 1, 2, 4, 5, 7, 10, 11, 12, 13,
and 14, and a first course stressing optimization would consist of Chapters 1, 2, 3,
5, 10, 11, 12, 17, 18, and 19. Experience indicates that the students consider these
substantial courses. One or two chapters could be omitted for a lighter course.
We would like to thank the many people who provided encouragement while
we wrote this book, pointed out typos and errors, and gave useful suggestions. In
particular, we would like to convey our thanks to Ben Li and John van Rees of the
University of Manitoba for proofreading some chapters.

William Kocay
Donald L. Kreher
August, 2004

xvii
xviii Graphs, Algorithms, and Optimization

Preface to the second edition


The second edition of Graphs, Algorithms, and Optimization contains three com-
pletely new chapters. New material has also been added to previously existing chap-
ters. There is a new chapter on subgraph counting containing identities connecting
various kinds of subgraphs in a graph. The graph reconstruction problem is intro-
duced in this chapter. There is a chapter on graphs and symmetries, where the relation
of permutation groups to graphs is considered. This chapter contains the basic theory
of permutation groups. In particular, groups are used to construct symmetric graphs,
and to understand self-complementary graphs and graphs with pseudo-similar ver-
tices. A chapter on graph embeddings on the Klein bottle and double torus has also
been added.
Some of the new material added to previously existing chapters is :
• A proof of the Erdös-Gallai theorem has been included;
• Sections on isometries of surfaces have been added, according to their applica-
tion to graph embeddings in the plane and torus;
• The treatment of the double cover of graphs on the projective plane has been
expanded;
• Automorphism groups of graph embeddings have been included;
• The proof of the NP-completeness of 3-coloring a graph has been corrected;
• The algorithm using Vizing’s technique for edge-coloring a graph has been im-
proved;
• A section on modules in graphs and digraphs has been added;
• Edmonds’ matching algorithm using blossoms now has a section;
• Nowhere-zero flows are introduced;
• The use of coordinate averaging to produce nice drawings of graphs on surfaces
is introduced;
• The basics of graph homomorphisms are now presented.
Also all the diagrams in the text have been redrawn and enhanced. We convey our
thanks and gratitude to Andrei Gagarin for his help in the proof-reading of this second
edition.

William Kocay
Donald L. Kreher
August, 2016
Preface xix

William Kocay obtained his Ph.D. in Combinatorics and Optimization from the
University of Waterloo in 1979. He is currently a member of the Computer Sci-
ence Department, and an adjunct member of the Mathematics Department, at the
University of Manitoba, and a member of St. Paul’s College, a college affiliated
with the University of Manitoba. He has published numerous research papers,
mostly in graph theory and algorithms for graphs. He was managing editor of the
mathematics journal Ars Combinatoria from 1988 to 1997. He is currently on
the editorial board of that journal. He has had extensive experience developing
software for graph theory and related mathematical structures.
Donald L. Kreher obtained his Ph.D. from the University of Nebraska in 1984.
He has held academic positions at Rochester Institute of Technology and the
University of Wyoming. He is currently a University Professor of Mathematical
Sciences at Michigan Technological University, where he teaches and conducts
research in combinatorics and combinatorial algorithms. He has published nu-
merous research papers and is a co-author of the internationally acclaimed text
“Combinatorial Algorithms: Generation Enumeration and Search”, CRC Press,
1999. He serves on the editorial boards of two journals.

Professor Kreher is the sole recipient of the 1995 Marshall Hall Medal, awarded
by the Institute of Combinatorics and its Applications.
1
Graphs and Their Complements

1.1 Introduction
The diagram in Figure 1.1 illustrates a graph. It is called the graph of the cube. The
edges of the geometric cube correspond to the line segments connecting the nodes in
the graph, and the nodes correspond to the corners of the cube where the edges meet.
They are the vertices of the cube.

2 6
3 7

0 4
1 5

FIGURE 1.1
The graph of a cube

This diagram is drawn so as to resemble a cube, but if we were to rearrange it,


as in Figure 1.2, it would still be the graph of the cube, although it would no longer
look like a cube. Thus, a graph is a graphical representation of a relation in which
edges connect pairs of vertices.

5 7
1 3

0 2
4 6

FIGURE 1.2
The graph of the cube

1
2 Graphs, Algorithms, and Optimization

DEFINITION 1.1: A simple graph G consists of a vertex set V (G) and an edge
set E(G), where each edge is a pair {u, v} of vertices u, v ∈ V (G).
 
We denote the set of all pairs of a set V by V2 . Then E(G) ⊆ V (G) 2 . In the
example of the cube, V (G) = {0, 1, 2, 3, 4, 5, 6, 7}, and E(G) = {01, 13, 23, 02, 45,
57, 67, 46, 15, 37, 26, 04}, where we have used the shorthand notation uv to stand
for the pair {u, v}. If u, v ∈ V (G), then u −→ v means that u is joined to v by
an edge. We say that u and v are adjacent. We use this notation to remind us of the
linked list data structure that we will use to store a graph in the computer. Similarly,
u 6−→ v means that u is not joined to v. We can also express these relations by
writing uv ∈ E(G) or uv 6∈ E(G), respectively. Note that in a simple graph if
u −→ v, then v −→ u. If u is adjacent to each of u1 , u2 , . . . , uk , then we write
u −→ {u1 , u2 , . . . , uk }.
These graphs are called simple graphs because each pair u, v of vertices is joined
by at most one edge. Sometimes we need to allow several edges to join the same pair
of vertices. Such a graph is also called a multigraph. An edge can then no longer be
defined as a pair of vertices, (or the multiple edges would not be distinct), but to each
edge there still corresponds a pair {u, v}. We can express this formally by saying that
a graph G consists of a vertex set V (G), an edge set E(G), and a correspondence

ψ : E(G) → V (G) 2 . Given an edge e ∈ E(G), ψ(e) is a pair {u, v} which are
the endpoints of e. Different edges can then have the same endpoints. We shall use
simple graphs most of the time, which is why we prefer the simpler definition, but
many of the theorems and techniques will apply to multigraphs as well.
This definition can be further extended to graphs with loops as well. A loop is an
edge in which both endpoints are equal. We can include  this in the general definition
of a graph by making the mapping ψ : E(G) → V (G) 2 ∪ V (G). An edge e ∈ E(G)
for which ψ(e) = u ∈ V (G) defines a loop. Figure 1.3(a) shows a graph with
multiple edges and loops. However, we shall use simple graphs most of the time, so
that an edge will be considered to be a pair of vertices.

(a) (b)

FIGURE 1.3
A multigraph (a) and a digraph (b)
Graphs and Their Complements 3

A directed graph or digraph has edges which are ordered pairs (u, v) rather than
unordered pairs {u, v}. In this case an edge is also called an arc. The direction of an
edge is indicated by an arrow in diagrams, as in Figure 1.3(b).
The number of vertices of a graph G is denoted |G|. It is called the order of G.

The number of edges is ε(G). If G is simple, then obviously ε(G) ≤ |G| 2 , because

E(G) ⊆ V (G) 2 . We shall often use node or point as synonyms for vertex.
Many graphs havespecial names. The complete graph Kn is a simple graph with
|Kn | = n and ε = n2 . The empty graph K n is a graph with |K n | = n and ε = 0.
K n is the complement of Kn .

FIGURE 1.4
The complete graph K5

DEFINITION 1.2: Let G be a simple


 graph. The complement of G is G, where
V (G) = V (G) and E(G) = V (G)
2 \ E(G).
E(G) consists of all those pairs uv which are not edges of G. Thus, uv ∈ E(G)
if and only if uv 6∈ E(G). Figure 1.5 shows a graph and its complement.

1 2 1 2

G= G=

4 3 4 3

FIGURE 1.5
A graph and its complement

Figure 1.6 shows another graph and its complement. Notice that in this case,
when G is redrawn, it looks identical to G.
In a certain sense, this G and G are the same graph. They are not equal, because
E(G) 6= E(G), but it is clear that they have the same structure. If two graphs have
the same structure, then they can only differ in the names of the vertices. Therefore,
we can rename the vertices of one to make it exactly equal to the other graph. In the
4 Graphs, Algorithms, and Optimization

1 1 1

5 2 5 2 4 3
−→

4 3 4 3 2 5
G G G

FIGURE 1.6
Another graph and its complement

Figure 1.6 example, we can rename the vertices of G by the mapping θ given by

k: 1 2 3 4 5
,
θ(k) : 1 3 5 2 4

then θ(G) would equal G. This kind of equivalence of graphs is known as isomor-
phism. Observe that a one-to-one mapping θ of the vertices of a graph G can be
extended to a mapping of the edges of G by defining θ({u, v}) = {θ(u), θ(v)}.
DEFINITION 1.3: Let G and H be simple graphs. G and H are isomorphic if
there is a one-to-one correspondence θ : V (G) → V (H) such that θ(E(G)) =
E(H), where θ(E(G)) = {θ(uv) : uv ∈ E(G)}.
We write G ∼ = H to denote isomorphism. If G ∼ = H, then uv ∈ E(G) if and
only if θ(uv) ∈ E(H). One way to determine whether G ∼ = H is to try and redraw
G so as to make it look identical to H. We can then read off the mapping θ from the
diagram. However, this is limited to small graphs. For example, the two graphs G and
H shown in Figure 1.7 are isomorphic, because the drawing of G can be transformed
into H by first moving vertex 2 to the bottom of the diagram, and then moving vertex
5 to the top. Comparing the two diagrams then gives the mapping

k: 1 2 3 4 5 6
θ(k) : 6 4 2 5 1 3

as an isomorphism.
It is usually more difficult to determine when two graphs G and H are not iso-
morphic than to find an isomorphism when they are isomorphic. One way is to find
a portion of G that cannot be part of H. For example, the graph H of Figure 1.7 is
not isomorphic to the graph of the prism, which is illustrated in Figure 1.8, because
the prism contains a triangle, whereas H has no triangle. A subgraph of a graph G is
a graph K such that V (K) ⊆ V (G) and E(K) ⊆ E(G). If θ : G → H is a possible
isomorphism, then θ(K) will be a subgraph of H which is isomorphic to K.
A subgraph K is an induced subgraph if for every u, v ∈ V (K) ⊆ V (G), uv ∈
E(K) if and only if uv ∈ E(G). That is, we choose a subset U ⊆ V (G) and all
Graphs and Their Complements 5

1
1 2 3
6 2

G= H=

5 3
4 5 6
4

FIGURE 1.7
Two isomorphic graphs

edges uv with both endpoints in U . We can also form an edge subgraph or partial
subgraph by choosing a subset of E(G) as the edges of a subgraph K. Then V (K)
will be all vertices which are an endpoint of some edge of K.

FIGURE 1.8
The graph of the prism

The degree of a vertex u ∈ V (G) is D EG(u), the number of edges which con-
tain u. If k = D EG(u) and u −→ {u1 , u2 , . . . , uk }, then θ(u) −→ {θ(u1 ), θ(u2 ),
. . . , θ(uk )}, so that D EG(u) = D EG(θ(u)). Therefore a necessary condition for G
and H to be isomorphic is that they have the same set of degrees. The examples of
Figures 1.7 and 1.8 show that this is not a sufficient condition.
In Figure 1.6, we saw an example of a graph G that is isomorphic to its comple-
ment. There are many such graphs.
DEFINITION 1.4: A simple graph G is self-complementary if G ∼
= G.

Lemma 1.1. If G is a self-complementary graph, then |G| ≡ 0 or 1 (mod 4).



Proof. If G ∼
= G, then ε(G) = ε(G). But E(G) = V (G) 2 \ E(G), so that ε(G) =
|G|
 1 |G|

2 − ε(G) = ε(G), so ε(G) = 2 2 = |G|(|G| − 1)/4. Now |G| and |G| − 1
6 Graphs, Algorithms, and Optimization

TABLE 1.1
Graphs up to 10 vertices
n No. graphs
1 1
2 2
3 4
4 11
5 34
6 156
7 1,044
8 12,346
9 247,688
10 12,005,188

are consecutive integers, so that one of them is odd. Therefore |G| ≡ 0 (mod 4) or
|G| ≡ 1 (mod 4).
So possible orders for self-complementary graphs are 4, 5, 8, 9, 12, 13, . . ., 4k,
4k + 1, etc.

Exercises
1.1.1 The four graphs on three vertices in Figure 1.9 have 0, 1, 2, and 3 edges,
respectively. Every graph on three vertices is isomorphic to one of these
four. Thus, there are exactly four different isomorphism types of graphs
on three vertices.

G1 G2 G3 G4

FIGURE 1.9
Four graphs on three vertices

Find all the different isomorphism types of graph on 4 vertices (there are
11 of them). Hint: Adding an edge to a graph with ε = m, gives a graph
with ε = m + 1. Every graph with ε = m + 1 can be obtained in this
way. Table 1.1 shows the number of isomorphism types of graphs up to
10 vertices.
1.1.2 Determine whether the two graphs shown in Figure 1.10 are isomorphic
to each other or not. If they are isomorphic, find an explicit isomorphism.
Graphs and Their Complements 7

FIGURE 1.10
Two graphs on eight vertices

1.1.3 Determine whether the three graphs shown in Figure 1.11 are isomorphic
to each other or not. If they are isomorphic, find explicit isomorphisms.

FIGURE 1.11
Three graphs on 10 vertices

1.1.4 Find a self-complementary graph on four vertices.


1.1.5 Figure 1.6 illustrates a self-complementary graph, the pentagon, with five
vertices. Find another self-complementary graph on five vertices.
1.1.6 We have seen that the pentagon is a self-complementary graph. Let G
be the pentagon shown in Figure 1.6, with V (G) = {u1 , u2 , u3 , u4 , u5 }.
Notice that θ = (u1 )(u2 , u3 , u5 , u4 ) is a permutation which maps G to
G; that is, θ(G) = G, and θ(G) = G. θ is called a complementing permu-
tation. Because u2 u3 ∈ E(G), it follows that θ(u2 u3 ) = u3 u5 ∈ E(G).
Consequently, θ(u3 u5 ) = u5 u4 ∈ E(G) again. Applying θ twice more
gives θ(u5 u4 ) = u4 u2 ∈ E(G) and θ(u4 u2 ) = u2 u3 , which is where
we started. Thus, if we choose any edge ui uj and successively apply θ
to it, we alternately get edges of G and G. It follows that the number
of edges in the sequence so-obtained must be even. Use the permutation
(1,2,3,4)(5,6,7,8) to construct a self-complementary graph on eight ver-
tices.
1.1.7 Can the permutation (1,2,3,4,5)(6,7,8) be used as a complementing per-
mutation? Can (1,2,3,4,5,6)(7,8) be? Prove that the only requirement is
that every sequence of edges obtained by successively applying θ be of
even length.
8 Graphs, Algorithms, and Optimization

1.1.8 If θ is any permutation of {1, 2, . . . , n}, then it depends only on the cycle
structure of θ whether it can be used as a complementing permutation.
Discover what condition this cycle structure must satisfy, and prove it
both necessary and sufficient for θ to be a complementing permutation.

1.2 Degree sequences


Theorem 1.2. For any simple graph G we have
X
D EG(u) = 2ε(G).
u∈V (G)

Proof. An edge uv has two endpoints. Therefore each edge will be counted twice in
the summation, once for u and once for v.
We use δ(G) to denote the minimum degree of G; that is, δ(G) = MIN{D EG(u) |
u ∈ V (G)}. ∆(G) denotes the maximum degree of G. By Theorem 1.2, the average
degree equals 2ε/|G|, so that δ ≤ 2ε/|G| ≤ ∆.
Corollary 1.3. The number of vertices of odd degree is even.
Proof. Divide V (G) into VP odd = {u | D EG (u) P is odd }, and Veven = {u |
deg(u)
P is even }. Then 2ε = u∈Vodd D EG (u) + u∈Veven D EG (u). Clearly 2ε and
P
u∈Veven D EG (u) are both even. Therefore, so is u∈Vodd D EG(u), which means
that |Vodd | is even.

DEFINITION 1.5: A graph G is a regular graph if all vertices have the same
degree. G is k-regular if it is regular, of degree k.
For example, the graph of the cube (Figure 1.1) is 3-regular.
Lemma 1.4. If G is simple and |G| ≥ 2, then there are always two vertices of the
same degree.
Proof. In a simple graph, the maximum degree ∆ ≤ |G| − 1. If all degrees were
different, then they would be 0, 1, 2, . . . , |G| − 1. But degree 0 and degree |G| − 1
are mutually exclusive. Therefore there must be two vertices of the same degree.
Let V (G) = {u1 , u2 , . . . , un }. The degree sequence of G is

DEG(G) = (D EG (u1 ), D EG(u2 ), . . . , D EG(un ))

where the vertices are ordered so that

D EG(u1 ) ≥ D EG(u2 ) ≥ · · · ≥ D EG(un ).


Graphs and Their Complements 9

Sometimes it is useful to construct a graph with a given degree sequence. For ex-
ample, can there be a simple graph with five vertices whose degrees are (4, 3, 3, 2, 1)?
Because there are three vertices of odd degree, Corollary 1.3 tells us that there is no
such graph. We say that a sequence
D = (d1 , d2 , . . . , dn ),
is graphic if
d1 ≥ d2 ≥ · · · ≥ dn ,
and there is a simple graph G with DEG(G) = D. So (2, 2, 2, 1) and (4, 3, 3, 2, 1)
are not graphic, whereas (2, 2, 1, 1), (4, 3, 2, 2, 1), and (2, 2, 2, 2, 2, 2, 2) clearly are.

Problem 1.1: Graphic


Instance: a sequence D = (d1 , d2 , . . . , dn ).
Question: is D graphic?
Find: a graph G with DEG(G) = D, if D is graphic.

For example, (7, 6, 5, 4, 3, 3, 2) is not graphic; for any graph G with this degree
sequence has ∆(G) = |G| = 7, which is not possible in a simple graph. Similarly,
(6, 6, 5, 4, 3, 3, 1) is not graphic; here we have ∆(G) = 6, |G| = 7 and δ(G) = 1.
But because two vertices have degree |G| − 1 = 6, it is not possible to have a vertex
of degree one in a simple graph with this degree sequence.
When is a sequence graphic? We want a construction which will find a graph G
with DEG(G) = D, if the sequence D is graphic.
One way is to join up vertices arbitrarily. This does not always work, because
we can get stuck, even if the sequence is graphic. The following algorithm always
produces a graph G with DEG(G) = D, if D is graphic.
procedure G RAPH G EN(D)
Create vertices u1 , u2 , . . . , un
comment: upon completion, ui will have degree D[i]
graphic ← false “assume not graphic”
i←1
while D[i] > 0

 k←D[i]



 if there are at least k vertices with D EG > 0

 

  join ui to the k vertices of largest degree

 
 decrease each of these degrees by 1
do then D[i] ← 0

 


  comment: vertex ui is now completely joined




 “ui cannot be joined”
 else exit

i←i+1
graphic ← true
10 Graphs, Algorithms, and Optimization

This uses a reduction. For example, given the sequence

D = (3, 3, 3, 3, 3, 3),

the first vertex will be joined to the three vertices of largest degree, which will then
reduce the sequence to (∗, 3, 3, 2, 2, 2), because the vertex marked by an asterisk is
now completely joined, and three others have had their degree reduced by 1. At the
next stage, the first remaining vertex will be joined to the three vertices of largest
degree, giving a new sequence (∗, ∗, 2, 2, 1, 1). Two vertices are now completely
joined. At the next step, the first remaining vertex will be joined to two vertices,
leaving (∗, ∗, ∗, 1, 1, 0). The next step joins the two remaining vertices with degree
one, leaving a sequence (∗, ∗, ∗, ∗, 0, 0) of zeroes, which we know to be graphic.
In general, given the sequence

D = (d1 , d2 , . . . , dn ),

where
d1 ≥ d2 ≥ · · · ≥ dn ,
the vertex of degree d1 is joined to the d1 vertices of largest degree. This leaves the
numbers
d2 − 1, d3 − 1, . . . , dd1 +1 − 1, dd1 +2 , . . . , dn ,
in some order. If we rearrange them into descending order, we get the reduced se-
quence D′ . Write
D′ = (d′2 , d′3 . . . , d′n ),
where the first vertex u1 has been deleted. We now do the same calculation, using D′
in place of D. Eventually, after joining all the vertices according to their degree, we
either get a graph G with Deg(G) = D or else at some stage, it is impossible to join
some vertex ui .
An excellent data structure for representing the graph G for this problem is to
have an adjacency list for each vertex v ∈ V (G). The adjacency list for a vertex
v ∈ V (G) is a linked list of the vertices adjacent to v. Thus it is a data structure in
which the vertices adjacent to v are arranged in a linear order. A node x in a linked
list has two fields: data hxi, and next hxi.

x: u •

datahxi nexthxi

Given a node x in the list, data hxi is the data associated with x and next hxi points to
the successor of x in the list or next hxi = NIL if x has no successor. We can insert
data u into the list pointed to by L with procedure L IST I NSERT(), and the first node
on list L can be removed with procedure L IST R EMOVE F IRST().
Graphs and Their Complements 11
procedure L IST I NSERT(pseudocode)
L, ux ← N EW N ODE()
data hxi ← u
next hxi ← L
L←x

procedure L IST R EMOVE F IRST(L)


x←L
L ← next hxi
F REE N ODE(x)

We use an array AdjList [·] of linked lists to store the graph. For each vertex v ∈
V (G), AdjList [v] points to the head of the adjacency lists for v. This data structure
is illustrated in Figure 1.12.

3 4 AdjList [1] 2 • 4 • ×

AdjList [2] 1 • 3 • 4 • ×

AdjList [3] 2 • 4 • ×
2 1 AdjList [4] 1 • 2 • 3 • ×

FIGURE 1.12
Adjacency lists of a graph

We can use another array of linked lists, Pts [k], being a linked list of the vertices
ui whose degree-to-be di = k. With this data structure, Algorithm 1.2.1 can be
written as follows:
12 Graphs, Algorithms, and Optimization

Algorithm 1.2.1: G RAPH G EN(D)



Assume D is not graphic.
comment:
Create and initialize the linked lists Pts [k].
graphic ← false
for k ← 0 to n − 1 do Pts [k] ← NIL
for k ← 1 to n do L IST I NSERT(Pts [D[k]], k)
comment: Begin with vertex of largest degree.
for k ← n − 1 downto 0
do while Pts [k] 6= NIL

 comment: These points are to have degree k.



 x ← Pts [k]



 u ← data hxi



L IST R EMOVE

  F IRST(Pts [k])

 Join u to the next k vertices v of largest degree.

 comment:

 If this is not possible, then D is not graphic so exit.



 i ← k



 ← 1 to k
for j 

 

  i←i−1

 
 while Pts [i] = NIL do

 
 if i = 0 exit

 


 
 x = Pts [i]

 


 v = data hxi
do do

 L IST R EMOVE F IRST(Pts [i])

 


 
 L IST I NSERT(AdjList [u], v)

 


 
 L IST I NSERT(AdjList [v], u)

 

 L IST I NSERT(TempList [i], v)




 For each such v joined to u if v is on list Pts [j],

 comment:

 then transfer v to Pts [j − 1]



 for j ← k downto 1

 

  while TempList [j] 6= NIL

 
 

 
  x = TempList [j]

 


 do v = data hxi

  do

 
  L IST R EMOVE F IRST(TempList [j])

 
 


 L IST I NSERT(Pts [j − 1], v)

comment: u is now completely joined. Choose the next point.
comment: Now every vertex has been successfully joined.
graphic ← true

This program is illustrated in Figure 1.13 for the sequence D = (4, 4, 2, 2, 2, 2),
where n = 6. The diagram shows the linked lists before vertex 1 is joined to vertices
2, 3, 4, and 5, and the new configuration after joining. Care must be used in transfer-
ring the vertices v from Pts [j] to Pts [j − 1], because we do not want to join u to v
more than once. The purpose of the list Pts [0] is to collect vertices which have been
transferred from Pts [1] after having been joined to u. The degrees d1 , d2 , . . . , dn
Graphs and Their Complements 13

D = (4, 4, 2, 2, 2, 2)
1
Pts [6] ×
5 2
Pts [5] ×

Pts [4] 1 • 2 • × 4 3
Pts [3] ×

Pts [2] 3 • 4 • 5 • 6 • ×

Pts [1] ×

Pts [0] ×
(a)

D = (∗, 3, 1, 1, 1, 2)
1
Pts [6] ×
5 2
Pts [5] ×

Pts [4] × 4 3
Pts [3] 2 • ×

Pts [2] 6 • ×

Pts [1] 3 • 4 • 5 • ×

Pts [0] ×
(b)

FIGURE 1.13
The linked lists Pts [k]. (a) Before 1 is joined to 2, 3, 4, and 5. (b) After 1 is joined to
2, 3, 4, and 5.
14 Graphs, Algorithms, and Optimization

need not necessarily be in descending order for the program to work, because the
points are placed in the lists Pts [k] according to their degree, thereby sorting them
into buckets. Upon completion of the algorithm vertex k will have degree dk . How-
ever, when this algorithm is done by hand, it is much more convenient to begin with
a sorted list of degrees; for example, D = (4, 3, 3, 3, 2, 2, 2, 2, 1), where n = 9. We
begin with vertex u1 , which is to have degree four. It will be joined to the vertices
u2 , u3 , and u4 , all of degree three, and to one of u5 , u6 , u7 , and u8 , which have de-
gree two. In order to keep the list of degrees sorted, we choose u8 . We then have
u1 −→ {u2 , u3 , u4 , u8 }, and D is reduced to (∗, 2, 2, 2, 2, 2, 2, 1, 1). We then choose
u2 and join it to u6 and u7 , thereby further reducing D to (∗, ∗, 2, 2, 2, 2, 1, 1, 1, 1).
Continuing in this way, we obtain a graph G.
In general, when constructing G by hand, when uk is to be joined to one of ui
and uj , where di = dj and i < j, then join uk to uj before ui , in order to keep D
sorted in descending order.
We still need to prove that Algorithm 1.2.1 works. It accepts a possible degree
sequence
D = (d1 , d2 , . . . dn ),
and joins u1 to the d1 vertices of largest remaining degree. It then reduces D to new
sequence
D′ = (d′2 , d′3 , . . . d′n ).

1.2.1 Havel-Hakimi theorem


Theorem 1.5. (Havel-Hakimi theorem) D is graphic if and only if D′ is graphic.
Proof. Suppose D′ is graphic. Then there is a graph G′ with degree sequence D′ ,
where V (G′ ) = {u2 , u3 , . . . , un } with D EG(ui ) = d′i . Furthermore

D′ = (d′2 , d′3 , . . . , d′n )

consists of the degrees

{d2 − 1, d3 − 1, . . . , dd1 +1 − 1, dd1 +2 , . . . , dn }

arranged in descending order. Create a new vertex u1 and join it to vertices of degree

d2 − 1, d3 − 1, . . . , dd1 +1 − 1.

Then D EG(u1 ) = d1 . Call the new graph G. Clearly the degree sequence of G is

D = (d1 , d2 , . . . , dn ).

Therefore D is graphic.
Now suppose D is graphic. Then there is a graph G with degree sequence

D = (d1 , d2 , . . . , dn ),

where V (G) = {u1 , u2 , . . . , un }, with D EG(ui ) = di . If u1 is adjacent to vertices


Graphs and Their Complements 15
u1

u2 u3 u4 uk−1 uk x
y

FIGURE 1.14
Vertices adjacent to u1

of degree d2 , d3 , . . . , dd1 +1 , then G′ = G − u1 has degree sequence D′ , in which


case D′ is graphic.
Otherwise, u1 is not adjacent to vertices of degree d2 , d3 , . . . , dd1 +1 . Let uk
(where k ≥ 2) be the first vertex such that u1 is not joined to uk , but is joined to
u2 , u3 , . . . , uk−1 . (Maybe k = 2.)
Now D EG(u1 ) = d1 ≥ k, so u1 is joined to some vertex x 6= u2 , u3 , . . . uk−1 . uk
is the vertex of next largest degree, so D EG(uk ) ≥ D EG(x). Now x is joined to u1 ,
while uk is not. Therefore, there is some vertex y such that uk −→ y but x 6−→ y.
Set G ← G + xy + u1 uk − u1 x − uk y.
The degree sequence of G has not changed, and now u1 −→ {u2 , u3 , . . . , uk }.
Repeat until u1 −→ {u2 , u3 , . . . , ud1 +1 }. Then G′ = G − u1 has degree sequence
D′ , so that D′ is graphic. (See Figure 1.14.)

Therefore we know the algorithm will terminate with the correct answer, because
it reduces D to D′ . So we have an algorithmic test to check whether D is graphic
and to generate a graph whenever one exists.

1.2.2 Erdös-Gallai theorem


There is another way of determining whether D is graphic, without constructing a
graph.
Theorem 1.6. (Erdös-Gallai theorem) Let D = (d1 , d2 , . . . , dn ), where d1 ≥
d2 ≥ · · · ≥ dn . Then D is graphic if and only if
Pn
1. i=1 di is even; and
Pk Pn
2. i=1 di ≤ k(k − 1) + i=k+1 MIN(k, di ), for k = 1, 2, . . . , n.
Pn
Proof. Suppose D is graphic. Then i=1 di = 2ε, which is even. Let V1 contain the
k vertices of largest degree, and let V2 = V (G) − V1 be the remaining vertices. See
Figure 1.15.
16 Graphs, Algorithms, and Optimization
ε2

ε1

V1 V2

FIGURE 1.15
The vertices V1 of largest degree and the remaining vertices v2

Suppose that there are ε1 edges within V1 and ε2 edges from V1 to V2 . Then
Pk
i=1 di = 2ε1 + ε2 , because each edge within V1 is counted twice in the sum, once
for each endpoint, but edges between V1 and V2 are counted once only. Now ε1 ≤
k
2 , because V1 can induce a complete subgraph at most. Each vertex v ∈ V2 can be
joined to at most k vertices in V1 , because |V1 | = k, but v can be joined to at most
D EG(v) vertices in V1 , P if D EG(v) < k. Therefore ε2 , the number P of edges between
V1 and V2 , is at most v∈V2 MIN (k, D EG(v)), which equals ni=k+1 MIN (k, di ).
Pk Pn
This now gives i=1 di = 2ε1 + ε2 ≤ k(k − 1) + i=k+1 MIN(k, di ).
Various proofs of the converse are available. Interesting proofs can be found
in the books by H ARARY [80] or B ERGE [14].PHere we outline a proof by
n
C HOUDUM [33]. The proof is by induction on S = i=1 di . If S = 2, it is clear that
the result is true. Without loss of generality, we can assume that dn ≥ 1. Let t be the
smallest integer such that dt > dt+1 , if there is one. Otherwise, if all di are equal,
we take t = n − 1.
Construct D′ = (d′1 , . . . , d′n ) from D as follows: if i 6= t and i 6= n, then d′i = di ;
if i = t or i = n, then d′i = di − 1. That is, we are looking for a graph with degree
sequence D in which vertex t is adjacent to vertex n. Then S ′ = S − 2. If we can
verify that D′ satisfies the conditions of the theorem, with corresponding graph G′ ,
we can then construct a graph G with degree sequence D.
Pk ′
Pk ′
PnConsider Sk = i=1 di and Sk = i=1 di . Let Tk = k(k − 1) +
′ ′ ′
i=k+1 MIN (di , k), and similarly for Tk . If k ≥ t, then Sk = Sk −1 ≤ Tk −1 ≤ Tk .
Thus the conditions of the theorem are satisfied when k ≥ t. If k < t there are
several cases to consider. Note that when k < t, d1 = d2 = . . . = dk , so that
Sk′ = Sk = kdk .
If k < t and dk < k, then Sk′ = kdk ≤ k(k − 1) ≤ Tk′ .
If k < t and dk = k, then Sk′ = kdk = k 2 = k(k − 1) + k. Now d′k+1 is
either k or k − 1. Therefore when i > k, MIN(d′i , k) = d′i . If d′k+1 = k, then
Sk′ = k(k−1)+d′k+1 ≤ Tk′ . Otherwise d′k+1 = k−1, and Sk′ = k(k−1)+d′k+1 +1.
If d′k+2 ≥ 1, we obtain Sk′ ≤ Tk′ . Otherwise n = k + 2 and t = n− 1, so that dn = 1,
giving S = (n − 2)2 + (n − 2) + 1, which must be even, so that n is odd. But then
all degrees are odd, which is impossible.
If k < t and dk > k and dn > k, then MIN(di , k) = MIN(d′i , k) = k when i > k.
Sk = kdk = Sk ≤ Tk = Tk′ .

If k < t and dk > k and dn ≤ k, let r be the first integer such that dr ≤ k.
Graphs and Their Complements 17

Then r > t and MIN (di , k) = di when i ≥ r, so that Sk′ = Sk = kdk ≤ Tk =


k(k − 1) + k(r − k − 1) + dr + . . . + dn = k(r − 2) + (dr + . . . + dn ). We have
Tk′ = Tk − 1.
Now Sk+1 = (k + 1)dk ≤ Tk+1 = (k + 1)k + (k + 1)(r − k − 2) + dr + . . . + dn .
Hence dk ≤ (r − 2) + (dr + . . . + dn )/(k + 1). Substituting this into the previous
k
expression gives kdk ≤ k(r − 2)+ k+1 (dr + . . .+ dn ) < Tk . Therefore Sk′ = kdk <
′ ′ ′
Tk . But Tk = Tk − 1, so that Sk ≤ Tk .
Thus, Sk′ ≤ Tk′ for all k. By induction we know that D′ is graphic. Let G′ be a
simple graph with degree sequence D′ . If vertices t and n are not adjacent in G′ , we
add the edge {t, n} to obtain a graph G with degree sequence D. If they are adjacent,
then choose a vertex m such that {t, m} 6∈ E(G′ ). Because d′m ≥ d′n , there is a
vertex r adjacent to m in G′ such that {r, n} 6∈ E(G′ ). Remove the edge {m, r} and
add the edges {t, m}, {r, n} to obtain a graph G with degree sequence D.

Conditions 1 and 2 of Theorem 1.6 are known as the Erdös-Gallai conditions.

Exercises
1.2.1 Prove Theorem 1.2 for arbitrary graphs. That is, prove
Theorem 1.7. For any graph G we have
X
Deg(u) + ℓ = 2ε(G).
u∈V (G)

where ℓ is the number of loops in G and D EG(u) is the number of


edges incident on u. What formula is obtained if loops count two toward
D EG(u)?
1.2.2 We know that a simple graph with n vertices has at least one pair of
vertices of equal degree, if n ≥ 2. Find all simple graphs with exactly
one pair of vertices with equal degrees. What are their degree sequences?
Hint: Begin with n = 2, 3, 4. Use a recursive construction. Can degree 0
or n − 1 occur twice?
1.2.3 Program the G RAPH G EN() algorithm. Input the sequence D =
(d1 , d2 , . . . , dn ) and then construct a graph with that degree sequence, or
else determine that the sequence is not graphic. Use the following input
data:
(a) 44444
(b) 333333
(c) 33333333
(d) 333333333
(e) 2222222222
(f) 76665521
18 Graphs, Algorithms, and Optimization

1.2.4 If G has degree sequence D = (d1 , d2 , . . . , dn ) , what is the degree se-


quence of G?
1.2.5 Let D = (d1 , d2 , . . . , dn ), where d1 ≥ d2 ≥ . . . ≥ dPn . Prove that there is
n
a multigraph
Pn with degree sequence D if and only if i=1 di is even, and
d1 ≤ i=2 di .

1.3 Analysis
Let us estimate the number of steps that Algorithm 1.2.1 performs. Consider the loop
structure
for k ← n downto 1
do while
 Pts [k] 6= NIL
do · · ·

The for-loop performs n iterations. For many of these iterations, the contents of
the while-loop will not be executed, because Pts [k] will be NIL. When the contents
of the loop are executed, vertex u of degree-to-be k will be joined to k vertices. This
means that k edges will be added to the adjacency lists of the graph G being con-
structed. This takes 2k steps, because an edge uv must be added to both GraphAdj [u]
and GraphAdj [v]. It also makes D EG(u) = k. When edge uv is added, v will be
transferred from Pts [j] to Pts [j − 1], requiring additional
P k steps. Once u has been
joined, it is removed from the list. Write ε = 21 i di , the number of edges of G
when D is graphic. Then, in all, the combination for-while-loop will perform exactly
2ε steps adding edges to the graph and a further ε steps transferring vertices to other
lists, plus n steps for the n iterations of the for-loop. This gives a total of 3ε + n steps
for the for-while-loop. The other work that the algorithm performs is to create and
initialize the lists Pts [·], which takes 2n steps altogether. So we can say that in total,
the algorithm performs 3ε + 3n steps.
Now it is obvious that each of these “steps” is composed of many other smaller
steps, for there are various comparisons and assignments in the algorithm which we
have not explicitly taken account of (they are subsumed into the steps we have ex-
plicitly counted). Furthermore, when compiled into assembly language, each step
will be replaced by many smaller steps. Assembly language is in turn executed by
the microprogramming of a computer, and eventually we come down to logic gates,
flip-flops, and registers. Because of this fact, and because each computer has its own
architecture and machine characteristics, it is customary to ignore the constant coef-
ficients of the graph parameters ε and n, and to say that the algorithm has order ε+n,
which is denoted by O(ε + n), pronounced “big Oh of ε + n”. A formal definition
is provided by Definition 1.6. Even though the actual running time of a given algo-
rithm depends on the architecture of the machine it is run on, the programmer can
often make a reasonable estimate of the number of steps of some constant size (e.g.,
counting one assignment, comparison, addition, multiplication, etc. as one step), and
Graphs and Their Complements 19

thereby obtain a formula like 3ε + 3n. Such an algorithm will obviously be superior
to one which takes 15ε + 12n steps of similar size. Because of this fact, we shall try
to obtain formulas of this form whenever possible, as well as expressing the result in
a form like O(ε + n).
The complexity of an algorithm is the number of steps it must perform, in the
worst possible case. That is, it is an upper bound on the number of steps. Because
the size of each step is an unknown constant, formulas like 5n2 /6 and 25n2 are both
expressed as O(n2 ). We now give a formal definition of this notation.
DEFINITION 1.6: Suppose f : Z+ → R and g : Z+ → R. We say that f (n) is
O(g(n)) provided that there exist constants c > 0 and n0 ≥ 0 such that 0 ≤ f (n) ≤
c · g(n) for all n ≥ n0 .
In other words, f (n) is O(g(n)) provided that f (n) is bounded above by a con-
stant factor times g(n) for large enough n. For example, the function 5n3 + 2n + 1
is O(n3 ), because for all n ≥ 1, we have

5n3 + 2n + 1 ≤ 5n3 + 2n3 + n3 = 8n3 .

Hence, we can take c = 8 and n0 = 1, and Definition 1.6 is satisfied.


The notation f (n) is Ω(g(n)) (“big omega”) is used to indicate that f (n) is
bounded below by a constant factor times g(n) for large enough n.
DEFINITION 1.7: Suppose f : Z+ → R and g : Z+ → R. We say that f (n)
is Ω(g(n)) provided that there exist constants c > 0 and n0 ≥ 0 such that f (n) ≥
c · g(n) ≥ 0 for all n ≥ n0 .
We say that f (n) is Θ(g(n)) (“big theta”) when f (n) is bounded above and
below by constant factors times g(n). The constant factors may be different. More
precisely:
DEFINITION 1.8: Suppose f : Z+ → R and g : Z+ → R. We say that f (n)
is Θ(g(n)) provided that there exist constants c, c′ > 0 and n0 ≥ 0 such that 0 ≤
c · g(n) ≤ f (n) ≤ c′ · g(n) for all n ≥ n0 .
If f (n) is Θ(g(n)), then we say that f and g have the same growth rate.
The big O-notation is a method of indicating the qualitative nature of the formula,
whether quadratic, linear, logarithmic, exponential, etc. Notice that “equations” in-
volving O(·) are not really equations, because O(·) can only be used in this sense on
the right hand side of the equals sign. For example, we could also have shown that
10n2 + 4n − 4 is O(n3 ) or that 10n2 + 4n − 4 is O(2n ), but these expressions are
not equal to each other. Given a complexity formula like 10n2 + 4n − 4, we want the
smallest function f (n) such that 10n2 + 4n − 4 is O(f (n)). Among the useful rules
for working with the O-notation are the following sum and product rules.
Theorem 1.8. Suppose that the two functions f1 (n) and f2 (n) are both O(g(n)).
Then the function f1 (n) + f2 (n) is O(g(n)).
Theorem 1.9. Suppose that f1 (n) is O(g1 (n)) and f2 (n) is O(g2 (n)). Then the
function f1 (n) f2 (n) is O(g1 (n) g2 (n)).
20 Graphs, Algorithms, and Optimization

As examples of the use of these notations, we have that n2 is O(n3 ), n3 is Ω(n2 ),


and 2n2 + 3n − sin n + 1/n is Θ(n2 ).
Several properties of growth rates of functions that arise frequently in algorithm
analysis follow. The first of these says that a polynomial of degree d, in which the
high-order coefficient is positive, has growth rate nd .
Theorem 1.10. Suppose that ad > 0. Then the function a0 + a1 n + · · · + ad nd is
Θ(nd ).
The next result says that logarithmic growth does not depend on the base to which
logarithms are computed. It can be proved easily using the formula loga n = loga b ·
logb n.
Theorem 1.11. The function loga n is Θ(logb n) for any a, b > 1.
The next result can be proved using Stirling’s formula. It gives the growth rate of
the factorial function in terms of exponential functions.
Theorem 1.12. The function n! is Θ(nn+1/2 e−n ) .

Exercises
1.3.1 Show that if G is a simple graph with n vertices and ε edges, then log ε =
O(log n).
1.3.2 Consider the following statements which count the number of edges in a
graph, whose adjacency matrix is Adj .

Edges ← 0
for u ← 1 to n − 1
do for v ← u + 1 to n
do if Adj [u, v] = 1
then Edges ← Edges + 1

Calculate the number of steps the algorithm performs. Then calculate the
number of steps required by the following statements in which the graph
is stored in adjacency lists:

Edges ← 0
for u ← 1 to n − 1
do for each v −→ u
do if u < v
then Edges ← Edges + 1

What purpose does the condition u < v fulfill, and how can it be avoided?
1.3.3 Use induction to prove that the following formulas hold:

(a) 1 + 2 + 3 + · · · + n = n+1
2
Graphs and Their Complements 21
    
(b) 22 + 32 + 42 + · · · + n
2 = n+1
3 .


t

t+1 t+2
 n
 n+1

(c) t + t + t + ··· + t = t+1 .

1.3.4 Show that 3n2 + 12n = O(n2 ); that is, find constants A and N such that
3n2 + 12n ≤ An2 whenever n ≥ N .
1.3.5 Show that log(n + 1) = O(log n), where the logarithm is to base 2.
1.3.6 Use the answer to the previous question to prove that

(n + 1) log(n + 1) = O(n log n).

1.3.7 Prove that if f1 (n) and f2 (n) are both O(g(n)), then f1 (n) + f2 (n) is
O(g(n)).
1.3.8 Prove that if f1 (n) is O(g1 (n)) and f2 (n) is O(g2 (n)), then f1 (n) f2 (n)
is O(g1 (n) g2 (n)).

1.4 Notes
Some good general books on graph theory are B ERGE [14], B OLLOB ÁS [20],
B ONDY and M URTY [23], C HARTRAND and L ESNIAK [31], C HARTRAND and
O ELLERMANN [32], D IESTEL [44], G OULD [73], and W EST [189]. A very read-
able introductory book is T RUDEAU [172]. G IBBONS [66] is an excellent treatment
of graph algorithms. A good book discussing the analysis of algorithms is P URDOM
and B ROWN [138]. A HO , H OPCROFT, and U LLMAN [1], S EDGEWICK [157] and
W EISS [188] are all excellent treatments of data structures and algorithm analysis.
2
Paths and Walks

2.1 Introduction
Let u and v be vertices of a simple graph G. A path P from u to v is a sequence of
vertices u0 , u1 , . . . , uk such that u = u0 , v = uk , ui −→ ui+1 , and all the ui are
distinct vertices. The length of a path P is ℓ(P ), the number of edges it uses. In this
example, ℓ(P ) = k, and P is called a uv-path of length k. A uv-path of length 4 is
illustrated in Figure 2.1, with dashed edges.
A cycle C is a sequence of vertices u0 , u1 , . . . , uk forming a u0 uk -path, such that
uk −→ u0 . The length of C is ℓ(C), the number of edges that it uses. In this case,
ℓ(C) = k + 1.
A uv-path P connects u to v. The set of all vertices connected to any vertex
u forms a subgraph Cu , the connected component of G containing u. It will often
be the case that Cu contains all of G, in which case G is a connected graph. ω(G)
denotes the number of distinct connected components of G. The graph of Figure 2.1
is disconnected, with ω = 3.

FIGURE 2.1
A graph with three components

There are several ways of finding the connected components of a graph G. One
way to find the sets Cu for a graph G is as follows:

23
24 Graphs, Algorithms, and Optimization
procedure C OMPONENTS(G)
for each u ∈ V (G)
do initialize Cu to contain only u
 u ∈ V (G)
for each
for each v −→ u
do
do if Cu 6= Cv then M ERGE(Cu , Cv )

The inner for-loop ensures that, upon completion, if u −→ v, then Cu = Cv , for


any vertices u and v. Therefore, if P = (u0 , u1 , . . . , uk ) is any path, we can be sure
that Cu0 = Cu1 = · · · = Cuk , so that when the algorithm terminates, each Cu will
contain all the vertices connected to u by any path; that is, Cu will be the connected
component containing u.
The complexity of the algorithm naturally depends upon the data structures used
to program it. This algorithm is a perfect example of the use of the merge-find data
structure. Initially, each Cu = {u} and Cv = {v}. When the edge uv is examined,
Cu and Cv are merged, so that now Cu = Cv = {u, v}. The two operations which
need to be performed are to determine whether Cu = Cv , and to merge Cu and
Cv into one. This can be done very efficiently by choosing a vertex in each Cu as
component representative.

uRep ← C OMP R EP (Cu )


vRep ← C OMP R EP (Cv )
if uRep 6= vRep
then M ERGE(Cu , Cv )

Initially, Cu = {u}, so that u begins as the representative of Cu . Associated with


each vertex v is a pointer toward the representative of the component containing v.
To find the representative of Cu , we start at u and follow these pointers, until we
come to the component representative. The component representative is marked by a
pointer that is negative. The initial value is −1. The pointers are easily stored as an
array, CompPtr .
C OMP R EP () is a recursive procedure that follows the component pointers until a
negative value is reached.

procedure C OMP R EP (u)


if CompPtr [u] < 0
return (u)
then 
theRep ← C OMP R EP (CompPtr [u])
else CompPtr [u] ← theRep

return (theRep )

The assignment
CompPtr [u] ← theRep
Paths and Walks 25

is called path compression. It ensures that the next time CompPtr (u) is computed,
the representative will be found more quickly. The algorithm C OMPONENTS() can
now be written as follows:

Algorithm 2.1.1: C OMPONENTS(G)

n ← |G|
for u ← 1 to n
do CompPtr [u] ← −1
← 1 to n
for u 

  v −→ u
for each

 uRep ← C OMP R EP (u)


do vRep ← C OMP R EP (v)

 do

 if uRep 6= vRep

 
then M ERGE(uRep , vRep )

The essential step in merging Cu and Cv is to assign either

CompPtr [vRep ] ← uRep

or
CompPtr [uRep ] ← vRep
The best one to choose is that which merges the smaller component onto the larger.
We can determine the size of each component by making use of the negative values
of CompPtr [uRep ] and CompPtr [vRep ]. Initially, CompPtr [u] = −1, indicating a
component of size one.

procedure M ERGE(uRep , vRep )


uSize ← −CompPtr [uRep ]
vSize ← −CompPtr [vRep ]
if uSize< vSize
CompPtr [uRep ] ← vRep
then
 CompPtr [vRep ] ← −(uSize + vSize )
CompPtr [vRep ] ← uRep
else
CompPtr [uRep ] ← −(uSize + vSize )

When Cu and Cv are merged, the new component representative (either uRep
or vRep ) has its CompPtr [·] assigned equal to −(uSize + vSize ). The component
pointers can be illustrated graphically. They are shown in Figure 2.2 as arrows. The
merge operation is indicated by the dashed line.
26 Graphs, Algorithms, and Optimization

uRep

uRep

u
CompPtr [vRep] = −5

CompPtr [uRep] = −8

FIGURE 2.2
Component representatives

2.2 Complexity
The components algorithm is very efficient. The for-loop which initializes the
CompPtr array requires n steps. If adjacency lists are used to store G, then the total
number of times that the body of the main loop is executed is
X
D EG(u) = 2ε.

Thus C OMP R EP () is called 4ε times. How many times is M ERGE() called? At each
merge, two existing components are replaced by one, so that at most n−1 merges can
take place. Each merge can be performed using four assignments and a comparison.
It takes n steps to initialize the CompPtr array. Thus the total number of steps is
about 6n + 4ε·(number of steps per call to C OMP R EP ()). The number of steps each
call to C OMP R EP () requires depends on the depth of the trees which represent the
components. The depth is changed by path compression, and by merging. It is proved
in A HO, H OPCROFT, and U LLMAN [1], that if there are a total of n points involved,
the number of steps required is O(α(n)), where α(n) is the inverse of the function
A(n), defined recursively as follows.

A(1) = 1
A(k) = 2A(k−1)
Paths and Walks 27

Thus, A(2) = 21 = 2, A(3) = 22 = 4, A(4) = 24 = 16, A(5) = 216 = 65536, etc.


It follows that α(n) ≤ 5, for all n ≤ 65536. So the complexity of Algorithm 2.1.1 is
almost linear, namely, O(n + εα(n)), where α(n) ≤ 5, for all practical values of n.

Exercises
2.2.1 Assuming the data structures described in Section 2.1, program the
C OMPONENTS () algorithm, merging the smaller component onto the
larger. Include an integer variable NComps which contains the current
number of components. Upon completion, its value will equal ω(G).
2.2.2 Algorithm 2.1.1 computes the connected components Cu using the array
CompPtr . If we now want to print the vertices of each distinct Cu , it
cannot be done very efficiently. Show how to use linked lists so that for
each component, a list of the vertices it contains is available. Rewrite the
M ERGE() procedure to include this. Is the complexity thereby affected?
2.2.3 In the Algorithm 2.1.1 procedure, the for-loop

for u ← 1 to n do

executes the statement uRep ← C OMP R EP (u) once for every v −→ u.


Show how to make this more efficient by taking the statement uRep ←
C OMP R EP (u) out of the v-loop, and modifying the M ERGE() procedure
slightly. Calculate the new complexity.

2.2.4 Let n = |G|. Show that if ε > n−1 2 , then G is connected. Hint: If G is
disconnected, there is a component of size x < n. What is the maximum
number of edges G can then have?
2.2.5 Show that if δ > ⌊(n − 1)/2⌋, then G is connected.
2.2.6 Show that if G is disconnected, then G is connected.
2.2.7 Show that if G is simple and connected but not complete, then G has three
vertices u, v, and w such that u −→ v, w, but v 6−→ w.
2.2.8 A longest path in a graph G is any path P such that G contains no path
longer than P . Thus a graph can have several different longest paths (all
of the same length, though). Show that ℓ(P ) ≥ δ(G), for any longest
path. Hint: Consider an endpoint of P .
2.2.9 Show that every graph G has a cycle of length at least δ(G)+1, if δ(G) ≥
2. Hint: Consider a longest path.
2.2.10 Prove that in a connected graph, any two longest paths have at least one
vertex in common.
28 Graphs, Algorithms, and Optimization

2.3 Walks
Paths do not contain repeated vertices or edges. A walk in G is any sequence of ver-
tices u0 , u1 , . . . , uk such that ui −→ ui+1 . Thus, in a walk, edges and vertices may
be repeated. Walks are important because of their connection with the adjacency ma-
trix of a graph. Let A be the adjacency matrix of G, where V (G) = {u1 , u2 , . . . , un },
such that row and column i of A correspond to vertex ui .
Theorem 2.1. Entry [i, j] of Ak is the number of walks of length k from vertex ui to
uj .
Proof. By induction on k. When k = 1, there is a walk of length 1 from ui to uj if
and only if ui −→ uj , in which case entry A[i, j] = 1. Assume it’s true whenever
k ≤ t and consider At+1 . Let W be a ui uj -walk of length t + 1, where t ≥ 2. If ul
is the vertex before uj on W , then W can be written as (W ′ , ul , uj ), where W ′ is
a ui ul -walk of length t. Furthermore, every ui ul -walk of length t gives a ui uj -walk
of length t + 1 whenever ul −→ uj . Therefore the number of ui uj -walks of length
t + 1 is X
(the number of ui ul − walks of length t)(A[l, j]).
l

But the number of ui ul -walks of length t is At [i, l], so that the number of ui uj -walks
of length t + 1 is
X n
At [i, l]A[l, j],
l=1

which equals At+1 [i, j]. Therefore the result is true when k = t + 1. By induction,
it’s true for all values of k.
Notice that this result is also true for multigraphs, where now A[i, j] is the num-
ber of edges joining ui to uj . For multigraphs, a walk W must be specified by giving
the sequence of edges traversed, as well as the sequence of vertices, because there
can be more than one edge joining the same pair of vertices.

Exercises
2.3.1 Show that A2 [i, j] equals the number of ui uj -paths of length 2, if i 6= j,
and that A2 [i, i] = D EG(ui ).
2.3.2 Show that A3 [i, i] equals the number of triangles containing vertex ui .
Find a similar interpretation of A3 [i, j], when i 6= j. (A triangle is a cycle
of length 3.)
2.3.3 Ak contains the number of walks of length k connecting any two vertices.
Multiply Ak by xk , the k th power of a variable x, and sum over k, to get
the matrix power series I + Ax + A2 x2 + A3 x3 + · · · , where I is the
identity matrix. The sum of this power series is a matrix whose ij th entry
Paths and Walks 29

is a function of x containing the number of ui uj -walks of each length, as


the coefficient of xk . Because the power series expansion of (1 − a)−1 is
1 + a + a2 + a3 + · · · , we can write the above matrix as (I − Ax)−1 .
That is, the inverse of the matrix (I − Ax) is the walk generating matrix.
Find the walk generating matrix for the graph of Figure 2.3.

FIGURE 2.3
Compute the number of walks in this graph

2.4 The shortest-path problem


The distance from vertex u to v is D IST(u, v), the length of the shortest uv-path. If
G contains no uv-path, then D IST(u, v) = ∞. In this section we study the following
two problems.

Problem 2.1: Shortest Path


Instance: a graph G and a vertex u.
Find: D IST(u, v), for all v ∈ V (G).

Problem 2.2: All Paths


Instance: a graph G.
Find: D IST(u, v), for all u, v ∈ V (G).

Given a vertex u, one way of computing D IST(u, v), for all v, is to use a breadth-
first search (BFS), as is done in procedure BFS().
Random documents with unrelated
content Scribd suggests to you:
undisturbed alike by the troubles and allurements of the world, as the
most perfect state of the soul; but it did not provide any adequate
motive for attaining this desirable equipoise. It could only state the
theory and insist on its importance; but refractory human nature had
its own way, in spite of philosophy. The apostle supplies in these words
a nobler and more workable philosophy. He not only exhorts us to
tranquillity of mind but shows us how it may be attained and kept. In
all kinds of anxieties and especially in the struggles of religious doubt,
prayer is the truest philosophy. Our difficulties vanish when we take
them to God.

"By caring and by fretting,


By agony and fear,
There is of God no getting;
But prayer He will hear."

We should cast our care on God because He is our Father. A father’s


office is to provide for his family. It is out of place for a child to be
anxiously making provision for emergencies—asking where to-
morrow’s food and clothing are to come from, and how the bills are to
be paid. We should rebuke such precocity, and send the child to school
or to play, and leave all such matters to the ordained caretaker. The
birds of the air are taken care of; so shall we be, even though our faith is
small. “Our prayers run along one road, and God’s answers by another,
and by-and-by they meet. God answers all true prayer, either in kind or
in kindness” (Judson).
III. That the peace of God in the heart will effectually banish all
care.—“And the peace of God which passeth all understanding shall
keep your hearts and minds through Christ Jesus” (ver. 7). The enemies
of peace are: melancholy, to which the apostle opposed joy in the Lord
(ver. 4); want of self-restraint or intemperance of feeling or conduct, to
which he opposes moderation (ver. 5); care and anxiety, or
unthankfulness and unbelief, to which he opposes grateful and earnest
prayer (ver. 6); the final result is peace (ver. 7). The peace that God
gives “passeth all understanding”; it is deep, precious, immeasurable.
God alone fully understands the grandeur of His own gift. It is an
impenetrable shield to the believing soul; it guards the fortress in
peace though the shafts of care are constantly hurled against it.
Lessons.—1. Our sins breed our cares. 2. God is ever willing to take up
the burden of our cares. 3. Only as we commit our cares to God have we
peace.

GERM NOTES ON THE VERSES.


Vers. 6, 7. The Remedy for Worldly Care.
I. A caution or warning.—“Be careful for nothing.”
1. This does not respect duty.—We must have a care for our Lord’s
interests.
2. But having performed duty, we are not to be careful as to
consequences.—(1) Because unnecessary. Christ cares. (2) Because
useless. It cannot ward off the evil. The evil only in imagination. The
evil often a good. Itself the greatest evil.
3. Because positively sinful.—(1) It breaks a commandment. (2) It sets
aside promises. (3) It undervalues experience. (4) It distrusts God’s
wisdom and goodness. (5) It is rebellion against God’s arrangements.
(6) It is an intrusion into God’s province.
4. Because hurtful and injurious.—(1) It often deters from duty. (2) It
destroys the comforts of duty.
II. Counsel or advice as to the manner in which the evil is to be
avoided.—“But in everything by prayer and supplication.” 1. The
correction is not a needless and reckless indifference. 2. The emphatic
word here is “everything.” This describes the range of prayer. This
precept is generally neglected. 3. The performance of this duty would
correct carefulness. It places everything under God’s government, and
leaves it there. It leads to a study of the Divine will in secular affairs.
Our prospects and plans are thus tested. It gives to every event the
character of an answer to prayer—evil as well as good. Prayer, i.e. direct
entreaty or petition. Supplication, i.e. deprecation. Thanksgiving for all
past and present.
III. A promise as to the results of following this counsel or advice.
—“And the peace of God, which passeth all understanding, shall keep
your hearts and minds.”
1. The mind and the heart are the seat of care.—The mind calculates,
imagines. The heart feels fear, grief, despair.
2. The mind and heart are made the seat of peace.—“The peace of God,
which passeth all understanding, shall keep your hearts and minds
through Jesus Christ.” The peace which God has flows from unity, from
omnipotence. This is the peace of God, because He gives it.
3. This peace comes through Jesus Christ.—He produces the unity. He
encircles with omnipotence.—Stewart.

Vers. 6, 7. Anxious Care.


I. The evil to be avoided.—1. Care is excessive when it is inconsistent
with peace and quietness. 2. When it induces loss of temper. 3. When it
makes us distrustful of Providence. 4. When it hurries us into any
improper course of conduct. (1) Anxiety is useless. (2) Is positively
injurious. (3) Exerts a mischievous influence on others. (4) Is criminal.
II. The proper course to be pursued.—1. Prayer. 2. Supplication.
3. Thanksgiving.
III. The happiness to be enjoyed.—“The peace of God, which
passeth understanding, shall keep your hearts and minds through
Jesus Christ.”—Dr. Robt. Newton.

Ver. 6. Subjects of Prayer.


I. For temporal blessings.—1. Our health. Value of health.
Dependence on God. 2. Our studies. Not to supersede diligence.
Communicates a right impulse. Secures a right direction. 3. Our
undertakings. Agricultural, commercial.
II. For spiritual blessings.—1. For pardon. Of our daily sins in
thought, word, and deed. Of all our sins. 2. For holiness in heart and
life. Regeneration, faith, love, hope, meekness, zeal, resignation,
obedience. 3. For usefulness and happiness.
III. For the outpouring of the Holy Spirit.—1. On ourselves. 2. On
our relatives and friends. 3. On the Church. 4.On the world.
IV. For the spread of the Gospel.—1. For the multiplication of the
necessary means. 2. For the removal of obstacles. 3. For the success of
labourers. 4. For the conversion of sinners.—G. Brooks.

True Prayer.
I. True prayer is specific as well as earnest.—Nothing is too little to
be made the subject of prayer. The very act of confidence is pleasing to
God and tranquillising to the supplicant. God is not only willing to
hear the details, but He desires that we should tell Him.
II. True prayer consists of confession, supplication, and
thanksgiving.—We are to confess our sins, ask forgiveness, and do it
with gratitude and thankfulness. God will not answer the requests of
unthankful beggars. Without thanksgiving what we call prayer is
presumption.—Homiletic Monthly.

Ver. 7. The Peace of God keeping the Heart.


I. The nature of this defending principle.—It has as its basis
forgiving mercy.
II. Its author.—“The peace of God.” It is called His peace, because that
work of mercy on which it rests is His work, and He Himself
communicates the peace.
III. Its property.—“Passeth all understanding.” 1. The understanding of
such as are strangers to it. 2. They who enjoy it the most cannot fully
comprehend it.
IV. Its effects.—“Shall keep your hearts and minds.” 1. In temptation it
secures the heart by satisfying the heart. 2. It keeps the heart in
affliction. 3. It keeps the mind by settling the judgment, and keeping
doubts and errors out of the mind.
V. Its source and the instrumentality by which it works.
—“Through Christ Jesus.”—C. Bradley.

MAIN HOMILETICS OF THE PARAGRAPH.—Verses 8, 9.


The Science of Christian Ethics—
I. Demands the study of every genuine virtue.—“Whatsoever
things are true, honest, just, pure, lovely, of good report, . . . think on
these things” (ver. 8). In regard to what is honourable, just, pure,
lovely, and of good report, there is a true and a false standard, and for
this reason the apostle here places the true at the beginning, that when
the following exhortations are presented, this fact which our
experience so often discloses may at once occur to the Christian, and
he may be led to examine himself and see whether he also is
everywhere seeking for the true (Schleiermacher). Genuine virtue has
its root in genuine religion. The modern school of ethics, which
professes to teach morality as something apart from spiritual
Christianity, is a return to the exploded theories of pagan moralists, an
attempt to dress up pre-Christian philosophy in a nineteenth-century
garb. The morality that is lovely and of good report is Christian
morality—the practical, liveable ethics of the New Testament. The
ethical terms used in this verse are closely united. The true, the
becoming, the right, and the pure are elements of virtue or moral
excellence, and when exhibited in practical life are lovely and worthy of
all praise. The charm of the Christian character is not the cultivation of
one virtue that overshadows all the rest, but the harmonious blending
of all the virtues in the unity of the Christian life. Christian ethics
should be earnestly studied, not as matters of pure speculation, but
because of their supreme importance and utility in the moral conduct
of every-day life.
II. Requires the translation of high moral principles into
practical life.—“Those things which ye have both learned, and
received, and heard, and seen in me, do” (ver. 9). It is one thing to
ponder, admire, and applaud morality; it is another thing to practise it.
The apostle not only taught Christian ethics, but practised them, and
could point to his own example as worthy of imitation; it was not, “Do
as I say,” but “Do as I do.” Christian morality is of little value as a mere
creed of ethics; its true power is seen in changing, elevating, and
refining the life. We have all to lament there is such a wide chasm
between theory and practice. Theory may be learned in a brief period;
practice is the work of a lifetime. The theory of music may be rapidly
apprehended, but the mastery of any one instrument, such as the
violin or organ, demands patient and incessant practice. It means
detail-work, plod, perseverance, genius. So is it with every virtue of
Christian ethics. Theory and practice should go together; the one helps
the other; practice more clearly defines theory, and theory more fully
apprehended stimulates practice. It is the practice of Christian
morality that preaches to the world a Gospel that it cannot fail to
understand and that is doing so much to renovate it. Lord Bolingbroke,
an avowed infidel, declared: “No religion ever appeared in the world
whose tendency was so much directed to promote the peace and
happiness of mankind as the Christian religion. The Gospel of Christ is
one continued lesson of the strictest morality, of justice, benevolence,
and universal charity. Supposing Christianity to be a human invention,
it is the most amiable and successful invention that ever was imposed
on mankind for their good.”
III. Links practical morality with the promise of Divine blessing.
—“And the God of peace shall be with you” (ver. 9). The upright man—
the man who is striving to shape and mould his life on the ethics of the
New Testament—shall not only enjoy peace, the peace of God, which
passeth all understanding, but the God of peace shall be with him and
in him. True religion, in healthy activity, gives, and can alone give, a
restfulness of spirit such as the troubles of life are impotent to disturb.
The two vital elements of true religion are communion with God and
the diligent cultivation of practical holiness—conformity to the will of
God in all things. Pray and bring forth the fruits of the Spirit, and the
God of peace shall be with you, preserving you from unrest and harm.
The peace of God is also an active principle, gentle and noiseless in its
activity, which will help the soul to grow in ethical symmetry and
beauty.
Lessons.—1. The Gospel is the foundation of the highest ethics. 2. No
system of morality is trustworthy that does not lead to holy practice.
3. God helps the man who is honestly striving to live up to his light.

GERM NOTES ON THE VERSES.


Ver. 8. Mercantile Virtues without Christianity.
I. What a man of mercantile honour has.—He has an attribute of
character which is in itself pure, lovely, honourable, and of good
report. He has a natural principle of integrity, and under its impulse he
may be carried forward to such fine exhibitions of himself as are
worthy of all admiration. It is very noble when the simple utterance of
his word carries as much security along with it, as if he had
accompanied that utterance by the signatures, the securities, and the
legal obligations which are required of other men. All the glories of
British policy and British valour are far eclipsed by the moral splendour
which British faith has thrown over the name and the character of our
nation. There is no denying the extended prevalence of a principle of
integrity in the commercial world.
II. What a man of mercantile honour has not.—He may not have
one duteous feeling of reverence which points upward to God. He may
not have one wish or one anticipation which points forward to eternity.
He may not have any sense of dependence on the Being who sustains
Him, and who gave him his very principle of honour as part of that
interior furniture which He has put into his bosom. He is a man of
integrity, and yet he is a man of ungodliness. This natural virtue, when
disjoined from a sense of God, is of no religious estimation whatever;
nor will it lead to any religious blessing, either in time or in eternity.—
T. Chalmers.

Ver. 9. Paul as an Example to Believers.


I. He was distinguished by his decision of character in all that
relates to religion.—Constitutionally ardent; zealous as a Pharisee.
From the day of his conversion he never faltered, notwithstanding his
privations, his dangers, his sufferings. Be decided.
II. By his care about the culture of the Divine life in his own soul.
—The student may desire to know the truth rather than to feel its
power. The preacher may be more solicitous about the power of the
truth over others than over himself. He never lost sight of the interests
of his own soul.
III. By his devotional habits.—One would rather be the author of his
prayers than of his sermons. The difference between his prayers as a
Pharisee and as a Christian. The subject, the spirit, the style of his
prayers as a Christian. Be careful. Be not soon shaken in mind or
troubled by speculations about the philosophy of prayer.
IV. By his spirituality and heavenly-mindedness.—He did not
show any interest in the class of worldly objects that might have been
expected to interest a man of his order of mind. He was absorbed in
“spiritual things.” The second coming of Christ had a prominent place
in his thoughts. “That day.” Cultivates a habitual superiority to the
things of time and sense. Seek the things that are above.
V. By his patient submission to the dispensations of Divine
providence.—Rare amount of suffering. Strong feeling, unmurmuring
submission. Patient, meek, contented. All from Christian principle. Be
resigned.
VI. By his laborious usefulness.—Sketch his career. Be useful.—
G. Brooks.

MAIN HOMILETICS OF THE PARAGRAPH.—Verses 10–14.


The Joy of a Good Man in Extremity—
I. Stimulated by the practical evidence of the growth in his
converts of Christian thoughtfulness.—“Your care of me hath
flourished again; wherein ye were also careful, but ye lacked
opportunity” (ver. 10). The Philippians were a hospitable people, as was
shown both by Lydia and the gaoler, who insisted on the privilege of
ministering to the wants of the apostles in the beginning of their
ministry at Philippi. The Church in that city had already sent a liberal
contribution to the apostle to help him in the missionary work; and he
now rejoices over another practical evidence of their generous
thoughtfulness in the timely help they had sent him by the hands of
Epaphroditus. Paul and his mission were much in their thoughts, and
they were often devising how they might minister to his wants and
further the work of the Gospel. They were eager to help him more
frequently but lacked opportunity. They valued the Gospel so as to be
willing to pay for it. It is a gratifying and unmistakable proof of
religious growth when we are anxious to contribute of our means,
according to our ability, for the spread of the Gospel. Liberality in
money-giving is a crucial test of genuine godliness. When the
commission of excise wrote Wesley, “We cannot doubt you have plate
for which you have hitherto neglected to make an entry,” his laconic
reply was, “I have two silver teaspoons at London, and two at Bristol;
this is all the plate which I have at present, and I shall not buy any
more at present while so many around me want bread.” It is estimated
that he gave away more than £30,000.
II. Maintained by having mastered the secret of Christian
contentment.—1. A contentment gained by actual experience of the
ups and downs of life. “Not that I speak in respect of want: for I have
learned, in whatsoever state I am, therewith to be content. I know both
how to be abased, and I know how to abound; everywhere and in all
things I am instructed both to be full and to be hungry, both to abound
and to suffer need” (vers. 11, 12). The checkered and eventful life of the
apostle had taught him many lessons, and not the least useful and
important was the art of contentment. A man with his varied
experience is not easily inconvenienced by fluctuating fortunes.
Contentment is gained, not by the abundance of what we possess, but
by discovering how much we can do without. “That which we miscall
poverty is indeed nature,” writes Jeremy Taylor; “and its proportions are
the just measures of a man, and the best instruments of content. But
when we create needs that God or nature never made, we have erected
to ourselves an infinite stock of trouble that can have no period.” Most
desires are first aroused by comparison with others. Sempronius
complained of want of clothes and was much troubled for a new suit,
being ashamed to appear in the theatre with his gown a little
threadbare; but when he got it, and gave his old clothes to Codrus, the
poor man was ravished with joy and went and gave God thanks for his
new purchase; and Codrus was made richly fine and cheerfully warm
by that which Sempronius was ashamed to wear; and yet their natural
needs were both alike.
2. A contentment inspired by Divine strength.—“I can do all things
through Christ which strengtheneth me” (ver. 13). The apostle’s
contentment was not self-sufficiency, but self-sufficingness; and this
was acquired, not only by the experiences of life, but the help of Divine
grace. He could conceive no circumstances in which that grace was not
sufficient. His contented mind he regarded as a gift of God. “I have
learnt from Thee, O God,” writes Augustine, “to distinguish between
the gift and the fruit. The gift is the thing itself, which is given by one
who supplies what is needed, as money or raiment; but the fruit is the
good and well-ordered will of the giver. It is a gift to receive a prophet
and to give a cup of cold water; but it is fruit to do those acts in the
name of a prophet and in the name of a disciple. The raven brought a
gift to Elias when it brought him bread and flesh, but the widow fruit,
because she fed him as a man of God.”
III. Gratefully commends the generosity of those who alleviate
his extremity.—“Notwithstanding ye have well done, that ye did
communicate with my affliction” (ver. 14). Though the apostle had
learned contentment in every situation, and his mind could
accommodate itself to every change of circumstances; though he had
fresh and inexhaustible sources of consolation within himself, and had
been so disciplined as to acquire the mastery over his external
condition and to achieve anything in Christ; yet he felt thankful for the
sympathy of the Philippian Church, and praised them for it. His
humanity was not absorbed in his apostleship, and his heart, though
self-sufficed, was deeply moved by such tokens of affection. Though he
was contented, he yet felt there was affliction—loss of liberty, jealous
surveillance, inability to fulfil the great end of his apostolic mission.
This sympathy on the part of the Philippians with the suffering
representative of Christ and His cause is the very trait of character
which the Judge selects for eulogy at last (Matt. xxv. 35) (Eadie).
IV. Had a Divine source.—“But I rejoiced in the Lord greatly” (ver.
10). He regarded the gift as coming from the Lord, and his joy in its
reception was from the same source. He rejoiced the more in this
practical evidence of the love and gratitude of his converts. Every
kindness shown to us by others when it is recognised as coming from
God, will augment our joy in Him.
Lessons.—1. God does not forget His servants in distress. 2. A
contented spirit is a fruit of Divine grace. 3. It is a joy to be remembered
by those we love.

GERM NOTES ON THE VERSES.


Ver. 10. Practical Christian Benevolence—

I. Is quick to see the needs of God’s servants and of the cause


in which they faithfully labour.
II. Eagerly watches every opportunity for supplying those
needs.
III. Is a matter of exalted joy to those who fully appreciate both
the supply and the motive that prompted it.

Vers. 11, 12. Tendency of Christian Principles to produce True


Contentment.
I. Christianity takes away the natural causes of discontent.—
1. Pride. 2. Self-preference. 3. Covetousness.
II. Christianity furnishes powerful motives for the exercise of a
contented mind.—1. The disciples of Christ are under the strongest
obligations to walk in the footsteps of their Divine Master. 2. True
Christians are firmly convinced that their lot is chosen for them by their
blessed Lord and Master. 3. It is chosen for them in infinite love and
mercy to their souls.—E. Cooper.

Ver. 11. Contentment.


I. That a man be content with his own estate without coveting
that which is another’s.
II. That a man be content with his present estate.—1. Because that
only is properly his own. 2. All looking beyond that disquiets the mind.
3. The present is ever best.
III. That a man be content with any estate.
IV. The art of contentment.—1. Is not learned from nature. 2. Or
outward things. 3. But is taught us by God’s Spirit. 4. By His promises.
5. By the rod of discipline. 6. Proficiency in contentment gained—(1) By
despising unjust gain. (2) By moderating worldly desires and care.
(3) By carefully using and charitably dispensing what we have. (4) By
bearing want and loss with patience.—R. Sanderson.

Christian Contentment.
I. What it is.—1. That our desires of worldly good are low and
moderate. 2. That in all our views of bettering our worldly condition we
indulge not immoderate cares. 3. That whatever our present condition
be, we cheerfully submit to the providence of God in it. 4. That we are so
easy with our own lot as not to envy others who may be in more
prosperous circumstances. 5. That we will not use any unlawful means
to better our present condition. 6. That we make the best of our
condition whatever it be.
II. How it may be learned.—1. Christianity sets in view the most solid
principles of contentment and the strongest motives to it. 2. Furnishes
us with the brightest patterns of contentment to enforce its precepts
and prevent our despair of attaining it.
Lessons.—1. The present state should be considered as a state of
learning. 2. More depends on our spirits than upon our outward
condition in order to contentment. 3. Labour to have our minds so
formed that they may be content and tolerably easy in any state of life.

Ver. 13. The Source of the Christian’s Power.


I. The extent of a Christian’s ability.—1. He is able to discharge every
duty. 2. He is able to endure every trial. 3. He is able to brave every
suffering. 4. He is able to overcome every temptation.
II. The source of the Christian’s ability.—1. Christ strengthens us by
His teachings. 2. Christ strengthens us by His example. 3. Christ
strengthens us by the moral influence of His death as a sacrifice for our
sin. 4. Christ strengthens us by uniting us to Himself, and bestowing on
us, in answer to the prayer of faith, the influences of the Holy Spirit.
Christ is the fountain of spiritual strength.—G. Brooks.

MAIN HOMILETICS OF THE PARAGRAPH.—Verses 15–19.


A Generous Church—
I. Spontaneously contributing to the earliest efforts in the
propagation of the Gospel.—1. Its generosity conspicuous by its
solitary example. “No Church communicated with me as concerning
giving and receiving, but ye only” (ver. 15). In the account between us,
the giving was on your part, the receiving on mine. The Philippians had
followed Paul with their bounty when he left Macedonia and came to
Corinth. We are not to wait for others in a good work, saying, “I will do
when others do it.” We must go forward though alone (Fausset). Their
liberality followed him on distant missionary tours, and when no
longer in their own province. One single example of generosity is an
inspiration and a hint to others. Any Church will wither into narrowing
dimensions when it confines its benefactions to itself.
2. Its generosity was repeated.—“For even in Thessalonica ye sent once
and again unto my necessity” (ver. 16). Even in Thessalonica, still in
their own province and not far from Philippi, they more than once
contributed to his help, and thus rendered him less dependent on
those among whom he was breaking new ground. Help in time of need
is a pleasant memory; and the apostle delights in reminding the
Philippians of their timely and thoughtful generosity. Repeated
kindnesses should increase our gratitude.
II. The gifts of a generous Church are appreciated as indicating
growth in practical religion.—“Not because I desire a gift; but I
desire fruit that may abound to your account” (ver. 17). It is not the gift
he covets, but that rich spiritual blessing which the gift secures to its
donors. The apostle wished them to reap the growing spiritual interest
of their generous expenditure. Not for his own sake but theirs does he
desire the gift. He knew that the state of mind which devised and
contributed such a gift was blessed in itself, that it must attract Divine
blessing, for it indicated the depth and amount of spiritual good which
the apostle had done to them, and for which they thus expressed their
gratitude; and it showed their sympathy with the cause of Christ, when
they had sought to enable their spiritual founder in former days to give
his whole time, without distraction or physical exhaustion, to the work
of his apostleship. This was a spiritual condition which could not but
meet with the Divine approbation and secure the Divine reward
(Eadie).
III. The gifts of a generous Church are accepted as a sacrifice well
pleasing to God.—“Having received of Epaphroditus the things which
were sent from you, an odour of a sweet smell, a sacrifice acceptable,
well-pleasing to God” (ver. 18). It was a gift in which God delighted,
fragrant as the sweet-smelling incense which burned in the censer. It
was felt that God is supreme Benefactor and that all possessions are
His gracious gift, that these have an end beyond the mere personal
enjoyment of them, that they may and ought to be employed in God’s
service, and that the spirit of such employment is the entire dedication
of these to Him. The money, while contributed to the apostle, was
offered to God. They discharged a spiritual function in doing a secular
act—“the altar sanctified the gift” (Ibid.). Giving to the cause of Christ
is worship, acceptable and well-pleasing to God. It belongs to the same
class of acts as the presentation of sacrifices under the old economy,
which was the central act of worship. For the proper use of no talent is
self-denial more needed than for that of money.
IV. The gifts of a generous Church will be recompensed with
abundant spiritual blessing.—“But my God shall supply all your
need according to His riches in glory by Christ Jesus” (ver. 19). The
money we give to God’s cause is well invested and will yield a rich
return: spiritual blessing in return for material gifts; this is beyond the
power of arithmetic to compute. This was no rash and unwarrantable
promise on the part of Paul. He knew something of the riches of the
Divine generosity, and was justified in assuring his kind benefactors of
God’s perfect supply of every want of body and soul, bestowed not
grudgingly but with royal beneficence.
Lessons.—1. Gratitude for blessings received should prompt generosity.
2. Money is never more wisely employed than in forwarding the cause of
God. 3. Our gifts to God are handsomely rewarded.
GERM NOTES ON THE VERSES.
Vers. 15, 16. Christian Generosity—

I. Indicates a genuine interest in the work of God and love for


its ministers.
II. Is especially valuable in prosecuting pioneer mission work.
III. Should not be conspicuous by one solitary example, but be
continuous and commensurate with the pressing needs of
the work of God.

Vers. 17, 18. Liberality a Fruit of the Christian Life.

I. It is not a gift, but the discharge of a just claim.


II. Paul did not desire a gift only to benefit himself, because he
wanted nothing.
III. Liberality is a fruit of the Christian life by discharging a debt
to which we stood engaged.
IV. Liberality is an advantage in the exercise of our patience
before the day of trial come upon us.
V. As God will punish the neglect of this duty, so if we perform
it He will count Himself in debt to us.—Farindon.

Ver. 19. Man’s Need supplied from God’s Riches.


I. Look at man’s necessity.
II. God’s wealth.—Its abundance; its excellence.
III. The supply the apostle anticipates for this necessity out of
this wealth.
Learn.—1. Contentment with our present lot. 2. Confidence for the
future.—C. Bradley.

Our Need and our Supply.


I. Examine the scope of the promise.—There is danger of fanaticism
in the interpretation of truth. God promises to supply our need, but
not to gratify our wishes or whims. Some of us God sees cannot bear
wealth, and so it is not given us; but as our day is so is our strength.
II. The supply.—The supply is not according to our deserts, but
according to the riches of His glory. The resources of the Trinity are
drawn upon. His wealth is unbounded. He is not a cistern, but a
fountain.
III. The Medium.—This supply comes through Christ. We can claim it
in no other name. But God ordains means and puts us under
conditions. As in agriculture, so here, we are to work in harmony with
God’s established methods if we would secure fruits.—Homiletic
Monthly.

MAIN HOMILETICS OF THE PARAGRAPH.—Verses 20–23.


Last Words.
I. A glowing ascription of praise to the Divine Giver of every
blessing.—“Now unto God and our Father be glory for ever and ever.
Amen” (ver. 20). To God, even our Father, the kind and liberal Supplier
of every want to every child, be eternal glory ascribed. The ascription of
praise is the language of spiritual instinct which cannot be repressed.
Let the child realise its relation to the Father who feeds it, clothes it,
and keeps it in life, who enlightens and guides it, pardons and purifies
it, strengthens and upholds it, and all this in Christ Jesus, and it cannot
but in its glowing consciousness cry out, “Now to God and our Father
be glory for ever.” The “Amen” is a fitting conclusion. As the lips shut
themselves, the heart surveys again the facts and the grounds of praise,
and adds, “So be it” (Eadie).
II. Christian salutations.—“Salute every saint in Christ Jesus. All the
saints salute you, chiefly those that are of Cæsar’s household” (vers. 21,
22). Salutations are tokens of personal interest and living fellowship
which should not be lightly esteemed. The apostolic salutations teach
that the Christian religion does not make men unfriendly and
stubborn, but courteous and friendly (Lange). The reference to the
saints in Cæsar’s household may mean either kinsfolk of Nero or
servants in the palace. It is improbable that so many near relatives of
the emperor should have yielded themselves to Christ as to be
designated by this phrase, and it is not likely to suppose that a
combination of these two classes would be grouped under the one
head. In all likelihood the reference is to servants holding more or less
important positions in the imperial household—some, no doubt,
slaves; and it is a suggestive testimony to the unwearied diligence and
influence of the apostle in using every opportunity to make known the
saving grace of the Gospel. To explain to any the reason for his
imprisonment was an occasion for preaching Christ. “O Rome, Rome!”
exclaims Starke, “how greatly hast thou changed! Formerly thou hadst
true saints even in the household of a pagan and tyrannical emperor;
but now hast thou false saints, especially in and around the so-called
chair of Peter and at the court of his supposed successor.”
III. Final benediction.—“The grace of our Lord Jesus Christ be with
you all. Amen” (ver. 23). The oldest MSS. read, “Be with your spirit.” It is
important that the grace of God should be not only around us, but with
us and in us. The benediction is a prayer that the Divine favour may be
conferred upon them, enriching the noblest elements of their nature
with choicest blessings, making them to grow in spiritual wisdom,
beauty, and felicity, that grace may ultimately merge into glory.
Lessons.—1. Praise should be offered to God in all things. 2. The
Christian spirit is full of kindly courtesy. 3. It is a comprehensive prayer
that invokes the blessing of Divine grace.

GERM NOTES ON THE VERSES.


Ver. 20. Eternal Praise should be offered unto God—

I. For mercies enjoyed in the past.


II. For mercies which as our Father He holds for us and bestows
on us in the present.
III. That the glory of His character may become increasingly
conspicuous in His works of creation, providence, and grace.

Vers. 21, 22. Christian Courtesy—

I. Elevates and sanctifies the amenities of social life.


II. Awakens and strengthens mutual sympathy and help in the
Christian life.
III. Should be exercised by Christians of all ranks and
conditions.

Ver. 23. The Grace of our Lord Jesus Christ—

I. Is the sum of all we can need for ourselves or desire for


others.
II. Is a revelation of His own character and of His regard for us.
III. May be sought with the utmost confidence and enjoyed in
ever-increasing measure.
Transcriber’s Notes

Page 299, Introduction, second paragraph, apply RC to “Divine call.”


Page 300, second new paragraph, apply RC to “the Gospel.” “Place and
time” section, second paragraph, change “iv. 32” to “ch. iv. 32” and “i. 13”
to “ch. i. 13.” Fifth paragraph, add sentence-ending period after “later
date.”
Page 301, in the synopsis, change “ii. 19–30” to “ch. ii. 19–30”; add a row
to indicate that no information is presented for chapter ii. verses 12
through 18.
Page 302, notes on chapter i., verse 7, apply RC to “the Gospel.” Verse 10,
add right double quotes after “not causing offence.”
Page 303, notes on verse 12, apply RC to “the Gospel.” Verse 13, remove
right double quotes after “body-guard”; correct “colouel” to “colonel”
and change double quotes to single quotes around it. Verse 14, apply RC
to “the Gospel.” Verse 15, apply RC to “a Gospel.” Verse 19, add right
double quote after “for me.”
Page 305, lesson “Christian Greeting,” point I, change question mark
after “kingdom” to period. Point II, apply RC to “the Gospel.” Point III,
apply RC to “Divine gifts,” “the Divine majesty,” and “the Gospel.”
Page 306, “Commencement” note, point I, apply RC to “the Gospel.”
Point II, apply RC to “the Gospel” and “Divine mercy.” Point IV, apply
RC to “the Gospel.” Lesson “Eulogy,” point I, apply RC to “the Gospel.”
Page 307, same lesson, point II, apply RC to “the Gospel.” Point III,
apply RC to “the Divine.”
Page 308, “Making Request” note, point I, apply RC to “Divine
communications.” “Grounds of Confidence” note, point II, apply RC to
“the Gospel.”
Page 311, lesson “Prayer,” “Definiteness” note, point II, apply RC to
“Divine intelligence.”
The break between pages 311 and 312 is in a unit that style indicates
should not be broken “destination.—That.” The entire unit was moved
to the earlier page.
Page 312, “Fruits” note, point I 1, apply RC to “Divine Being.” “Spiritual
Attainment” note, point IV, apply RC to “all Divine.” “Divine Culture”
note, point IV, apply RC to “the Husbandman.” Lesson “Gospel
Irrepressible,” point I 1, apply RC to “the Gospel” (five times). Point I 2,
apply RC to “the Gospel.”
Page 313, same point, apply RC to “the Gospel” (twice). Point II 1, apply
RC to “the Gospel” (thrice). Point II 2, apply RC to “the Gospel” (thrice).
Page 314, point III, apply RC to “the Gospel” (thrice). Application
(“Lessons”), point 1, apply RC to “the Gospel.” “Development” note,
point III, apply RC to “the Gospel.”
Page 315, “Ministry of Bonds” note, point III, apply RC to “the Gospel.”
“Germ” note, point V, change “afflictions” to “affliction.” “Real” note,
point II 4, apply RC to “the Gospel.”
Page 316, lesson “Noble Attitude,” point II 1, apply RC to “the Gospel.”
Page 317, “Life and Death” note, point I 1 (3), apply RC to “Divine
knowledge.”
Page 319, lesson “Exhortation,” point I 2, apply RC to “the Gospel”
(twice). Point I 3, apply RC to “the Gospel.” Point III, apply RC to “the
Divine” (twice).
Page 320, “Evangelical Consistency,” each of points I, I 1, I 2 (twice), I 3,
I 4, and II 1, apply RC to “Gospel.” “Effects” note, point I 1, apply RC to
“the Gospel.” Point I 2, apply RC to “the Divine.” Point II 1, apply RC to
“the Gospel” and “its Author.”
Page 321, notes on chapter ii., verse 1, change “i. 8” to “ch. i. 8.” Verse 2,
change “i. 4” to “ch. i. 4.” Verse 5, apply RC to “the Gospel.” Verse 6,
apply RC to “the Divinity.”
Page 322, verse 12, apply RC to “the Gospel.” Verse 15, tag
“immaculatum” as Latin and set it in Italic.
Page 323, verse 22, apply RC to “the Gospel.” Verse 29, change “#alue” to
“value.”
Page 324, lesson “Christian Union,” point II, apply RC to “the Gospel.”
Point III 2, add sentence ending period after “(ver. 4).” Point IV, add “Ps.
cxxxiii. 1” reference.
Page 325, “Unity” note, point 2, apply RC to “the Gospel.” “Looking”
note, point III, change “th#” to “the.” Lesson “Humiliation,” point I,
apply RC to “His Divine” and “Divinity.”
Page 326, same lesson, point II, apply RC to “Divinity” (twice).
“Incarnate” note, point I, apply RC to “Divine glory.” Point II, apply RC
to “Divine nature.”
Page 327, “Christian Temper” note, application (“Lessons”), point 2,
apply RC to “the Gospel.” Point 3, apply RC to “God-like.”
Page 328, lesson “Exaltation,” point I, apply RC to “Divine act”; add left
parenthesis before “ver. 9.” Point II, apply RC to “the Divine” (thrice).
Point III, apply RC to “Him”; change quote from “and every tongue
confess” to “and that every tongue should confess” to match KJV; apply
RC to “His Divine majesty.”
Page 329, same lesson, same point, apply RC to “the Gospel.” “Worthy”
note, point 2, apply RC to “His Divine majesty.” Point 3, apply RC to
“Divine honour.”
Page 330, lesson “Salvation,” point II 2, apply RC to “Divine aid.” Point
III, apply RC to “Divine work.” Application (“Lessons”), point 2, apply
RC to “Divine influences.”
Page 331, “Divine and Human” note, point II, apply RC to “Divine.”
“Active Exertion” note, point I, capitalise “Promised Land.” “Co-
operation” note, point I, apply RC to “Divine.”
Page 332, same note, point III, apply RC to “Divine operations.” Lesson
“Lustre,” point I, apply RC to “Divine command.” Point II, apply RC to
“the Gospel” and “the Word.”
Page 333, same lesson, point III 3, apply RC to “the Gospel.”
Page 334, lesson “Projected,” point II, apply RC to “the Gospel.” Point
II 2, apply RC to “Divinity.”
Page 335, same lesson, point II 3, apply RC to “the Gospel” (twice).
Page 337, lesson “Devoted,” point IV, apply RC to “glorious Gospel” and
“the Word.” “Anxieties” note, insert point “2” at the beginning of the
second sentence.
Page 338, notes on chapter iii., verse 1, change “iv. 8” to “ch. iv. 8.” Verse
8, insert “[R.V., ‘soul’ A.V.].”
Page 339, verse 14, change “gaol” to “goal.” Verse 17, apply RC to “Good
Shepherd.”
Page 340, lesson “False and True,” point I, apply RC to “the Gospel”
(twice).
Page 341, same lesson, point II 2, apply RC to “the Divine” and “the
Divinity”; change period after “yourself” to a question mark; apply RC
to “Divinity.”
Page 343, lesson “External,” point III, apply RC to “the Divine.”
“Excellent” note, point I, apply RC to “the Gospel.”
Page 344, same note, renumber second point “VI” to “VII.” First
“Excellency” note, point I, apply RC to “the Divinity.” Lesson “Features,”
point II, apply RC to “Divinely.”
Page 345, same lesson, same point, apply RC to “Divine.” Point III, apply
RC to “Divine power”; insert point “1” before first sentence in Italic;
point III 1, apply RC to “Divine power” and “Divine life.” Point III 2,
apply RC to “Good Shepherd.”
Page 346, “Power” note, point I, apply RC to “Divine mission.” Point II,
apply RC to “Divinity” (twice). Point V, apply RC to “the Gospel.”
“Resurrection” note, point II 4, apply RC to “the Divine.”
Page 347, lesson “Highest,” point I, apply RC to “Divinely” “the Gospel,”
and “the Divine.” Point III, change “Michael Angelo” to “Michelangelo”;
add comma between “he said” and quotation. Point IV, apply RC to
“Divine light.”
Page 348, “Pressing” note, point II 3 (2), change period to question
mark.
Page 349, “Temper” note, point III 3, apply RC to “the Gospel.”
Page 350, lesson “Examples,” point III 3, apply RC to “the Gospel.” Point
IV, apply RC to “the Gospel.”
Page 351, lesson “Citizenship,” point I, add sentence-ending period to
last sentence. Point III 2, apply RC to “Divine power.”
Page 352, same lesson, same point, apply RC to “the Divine” (twice).
Page 353, notes on chapter iv., verse 3, change the double quotes around
“fellow-in-yoke, fellow labourer” to single quotes and add closing
double quotes.
Page 354, notes on verse 8, identify the Cicero quotation as Latin and
set it in Italic. Verse 11, add em-dash after “etc.” Verse 12, add em-dash
after “etc.” and “Ps. xxiii.” reference. Verse 18, add “Matt. xxv. 40”
reference.
Page 355, lesson “Plea,” point II, apply RC to “the Gospel”; change
“strengthened by Him” to “him,” speaking of Paul. Point III, apply RC to
“the Gospel” and “the Word.”
Page 356, lesson “Glimpses,” point I, apply RC to “the Gospel.” Point II,
apply RC to “Gospel.” Point III, apply RC to “the Gospel.”
Page 357, same lesson, point IV 2, apply RC to “the Gospel.” Point IV 3,
apply RC to “the Gospel.”
Page 358, lesson “Joy,” point II, apply RC to “Divine grace” and “the
Gospel.”
Page 359, same lesson, point III, apply RC to “Divine grace.” “Rejoicing”
note, point I 2, add em-dash after “for.” Point II 3 (3), apply RC to “His
Word.”
Page 360, lesson “Equity,” point I, apply RC to “Divine Surety.” Point II,
apply RC to “the Gospel” and “His professed followers.”
Page 361, lesson “Cure,” point I, remove commas from “kill-joy, and”
and “blessings, and.” Point II, remove commas from “mind, but” and
“anxieties, and.”
Page 362, “Remedy” note, point II 3, apply RC to “Divine will.”
Page 363, “Subjects” note, point IV, apply RC to “the Gospel.” Lesson
“Science,” point I, change “livable” to “liveable.”
Page 364, same lesson, point II, apply RC to “the Gospel” (twice). Point
III, apply RC to “Divine blessing.” Application (“Lessons”), point 1,
apply RC to “the Gospel.”
The break between pages 364 and 365 is in the word “upward”:
up|ward.
Page 365, “Paul” note, point II, apply RC to “Divine life.” Point V, apply
RC to “Divine providence.” Lesson “Joy,” point I, apply RC to “the
Gospel”; remove comma from “frequently, but”; apply RC to “the
Gospel” (twice).
Page 366, same lesson, point II 2, apply RC to “Divine strength” and
“Divine grace.” Point IV, apply RC to “Divine source.”
Page 367, same lesson, application (“Lessons”), point 2, apply RC to
“Divine grace.” “Tendency” note, point II 1, apply RC to “Divine Master.”
Page 368, lesson “Generous,” point I, apply RC to “the Gospel.” Point II,
apply RC to “Divine blessing,” “Divine approbation,” and “Divine
reward.”
Page 369, same lesson, point IV, remove comma from “invested, and”;
apply RC to “Divine generosity.” Lesson “Last Words,” point I, apply RC
to “Divine Giver.”
Page 370, same lesson, point II, apply RC to “the Gospel.” Point III,
apply RC to “Divine favour.” Application (“Lessons”), point 3, apply RC
to “Divine grace.”

THE

EPISTLE TO THE COLOSSIANS.

INTRODUCTION.

Colossæ and its people.—In Asia Minor, a few days’ journey to the
east of Ephesus, is a district which for natural beauty, as described by
many travellers, is hardly to be surpassed. At the foot of Mount
Cadmus—now known as Baba Dagh, or “the Father of Mountains”—
near the stream of the Lycus, a tributary of the Mæander, stood the
town of Colossæ. Within a day’s journey stood Hierapolis and
Laodicea, the latter the home of a Church in the later years where a
poor, half-hearted religion was a constant offence to God. Owing to its
political significance, it quite eclipsed Colossæ, as Hierapolis also did,
owing to its natural advantages as a health-resort or watering-place.
Though at one time Colossæ was a flourishing town, where the vast
forces of Xerxes or those of Cyrus could halt, in this country it was only
with difficulty and some uncertainty that its exact site was discovered.
Chronos (so called from the funnel-shaped holes into which the river
drops) is its modern substitute, though from two to three miles south
of the site of Colossæ.
The inhabitants of Colossæ were largely of Phrygian derivation, highly
religious, if dread of the supernatural in every form constitutes
religion, but ready to yield themselves up to the wildest orgies and the
most degradingly sensual types of worship. But there were also many
Jews in the town, as we learn not only from the indications in this
letter, but from other sources. It was not the only occasion in history
when travelled Jews had learnt to blend with their ancestral religion
the philosophical or theosophical opinions of the neighbourhood
where they had settled. The result was an amalgam very hard to
catalogue. The Hellenism of these Phrygian Jews did as little for them
as in later days it did for Heine, the German Jew. So, because its results
were pernicious, the uncompromising opponent of Pharisaic dead
works and herald of one God set himself to make known to the
Colossians the sufficiency of Christian doctrine without admixture of
heathen wisdom (ch. ii. 8, 9) or the administration of Jewish rites (ch.
ii. 11).
Occasion, aim, time, and place of composition.—Epaphras, a
member of the Colossian Church, and to whom the whole
neighbourhood was indebted as the bringer of Gospel tidings, had
given St. Paul an account of the state of the Church to which he
ministered, with intimations of the perils threatening it. This it was
which led the apostle to send Tychicus with this letter. The runaway
slave Onesimus accompanied him, sent back to Philemon his master in
Colossæ by St. Paul.
The aim of the apostle in writing the letter was chiefly to warn the
Colossians against the specious errors of certain teachers who had tried
to unite Christianity with Judaism, and these to theosophical notions.
The results of this blend could only be regarded with a pitiful smile. It
was pernicious, and, with all its semblance of humility, immoral. Its
main offence to the apostle was that it dishonoured his Lord, “who is
the image of the invisible God, the firstborn of all creation.”
Lightfoot thinks this letter, with those to Ephesus and Philemon, was
sent by Tychicus “towards the close of the apostle’s captivity in Rome,
about the year 63.” Meyer, who contends that it was sent, not from
Rome, but from Cæsarea, thinks 60 or 61 was the date. The ancient
tradition was that the letter emanated from a Roman prison, and the
reasons given against this are too slender to set it aside in favour of
Cæsarea.
Style of the epistle.—“The style of the epistle is somewhat laboured.
It lacks the spontaneity, the fire, the passion, the tender emotion which
mark most of St. Paul’s letters. The reason for this is twofold. It is partly
because he is addressing strangers, the members of Churches which he
had not directly founded, and to whom his expressions did not flow
forth from the same full spring of intimate affection. It is still more
because he is refuting errors with which he was not familiar, and which
he had not witnessed in their direct workings. . . . When he was a little
more familiar with the theme (in writing Ephesians) he writes with
more fervency and ease. . . . In the close similarity between these two,
and yet in the strongly marked individuality of each, we have one of the
most indisputable proofs of the genuineness of both. . . . If Colossians
has less of the attractive personal element and the winning pathos of
other letters of St. Paul, it is still living, terse, solid, manly, vigorous;
and brief though it be, it still, as Calvin says, contains the nucleus of
the Gospel” (Farrar).
Outline of the epistle.
Introduction. i. 1, 2, greeting. 3–8, thanksgiving. 9–14, prayer and
supplication with thanksgiving.
i. 15–23. Main theme of the epistle. Christ’s personal
supremacy and the universal efficacy of His
mediatorial work.
24–29. The apostle’s personal explanation of his motive in
addressing them.
ii. 1–7. His interest in the highest welfare of Christians
unknown to him.
8–15. Warning against a philosophy born of earth, able
only to deal externally with outbursts of sin as
contrasted with the complete putting away of it by
Christ’s death and resurrection.
16–23. A protest against the attempt to foist precepts and
prohibitions on those who in Christ have passed
beyond the stage of legalism.
iii. 1–17. The sufficiency, for conduct, of living consistently
with the life hid with Christ in God, which is fatal, as
it grows, to every form and manifestation of the old
and corrupt life.
18–22. Duties of wives (18), husbands (19), children (20),
fathers (21), servants (22).
23–25. Motives, incentives, and deterrents in service.
iv. 1. Duties of masters, and motive of conduct.
2–18. Sundry exhortations, commendations, and
greetings. The latter concludes with the apostle’s
autograph signature, a touching reference to his
“bonds,” and a benediction.

CHAPTER I.

CRITICAL AND EXPLANATORY NOTES.


Ver. 1. Paul, an apostle of Jesus Christ by the will of God.—Here, as
in the Ephesian epistle, St. Paul traces his apostolate to the will of God.
It does not seem as if any reason could be given why in these two
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookgate.com

You might also like