SlideShare a Scribd company logo
A Tale Of Discrete Mathematics A Journey Through
Logic Reasoning Structures And Graph Theory
Joseph Khoury download
https://ebookbell.com/product/a-tale-of-discrete-mathematics-a-
journey-through-logic-reasoning-structures-and-graph-theory-
joseph-khoury-57069494
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
A Tale Of Discrete Mathematics A Journey Through Logic Reasoning
Structures And Graph Theory Joseph Khoury
https://ebookbell.com/product/a-tale-of-discrete-mathematics-a-
journey-through-logic-reasoning-structures-and-graph-theory-joseph-
khoury-56974438
A Tale Of Two Viruses The Parallel Research Trajectories Of Tumor And
Bacterial Viruses Neeraja Sankaran
https://ebookbell.com/product/a-tale-of-two-viruses-the-parallel-
research-trajectories-of-tumor-and-bacterial-viruses-neeraja-
sankaran-46087356
A Tale Of Two Princes Eric Geron
https://ebookbell.com/product/a-tale-of-two-princes-eric-
geron-47562914
A Tale Of Two Princes 1st Edition Eric Geron
https://ebookbell.com/product/a-tale-of-two-princes-1st-edition-eric-
geron-48208528
A Tale Of Two Cities Charles Dickens
https://ebookbell.com/product/a-tale-of-two-cities-charles-
dickens-48506290
A Tale Of Steam Cinders Crea Reitan
https://ebookbell.com/product/a-tale-of-steam-cinders-crea-
reitan-48570140
A Tale Of Two Stories Customary Marriage And Paternity A Discourse
Analysis Of A Scandal In Egypt Originalausgabe Bjrn Bentlage
https://ebookbell.com/product/a-tale-of-two-stories-customary-
marriage-and-paternity-a-discourse-analysis-of-a-scandal-in-egypt-
originalausgabe-bjrn-bentlage-49052068
A Tale Of Two Churches Distinctive Social And Economic Dynamics At
Thessalonica And Corinth Jung
https://ebookbell.com/product/a-tale-of-two-churches-distinctive-
social-and-economic-dynamics-at-thessalonica-and-corinth-jung-49052158
A Tale Of Two Stpas Diverging Paths In The Revival Of Buddhism In
China Albert Welter
https://ebookbell.com/product/a-tale-of-two-stpas-diverging-paths-in-
the-revival-of-buddhism-in-china-albert-welter-50197518
A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury
A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury
A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury
A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury
Published by
World Scientific Publishing Co. Pte. Ltd.
5 Toh Tuck Link, Singapore 596224
USA office: 27 Warren Street, Suite 401-402, Hackensack, NJ 07601
UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE
Library of Congress Cataloging-in-Publication Data
Names: Khoury, Joseph, 1968– author.
Title: A tale of discrete mathematics : a journey through logic, reasoning, structures and
graph theory / Joseph Khoury, University of Ottawa, Canada.
Description: New Jersey : World Scientific, [2024] | Includes index.
Identifiers: LCCN 2023049052 | ISBN 9789811285783 (hardcover) |
ISBN 9789811285790 (ebook for institutions) | ISBN 9789811285806 (ebook for individuals)
Subjects: LCSH: Logic, Symbolic and mathematical--Textbooks. |
Combinatorial analysis--Textbooks. | Set theory--Textbooks. | Algebraic logic--Textbooks.
Classification: LCC QA9 .K435 2024 | DDC 511.3--dc23/eng/20231221
LC record available at https://lccn.loc.gov/2023049052
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library.
Copyright © 2024 by World Scientific Publishing Co. Pte. Ltd.
All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means,
electronic or mechanical, including photocopying, recording or any information storage and retrieval
system now known or to be invented, without written permission from the publisher.
For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance
Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy
is not required from the publisher.
For any available supplementary material, please visit
https://www.worldscientific.com/worldscibooks/10.1142/13663#t=suppl
Desk Editors: Nimal Koliyat/Kwong Lai Fun
Typeset by Stallion Press
Email: enquiries@stallionpress.com
Printed in Singapore
To the one who showed me that true love is beyond discrete
and continuous, it is simply out of this world. To my daughter
Jo-Ann whose presence in my life fills my heart with warmth
and joy every day.
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
Preface
In the English Cambridge dictionary, one can find the following definition
of the word discrete: clearly separate or different in shape or form.
From a mathematical perspective, this definition might not tell much
about the nature of discrete mathematics, but it hints at the fact that
the subject is an umbrella of many areas of mathematics that share
the property of being discrete as opposed to continuous. Understanding the
difference between these two concepts is key to understanding what discrete
mathematics is and the scope of the topics that fall under its umbrella. A
well-known example to explain the difference between these two notions is
the comparison between an analog clock (i.e., a clock with three hands) and
a digital one. If one has a super magnifier, then one can see that there are
always two positions occupied by the seconds hand of an analogue clock
so close together that we cannot distinguish them with the naked eye. We
say that the seconds hand moves in a continuous mode (at least in theory).
The digital clock, on the other hand, displays numerals which are limited
in values and distinct from one another. In discrete mathematics, variables
(like the numerals on digital clocks) cannot get arbitrarily small as they are
just multiples of a certain unit. For example, integers are just multiples of
the digit 1. We cannot choose an integer n arbitrary close to 0 for instance.
As a consequence, notions like the instantaneous rate of change and limits
of functions and sequences can only be defined in continuous mathematics.
Topics covered in a typical discrete mathematics course are certainly not
new additions to mathematics. Some of them go back deep in history to the
time where humans first felt the need to count, to calculate areas and to keep
track of time. However, the recent advances in technology and computer
science have resulted in increased interest in these topics. The basic fact that
vii
viii A Tale of Discrete Mathematics
information is stored and analyzed by machines in a discrete manner made
discrete mathematics a key to any advancement in computer science. Topics
covered by a modern entry level discrete mathematics course include, but
not limited to: propositional and predicate logic, proof techniques, recursion
and induction, integers and their properties, set theory, functions, relations,
combinatorics, algorithms and theory of computation, discrete probability,
graph theory and discrete structures. While the book covers a wide range
of these topics, it does not touch on probability theory or the classical
algebraic structures like groups, rings, fields. We do however explore discrete
structures like Boolean algebras and lattices.
The work on this book has been developed over many years of teaching
first and second year discrete mathematics courses. During these years, I
was greatly inspired by my students. Their reaction to various topics, their
questions, comments and concerns allowed me to better understand how
some concepts are perceived and which ones cause most difficulties.
0.1 Organization of the book
The book is organized in 11 chapters and one appendix. The content of
each chapter is given briefly in what follows.
• Chapter 1. Propositional Logic: The Foundation of
Mathematical Reasoning. Logic is at the heart of mathematical
reasoning and proof techniques. Interest in the topic has seen a
considerable increase with the digital revolution over the second
half of the twentieth century. Chapter 1 deals with basic logical
propositions, i.e., statements that are either true of false, and
the logic connectives that tie them together. Although weaker
than predicate logic in expressing and interpreting mathematical
results, propositional logic is still a powerful tool in mathematics
and computer science. The chapter covers topics like truth tables,
truth trees, tautologies, contradictions, validity of logic arguments,
normal forms (conjunctive and disjunctive) and others. Considering
its binary nature, propositional logic offers a perfect setting to
mathematically represent and design logic gates in electronic
circuits.
Preface ix
• Chapter 2. Set Theory and Introduction to Boolean
Algebra: A Naı̈ve Approach. Sets are building blocks of every
mathematical theory. Set theory is a vast area of mathematics
and many authors like to include functions and relations under
its umbrella. The book covers these topics in different chapters
to allow more flexibility. In this chapter, a practical approach
to set theory known in the literature as the naı̈ve set theory is
adopted. My intention is to present the version of set theory
relevant to other topics in the book and to stay away from the
formal axiomatic treatment of the subject. The chapter explores
the notion of recursive definition of sets, a key concept in computer
science. Boolean algebra structure is introduced in Section 6. Sum
of products, product of sums and Karnaugh maps are used to
minimize Boolean expressions. This is particularly important in
designing efficient electronic circuits.
• Chapter 3. Prove It: Mathematical Proof Techniques. This
chapter addresses the question of writing a sound mathematical
proof. Multiple proof strategies are explored, each followed with
numerous examples to enhance comprehension. Proof techniques
studied include: direct proof, indirect proof, proof of an ”if and
only if” statements, proof by contradiction and proof by separation
of cases. The chapter ends with the important technique of
the proof by induction. Simple, strong and structural forms of
induction. While simple and strong forms of induction are standard
in any textbook of discrete mathematics, structural induction is
not commonly covered and it is used to prove properties about
recursively defined objects (sets, functions, . . .).
• Chapter 4. Introduction to Predicate Logic: One Step
Further. Proportional logic is a good first step to understand
and analyse statements over the simple domain {True, False}. But
it fails to deal with mathematical statements with truth values
depending on one or more variables in a certain domain. The
purpose of this chapter is to extend the language of propositional
logic to capture the meaning and to analyse statements containing
terms like for all and there exists. The notion of quantifiers,
scope, translation to and from natural language, reasoning with
quantifiers and arguments of predicate logic are explored.
• Chapter 5. Functions: Back to the Basics. Functions are
particular type of binary relations, but this chapter introduces
x A Tale of Discrete Mathematics
them as rules of correspondence between sets satisfying certain
conditions. The notion of a well-defined function is introduced.
Binary operations on sets and their properties are studied from the
point of view of functions. Like sets, we consider functions defined
recursively. Injective, surjective and bijective functions and their
properties are studied. Invertible functions and their relation with
bijective functions are also considered at the end of the chapter.
• Chapter 6. Elementary Number Theory: The Basics,
Primes, Congruences and A Bit More. As discrete
mathematics is concerned with discrete numeral system, it is
only natural that integers are studied in any textbook on the
subject. The chapter starts with a formal axiomatic definition
of the integers. From this definition, some immediate properties
of the integers are established as well as the introduction of the
standard order in Z. The chapter proceeds to explore the notions
of divisibility and prime numbers. The Fundamental Theorem
of Arithmetic, the gcd, the lcm and the Euclidean algorithm
are studied. The chapter also touches on the notion of linear
congruence, the famous Chinese remainder theorem and the famous
Euler phi function. As an application, the chapter ends with the
RSA algorithm for ciphering messages.
• Chapter 7. Relations. This chapter is an extension of Chapters
2 and 5 on set theory and functions. Relations occur very often
in mathematical theories as a mean to compare elements. The
emphasis in the chapter is on binary relations. Representations of
relations using Boolean matrices and direct graphs are introduced
and methods to create new relations from old ones are explained.
The chapter revisits the notion of functions defined in Chapter
5 and a more formal definition of functions is given in terms
of relations. Important properties of relations are introduced
(reflexivity, symmetry, transitivity, . . .) as well as their closures. In
particular, Warshall’s algorithm to compute the transitive closure
is given. Two important classes of relations are studied in this
chapter: the equivalence relation and the partial order relation.
The well-ordering principal is introduced in a general setting. The
chapter ends with the notion of topological sorting.
• Chapter 8. Basic Combinatorics: The Art of Counting
Without Counting. Combinatorics is the branch of discrete
mathematics that is concerned with arrangements of objects and
counting outcomes. This is a vast area of mathematics and
Preface xi
the goal of the chapter is to just give an introduction of the
topic and its main results. The chapter starts with the basic
counting principles: the sum rule, the product rule and the
principle of inclusion–exclusion. The pigeonhole principle is then
introduced and first examples are given. The chapter moves on
to explore permutations and combinations of a finite number of
objects, with and without repetitions. The number of surjective
functions between two finite sets and derangements of objects are
counted. The chapter also explores the binomial theorem and some
applications.
• Chapter 9. Basics of Graph Theory. This chapter starts phase
2 of this book. Started as a simple puzzle in the 18th century,
graph theory has developed through the years to be an important
field of study with a wide range of applications in mathematics,
chemistry, computer science and engendering. Basic definitions are
given including a list of basic simple graphs, the adjacency and
incidence matrices associated with a graph. The first result about
graph theory, the handshaking lemma, is given in Section 3. The
section also looks at the question of determining if a list of natural
numbers is graphical. The Havel–Hakimi algorithm to answer this
question is given with several examples on how to apply it. Many
important and interesting topics of graph theory are covered in
the remainder of the chapter: subgraph, line graph, complement,
Hamiltonian closure, connectivity, bipartite graphs, matching in
bipartite graphs, Hall’s marriage theorem, isomorphism of graphs.
The chapter ends with the notion of a flow in a network, and
the Ford–Fulkerson algorithm to solve the maximum flow problem.
There is a lot of flexibility in this chapter. Sections 9.4.4, 9.5.2, 9.7,
9.8 and 9.10 can be treated as optional but instructors are strongly
encouraged to cover some of them.
• Chapter 10. More on Graph Theory. The chapter continues
to investigate important results and applications of graph theory.
Planar graphs and Kuratowski’s theorem (without proof) are given
in the first section. Eulerian and Hamiltonian graphs and their
properties are studied in Sections 2 and 3. The chapter finishes with
the topic of graph colouring and its applications. Graph colouring
ties graph theory with algebra by associating a polynomial, called
chromatic polynomial, to every graph. Coefficients of the chromatic
polynomial gives many interesting features of the graph.
xii A Tale of Discrete Mathematics
• Chapter 11. Trees. Trees are special type of graphs which
are very useful in computer science, chemistry and in modeling
some real life problems. After establishing first results about trees
(including characterizing a tree), we investigate the topic of tree
traversal and its applications. Modeling with trees, prefix, infix and
postfix notations and coding using trees are presented. Depth-First
and Breadth-First searches are studied and the question of minimal
spanning tree is tackled.
0.2 Key features of the book
There are many excellent textbooks on discrete mathematics out there, so
why another one on the subject? If I have to cite couple of reasons, I would
say accessibility and the breadth-depth approach. But there are certainly
other features that set this textbook apart from others on the subject.
• Accessibility. Many students taking an introductory discrete
math class have little mathematics in their final high school years.
Others are returning to university after years of being in the
work force and away from academia. Unlike calculus and linear
algebra, topics covered in a discrete math class are not universal
and can vary significantly between educational institutions, and
even between different programs at the same institution. After
many years of teaching logic and discrete mathematics courses,
I came to realize that most textbooks on the subject fall into two
categories. In the first category, the authors assume that the reader
has acquired a certain level of mathematical maturity which results
in a high level of abstraction and complexity in the textbook. In
the second, the authors stick to the basics and students with higher
mathematical maturity find themselves almost repeating what they
already learned in high school. My intent in writing this book is
to present the topics in a way that is accessible to students with
modest mathematical maturity, but also to give all students the
chance to advance gradually in acquiring a wide range of advanced
topics.
• Breadth and depth. A key feature of this textbook is the
scope of topics it covers. The following topics are explored in
the book but are not standard in an introductory textbook in
discrete mathematics: the method of truth tree (Chapter 1), sum
Preface xiii
of products, product of sums and Karnaugh maps (Chapter 2),
recursive definitions of sets and functions and structural induction
(chapters 3 and 5), the Euler phi function and the RSA algorithm
(Chapter 6), closures of relations, Warshall’s algorithm and
topological sorting (Chapter 7), the Havel–Hakimi algorithm,
Hamiltonian closure, matching in bipartite graphs, the Hall’s
marriage theorem, flow in a network, the Ford–Fulkerson algorithm
(Chapter 9), chromatic polynomial (Chapter 10) and ruskal’s and
Prim’s algorithms (Chapter 11). The fact is each chapter can be
explored in a full textbook on its own. Efforts are made to ensure
that the treatment of each topic goes as deep as possible to capture
the most important features of the topic in the most direct and
concise way possible.
• A straightforward language. The textbook is written for
students from various mathematical and cultural backgrounds.
Mathematical concepts can be challenging enough, and the last
thing students need is a complex language to add to the challenge.
Definitions are given using simple straightforward language,
theorems are stated in a clear and concise matter with little room
for misinterpretation. Proofs include as much details as possible to
facilitate comprehension.
• Focus on proofs. After every semester teaching a discrete
mathematics class, I survey students on a list of the most
challenging components of the class. By far, mathematical proof
tops the list every semester. Many students have difficulties
reading and understanding a mathematical proof, let alone writing
one. Mathematical proofs require a lot of reading, patience and
exercise. An important feature of this book is the combination
between sound mathematics and interesting applications. By sound
mathematics, I mean precise results with their complete proofs.
This combination is precisely what students should get from a
discrete mathematics course. In this sense, the textbook is suitable
for math majors as well computer science and engineering students.
With the exception of very few theorems, the proof of every
result is presented with all necessary details. Students are strongly
encouraged to read every proof carefully and to try hard to rewrite
it on their own. In every section, a certain number of exercises is
dedicated to proofs of mathematical results. I always recommend
xiv A Tale of Discrete Mathematics
to my students to start a proof by writing the first and the last
sentence of the proof and then gradually fill it the lines in between.
• Early introduction to the language of mathematics. The
book introduces logic and mathematical reasoning at an early
stage. A clear and thorough understanding of mathematical logic
is key to fully grasp any mathematical concept. My experience
teaching some transitional courses like real analysis or group
theory shows that students’ difficulties are not so much in grasping
the theoretical concepts, but rather in properly expressing their
reasoning and understanding of statements. A typical example is
the confusion between the hypothesis and the conclusion in an
implication.
• A wealth of examples. The book contains hundreds of fully
worked examples, carefully written to eliminate ambiguities and to
cover as many scenarios as possible. Understanding these examples
is key to fully grasp definitions and results. Many of the worked
examples are also mirrored in the exercises to allow students to
have a firm grasp on new concepts.
• Extensive set of exercises. Every section of the book ends with
a set of suggested exercises designed to offer students a variety of
practice problems on the topics covered in the section. Students
are strongly encouraged to try as many exercises as possible. Some
exercises have similarities with worked out examples in the section,
others are designed to offer a bit more challenge to students.
Exercises are also used in some occasions to explore some concepts
not covered in the section in some informal fashion.
• Solutions to selected exercises. To provide some guidance
to students, Appendix A contains full solutions to selected set
of exercises (indicated by ?) from each section. These selected
exercises are carefully chosen to give students enough material to
practice the theory in the section. Students are strongly encouraged
to try their absolute best to work these exercises before they consult
the solutions. It is only by grappling with these problems that
students will gain confidence and experience in the topic.
• Flexibility. Flexibility is desirable in any textbook, but difficult to
achieve in general. This is even more challenging in a textbook on
a subject of a cumulative nature like mathematics. The diversity
of topics covered in the textbook offers instructors and students
a comfortable level of flexibility in choosing the order in which
Preface xv
topics are covered. For example, one can choose to completely skip
the chapter on predicate logic and still have good grasp on the
remaining topics of the book. Another example is the chapter on
functions that can be approached from the point of view of Chapter
7 on relations. Even within the same chapter, some sections can
be treated independently of other sections. In addition, some
sections can be treated as optional and left to the discretion of
the instructor.
• Introduction to algorithms. The book contains several
important algorithms in various topics. The combination of
abstraction and practical algorithms enriches the book and widens
the range of students who could benefit from it. Although the book
does not include a chapter on writing and verifying algorithms, it
lays down the mathematical foundation that fuels these algorithms.
We explore, among others, Warshall’s algorithm to compute the
transitive closure of a binary relation, the Euclidean algorithm
to compute the gcd of two integers and express it as a linear
combination of the integers, Havel–Hakimi algorithm to test if
a sequence of natural numbers is graphical, the Ford–Fulkerson
algorithm to find the maximum flow in a network, Depth-first and
Breadth-first search algorithms to traverse a graph, Kruskal’s and
Prim’s algorithms to generate a minimal spanning tree.
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
About the Author
Joseph Khoury received his Ph.D. in Mathematics
in 2001 from the University of Ottawa, Canada.
He is currently an instructor and the director
of the Math Help Center at the University of
Ottawa. Dr. Khoury is a co-editor and a co-author
of previously published World Scientific books,
Jim Totten’s Problems of the Week and The
Mathematics that Power Our World, How Does It
Work?
xvii
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
This page intentionally left blank
Contents
Preface vii
About the Author xvii
1. Propositional Logic: The Foundation of Mathematical Reasoning 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Basic terminologies and logic connectives . . . . . . . . . 2
1.2.1 Logic connectives . . . . . . . . . . . . . . . . . . 3
1.2.2 Truth table . . . . . . . . . . . . . . . . . . . . . . 4
1.2.3 Operations on binary strings . . . . . . . . . . . . 11
1.2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Propositional logic: Formal point of view . . . . . . . . . . 15
1.3.1 Valuations and truth tables of logic formulas . . . 16
1.3.2 Special types of logic formulas and coherency . . . 18
1.3.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 Logic formulas in natural language: Translation between
English and propositional logic . . . . . . . . . . . . . . . 21
1.4.1 Logic arguments . . . . . . . . . . . . . . . . . . . 23
1.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 24
1.5 The island of knights and knaves . . . . . . . . . . . . . . 26
1.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 29
1.6 Logical equivalence . . . . . . . . . . . . . . . . . . . . . . 30
1.6.1 Using a truth table to write an expression for a
logic formula . . . . . . . . . . . . . . . . . . . . . 34
1.6.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 35
1.7 The method of truth trees . . . . . . . . . . . . . . . . . . 38
1.7.1 Description of the method . . . . . . . . . . . . . 40
xix
xx A Tale of Discrete Mathematics
1.7.2 Tautologies and the method of truth tree . . . . . 43
1.7.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 44
1.8 Validity of logic arguments . . . . . . . . . . . . . . . . . 45
1.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 50
1.9 Formal proof of validity of an argument: Rules of inference
for propositional logic . . . . . . . . . . . . . . . . . . . . 53
1.9.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 56
1.10 Normal forms . . . . . . . . . . . . . . . . . . . . . . . . . 57
1.10.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 63
2. Set Theory and Introduction to Boolean Algebra: A Naı̈ve Approach 65
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.2 Basic definitions and terminology . . . . . . . . . . . . . . 66
2.2.1 Describing sets . . . . . . . . . . . . . . . . . . . . 67
2.2.2 Set equality: Finite and infinite sets . . . . . . . . 70
2.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 71
2.3 Subsets and power set . . . . . . . . . . . . . . . . . . . . 75
2.3.1 Intervals in R . . . . . . . . . . . . . . . . . . . . 78
2.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 80
2.4 Operations on sets . . . . . . . . . . . . . . . . . . . . . . 82
2.4.1 Intersection . . . . . . . . . . . . . . . . . . . . . . 83
2.4.2 Union . . . . . . . . . . . . . . . . . . . . . . . . . 85
2.4.3 Difference, complement and symmetric difference 87
2.4.4 Cartesian product . . . . . . . . . . . . . . . . . . 90
2.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 92
2.5 Partition of a set . . . . . . . . . . . . . . . . . . . . . . . 97
2.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 99
2.6 Introduction to Boolean algebra . . . . . . . . . . . . . . . 100
2.6.1 Boolean expressions . . . . . . . . . . . . . . . . . 105
2.6.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 107
2.7 Sum of products (SOP), product of sums (POS), and
Karnaugh maps . . . . . . . . . . . . . . . . . . . . . . . . 109
2.7.1 Sum of products (SOP) . . . . . . . . . . . . . . . 109
2.7.2 Product of sums (POS) . . . . . . . . . . . . . . . 111
2.7.3 Karnaugh maps . . . . . . . . . . . . . . . . . . . 112
2.7.4 Two-variable Karnaugh maps . . . . . . . . . . . 113
2.7.5 Three-variable Karnaugh maps . . . . . . . . . . . 114
2.7.6 Four-variable Karnaugh maps . . . . . . . . . . . 115
2.7.7 Using Karnaugh to minimize a Boolean expression 116
Contents xxi
2.7.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . 119
2.8 Logic gates . . . . . . . . . . . . . . . . . . . . . . . . . . 121
2.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 124
3. Prove It: Mathematical Proof Techniques 127
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 127
3.2 Proving an implication and a biconditional . . . . . . . . 128
3.2.1 Direct proof . . . . . . . . . . . . . . . . . . . . . 128
3.2.2 Indirect proof . . . . . . . . . . . . . . . . . . . . 130
3.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 132
3.3 Proving a biconditional . . . . . . . . . . . . . . . . . . . 133
3.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 134
3.4 Proof by contradiction . . . . . . . . . . . . . . . . . . . . 134
3.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 136
3.5 Proof by separation of cases . . . . . . . . . . . . . . . . . 138
3.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 140
3.6 Proof by induction . . . . . . . . . . . . . . . . . . . . . . 142
3.6.1 The principle of weak induction . . . . . . . . . . 142
3.6.2 The principle of strong induction . . . . . . . . . 147
3.6.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 152
3.7 Recursive definition of sets and the principle of structural
induction . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
3.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 162
4. Introduction to Predicate Logic: One Step Further 167
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.2 The basics of predicate logic . . . . . . . . . . . . . . . . . 168
4.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 172
4.3 Quantifiers: The language of predicate logic . . . . . . . . 173
4.3.1 Negation of a quantified statement . . . . . . . . . 176
4.3.2 Multiple quantifiers . . . . . . . . . . . . . . . . . 177
4.3.3 Syntax of the predicate logic language . . . . . . . 179
4.3.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 181
4.4 Translation from and to predicate logic . . . . . . . . . . 184
4.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 186
4.5 Scope of a quantifier, bound and free variables . . . . . . 190
4.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 194
4.6 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . 195
xxii A Tale of Discrete Mathematics
4.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 197
4.7 Reasoning with quantifiers: Arguments of
predicate logic . . . . . . . . . . . . . . . . . . . . . . . . 199
4.7.1 The universal instantiation (UI) . . . . . . . . . . 199
4.7.2 The universal generalization (UG) . . . . . . . . . 199
4.7.3 The existential instantiation (EI) . . . . . . . . . 201
4.7.4 The existential generalization (EG) . . . . . . . . 201
4.7.5 Arguments of predicate logic . . . . . . . . . . . . 202
4.7.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . 204
5. Functions: Back to the Basics 207
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 207
5.2 Basic definitions and terminology . . . . . . . . . . . . . . 208
5.2.1 Combining real-valued functions . . . . . . . . . . 212
5.2.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 214
5.3 Some special functions . . . . . . . . . . . . . . . . . . . . 218
5.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 222
5.4 Binary operations . . . . . . . . . . . . . . . . . . . . . . . 223
5.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 226
5.5 Functions defined recursively . . . . . . . . . . . . . . . . 229
5.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 233
5.6 Injective, surjective and bijective functions . . . . . . . . . 235
5.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 239
5.7 Composition of functions and invertible functions . . . . . 242
5.7.1 Invertible functions . . . . . . . . . . . . . . . . . 246
5.7.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 248
6. Elementary Number Theory 253
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 253
6.2 Integers defined axiomatically . . . . . . . . . . . . . . . . 253
6.2.1 Order on the integers . . . . . . . . . . . . . . . . 256
6.2.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 258
6.3 Division in Z: Prime numbers . . . . . . . . . . . . . . . . 259
6.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 263
6.4 The division algorithm . . . . . . . . . . . . . . . . . . . . 266
6.4.1 Representing integers in different bases . . . . . . 267
6.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 269
Contents xxiii
6.5 The Fundamental Theorem of Arithmetic, the gcd,
the lcm and the Euclidean algorithm . . . . . . . . . . . . 271
6.5.1 The least common multiple . . . . . . . . . . . . . 277
6.5.2 Finding the gcd and the lcm . . . . . . . . . . . . 279
6.5.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 283
6.6 Introduction to modular arithmetic . . . . . . . . . . . . . 285
6.6.1 Linear congruence equations . . . . . . . . . . . . 287
6.6.2 The Chinese remainder theorem . . . . . . . . . . 291
6.6.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 293
6.7 The Euler phi function . . . . . . . . . . . . . . . . . . . . 294
6.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 302
6.8 Caesar cipher: The RSA algorithm . . . . . . . . . . . . . 303
6.8.1 The RSA scheme . . . . . . . . . . . . . . . . . . 305
6.8.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 307
7. Binary Relations 309
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 309
7.2 Basic definitions and terminology . . . . . . . . . . . . . . 309
7.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 312
7.3 Representations of binary relations: Boolean matrices . . 315
7.3.1 Properties of Boolean matrices . . . . . . . . . . . 317
7.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 321
7.4 Functions as relations . . . . . . . . . . . . . . . . . . . . 323
7.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 324
7.5 New relations from old . . . . . . . . . . . . . . . . . . . . 325
7.5.1 Composition of relations . . . . . . . . . . . . . . 329
7.5.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 333
7.6 Paths and connectivity . . . . . . . . . . . . . . . . . . . . 339
7.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 345
7.7 Properties of binary relations . . . . . . . . . . . . . . . . 347
7.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 351
7.8 Closures of a relation . . . . . . . . . . . . . . . . . . . . . 354
7.8.1 Warshall’s algorithm . . . . . . . . . . . . . . . . 357
7.8.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 360
7.9 Equivalence relations . . . . . . . . . . . . . . . . . . . . . 362
7.9.1 Equivalence classes and partition of a set . . . . . 366
7.9.2 Well-defined operations on the quotient set . . . . 370
7.9.3 Equivalence relation generated by an arbitrary
relation . . . . . . . . . . . . . . . . . . . . . . . . 372
xxiv A Tale of Discrete Mathematics
7.9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 373
7.10 Order relation . . . . . . . . . . . . . . . . . . . . . . . . . 380
7.10.1 Digraph of a partial order: The Hasse diagram . . 384
7.10.2 Total order . . . . . . . . . . . . . . . . . . . . . . 386
7.10.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 387
7.11 Special elements in a poset, lattices, well-ordering principle
and topological sorting . . . . . . . . . . . . . . . . . . . . 389
7.11.1 Lattices . . . . . . . . . . . . . . . . . . . . . . . . 393
7.11.2 The well-ordering principle and the well-ordered
sets . . . . . . . . . . . . . . . . . . . . . . . . . . 396
7.11.3 Application: The topological sorting . . . . . . . . 397
7.11.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 399
8. Basic Combinatorics: The Art of Counting Without Counting 405
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 405
8.2 Basic counting principles . . . . . . . . . . . . . . . . . . . 405
8.2.1 The sum principle . . . . . . . . . . . . . . . . . . 405
8.2.2 The product principle . . . . . . . . . . . . . . . . 407
8.2.3 The principle of inclusion–exclusion . . . . . . . . 410
8.2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 415
8.3 The pigeonhole principle . . . . . . . . . . . . . . . . . . . 418
8.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 421
8.4 Permutation . . . . . . . . . . . . . . . . . . . . . . . . . . 423
8.4.1 Permutation without repetition . . . . . . . . . . 423
8.4.2 Circular permutation . . . . . . . . . . . . . . . . 426
8.4.3 Permutations of objects not all distinct . . . . . . 427
8.4.4 Permutations with repetitions . . . . . . . . . . . 429
8.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 430
8.5 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . 433
8.5.1 Number of surjective functions: Derangements . . 436
8.5.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 438
8.6 The binomial theorem . . . . . . . . . . . . . . . . . . . . 441
8.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 443
8.7 Combinations with repetition . . . . . . . . . . . . . . . . 444
8.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 447
9. Basics of Graph Theory 451
9.1 Introduction and a bit of history . . . . . . . . . . . . . . 451
Contents xxv
9.2 Basic definitions and terminology . . . . . . . . . . . . . . 453
9.2.1 Some common simple graphs . . . . . . . . . . . . 456
9.2.2 Adjacency and incidence matrices . . . . . . . . . 458
9.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 461
9.3 Degree of a vertex, the Handshaking lemma
and graphical sequences . . . . . . . . . . . . . . . . . . . 464
9.3.1 Graphical sequences . . . . . . . . . . . . . . . . . 468
9.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 472
9.4 Subgraphs and new graphs from old . . . . . . . . . . . . 476
9.4.1 Induced and spanning subgraphs . . . . . . . . . . 478
9.4.2 New subgraphs from old . . . . . . . . . . . . . . 479
9.4.3 Complement of a graph . . . . . . . . . . . . . . . 480
9.4.4 Line graph, Hamiltonian closure of a graph . . . . 481
9.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 483
9.5 Walks, trails, paths, cycles and graph connectivity . . . . 487
9.5.1 Graph connectivity . . . . . . . . . . . . . . . . . 489
9.5.2 Vertex-connectivity, edge-connectivity . . . . . . . 492
9.5.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 496
9.6 Bipartite graphs . . . . . . . . . . . . . . . . . . . . . . . 499
9.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 504
9.7 Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
9.7.1 Matching in general graphs . . . . . . . . . . . . . 508
9.7.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 509
9.8 Matching in bipartite graphs and Hall’s Theorem . . . . . 510
9.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 517
9.9 Isomorphism of simple graphs . . . . . . . . . . . . . . . . 518
9.9.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 523
9.10 Maximum flow in a network, the Ford–Fulkerson algorithm
and maximum bipartite matching . . . . . . . . . . . . . . 526
9.10.1 Residual network . . . . . . . . . . . . . . . . . . 532
9.10.2 The Max-Flow Min-Cut theorem, the
Ford–Fulkerson algorithm . . . . . . . . . . . . . . 534
9.10.3 Maximum bipartite matching . . . . . . . . . . . . 538
9.10.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 540
10. More on Graph Theory 545
10.1 Planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . 545
10.1.1 Kuratowski’s theorem . . . . . . . . . . . . . . . . 550
10.1.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 552
xxvi A Tale of Discrete Mathematics
10.2 Euler trails and Euler circuits . . . . . . . . . . . . . . . . 555
10.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 561
10.3 Hamiltonian circuits and Hamiltonian paths . . . . . . . . 565
10.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 572
10.4 Graph coloring . . . . . . . . . . . . . . . . . . . . . . . . 576
10.4.1 The chromatic polynomial . . . . . . . . . . . . . 581
10.4.2 Coloring planar graphs: Five and four-color
theorems . . . . . . . . . . . . . . . . . . . . . . . 588
10.4.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 590
11. Trees 595
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 595
11.2 Basic definitions and terminology . . . . . . . . . . . . . . 595
11.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 600
11.3 First results about trees . . . . . . . . . . . . . . . . . . . 603
11.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 605
11.4 Traversal of trees . . . . . . . . . . . . . . . . . . . . . . . 607
11.4.1 Binary search tree . . . . . . . . . . . . . . . . . . 612
11.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 616
11.5 Modeling with trees . . . . . . . . . . . . . . . . . . . . . 619
11.5.1 Chemistry . . . . . . . . . . . . . . . . . . . . . . 619
11.5.2 Digital arithmetic expressions . . . . . . . . . . . 620
11.5.3 Prefix, postfix and infix notations . . . . . . . . . 622
11.5.4 Coding . . . . . . . . . . . . . . . . . . . . . . . . 626
11.5.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 630
11.6 Spanning subtrees and graph search . . . . . . . . . . . . 633
11.6.1 Graph search . . . . . . . . . . . . . . . . . . . . . 635
11.6.2 Search algorithms and graph connectivity . . . . . 640
11.6.3 Minimal spanning tree . . . . . . . . . . . . . . . 641
11.6.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 645
Appendix: Solutions to Suggested Exercises 649
Index 787
Chapter 1
Propositional Logic: The Foundation
of Mathematical Reasoning
1.1 Introduction
Throughout history, many civilizations have realized the need to formalize
rules for reasoning and proof techniques. For example, a pilar in ancient
Greece education system was the trivium (three roads in Latin), which
refers to the study of grammar, rhetoric, and logic to young students. With
the development of new mathematical theories, the need for a precise set
of rules to determine what constitutes a valid mathematical proof became
paramount and preoccupied mathematicians for centuries.
Historically speaking, logic origins are hard to trace as many ancient
philosophers and scientists contributed to the development of the discipline.
It is however widely believed that the discipline started to take the shape
we know today in ancien Greece. Aristotle, a Greek philosopher and
mathematician (384–322 BC), is considered to be the author of the earliest
known document on formal logic. His main goal was to develop the logic
theory as a complete mathematical system to analyze human reasoning
and effective arguments. While this philosophical aspect of logic remains
a central component of the subject some 25 centuries after Aristotle, this
area of mathematics has significantly evolved in the last century to become
a key tool not only in pure and applied mathematics but also in many
applications of computer science.
There are two main formal systems of mathematical logic: the propositional
logic and predicate logic. Propositional logic studies statements which
have truth values (either true or false) and logical operators on these
statements like the words “and”, “or” and others. In this context, we
1
2 A Tale of Discrete Mathematics
refer to the statements as propositions and to the operators on them as
logic connectives. A unit (or atomic) statement of propositional logic is
a proposition that contains no connective and as such, it is not further
analyzable. Logic connectives are used to connect propositions together and
form more complex ones. Propositional logic analyses statements with truth
values depending uniquely and entirely on the units on which they are built.
There are however mathematical statements with truth values depending
not only on their underlying units but also on their interpretation within a
given context. This type of statements requires a richer system of analysis
and will be studied in Chapter 4 on predicate logic.
1.2 Basic terminologies and logic connectives
In the English language, the following are well-known types of sentences.
(1) The imperative sentence. This is a sentence that gives a command or
an order. For example, “Bring me the book”.
(2) The interrogative sentence. This is a sentence that asks a direct question
and which always ends with a question mark. For example, “Is 1051 a
prime number?”.
(3) The declarative sentence. This is a sentence that states a fact or gives
some sort of information. For example, “1051 is not a prime number”
and “Ottawa is the capital city of Canada”.
What distinguishes a declarative sentence from other types of sentences
is the fact that it is either true or false but not both at the same time.
From a propositional logic perspective, a declarative sentence is called a
proposition. If a proposition p is true, we say that its truth value is T and
we write v(p) = T. If a proposition p is false, we say that its truth value
is F and we write v(p) = F. Some authors assign 1 and 0 as truth values
for a true and false proposition, respectively. Propositions like “ 33
+ 3 is
an even number” and “the equation x2
− 3x + 2 = 0 has no real roots” can
be easily characterized as true or false. The first is true as 33
+ 3 = 30 is
an even number and the second is false since x = 1 and x = 2 are real
roots of the equation. The ease of determining the truth values of these
two statements is unfortunately not an indication on the hardship of this
task in general. Things can get complicated very quickly as we combine
statements. For example, the task of determining the truth value of the
declaration: “6851 is a prime number or ππ
is a rational number if and only
Propositional Logic: The Foundation of Mathematical Reasoning 3
if x3
−12354x2
+3x−1200 = 0 has a rational root” is certainly not a trivial
one, even if we know the truth value of each of the individual components
of the declaration.
In the syntax of propositional logic, propositions are usually referred to
using letters. So we write things like A : “25
> 33”, B : “31 is an even
number” and p : “The domain of the function f(x) =
√
x + 1 is the set of
all real numbers.”
Example 1.1. In each case, determine if the expression is a proposition.
If the expression is a proposition, determine its truth value.
(a) p: “8
1
3 = 2”.
(b) q: “8
1
3 ”.
(c) r: “The sum of two odd numbers”.
(d) s: “The sum of two odd numbers is odd”.
(e) t: “The equation 4x2
− 4x − 3 = 0 has at least one integer solution”.
Solution. (a) p is a proposition. It states that the cubic root of 8 is equal
to 2. This is true since 23
= 8.
(b) q is not a proposition. It simply gives a number, namely 8
1
3 = 2.
(c) r is not a proposition. It does not declare anything.
(d) s is a proposition. It declares that when we add two odd numbers, the
result is always an odd number. The truth value of s is F (false) since,
for example, 1 + 3 = 4 is even.
(e) t is a proposition. Its truth value is F since the equation has two
solutions x = −1
2 and x = 3
2 and neither one of them is an integer.
♦
1.2.1 Logic connectives
In any natural language, a word is a sequence of symbols chosen from a
set called the alphabet of the language. Sentences are formed by connecting
words together with special connectors like “or”, “and”, a comma, etc.
Propositional logic is no different from any other language. its alphabet
consists of a set of propositional units, the special symbols ∧, ∨, →, ↔ and
¬, commas and parentheses: “(” and “)”. The role of the special symbols
is to connect propositions together to create new ones. For example, the
following (compound) proposition: “The sun is shining or the lion is roaring
if and only if it is pouring in the forest and the hunter hides behind the
4 A Tale of Discrete Mathematics
trees unless the leaves are falling” is formed by connecting the (atomic)
propositions “The sun is shining”, “The lion is roaring”, “It is pouring
in the forest”, “The hunter hides behind the trees” and “The leaves are
falling” using the words “or”, “if and only if ”, “and”, and “unless” that
we call the logic connectives or the logic operators . There are five basic
logic connectives. Table 1.1 gives the names and symbols of these basic
connectives. Note that, with the exception of the negation connective ¬,
each of these connectives is a binary operation which means it requires
two input propositions. For instance, the connective ∨ takes two input
propositions p and q and produces the new proposition “p or q”.
Table 1.1 Basic logic connectives
Connective Name Symbol English Expressions
Conjunction ∧ and
Disjunction ∨ or
Implication → implies
Biconditional ↔ if and only if
Negation ¬ not
A proposition with no logic connectives in it is called an atomic proposition
or simply an atom. A logic proposition containing one or more logic
connectives is called a compound proposition. For example, “Ottawa is the
capital city of Canada unless the sun rises from the west” is a compound
proposition formed by the disjunction of the two atoms “Ottawa is the
capital city of Canada” and “The sun rises from the west”.
1.2.2 Truth table
The truth table of a logic proposition p is a table listing the truth values
of p for all possible truth values of the components of p (also called the
logical variables of p). Each list of truth values of the logical variables of p
is called a valuation of p (see Definition 1.3 below). For example, if p is a
proposition with two logical variables A and B, then there are four possible
valuations of p, namely (T, T), (T, F), (F, T) and (F, F).
Example 1.2. The truth table of a logic proposition p is given below.
A B p
T T F
T F T
F T F
F F T
Propositional Logic: The Foundation of Mathematical Reasoning 5
The table can be interpreted as follows: the proposition p is true when
A is true and B is false or when both A and B are false. It is false when
both A and B are true or when A is false and B is true.
We look next at each of the five basic connectives in a bit more detail.
Table 1.2 at the end gives a summary that will serve as a basis for the rest
of the discussion on propositional logic.
1.2.2.1 The conjunction connective
If p and q are two propositions, their conjunction is the compound
proposition “p and q” that we denote by (p ∧ q). The conjunction (p ∧ q)
is true if and only if both propositions p and q are true. The truth table of
the conjunction connective is the following.
p q (p ∧ q)
T T T
T F F
F T F
F F F
Example 1.3. The proposition Washington is the capital city of Canada
and 3125689
+ 11 is a prime number is false since the first component is
false. Note that we did not need to know if 3125689
+ 11 is a prime number.
Example 1.4. The proposition “8− 1
3 = 1
2 and
√
7 ≤ 3” is true since it is
the conjunction of two true statements.
1.2.2.2 The disjunction connective
If p and q are two propositions, their disjunction is the compound
proposition “p or q” that we denote by (p ∨ q). The disjunction (p ∨ q)
is always true except in the unique case when both p and q are false. The
truth table of the disjunction connective is as follows.
p q (p ∨ q)
T T T
T F T
F T T
F F F
6 A Tale of Discrete Mathematics
Example 1.5. The proposition Ottawa is the capital city of Canada or
the sun rises from the west is true since the first component is true. Note
that it does not matter what the truth value of the second component is in
this case since we know that the proposition Ottawa is the capital city of
Canada is true.
Example 1.6. The proposition “8
1
3 = 1
2 or
√
7 > 3” is false since it is the
disjunction of two false propositions.
Example 1.7. The proposition “Ottawa is the capital city of Canada and
the sun rises from the west, or 3
√
−8 = −2” is true since the second
component is clearly true. Note that the proposition “Ottawa is the capital
city of Canada and the sun rises from the west” is false in this case.
Remark 1.1. The symbol ∨ is used to represent the disjunction “or” in
the inclusive sense. To explain this, imagine you ask a friend about his plan
to get to Toronto today and he answers with the following disjunction:
“I will drive or I will take the train”. Note that exactly one of the two
components of this disjunction can be true in this context. We say in this
case that the disjunction “or” is used in an exclusive sense. On the other
hand, the disjunction “or” in the proposition “I drink my coffee or I read my
book” is used in an inclusive sense since the components “I drink my coffee”
and “I read my book” can happen simultaneously (can be true at the same
time). The symbol ⊕ is usually used to specify the exclusive disjunction.
So (p ⊕ q) is true when exactly one of p, q is true and it is false when both
are true or both are false.
1.2.2.3 The implication connective
A big part of human interactions comes in the form of conditional
and sequential statements. Sentences like If you walk under the rain,
you will catch a cold or Reading this book is sufficient to have a basic
understanding of Discrete Mathematics are called conditional statements.
Such statements give some information (conclusion) based on a certain
assumption (hypothesis). In propositional logic, a conditional statement is
referred to as an implication. If p and q are two propositions, the proposition
“p implies q” (or equivalently “if p then q”) is represented with the notation
(p → q). For the implication (p → q), p is called the hypothesis and q is
called the conclusion.
Propositional Logic: The Foundation of Mathematical Reasoning 7
Example 1.8. The statement If the stars are shining in the sky at night,
then it is going to be sunny in the morning is an implication with The stars
are shining in the sky at night as the hypothesis and It is going to be sunny
in the morning as the conclusion .
Example 1.9. The proposition “the sum of two rational numbers is a
rational number” does not sound at first like an implication but rather like
one atomic proposition. But a bit of deflexion shows that the proposition is
actually stating the following: “If x and y are two rational numbers, then
x+y is a rational number”. This makes it an implication with “x and y are
two rational numbers” as the hypothesis and “x + y is a rational number”
as the conclusion.
Unlike the conjunction and the disjunction connectives, the truth table of
the implication connective is not obvious and requires some explanation. A
classic scenario used to explain the truth table of the implication connective
is the following. During an election campaign, the candidate Joe makes
the following statement: “If I am elected, there will be income tax cut
for the middle class in the first hundred days after the elections” (sounds
familiar?). When can you accuse Joe of lying? If Joe was not elected, then
no one can accuse him of lying regardless of wether there was an income tax
cut for the middle class in the first hundred days or not. In this case, his
initial statement would still be valid since we don’t know what would have
happened had he been elected. If Joe is elected and he managed to reduce
income tax for middle class in the first hundred days after the elections,
then he spoke no fallacy during the campaign and his statement is true.
Now, Joe would be in hot water (one would hope!) if he was elected but no
income tax reduction followed for the middle class in the first hundred days
after the elections. So, there is only one scenario where we can confirm that
Joe’s statement is false: he is elected but no income tax reduction follows for
the middle class in the first hundred days after the elections. This suggests
that an implication (p → q) is always true except in the unique case where
p (the hypothesis) is true and q (the conclusion)is false. In particular, an
implication with a false hypothesis is always true. The truth table of the
implication connective is the following.
p q (p → q)
T T T
T F F
F T T
F F T
8 A Tale of Discrete Mathematics
Example 1.10. The proposition “If Washington is the capital city of
Canada, then 24
= −1” is true since it is an implication with a false
hypothesis.
Example 1.11. The proposition “If 8
1
3 = 2 and the equation x2
+ 1 = 0
has no real roots, then
√
7 > 3” is false since it is an implication with a true
hypothesis (a conjunction of two true propositions) and a false conclusion.
Definition 1.1. For the implication (p → q): the implication (¬q → ¬p) is
called the contrapositive implication and the implication (q → p) is called
the converse implication.
The reader should be very careful not to confuse the contrapositive and the
converse of an implication. They are different propositions with different
meanings. The following example explains the difference in a natural
language context.
Example 1.12. Consider the proposition φ: “If there is a storm, then
the school bus is cancelled”. This is clearly an implication with “There
is a storm” as the hypothesis and “The school bus is cancelled” as the
conclusion. The contrapositive of φ is “If the school bus is not cancelled,
then there is no storm” while the converse of φ is: “If the school bus is
cancelled, then there is a storm”.
Example 1.13. For the implication “If n is an odd integer, then n3
+ 1 is
an even integer”, the contrapositive is “If n3
+ 1 is an odd integer, then n
is an even integer”, and the converse is “If n3
+ 1 is an even integer, then
n is an odd integer”.
1.2.2.4 The biconditional connective
If p and q are two propositions, the compound proposition “p if and only
if q” (or p is a necessary and sufficient condition for q) is called the
biconditional of p and q that we denote with (p ↔ q). The biconditional
(p ↔ q) is true when p and q have the same truth value (both are true or
both are false) and is false when p and q have different truth values (one is
true and the other is false). The truth table of the biconditional connective
is the following.
Propositional Logic: The Foundation of Mathematical Reasoning 9
p q (p ↔ q)
T T T
T F F
F T F
F F T
Example 1.14. The proposition Washington is the capital city of Canada
if and only if 24
= 16 is false since its first component is false but its second
is true.
Example 1.15. The proposition 4
√
8 = 2 if and only if
√
7 > 3 is true since
both components of the proposition are false.
Example 1.16. The proposition 4
√
8 = 2 or 8
1
3 = 2 if and only if
√
7 < 3
and
√
3 < 2 is true since both components of the proposition are true.
1.2.2.5 The negation connective
Unlike the other four logic connectives, the negation connective is a unary
operation (as opposed to binary for the other four). It takes one proposition
as its input and produces another at the input. If p is a logic statement,
then the statement “not p” is called the negation of p that we denote with
the symbol ¬p. The negation of p has the opposite truth value than p. The
truth table of the negation connective is the following.
p ¬p
T F
F T
Example 1.17. If p is the proposition
√
7 < 3, then ¬p is the proposition
√
7 ≥ 3.
Example 1.18. The negation of the proposition There exists a real number
x that satisfies x2
+ 1 = 0 (which is false) is No real number satisfies
x2
+ 1 = 0 (which is true).
1.2.2.6 Summary
Table 1.2 gives a summary of the truth tables of the five basic logic
connectives. Propositional logic calculus is mainly based on this table.
10 A Tale of Discrete Mathematics
Table 1.2 Basic logic connectives
p q (p ∧ q) (p ∨ q) (p → q) (p ↔ q) ¬p ¬q
T T T T T T F F
T F F T F F F T
F T F T T F T F
F F F F T T T T
Example 1.19. In each case, determine the truth value of the compound
proposition.
(a) 23 is odd or the equation ln(2x+3)+ex+2
= 37 has an integer solution.
(b) If 1 + 2 = 4, then pigs can fly.
(c) 3123456
+ 1 is a prime number and the equation x2
+ 1 = 0 has at least
one real root.
(d) The equation x2
+ 1 = 0 has at least one real root if and only if pigs
can fly.
(e) If 1 − 2 = −1, then 212456790
+ 3 is even.
Solution. (a) The proposition is true since it is the disjunction of two
propositions with the first one true. Note that it does not matter what
the truth value of the second component is in this case.
(b) The proposition is true since it is an implication with a false hypothesis.
(c) The proposition is false since it is a conjunction with the second
component (pigs can fly) is false. Note that it does not matter what
the truth value of the first component is in this case.
(d) The proposition is true since it is a biconditional with both components
have the same truth value (both are false in this case).
(e) The proposition is false since it is an implication of the form (T → F).
♦
Using Table 1.2, we can determine the truth value of any complex logic
proposition as a function of the truth values of its components.
Example 1.20. Construct the truth table of the compound proposition
φ : ((p ∧¬q) ∨¬(q → p)) where p and q are logic propositions. In particular
give all truth values of p and q for which φ is true.
Solution. The proposition φ is the disjunction of the two propositions
(p ∧ ¬q) and ¬(q → p). First, we determine the truth value of (p ∧ ¬q) and
¬(q → p) and then we use the truth table for the disjunction connective.
All the steps are included in the following table.
Propositional Logic: The Foundation of Mathematical Reasoning 11
p q ¬q (q → p) ¬(q → p) (p ∧ ¬q) ((p ∧ ¬q) ∨ ¬(q → p))
T T F T F F F
T F T T F T T
F T F F T F T
F F T T F F F
In particular, φ is true when p and q have opposite truth values. ♦
1.2.3 Operations on binary strings
Information is usually processed by computers using bit strings: a sequence
of 0’s and 1’s. This type of sequences plays a central role in mathematics
and computer science. We give a formal definition of binary strings as we
need to refer to them in many places in this book.
Definition 1.2. A binary string is an (ordered) sequence of 0’s and 1’s,
each of which is called a bit (short for binary digit). The length of a binary
string is the number of bits in the sequence. A string of length zero is called
the empty string (the string with no bits in it), that we denote by λ.
Because of their binary nature, bits can be used to represent truth values
of logic propositions with 1 and 0 representing true and false, respectively.
Logic connectives can then be applied to 1 and 0 the same way they apply
to T and F. From a computer science perspective, connectives ∧, ∨ and ⊕
are of particular importance. In this context, ∧, ∨ and ⊕ are referred to as
the AND, OR and XOR operators, respectively. Actions of these operators
on Boolean variables p and q (these are variables which take values over
the set {0, 1}) are summarized in Table 1.3 below. The bit operations in
Table 1.3 can be generalized to operations on binary strings having the
same length. If s1 = a1a2 · · · an and s2 = b1b2 · · · bn are two binary strings
of the same length, then s1 ∧ s2 is the string c1c2 · · · cn where ci = ai ∧ bi
for each i. Strings s1 ∨ s2 and s1 ⊕ s2 are defined similarly.
Example 1.21. Let s1 = 110100111 and s2 = 010100100. Then s1 ∧ s2 =
010100100, s1 ∨ s2 = 110100111 and s1 ⊕ s2 = 100000011.
Another important operation on binary strings is the concatenation. Given
two binary strings s1 = a1a2 · · · an and s2 = b1b2 · · · bn, the concatenation
of s1 and s2 is the string s1s2 = a1a2 · · · anb1b2 · · · bn. In particular, if n is
a natural number and s is a binary string, then sn
is the string obtained
12 A Tale of Discrete Mathematics
by concatenating n copies of s. In this definition, it is understood that s0
is the empty string λ.
Example 1.22. Let s = 11010 and t = 1010100100. Then st =
110101010100100, s2
= 1101011010 and s3
= 110101101011010.
Table 1.3 AND, OR and XOR
p q p ∧ q p ∨ q p ⊕ q
1 1 1 1 0
1 0 0 1 1
0 1 0 1 1
0 0 0 0 0
1.2.4 Exercises
(1) In each case, determine if the expression is a logic proposition.
(a) Is it raining now?
?(b) The sum of two even numbers is even.
?(c) 21012
+ 5.
?(d) 21012
+ 5 is odd.
(e) Finish your assignment!
(f) No prime number is even except 2.
(g) n2
+ 3n + 1 is odd for some integer n.
(h) A permutation of five objects.
(i) There are 120 ways to permute five objects.
(j) If Oxygen is a perfect gas, then so is Nitrogen.
?(k) An infinite number of odd numbers.
(2) In each case, the given expression is the start of a logic proposition.
Complete the expression to form a: (i) true proposition (ii) false
proposition. There are many possible answers for each part.
?(a) The sum of the squares of two integers.
(b) 21012
+ 5.
(c) The product of two positive integers.
(d) (−64)
1
3 .
?(e) There exists a real number.
(f) There exists no integer.
(3) In each case, a compound logic proposition is given. Determine the
main logic connective of the statement. That is, write the proposition
Propositional Logic: The Foundation of Mathematical Reasoning 13
under the form (p θ q) where p and q are two (possibly compound)
propositions and θ is a logic connective.
(a) 3 is an odd and a prime number.
(b) Either
√
2 is a rational number, or
√
2
√
2
is a rational number and
a root of the equation x4
− 1 = 0.
(c) If I fail the exam, then either I did not prepare or I was sick.
?(d) Joe fails the course if and only if he does not do the effort and the
professor does not warn him.
(e) Joe is a smart and an honest person, or he can be really hard to
deal with if and only if he senses dishonesty on your part.
(4) In each case, the statement is the disjunction of two propositions.
Determine if the disjunction is used in an inclusive or an exclusive
sense.
(a) You study or you fail.
?(b) I will either swim or take the boat to get to the island today.
(c) You can choose English or French to answer the question.
(d) You can either dial 0 or 1 on you phone to speak to a costumer
service representative.
(e) Joe can speak either English or French.
(5) Determine the truth value of each of the following logic propositions.
(a) 2 − 3 = −1 or 31080
+ 7 is a multiple of 17.
(b) The equation x4
+ 1 = 0 has no real roots and
√
9 = 3.
(c) If 2 − 3 = −1, then
√
10 > 3.
(d) If Washington is the capital city of the US and 23
= 8, then
1 + 2 = 5.
(e) If Boston is the capital city of the US and 23
= 8, then 1 + 2 = 5.
?(f) If 3345687609876651 is a prime number and every dog is a cat,
then
√
9 = 3.
?(g) 823432
−1 is even if and only if the equation x3
−4x2
= 0 has three
distinct real roots.
(h) There is no integer n such n3
− 2 = 0 if and only if 3
√
64 = 8 or
3
√
7 > 2.
(6) A and B are two atomic propositions such that the proposition
(B → ¬A) is false. Determine the truth value of each of the following
propositions.
14 A Tale of Discrete Mathematics
(a) (A ∨ B)
(b) (A ∧ B)
(c) (¬A ∨ ¬B)
?(d) (¬(A ∨ B) → A)
(e) ((A ∧ B) → B)
(f) ((A ∨ B) → (¬A ∧ B))
(g) ¬(¬A → B)
(h) (¬A ↔ ¬B)
?(i) (¬A ↔ (A ∧ B))
?(j) (¬B ↔ (¬A ∧ B))
?(7) Give an example of an implication which is true but its converse is false.
(8) Each of the following statements is an implication. State: (i) the
contrapositive and (ii) the converse of the implication.
(a) If you snooze, you loose.
?(b) If a function is differentiable on the interval [a, b], then it is
continuous on that interval.
(c) For an even integer n, 5n + 2 is even.
(d) The product of two even integers is even.
(9) Let φ and ψ be two propositions with the same set of logic variables.
We say that φ and ψ have the same truth table if every valuation of
the logic variables assigns the same truth value for φ and ψ. In each
case, verify that the two compound propositions have the same truth
table.
(a) (p ⊕ q), ((p ∨ q) ∧ ¬(p ∧ q))
(b) ¬(p ∨ q), (¬p ∧ ¬q)
(c) (p → q), (¬p ∨ q)
?(d) (p ↔ q), ((p → q) ∧ (q → p))
(10) Show that the logic formula φ : ((A ∧ ¬B) ∨ ¬(B → A)) → (¬A ∨ ¬B)
is true for any valuation of the variables A and B (we call such a
proposition as we will see later).
(11) Consider the logic proposition φ : ((p → ¬q) ∨ ¬(q → r)) in three
logic variables p, q and r. Construct the truth table of φ and give all
valuations that satisfy it. Note that in this case, there are eight different
valuations of φ.
(12) In each case, two binary strings s and t are given. Find: s∧t, s∨t, s⊕t
and st (the concatenation).
(a) s = 10, t = 11
(b) s = 1001, t = 1100
?(c) s = 110100, t = 110011
(d) s = 00011001, t = 10010111
(13) Let s, t and v be three binary strings of the same length. In each case,
determine if the statement is true or false. Justify your answer.
Propositional Logic: The Foundation of Mathematical Reasoning 15
(a) s ∧ t = t ∧ s
(b) s ∨ t = t ∨ s
?(c) (s ∧ t) ∧ v = s ∧ (t ∧ v)
(d) (s ∨ t) ∨ v = s ∨ (t ∨ v)
(e) s ⊕ (t ∧ v) = (s ⊕ t) ∧ (s ⊕ v)
(f) s ⊕ (t ∨ v) = (s ⊕ t) ∨ (s ⊕ v)
?(g) (s ⊕ t)v = (s ⊕ v)(t ⊕ v)
(h) sλ = s
1.3 Propositional logic: Formal point of view
The logic expression P → Q ∨ R can be interpreted in two different
ways. One can look at it as the disjunction of P → Q and R, or as an
implication with P as hypothesis and Q ∨ R as conclusion. In other words,
it is not clear what the main connective in the expression is. In order to
determine the truth value of a logic proposition, the latter should present
no ambiguity and its main connective should be clear. A proposition that
is written with no ambiguity about its meaning is called a well-formed
logic formulas or simply formulas of propositional logic, that we abbreviate
with wff (plural: wffs). To formally define wffs, we start by fixing a set
A = {A, B, . . . , A1, B1, . . .} of letters and indexed letters whose elements
are called propositional variables. Then the set of wffs of propositional logic
over A is defined recursively using the following rules.
(1) Every propositional variable is a wff that we call an atomic formula.
(2) If φ is a wff, then ¬φ is also a wff.
(3) If φ and ψ are wffs, then
(3.1) (φ ∧ ψ) is a wff.
(3.2) (φ ∨ ψ) is a wff.
(3.3) (φ → ψ) is a wff.
(3.4) (φ ↔ ψ) is a wff.
(4) The symbols T and F (True and False) are wffs.
(5) Nothing else is a wff. That is to say, only expressions that can be
generated using the above rules are wffs.
Remark 1.2. Like the grammar of any natural language, one has to follow
the above rules to the letter in forming a wff. For instance, the expression
φ → ψ does not constitute a wff since it cannot be generated following
the above rules (parentheses are missing), even if there is no ambiguity in
its meaning. There are, however, some instances where the rules can be
relaxed a bit as we will see later. We also point out that it is sometimes
convenient to use square brackets as outer denominators instead of round
parentheses to improve readability of certain formulas. For example, one
16 A Tale of Discrete Mathematics
can write [(φ → ψ)∨(ρ∧)] instead of ((φ → ψ)∨(ρ∧)) without violating
the above rules.
Example 1.23. The expression ¬A is a wff by rules (1) and (2) above.
The expressions ¬(A) and (¬A), on the other hand, are not wffs since they
cannot be constructed using the above rules.
Example 1.24. The following provides a step by step proof of the fact
that the expression: ¬((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is indeed a wff.
1. A, B and C are wffs: Rule (1).
2. ¬A is a wff: Line 1 and Rule (2).
3. (¬A ∨ B) is a wff: Lines 1, 2 and Rule (3.2).
4. (C ∧ B) is a wff: Line 1 and Rule (3.1).
5. (A → (C ∧ B)) is a wff: Lines 1, 4 and Rule (3.3).
6. (A → (C ∧ B)) is a wff: Line 5 and Rule (2).
7. ((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff: Lines 3, 6 and Rule (3.4).
8. ¬((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff: Line 7 and Rule (2).
Note that if φ is a wff over the set A of logic variables and A is a subset
of B, then φ is also a wff over the set B. For example, the expression
φ : ((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff over the set A = {A, B, C} but
it can also be considered as a wff over the set B = {A, B, C, D, X, Y, Z, T}
containing A.
1.3.1 Valuations and truth tables of logic formulas
We have seen already how to construct the truth table of a logic proposition
in the first section. In this section, we use a more formal approach.
Definition 1.3. Given a set E = {e1, . . . , en} of logic variables, a valuation
of E is a list (v1, . . . , vn) where vi = v(ei) is a truth value for the logic
variable ei for i = 1, 2, . . . n}.
Since there are only two choices for every truth value, there are 2n
different
valuations for a set E containing n propositional variables. The formal proof
of this fact will be given in Chapter 8.
Example 1.25. If E = {A, B, C}, then there are 23
= 8 possible valuations
of the set E, namely (T, T, T), (T, T, F), (T, F, T), (T, F, F), (F, T, T),
(F, T, F), (F, F, T), and (F, F, F).
Propositional Logic: The Foundation of Mathematical Reasoning 17
Given a set E of logic variables and a wff φ over E, every valuation
α of E determines a unique truth value for φ. For example, the valuation
α = (T, F, F) of the set E = {A, B, C} assigns the truth value T for the
formula φ : (C ↔ (A ∧ B)) (since in this case, φ has the form F ↔ F
which is true). The valuation (T, F, T), on the other hand, assigns F as a
truth value for φ (for this valuation, φ has the form T ↔ F which is false).
We say that the valuation α satisfies the formula φ if the truth value of
φ determined by α is T. Hence, the valuation α = (T, F, F) satisfies the
formula φ : (C ↔ (A ∧ B)) while (T, F, T) does not. The truth table of φ
is the listing of all truth values of φ, in a tabular form, in relation with all
possible valuations of E.
Example 1.26. The truth table of the formula φ : (C ↔ (A ∧ B)) is given
below. It is important to notice that in the table on the left, the column of
(A ∧ B) is not really a part of the truth table of φ. It is included to give us
a better understanding how the last column is formed. The truth table of φ
can be restricted to the table on the right. From the table, we see that the
valuations that satisfy φ are: (T, T, T), (T, F, F), (F, T, F) and (F, F, F).
A B C (A ∧ B) φ : (C ↔ (A ∧ B))
T T T T T
T T F T F
T F T F F
T F F F T
F T T F F
F T F F T
F F T F F
F F F F T
A B C φ
T T T T
T T F F
T F T F
T F F T
F T T F
F T F T
F F T F
F F F T
Example 1.27. For the formula ψ : (((¬C ∨ A) → B) → (A ∧ ¬C)),
the truth table is given below. Each component of the formula is analyzed
separately.
A B C ¬C (¬C ∨ A) ((¬C ∨ A) → B) (A ∧ ¬C) ψ
T T T F T T F F
T T F T T T T T
T F T F T F F T
T F F T T F T T
F T T F F T F F
F T F T T T F F
F F T F F T F F
F F F T T F F T
18 A Tale of Discrete Mathematics
Once again, the column of ¬C, (¬C ∨ A), ((¬C ∨ A) → B) and (A ∧ ¬C)
are included to give us a better understanding of how the last column is
formed. The valuations that satisfy ψ are: (T, T, F), (T, F, T), (T, F, F)
and (F, F, F).
1.3.2 Special types of logic formulas and coherency
Let φ be a wff of propositional logic. If φ is true then (φ ∨ ¬φ) is true. If φ
is false, then ¬φ is true and so (φ ∨ ¬φ) is true. This means that (φ ∨ ¬φ)
is true regardless of what the truth value of φ is. On the other extreme, we
can prove similarly that (φ ∧ ¬φ) is false regardless of what the truth value
of φ is. Formulas which are always true (for any valuation of their logic
variables) play a central role in propositional logic. This type of formulas
is directly linked to other concepts in logic, like the validity of arguments
and the notion of logic equivalence.
Definition 1.4. We say that the logic formula φ is a tautology if its truth
value is T for any valuation of its logic variables. We say that φ is a
contradiction if its truth value is F for any valuation of its logic variables. If
φ is neither a tautology nor a contradiction, we say that it is a contingency
(or a contingent formula). The truth table of a tautology consists of T’s
only, that of a contradiction consists of F’s only and the truth table of a
contingency has both T’s and F’s in it.
Example 1.28. In each case, use a truth table to determine if the formula
is a tautology, a contradiction or a contingency.
(a) φ : ((P ∨ (Q ∧ R)) → ((P ∨ Q) ∧ (P ∨ R)))
(b) ψ : (((¬C ∨ A) → B) → (A ∧ ¬C))
(c) η : ¬((A ∨ B) ∨ (¬A ∧ ¬B))
Solution. (a) The truth table of φ is the following:
P Q R (Q ∧ R) (P ∨ (Q ∧ R)) (P ∨ Q) (P ∨ R) ((P ∨ Q) ∧ (P ∨ R)) φ
T T T T T T T T T
T T F F T T T T T
T F T F T T T T T
T F F F T T T T T
F T T T T T T T T
F T F F F T F F T
F F T F F F T F T
F F F F F F F F T
The formula is a tautology.
Propositional Logic: The Foundation of Mathematical Reasoning 19
(b) The truth table of ψ was constructed in Example 1.27 above. The table
contains both T’s and F’s. The formula is a contingency.
(c) The truth table of η is the following.
A B ¬A ¬B (A ∨ B) (¬A ∧ ¬B) ((A ∨ B) ∨ (¬A ∧ ¬B)) η
T T F F T F T F
T F F T T F T F
F T T F T F T F
F F T T F T T F
The table consists of F’s only, η is a contradiction. ♦
Definition 1.5. A set E of logic formulas over a set F of logic variables is
called coherent (or Consistent) if there exists at least one valuation of F
that satisfies all formulas in E. The set E is called incoherent otherwise.
Example 1.29. The set E = {(A ∨ B), (A → B), (¬A ∧ B)} is coherent.
The valuation (F, T) satisfies all the formulas in E as shown in the following
truth table of the formulas in E.
A B ¬A (A ∨ B) (A → B) (¬A ∧ B)
T T F T T F
T F F T F F
F T T T T T
F F T F T F
Example 1.30. The set E = {(A ∧ B), (A → B), (¬A ∧ B)} is incoherent.
From the truth table of each of the formulas in E given below, we see that
none of the four possible valuations of {A, B} satisfies all the formulas in
E at the same time.
A B ¬A (A ∧ B) (A → B) (¬A ∧ B)
T T F T T F
T F F F F F
F T T F T T
F F T F T F
1.3.3 Exercises
(1) In each case, determine if the expression is a wff of propositional logic. If
you say that the expression is a wff, determine its main logic connective.
(a) ¬¬¬A
?(b) (¬(¬A ∧ B) → (A ↔ (¬C ∨ B)))
20 A Tale of Discrete Mathematics
(c) (A ∨ B) → ¬(C → ¬B)
(d) ¬((A ∨ ¬(¬B → C)) ↔ ((¬A ∧ B) ∨ (C → ¬B)))
?(e) (((A → B ∧ C) → ¬(A ∨ B))
(f) (((A → (B → C)) ↔ ((A → B) → C)) → (A → C))
(2) Prove that the following expression φ is a wff:
((A ∨ ¬(¬B → D)) → ((¬A ∧ B) ∨ (C → ¬E))).
How many rows are there in the truth table of φ?
(3) In each case, form the truth table of the logic formula. Determine if
the formula is a tautology, a contradiction or a contingency. If you say
that the formula is a contingency, give all valuations that satisfy the
formula.
(a) ((A → B) → (A ∧ ¬B))
(b) ((A → ¬B) ↔ (¬C → (A → B))
?(c) ((P → (Q → R)) → ((P → Q) → (P → R)))
(d) ((P → Q) → R)) → (P → (Q → (P → R)))
(e) ((A ∨ B) → ¬(C → ¬B))
(f) ((A ∨ ¬(¬B → C)) ↔ ((¬A ∧ B) ∨ (C → ¬B)))
?(g) ((A ∨ B) ↔ ¬(¬B → A))
(4) In each case, determine if the given set of logic formulas is coherent.
If you say it is, give at least one valuation of the logic variables that
satisfies all the formulas in the set.
(a) {¬(A → ¬B), (¬A ∨ B), ¬(A ∨ ¬B)}
(b) {(¬A → B), (¬B → ¬A), (¬A ∧ B)}
?(c) {¬(Q ∧ R), ((¬P → Q) ∧ (¬R → P)), (P ∨ ¬R), (P → (Q → ¬R))}
(5) Consider the valuation α : (v(A) = T, v(B) = T, v(C) = F, v(D) = F)
of the set {A, B, C, D} of logic variables. In each case, determine if α
satisfies the given formula.
(a) (¬A → (B ↔ (C ∨ D)))
?(b) (((A ∧ B) → ¬C) → (A ∧ (C ∨ D)))
(c) ((C ∨ ¬D) ↔ ¬B) ∨ (B → ¬A))
?(d) (((A → B) → C) → D)
(e) (A → ((B → C) → D))
(6) Consider the wff φ : (D ∨ (B ∧ ¬C)) ∧ (B → (A → C) ∧ ¬D))). If
α = (v(A).v(B), v(C), v(D)) is a valuation of the set {A, B, C, D} that
satisfies φ and such that v(B) = T, determine the values of v(A), v(C)
and v(D).
Propositional Logic: The Foundation of Mathematical Reasoning 21
1.4 Logic formulas in natural language: Translation
between English and propositional logic
Automated translation softwares have been around for many years now and
have came a long way in achieving good quality translations. Still, you have
probably noticed how silly some translated sentences could sound using a
computer software. The task of capturing the exact meaning in two different
languages is certainly not an easy one, even for professional translators. The
same is true when it comes to translation between natural languages and
the language of propositional logic. The ability of manipulating formal logic
formulas and laws is very important but has little value if one cannot express
a natural language statement into a formal expression of propositional logic
and vice a versa. In most cases, the difficulty of translating a natural
language text into logic arises from the complexity of the text itself and
the way it is written. For example, saying: “Failing a course is a necessary
condition for not studying” sounds much harder to understand than saying
:“If you don’t study, you fail”, although the two sentences say the same
thing in two different ways.
Table 1.1 above gives one way of expressing each of the basic logic
connectives in English. There are, however, many other expressions in
English that capture the same meaning for these connectives. In what
follows, we explore the most common ways of expressing logic connectives
in English. This is key in analysing statements of propositional logic.
• Conjunction ((p ∧ q)): p and q; p but q; p even though q; p, moreover
q; p although q.
• Disjunction ((p ∨ q)): p or q; p unless q; either p or q; p, otherwise q; p
except if q.
• Implication ((p → q)): p implies q; If p, then q; If p, q; q if p; p only if
q; q is a necessary condition for p; p is a sufficient condition for q; For
p, it is necessary that q; For q, it is sufficient that p; For q, it suffices
that p.
• Biconditional ((p ↔ q)): p if and only if q; p is equivalent to q; p is
a necessary and a sufficient condition for q; for q, it is necessary and
sufficient that p.
Example 1.31. Translate each of the following sentences into a wff of
propositional logic using the following atoms:
22 A Tale of Discrete Mathematics
• J: Joe passes the course
• C: Joe attends all classes
• N: Joe takes notes in class
• E: Joe does well on the exam
(a) To pass the course, it is necessary that Joe attends all classes and that
he takes notes in class.
(b) Doing well on the exam is sufficient for Joe to pass the course.
(c) Neither attending all classes nor taking notes in class guarantees that
Joe passes the course.
(d) Joe does not do well on the exam if and only if he skips some classes
unless or does not take notes in class.
(e) Joe passes the course only if he does well on the exam or he does not
take notes in class.
Solution. (a) The sentence has the form “For p, it is necessary that q”
which translates to (p → q) in propositional logic language. Note that
the conjunction is main connective of the conclusion q. The translation
of the sentence is (J → (C ∧ N)).
(b) The sentence is of the form “E is sufficient for J” which translates as
(E → J) in propositional logic.
(c) the sentence can be rephrased as follows: It is not true that attending
all classes implies that Joe will pass course and it is not true that taking
notes in class implies that Joe will pass the course. The translation into
a wff of propositional logic is: (¬(C → J) ∧ ¬(N → J)) .
(d) This is a biconditional with a disjunction as the main connective in the
second component: (¬E ↔ (¬C ∨ ¬N)).
(e) This is a implication (only if connective) where the conclusion is a
disjunction of two propositions: (J → (E ∨ ¬N)) . ♦
Example 1.32. Translate the following sentence using symbols of
propositional logic: If Joe goes to class only if he does not go to work or
Fred is working, then he will not pass the course unless he does not go to
work and Fred does not go to class.
Solution. We identify the following atomic propositions in the
sentence:
• J: Joe goes to class
• W: Joe goes to work
• F: Fred goes to work
• C: Joe will pass the course
• D: Fred goes to class
Propositional Logic: The Foundation of Mathematical Reasoning 23
A quick look at the statement shows that it is of the form “If p, then
q” with:
• p: Joe goes to class only if he does not go to work or Fred is working;
• q: Joe will not pass the course unless he does not go to work and Fred
does not go to class.
Each of p and q is a compound proposition on its own and it can be formed
using the above atomic sentences as follows: p : (J → (¬W ∨ F)) and
q : (¬C ∨ (¬W ∧ ¬D)). We conclude that the translation of the sentence is
the wff: ((J → (¬W ∨ F)) → (¬C ∨ (¬W ∧ ¬D))). ♦
1.4.1 Logic arguments
Consider the following paragraph:
“If the arms race continues, the world is heading to a war. Joe is elected
as a president only if the arms race continues. Joe will never be elected
unless the steel industry endorses him. The steel industry endorses Joe for
presidency if and only if the arms race continues and the world is heading
to a war. Therefore, the world is heading to a war.”
The paragraph sounds like a statement made by some political opponent
of Joe to make the case why he should not be elected as a president. The
paragraph draws a conclusion based on several facts (or premises). From the
propositional logic perspective, the above paragraph is called an argument.
We all make arguments almost on a daily basis to push an opinion forward
or to persuade others about an opinion. The more “coherent” the argument,
the more convincing it is. Propositional logic gives us a way to assess and
measure an argument in terms of its validity that we will introduce later.
Definition 1.6. An argument of propositional logic is a list of the following
form:
φ1
.
.
.
φn
∴ ψ
where φ1, φ2, . . . , φn and ψ are logic formulas. The formulas φ1, φ2, . . . , φn
are called the premises and the formula ψ is called the conclusion of
24 A Tale of Discrete Mathematics
the argument. A small horizontal line separates the premises from the
conclusion of an argument and the symbol ∴ stands for “therefore”.
In most cases, logic arguments are given in natural languages sentences
which makes them hard to analyze. As we will see later, the first step to
determine the validity of an argument is to break it down to the form given
in Definition 1.6 above.
Example 1.33. Write the logic argument given at the beginning of this
section in standard form given in Definition 1.6.
Solution. The following propositions are the atoms in the argument:
• A: The arms race continues
• B: The world is heading to a war
• C: Joe is elected as a president
• D: The steel industry endorses
Joe
The first premise translates as (A → B), the second as (C → A), the
third is (¬C ∨ D) and the fourth as (D ↔ (A ∧ B)). The conclusion is
simply B. The translation of the argument into logic symbols is:
(A → B)
(C → A)
(¬C ∨ D)
(D ↔ (A ∧ B))
∴ B ♦
1.4.2 Exercises
(1) Translate the following statement into a formula of propositional logic.
Start by identifying the atomic components of the statement: “If the
European union wants to standardize its economy, then it must follow
the French or the Swedish model but not both at the same time.”
(2) In each case, translate the given sentence into a wff of propositional
logic using the following atoms.
• P: The wind is blowing
• Q: The temperature drops below the freezing degree
• R: A snow storm is coming
(a) If the wind is blowing or the temperature drops below the freezing
degree, then a snow storm is coming.
Random documents with unrelated
content Scribd suggests to you:
We shall have to leave it for my father's home. True. But that, I
trust, may be a long while off. And then we could re-sell Raven's
Priory.
Yes, of course. It is a nice place, William?
Charming, he replied with enthusiasm. For, of course, all things,
the proposed residence included, were to him the hue of couleur-de-
rose.
I have never been inside it, she observed.
No. The Wests are churlish people, keeping no company. Report
says that Mrs. West is a hypochondriac. They let me go in this
morning, and I went over all the house. It is the nicest place, love--
and not too large or too small for us; and the Wests have kept it in
good condition. You will be charmed with the drawing-rooms, Mary;
and the conservatory is one of the best I ever saw. They want us to
take to the plants.
Are they nice?
Beautiful. The Wests are moving to London, to be near good
advice for her, and they do not expect to get anything of a
conservatory there; at least, that is worth the name. I wonder what
your papa will think about this house, Mary? We might tell him of it
now. Where is he?
He is out, she answered. Just as he was going up to dress,
Thomas Hill sent for him downstairs, and they went out somewhere
together. Papa ran up to tell me he would be back as soon as he
could, but that I must for once receive the people alone.
I wish I might stand by your side to help receive them! he said,
impulsively. Would any of them faint at it? Do you think Mrs. Webb
would, if she were here? he continued, with a smile. Ah, well--a
short while, my darling, and I shall have the right to stand by you.
He stole his arm round her waist, and whispered to her a
repetition of those love vows that had so often before charmed her
ear and thrilled her heart. Her cheek touched his shoulder; the faint
perfume of her costly fan, that she swayed unconsciously as it hung
from her wrist, was to him like an odour from Paradise. He
recounted to her all the features he remembered of the house that
neither of them doubted would be their future home; and the
minutes passed, in, to both, bliss unutterable.
The crashing up of a carriage--of two carriages it seemed--warned
them that this sweet pastime was at an end. Sounds of bustle in the
hall succeeded to it: the servants were receiving the first guests.
Oh, William--I forgot--I meant to tell you, she hurriedly
whispered. I had the most ugly dream last night. And you know I
very rarely do dream. I have not been able to get it out of my mind
all day.
What is it, Mary?
I thought we were separated, you and I; separated for ever. We
had quarrelled, I think; that point was not clear; but you turned off
one way, and I another. It was in the gallery of this house, William,
and we had been talking together. You went out at the other end, by
the door near the dining-room, and I at this end; and we turned at
the last and looked at one another. Oh, the look was dreadful! I shall
never forget it: so full of pain and sadness! And we knew, both of us
knew, that it was the last farewell look; that we should never again
meet in this world.
Oh, my love! my love! he murmured, bending his face on hers.
And you could let it trouble you!--knowing it was but a dream!
Nothing but the decree of God--death--shall ever separate us, Mary.
For weal or for woe, we will go through the life here together.
He kissed away the tears that had gathered in her eyes at the
remembrance; and Miss Castlemaine turned hastily into one of the
larger rooms, and took up her standing there in expectation. For the
feet of the gay world were already traversing the gallery.
She welcomed her guests, soon coming in thick and threefold,
with the gracious manner and the calm repose of bearing that
always characterised her, apologising to all for the absence of her
father; telling that he had been called out unexpectedly on some
matter of business, but would soon return. Amid others, came the
party from Greylands' Rest, arriving rather late: Mrs. Castlemaine in
black velvet, leaning on the arm of her stepson; Ethel Reene walking
modestly behind, in a simple dress of white net, adorned with white
ribbons. There was many a fine young man present, but never a
finer or more attractive one than Harry Castlemaine; with the
handsome Castlemaine features, the easy, independent bearing, and
the ready tongue.
Is it of any use to ask whether you are at liberty to honour me
with your hand for the first dance, Mary Ursula? he inquired, after
leaving Mrs. Castlemaine on a sofa.
Not the least, Harry, answered Miss Castlemaine, smiling. I am
engaged for that, and for the second as well.
Of course. Well, it is all as it should be, I suppose. Given the
presence of Mr. Blake-Gordon, and no one else has so good a right
as he to open the ball with you.
You will find a substitute for me by the asking, Harry. See all
those young ladies around; not one but is glancing towards you with
the hope that you may seek her.
He laughed rather consciously. He was perfectly well aware of the
universal favour accorded by the ladies, young and old, to Harry
Castlemaine. But this time, at any rate, he intended to disappoint
them all. He turned to Miss Reene.
Will you take compassion upon a rejected man, Ethel? Mary
Ursula won't have me for the first two dances, you hear; so I appeal
to you in all humility to heal the smart. Don't reject me.
Nonsense, Harry! was the young lady's answer. You must not
ask me for the first dance; it would be like brother and sister
dancing together; all the room would resent it in you, and call it bad
manners. Choose elsewhere. There's Miss Mountsorrel; she will not
say you nay.
For the dances, no but she'll not condescend to speak three
words to me while they are in process, returned Mr. Harry
Castlemaine. If you do not dance them with me, Ethel, I shall sit
down until the two first dances are over.
He spoke still in the same laughing, half joking manner; but,
nevertheless, there was a ring of decision in the tone of the last
words; and Ethel knew he meant what he said. The Castlemaines
rarely broke through any decision they might announce, however
lightly it was spoken; and Harry possessed somewhat of the same
persistent will.
If you make so great a point of it, I will dance with you,
observed Ethel. But I must again say that you ought to take anyone
rather than me.
I have not seen my uncle yet, remarked Miss Castlemaine to
Ethel, as Harry strolled away to pay his devoirs to the room
generally. Where can he be lingering?
Papa is not here, Mary Ursula.
Not here! How is that?
Really I don't know, replied Ethel. When Harry came running
out to get into the carriage to-night--we had been sitting in it quite
five minutes waiting for him but he had been away all day, and was
late in dressing--Miles shut the door. 'Don't do that,' said Harry to
him, 'the master's not here.' Upon that, Mrs. Castlemaine spoke, and
said papa was not coming with us.
I suppose he will be coming in later, remarked Mary Ursula, as
she moved away to meet fresh guests.
The dancing began with a country dance; or, as would have been
said then, the ball opened with one. Miss Castlemaine and her lover,
Mr. Blake-Gordon, took their places at its head; Harry Castlemaine
and Miss Reene were next to them. For in those days, people stood
much upon etiquette at these assemblies, and the young ladies of
the family took precedence of all others in the opening dance.
The dance chosen was called the Triumph. Harry Castlemaine led
Mary Ursula down between the line of admiring spectators; her
partner, Mr. Blake-Gordon, followed, and they brought the young
lady back in triumph. Such was the commencement of the figure. It
was a sight to be remembered in after years; the singular good looks
of at least two of the three; Harry, the sole male heir of the
Castlemaines, with the tall fine form and the handsome face; and
Mary Ursula, so stately and beautiful. Ethel Reene was standing
alone, in her quiet loveliness, looking like a snowdrop, and waiting
until her turn should come to be in like manner taken down. The
faces of all sparkled with animation and happiness; the gala robes of
the two young ladies added to the charm of the scene. Many
recalled it later; recalled it with a pang: for, of those four, ere a year
had gone by, one was not, and another's life had been blighted. No
prevision, however, rested on any of them this night of what the
dark future held in store; and they revelled in the moment's
enjoyment, gay at heart. Heaven is too merciful to let Fate cast its
ominous shade on us before the needful time.
The banker came in ere the first dance was over. Moving about
from room to room among his guests, glancing with approving smile
at the young dancers, seeing that the card-tables were filled, he at
length reached the sofa of Mrs. Castlemaine. She happened to be
alone on it just then, and he sat down beside her.
I don't see James anywhere, he remarked. Where is he hiding
himself?
He has not come, replied Mrs. Castlemaine.
No! How's that? James enjoys a ball.
Yes, I think he does still, nearly as much as his son Harry.
Then what has kept him away?
I really do not know. I had thought nearly to the last that he
meant to come. When I was all but ready myself, finding James had
not begun to dress, I sent Harriet to remind him of the lateness of
the hour, and she brought word back that her master was not
going.
Did he say why? asked Mr. Peter Castlemaine.
No! I knocked at his study door afterwards and found him seated
at his bureau. He seemed busy. All he said to me was, that he
should remain at home; neither more nor less. You know, Peter,
James rarely troubles himself to give a reason for what he does.
Well, I am sorry. Sorry that he should miss a pleasant evening,
and also because I wanted to speak to him. We may not have many
more of these social meetings.
I suppose not, said Mrs. Castlemaine, assuming that her
brother-in-law alluded in an indirect way to his daughter's
approaching marriage. When once you have lost Mary Ursula, there
will be nobody to hold, festivities for.
No, said the banker, absently.
I suppose it will be very soon now.
What will be soon?
The wedding. James thinks it will be after Easter.
Oh--ay--the wedding, spoke Mr. Peter Castlemaine, with the air
of a man who has just caught up some recollection that had slipped
from him. I don't know yet: we shall see: no time has been decided
on.
Close as his brother thought Mrs. Castlemaine. No likelihood,
that he will disclose anything unless he chooses.
Will James be coming in to Stilborough to-morrow? asked the
banker.
I'm sure I cannot tell. He goes out and comes in, you know,
without any reference to me. I should fancy he would not be coming
in, unless he has anything to call him. He has not seemed well to-
day; he thinks he has caught a cold.
Ah, then I daresay that's the secret of his staying at home to-
night, said Mr. Peter Castlemaine.
Yes, it may be. I did not think of that. And he has also been very
much annoyed to-day: and you know, Peter, if once James is
thoroughly put out of temper, it takes some little time to put him in
again.
The banker nodded assent.
What has annoyed him?
A very curious thing, replied Mrs. Castlemaine: you will hardly
believe it when I tell you. Some young man----
Breaking off suddenly, she glanced around to make sure that no
one was within hearing. Then drawing nearer to the banker, went on
in a lowered voice:
Some young man presented himself this morning at Greylands'
Rest, pretending to want to put in a claim to the estate.
Abstracted though the banker had been throughout the brief
interview, these words aroused him to the quick. In one moment he
was the calm, shrewd, attentive business man, Peter Castlemaine,
his head erect, his keen eyes observant.
I do not understand you, Mrs. Castlemaine.
Neither do I understand, she rejoined. James said just a word
or two to me, and I gathered the rest.
Who was the young man?
Flora described him as wearing a coat trimmed with fur; and
Miles thought he spoke with somewhat of a foreign accent, replied
Mrs. Castlemaine, deviating unconsciously from the question, as
ladies sometimes do deviate.
But don't you know who he was? Did he give no account of
himself?
He calls himself Anthony Castlemaine.
As the name left her lips a curious kind of change, as though he
were startled, passed momentarily over the banker's countenance.
But he neither stirred nor spoke.
When the card was brought in with that name upon it--James
happened to be in the red parlour, talking with me about a new
governess--I said it must be an old card of your father's that
somebody had got hold of. But it turned out not to be that: and,
indeed, it was not like the old cards. What he wants to make out is,
that he is the son of Basil Castlemaine.
Did James see him?
Oh dear yes, and their interview lasted more than an hour.
And he told James he was Basil's son?--this young man.
I think so. At any rate, the young man told Ethel he was. She
happened to meet him as he was leaving the house and he
introduced himself to her as Anthony Castlemaine, Basil's son, and
said he had come over to claim his inheritance--Greylands' Rest.
And where's Basil? asked the banker, after a pause.
Dead.
Dead?
So the young man wishes to make appear. My opinion is he must
be some impostor.
An impostor no doubt, assented the banker, slowly. At least--he
may be. I only wonder that we have not, under the circumstances,
had people here before, claiming to be connected with Basil.
And I am sure the matter has annoyed James very much,
pursued Mrs. Castlemaine. He betrayed it in his manner, and was
not at all like himself all the afternoon. I should make short work of
it if the man came again, were I James, and threaten him with the
law.
Mr. Peter Castlemaine said no more, and presently rose to join
other of his guests. But as he talked to one, laughed with another,
listened to a third, his head bent in attention, his eyes looking
straight into their eyes, none had an idea that these signs of interest
were evinced mechanically, and that his mind was far away.
He had enough perplexity and trouble of his own just then, as
Heaven knew; very much indeed on this particular evening; but this
other complexity, that appeared to be arising for his brother James,
added to it. To Mrs. Castlemaine's scornfully expressed opinion that
the man was an impostor, he had assented just in the same way that
he was now talking with his guests--mechanically. For some instinct,
or prevision, call it what you will, lay on the banker's heart, that the
man would turn out to be no impostor, but the veritable son of the
exile, Basil.
Peter Castlemaine was much attached to his brother James, and
for James's own sake he would have regretted that any annoyance
or trouble should arise for him; but he had also a selfish motive for
regretting it. In his dire strait as to money--for to that it had now
come--he had been rapidly making up his mind that evening to
appeal to James to let him have some. The appeal might not be
successful under the most favourable auspices: he knew that: but
with this trouble looming for the Master of Greylands, he foresaw
that it must and would fail. Greylands' Rest might be James's in all
legal security; but an impression had lain on the mind of Peter
Castlemaine, since his father's death, that if Basil ever returned he
would set up a fight for it.
Supper over--the elaborate, heavy, sit-down supper of those days-
-and the two dances following upon it, most of the guests departed.
Mr. Blake-Gordon, seeking about for the banker to wish him
goodnight, at length found him standing over the fire in the deserted
card-room. Absorbed though he was in his own happiness, the
young man could but notice the flood-tide of care on the banker's
brow. It cleared off, as though by magic, when the banker looked up
and saw him.
Is it you, William? I thought you had left.
I should hardly go, sir, without wishing you goodnight. What a
delightful evening it has been!
Ay, I think you have all enjoyed yourselves.
Oh, very, very much.
Well, youth is the time for enjoyment, observed the banker. We
can never again find the zest in it, once youth is past.
You look tired, sir; otherwise I--I might have ventured to trespass
on you for five minutes' conversation, late though it be, pursued Mr.
Blake-Gordon with some hesitation.
Tired!--not at all. You may take five minutes; and five to that,
William.
It is about our future residence, sir. Raven's Priory is in the
market: and I think--and Mary thinks--it will just suit us.
Ay; I heard more than a week ago that the Wests were leaving.
The words took William Blake-Gordon by surprise. He looked at
the banker.
Did you, sir!--more than a week ago! And did it not strike you
that it would be a very suitable place for us?
I cannot say that I thought much about it, was the banker's
answer; and he was twirling an ornament on the mantelpiece about
with his hand as he spoke: a small, costly vase of old china from
Dresden.
But don't you think it would be, sir?
I daresay it might be. The gardens and conservatories have been
well kept up; and you and Mary Ursula have both a weakness for
rare flowers.
That was perfectly true. And the weakness showed itself then,
for the young man went off into a rapturous description of the
wealth of Raven's Priory in respect of floriculture. The ten minutes
slipped away to twenty; and in his own enthusiasm Mr. Blake-Gordon
did not notice the absence of it in his hearer.
But I must not keep you longer, sir, he suddenly said, as his eyes
caught the hands of the clock. Perhaps you will let me see you
about it to-morrow. Or allow my father to see you--that will be
better.
Not to-morrow, said Mr. Peter Castlemaine. I shall be
particularly engaged all day. Some other time.
Whenever you please, sir. Only--we must take care that we are
not forestalled in the purchase. Much delay might----
We can obtain a promise of the first refusal, interrupted the
banker, in a somewhat impatient tone. That will not be difficult.
True. Goodnight, sir. And thank you for giving us this most
charming evening.
Goodnight, William.
But Mr. Blake-Gordon had not yet said his last farewell to his
betrothed wife; and lovers never think that can be spoken often
enough. He found her in the music-room, seated before the organ.
She was waiting for her father.
We shall have Raven's Priory, Mary, he whispered, speaking in
accordance with his thoughts, in his great hopefulness; and his voice
was joyous, and his pale face had a glow on it not often seen there.
Your papa himself says how beautiful the gardens and
conservatories are.
Yes, she softly answered, we shall be sure to have it.
I may not stay, Mary: I only came back to tell you this. And to
wish you goodnight once again.
Her hand was within his arm, and they walked together to the end
of the music-room. All the lights had been put out, save two. Just
within the door he halted and took his farewell. His arm was around
her, his lips were upon hers.
May all good angels guard you this happy night--my love!--my
promised wife!
He went down the corridor swiftly; she stole her blushing face to
the opening of the door, to take a last look at him. At that moment a
crash, as of some frail thing broken, was heard in the card-room. Mr.
Blake-Gordon turned into it Mary Ursula followed him.
The beautiful Dresden vase lay on the stone flags of the hearth,
shivered into many atoms. It was one that Mary Ursula set great
store by, for it had been a purchase of her mother's.
Oh papa! How did it happen?
My dear, I swept it off unwittingly with my elbow: I am very sorry
for it, said Mr. Peter Castlemaine.
CHAPTER VI.
ANTHONY CASTLEMAINE ON HIS SEARCH.
The hour of dinner with all business men in Stilborough was half-
past one o'clock in the day. Perhaps Mr. Peter Castlemaine was the
only man who did not really dine then; but he took his luncheon;
which came to the same thing. It was the recognized daily
interregnum in the public doings of the town--this half hour between
half-past one and two: consequently shops, banks, offices, all were
virtually though not actually closed. The bank of Mr. Peter
Castlemaine made no exception. On all days, except Thursday,
market day, the bank was left to the care of one clerk during this
half hour: the rest of the clerks and Mr. Hill would be out at their
dinner. As a rule, not a single customer came in until two o'clock had
struck.
It was the day after the ball. The bank had been busy all the
morning, and Mr. Peter Castlemaine had been away the best part of
it. He came back at half-past one, just as the clerks were filing out.
Do you want me, sir? asked Thomas Hill, standing back with his
hat in his hand; and it was the dreadfully worn, perplexed look on
his master's face that induced him to ask the question.
Just for a few minutes, was the reply. Come into my room.
Once there, the door was closed upon them, and they sat in
grievous tribulation. There was no dinner for poor Thomas Hill that
day; there was no lunch for his master: the hour's perplexities were
all in all.
On the previous evening some stranger had arrived at Stilborough,
had put up at the chief inn there, the Turk's Head; and then, after
enquiring the private address of Mr. Peter Castlemaine's head clerk,
had betaken himself to the clerk's lodgings. Thomas Hill was seated
at tea when the gentleman was shown in. It proved to be a Mr.
Fosbrook, from London: and the moment the clerk heard the name,
Fosbrook, and realized the fact that the owner of it was in actual
person before him, he turned as cold as a stone. For of all the men
who could bring most danger on Mr. Peter Castlemaine, and whom
the banker had most cause to dread, it was this very one, Fosbrook.
That he had come down to seek explanations in person which might
no longer be put off, the clerk felt sure of: and the fact of his
seeking out him instead of his master, proved that he suspected
something was more than wrong. He had had a little passing, private
acquaintance with Mr. Fosbrook in the years gone by, and perhaps
that induced the step.
Thomas Hill did what he could. He dared not afford explanation or
information himself, for he knew not what it would be safe to say,
what not. He induced Mr. Fosbrook to return to his inn, undertaking
to bring his master to wait on him there. To the banker's house he
would not take the stranger; for the gaiety of which it was that night
the scene was not altogether a pleasant thing to show to a creditor.
Leaving Mr. Fosbrook at the Turk's Head on his way, he came on to
apprise Mr. Peter Castlemaine.
Mr. Peter Castlemaine went at once to the inn. He had no resource
but to go: he did not dare do otherwise: and this it was that caused
his absence during the arrival of the guests. The interview was not a
long one; for the banker, pleading the fact of having friends at
home, postponed it until the morning.
It was with this gentleman that his morning had been spent; that
he had now, half-after one o'clock, just come home from. Come
home with the weary look in his face, and the more than weary pain
at his heart.
And what is the result, sir? asked Thomas Hill as they sat down
together.
The result is, that Fosbrook will wait a few days, Hill three or four,
he says. Perhaps that may be made five or six: I don't know. After
that--if he is not satisfied by tangible proofs that things are right and
not wrong, so far as he is concerned--there will be no further
waiting.
And the storm must burst.
The storm must burst, echoed Peter Castlemaine.
Oh but, sir, my dear master, what can be done in those few poor
days? cried Thomas Hill, in agitation. Nothing. You must have more
time allowed you.
I had much ado to get that much, Hill. I had to LIE for it, he
added, in a low tone.
Do you see a chance yourself, sir?
Only one. There is a chance; but it is a very remote one. That
last venture of mine has turned up trumps: I had the news by the
mail this morning: and if I can realize the funds in time, the present
danger may be averted.
And the future trouble also, spoke Thomas Hill, catching eagerly
at the straw of hope. Why, sir, that will bring you in a mine of
wealth.
Yes. The only real want now is time. Time! time! I have said it
before perhaps too sanguinely; I can say it in all truth now.
And, sir--did you not show this to be the case to Mr. Fosbrook?
I did. But alas, I had to deny to him my other pressing liabilities--
and he questioned sharply. Nevertheless, I shall tide it over, all of it,
if I can only secure the time. That account of Merrit's--we may as
well go over it together now, Thomas. It will not take long.
They drew their chairs to the table side by side. A thought was
running through Thomas Hill's mind, and he spoke it as he opened
the ledgers.
With this good news in store, sir, making repayment certain--for if
time be given you, you will now have plenty--don't you think Mr.
Castlemaine would advance you funds?
I don't know, said the banker. James seems to be growing
cautious. He has no notion of my real position--I shrink from telling
him--and I am sure he thinks that I am quite rich enough without
borrowing money from anybody for fresh speculations. And, in truth,
I don't see how he can have much money at command. This new
trouble, that may be looming upon him, will make him extra
cautious.
What trouble? asked Thomas Hill.
Some man, I hear, has made his appearance at Greylands, calling
himself Anthony Castlemaine, and saying that he is a son of my
brother Basil, replied the banker, confidentially.
Never! cried the old man. But, sir, if he be, how should that
bring trouble on Mr. Castlemaine?
Because the stranger says he wants to claim Greylands' Rest.
He must be out of his mind, said Thomas Hill. Greylands' Rest is
Mr. Castlemaine's; safe enough too, I presume.
But a man such as this may give trouble, don't you see.
No, sir, I don't see it--with all deference to your opinion. Mr.
Castlemaine has only to show him it is his, and send him to the right
about----
A knock at the room door interrupted the sentence. The clerk rose
to open it, and received a card and a message, which he carried to
his master. The banker looked rather startled as he read the name
on it: Anthony Castlemaine.
Somewhere about an hour before this, young Anthony
Castlemaine, after a late breakfast a la fourchette, had turned out of
the Dolphin Inn to walk to Stilborough. Repulsed by his Uncle James
on the previous day, and not exactly seeing what his course should
be, he had come to the resolution of laying his case before his other
uncle, the banker. Making enquiries of John Bent as to the position
of the banker's residence, he left the inn. Halting for a few seconds
to gaze across beyond the beach, for he thought the sea the most
beautiful object in nature and believed he should never tire of
looking at it, he went on up the hill, past the church, and was fairly
on his road to Stilborough. It was a lonely road enough, never a
dwelling to be seen all the way, save a farm homestead or two lying
away amid their buildings; but Anthony Castlemaine walked slowly,
taking in all the points and features of his native land, that were so
strange to his foreign eye. He stood to read the milestones; he
leaned on the fences; he admired the tall fine trees, leafless though
they were; he critically surveyed the two or three carts and waggons
that passed. The sky was blue, the sun bright, he enjoyed the walk
and did not hurry himself: but nevertheless he at length reached
Stilborough, and found out the house of the banker. He rang at the
private door.
The servant who opened it saw a young man dressed in a rather
uncommon kind of overcoat, faced with fur. The face was that of a
stranger; but the servant fancied it was a face he had seen before.
Is my uncle Peter at home?
Sir! returned the servant, staring at him. For the only nephew
the banker possessed, so far as he knew, was the son of the Master
of Greylands. What name did you please to ask for, sir?
Mr. Peter Castlemaine. This is his residence I am told.
Yes, sir, it is.
Can I see him? Is he at home?
He is at home, in his private room, sir; I fancy he is busy. I'll ask
if you can see him. What name shall I say, sir?
You can take my card in. And please say to your master that if he
is busy, I can wait.
The man glanced at the card as he knocked at the door of the
private room, and read the name: Anthony Castlemaine.
It must be a nephew from over the sea, he shrewdly thought:
he looks foreign. Perhaps a son of that lost Basil.
We have seen that Thomas Hill took in the card and the message
to his master. He came back, saying the gentleman was to wait; Mr.
Peter Castlemaine would see him in a quarter of an hour. So the
servant, beguiled by the family name, thought he should do right to
conduct the stranger upstairs to the presence of Miss Castlemaine,
and said so, while helping him to take off his overcoat.
Shall I say any name, sir? asked the man, as he laid his hand on
the handle of the drawing-room door.
Mr. Anthony Castlemaine.
Mary Ursula was alone. She sat near the fire doing nothing, and
very happy in her idleness, for her thoughts were buried in the
pleasures of the past gay night; a smile was on her face. When the
announcement was made, she rose in great surprise to confront the
visitor. The servant shut the door, and Anthony came forward.
He did not commit a similar breach of good manners to the one of
the previous day; the results of that had shown him that fair
stranger cousins may not be indiscriminately saluted with kisses in
England. He bowed, and held out his hand with a frank smile. Mary
Ursula did not take it: she was utterly puzzled, and stood gazing at
him. The likeness in his face to her father's family struck her forcibly.
It must be premised that she did not yet know anything about
Anthony, or that any such person had made his appearance in
England. Anthony waited for her to speak.
If I understood the name aright--Anthony Castlemaine--you must
be, I presume, some relative of my late grandfather's, sir? she said
at length.
He introduced himself fully then; who he was, and all about it.
Mary Ursula met his hand cordially. She never doubted him or his
identity for a moment. She had the gift of reading countenances;
and she took to the pleasant, honest face at once, so like the
Castlemaines in features, but with a more open expression.
I am sure you are my cousin, she said, in cordial welcome. I
think I should have known you for a Castlemaine had I seen your
face in a crowd.
I see, myself, how like I am to the Castlemaines, especially to my
father and grandfather: though unfortunately I have not inherited
their height and strength, he added, with a slight laugh. My
mother was small and slight: I take after her.
And my poor uncle Basil is dead!
Alas, yes! Only a few weeks ago. These black clothes that I wear
are in memorial of him.
I never saw him, said Miss Castlemaine, gazing at the familiar--
for indeed it seemed familiar--face before her, and tracing out its
features. But I have heard say my uncle Basil was just the image of
his father.
And he was, said Anthony. When I saw the picture of my
grandfather yesterday at Greylands' Rest, I thought it was my
father's hanging there.
It was a long while since Miss Castlemaine had met with anyone
she liked so well at a first interview as this young man; and the
quarter of an hour passed quickly. At its end the servant again
appeared, saying his master would see him in his private room. So
he took leave of Mary Ursula, and was conducted to it.
But, as it seemed, Mr. Peter Castlemaine did not wait to receive
him: for almost immediately he presented himself before his
daughter.
This person has been with you, I find, Mary Ursula! Very wrong
of Stephen to have brought him up here! I wonder what possessed
him to do it?
I am glad he did bring him, papa, was her impulsive answer.
You have no idea what a sensible, pleasant young man he is. I
could almost wish he were more even than a cousin--a brother.
Why, my dear, you must be dreaming! cried the banker, after a
pause of astonishment. Cousin!--brother! It does not do to take
strange people on trust in this way. The man may be, and I dare say
is, an adventurer, he continued, testily: no more related to the
Castlemaines than I am related to the King of England.
She laughed. You may take him upon trust, papa, without doubt
or fear. He is a Castlemaine all over, save in the height. The likeness
to grandpapa is wonderful; it is so even to you and to uncle James.
But he says he has all needful credential proofs with him.
The banker, who was then looking from the window, stood
fingering the bunch of seals that hung from his long and massive
watch-chain, his habit sometimes when in deep thought. Self-
interest sways us all. The young man was no doubt the individual he
purported to be: but if he were going to put in a vexatious claim to
Greylands' Rest, and so upset James, the banker might get no loan
from him. He turned to his daughter.
You believe, then, my dear, that he is really what he makes
himself out to be--Basil's son?
Papa, I think there is no question of it. I feel sure there can be
none. Rely upon it, the young man is not one who would lay himself
out to deceive, or to countenance deception: he is evidently honest
and open as the day. I scarcely ever saw so true a face.
Well, I am very sorry, returned the banker. It may bring a great
deal of trouble upon James.
In what way can it bring him trouble, papa? questioned Mary
Ursula, in surprise.
This young man--as I am informed--has come over to put in a
claim to Greylands' Rest.
To Greylands' Rest! she repeated. But that is my uncle James's!
How can anyone else claim it?
People may put in a claim to it; there's no law against that; as I
fear this young man means to do, replied the banker, taking
thought and time over his answer. He may cost James no end of
bother and expense.
But, papa--I think indeed you must be misinformed. I feel sure
this young man is not one who would attempt to claim anything that
is not his own.
But if he supposes it to be his own?
What, Greylands' Rest his? How can that be?
My dear child, as yet I know almost nothing. Nothing but a few
words that Mrs. Castlemaine said to me last night.
But why should he take up such a notion, papa? she asked, in
surprise.
From his father, I suppose. I know Basil as much believed
Greylands' Rest would descend to him as he believed In his Bible.
However, I must go down and see this young man.
As soon as Peter Castlemaine entered his private room, and let his
eyes rest on the face of the young man who met him so frankly, he
saw the great likeness to the Castlemaines. That it was really his
nephew, Basil's son, he had entertained little doubt of from the first;
none, since the recent short interview with his daughter. With this
conviction on his mind, it never would have occurred to him to deny
or cast doubts on the young man's identity, and he accepted it at
once. But though he called him Anthony, or Anthony
Castlemaine--and now and then by mistake Basil--he did not show
any mark of gratification or affection, but was distant and cold; and
thought it very inconvenient and ill-judged of Basil's son to be
bringing trouble on James. Taking his place in his handsome chair,
turned sideways to the closed desk, he faced the young man seated
before him.
A few minutes were naturally spent in questions and answers,
chiefly as to Basil's career abroad. Young Anthony gave every
information freely--just as he had done to his uncle James on the
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

More Related Content

PDF
Lectures On Factorization Homology Categories And Topological Field Theories ...
PDF
Mathematics for Neuroscientists Fabrizio Gabbiani
PDF
Introduction To The Theory Of Complex Systems Stefan Thurner
PDF
Fundamentals Of Advanced Mathematics 1 Bourles Henri
PDF
Mathematical Foundations Of Neuroscience 1st Edition G Bard Ermentrout
PDF
Mathematics And The Natural Sciences The Physical Singularity Of Life Francis...
PDF
Quantum Computing Made Easy David Bradshaw
PDF
Journey Into Mathematics An Introduction To Proofs Dover Ed Joseph J Rotman
Lectures On Factorization Homology Categories And Topological Field Theories ...
Mathematics for Neuroscientists Fabrizio Gabbiani
Introduction To The Theory Of Complex Systems Stefan Thurner
Fundamentals Of Advanced Mathematics 1 Bourles Henri
Mathematical Foundations Of Neuroscience 1st Edition G Bard Ermentrout
Mathematics And The Natural Sciences The Physical Singularity Of Life Francis...
Quantum Computing Made Easy David Bradshaw
Journey Into Mathematics An Introduction To Proofs Dover Ed Joseph J Rotman

Similar to A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury (20)

PDF
An Invitation To Applied Category Theory Seven Sketches In Compositionality B...
PDF
Mathematics For Physics An Illustrated Handbook 1st Edition Adam Marsh
PDF
Discrete Mathematics Lecture Notes
PDF
Electromagnetic Analysis Using Transmission Line Variables Third Edition Maur...
PPTX
History of AI - ICIMCC 2024 - Wuhan China
PDF
Handbook Of Philosophical Logic Vol 1 2nd Edition Dov M Gabbay
PDF
An Introduction To Chaotic Dynamical Systems 2nd Edition Robert Devaney
PDF
Calculus In 3d Geometry Vectors And Multivariate Calculus Draft Nitecki
PDF
Differential Geometry From A Singularity Theory Viewpoint Shyuichi Izumiya
PDF
Handbook Of Philosophical Logic 2nd Dov M Gabbay Franz Guenthner Eds
PDF
Effective Mathematics Of The Uncountable Greenberg N Hirschfeldt D
PDF
Discrete Stochastic Processes Lecture Notes Mit 6262 Itebooks
PDF
Models And Cognition Prediction And Explanation In Everyday Life And In Scien...
PDF
Computational Geometry Of Positive Definite Quadratic Forms Achill Schurmann
PDF
Hermitian Analysis From Fourier Series To Cauchyriemann Geometry 1st Edition ...
PDF
2003 book discrete_mathematics
PDF
Category Theory 3rd Edition Horst Herrlich George Strecker
PPTX
History of Artificial Intelligence (slides)
PDF
Modal Logics And Philosophy Second Edition Second Edition Rod Girle
PDF
Institutionindependent Model Theory 1st Edition Razvan Diaconescu
An Invitation To Applied Category Theory Seven Sketches In Compositionality B...
Mathematics For Physics An Illustrated Handbook 1st Edition Adam Marsh
Discrete Mathematics Lecture Notes
Electromagnetic Analysis Using Transmission Line Variables Third Edition Maur...
History of AI - ICIMCC 2024 - Wuhan China
Handbook Of Philosophical Logic Vol 1 2nd Edition Dov M Gabbay
An Introduction To Chaotic Dynamical Systems 2nd Edition Robert Devaney
Calculus In 3d Geometry Vectors And Multivariate Calculus Draft Nitecki
Differential Geometry From A Singularity Theory Viewpoint Shyuichi Izumiya
Handbook Of Philosophical Logic 2nd Dov M Gabbay Franz Guenthner Eds
Effective Mathematics Of The Uncountable Greenberg N Hirschfeldt D
Discrete Stochastic Processes Lecture Notes Mit 6262 Itebooks
Models And Cognition Prediction And Explanation In Everyday Life And In Scien...
Computational Geometry Of Positive Definite Quadratic Forms Achill Schurmann
Hermitian Analysis From Fourier Series To Cauchyriemann Geometry 1st Edition ...
2003 book discrete_mathematics
Category Theory 3rd Edition Horst Herrlich George Strecker
History of Artificial Intelligence (slides)
Modal Logics And Philosophy Second Edition Second Edition Rod Girle
Institutionindependent Model Theory 1st Edition Razvan Diaconescu
Ad

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PDF
Classroom Observation Tools for Teachers
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharma ospi slides which help in ospi learning
PDF
Pre independence Education in Inndia.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
master seminar digital applications in india
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Cell Structure & Organelles in detailed.
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
01-Introduction-to-Information-Management.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
GDM (1) (1).pptx small presentation for students
Classroom Observation Tools for Teachers
VCE English Exam - Section C Student Revision Booklet
Pharma ospi slides which help in ospi learning
Pre independence Education in Inndia.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
master seminar digital applications in india
Module 4: Burden of Disease Tutorial Slides S2 2025
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
102 student loan defaulters named and shamed – Is someone you know on the list?
Cell Structure & Organelles in detailed.
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
01-Introduction-to-Information-Management.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharmacology of Heart Failure /Pharmacotherapy of CHF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Cell Types and Its function , kingdom of life
O5-L3 Freight Transport Ops (International) V1.pdf
Ad

A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury

  • 1. A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury download https://ebookbell.com/product/a-tale-of-discrete-mathematics-a- journey-through-logic-reasoning-structures-and-graph-theory- joseph-khoury-57069494 Explore and download more ebooks at ebookbell.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. A Tale Of Discrete Mathematics A Journey Through Logic Reasoning Structures And Graph Theory Joseph Khoury https://ebookbell.com/product/a-tale-of-discrete-mathematics-a- journey-through-logic-reasoning-structures-and-graph-theory-joseph- khoury-56974438 A Tale Of Two Viruses The Parallel Research Trajectories Of Tumor And Bacterial Viruses Neeraja Sankaran https://ebookbell.com/product/a-tale-of-two-viruses-the-parallel- research-trajectories-of-tumor-and-bacterial-viruses-neeraja- sankaran-46087356 A Tale Of Two Princes Eric Geron https://ebookbell.com/product/a-tale-of-two-princes-eric- geron-47562914 A Tale Of Two Princes 1st Edition Eric Geron https://ebookbell.com/product/a-tale-of-two-princes-1st-edition-eric- geron-48208528
  • 3. A Tale Of Two Cities Charles Dickens https://ebookbell.com/product/a-tale-of-two-cities-charles- dickens-48506290 A Tale Of Steam Cinders Crea Reitan https://ebookbell.com/product/a-tale-of-steam-cinders-crea- reitan-48570140 A Tale Of Two Stories Customary Marriage And Paternity A Discourse Analysis Of A Scandal In Egypt Originalausgabe Bjrn Bentlage https://ebookbell.com/product/a-tale-of-two-stories-customary- marriage-and-paternity-a-discourse-analysis-of-a-scandal-in-egypt- originalausgabe-bjrn-bentlage-49052068 A Tale Of Two Churches Distinctive Social And Economic Dynamics At Thessalonica And Corinth Jung https://ebookbell.com/product/a-tale-of-two-churches-distinctive- social-and-economic-dynamics-at-thessalonica-and-corinth-jung-49052158 A Tale Of Two Stpas Diverging Paths In The Revival Of Buddhism In China Albert Welter https://ebookbell.com/product/a-tale-of-two-stpas-diverging-paths-in- the-revival-of-buddhism-in-china-albert-welter-50197518
  • 8. Published by World Scientific Publishing Co. Pte. Ltd. 5 Toh Tuck Link, Singapore 596224 USA office: 27 Warren Street, Suite 401-402, Hackensack, NJ 07601 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE Library of Congress Cataloging-in-Publication Data Names: Khoury, Joseph, 1968– author. Title: A tale of discrete mathematics : a journey through logic, reasoning, structures and graph theory / Joseph Khoury, University of Ottawa, Canada. Description: New Jersey : World Scientific, [2024] | Includes index. Identifiers: LCCN 2023049052 | ISBN 9789811285783 (hardcover) | ISBN 9789811285790 (ebook for institutions) | ISBN 9789811285806 (ebook for individuals) Subjects: LCSH: Logic, Symbolic and mathematical--Textbooks. | Combinatorial analysis--Textbooks. | Set theory--Textbooks. | Algebraic logic--Textbooks. Classification: LCC QA9 .K435 2024 | DDC 511.3--dc23/eng/20231221 LC record available at https://lccn.loc.gov/2023049052 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. Copyright © 2024 by World Scientific Publishing Co. Pte. Ltd. All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the publisher. For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher. For any available supplementary material, please visit https://www.worldscientific.com/worldscibooks/10.1142/13663#t=suppl Desk Editors: Nimal Koliyat/Kwong Lai Fun Typeset by Stallion Press Email: enquiries@stallionpress.com Printed in Singapore
  • 9. To the one who showed me that true love is beyond discrete and continuous, it is simply out of this world. To my daughter Jo-Ann whose presence in my life fills my heart with warmth and joy every day.
  • 10. This page intentionally left blank This page intentionally left blank This page intentionally left blank This page intentionally left blank
  • 11. Preface In the English Cambridge dictionary, one can find the following definition of the word discrete: clearly separate or different in shape or form. From a mathematical perspective, this definition might not tell much about the nature of discrete mathematics, but it hints at the fact that the subject is an umbrella of many areas of mathematics that share the property of being discrete as opposed to continuous. Understanding the difference between these two concepts is key to understanding what discrete mathematics is and the scope of the topics that fall under its umbrella. A well-known example to explain the difference between these two notions is the comparison between an analog clock (i.e., a clock with three hands) and a digital one. If one has a super magnifier, then one can see that there are always two positions occupied by the seconds hand of an analogue clock so close together that we cannot distinguish them with the naked eye. We say that the seconds hand moves in a continuous mode (at least in theory). The digital clock, on the other hand, displays numerals which are limited in values and distinct from one another. In discrete mathematics, variables (like the numerals on digital clocks) cannot get arbitrarily small as they are just multiples of a certain unit. For example, integers are just multiples of the digit 1. We cannot choose an integer n arbitrary close to 0 for instance. As a consequence, notions like the instantaneous rate of change and limits of functions and sequences can only be defined in continuous mathematics. Topics covered in a typical discrete mathematics course are certainly not new additions to mathematics. Some of them go back deep in history to the time where humans first felt the need to count, to calculate areas and to keep track of time. However, the recent advances in technology and computer science have resulted in increased interest in these topics. The basic fact that vii
  • 12. viii A Tale of Discrete Mathematics information is stored and analyzed by machines in a discrete manner made discrete mathematics a key to any advancement in computer science. Topics covered by a modern entry level discrete mathematics course include, but not limited to: propositional and predicate logic, proof techniques, recursion and induction, integers and their properties, set theory, functions, relations, combinatorics, algorithms and theory of computation, discrete probability, graph theory and discrete structures. While the book covers a wide range of these topics, it does not touch on probability theory or the classical algebraic structures like groups, rings, fields. We do however explore discrete structures like Boolean algebras and lattices. The work on this book has been developed over many years of teaching first and second year discrete mathematics courses. During these years, I was greatly inspired by my students. Their reaction to various topics, their questions, comments and concerns allowed me to better understand how some concepts are perceived and which ones cause most difficulties. 0.1 Organization of the book The book is organized in 11 chapters and one appendix. The content of each chapter is given briefly in what follows. • Chapter 1. Propositional Logic: The Foundation of Mathematical Reasoning. Logic is at the heart of mathematical reasoning and proof techniques. Interest in the topic has seen a considerable increase with the digital revolution over the second half of the twentieth century. Chapter 1 deals with basic logical propositions, i.e., statements that are either true of false, and the logic connectives that tie them together. Although weaker than predicate logic in expressing and interpreting mathematical results, propositional logic is still a powerful tool in mathematics and computer science. The chapter covers topics like truth tables, truth trees, tautologies, contradictions, validity of logic arguments, normal forms (conjunctive and disjunctive) and others. Considering its binary nature, propositional logic offers a perfect setting to mathematically represent and design logic gates in electronic circuits.
  • 13. Preface ix • Chapter 2. Set Theory and Introduction to Boolean Algebra: A Naı̈ve Approach. Sets are building blocks of every mathematical theory. Set theory is a vast area of mathematics and many authors like to include functions and relations under its umbrella. The book covers these topics in different chapters to allow more flexibility. In this chapter, a practical approach to set theory known in the literature as the naı̈ve set theory is adopted. My intention is to present the version of set theory relevant to other topics in the book and to stay away from the formal axiomatic treatment of the subject. The chapter explores the notion of recursive definition of sets, a key concept in computer science. Boolean algebra structure is introduced in Section 6. Sum of products, product of sums and Karnaugh maps are used to minimize Boolean expressions. This is particularly important in designing efficient electronic circuits. • Chapter 3. Prove It: Mathematical Proof Techniques. This chapter addresses the question of writing a sound mathematical proof. Multiple proof strategies are explored, each followed with numerous examples to enhance comprehension. Proof techniques studied include: direct proof, indirect proof, proof of an ”if and only if” statements, proof by contradiction and proof by separation of cases. The chapter ends with the important technique of the proof by induction. Simple, strong and structural forms of induction. While simple and strong forms of induction are standard in any textbook of discrete mathematics, structural induction is not commonly covered and it is used to prove properties about recursively defined objects (sets, functions, . . .). • Chapter 4. Introduction to Predicate Logic: One Step Further. Proportional logic is a good first step to understand and analyse statements over the simple domain {True, False}. But it fails to deal with mathematical statements with truth values depending on one or more variables in a certain domain. The purpose of this chapter is to extend the language of propositional logic to capture the meaning and to analyse statements containing terms like for all and there exists. The notion of quantifiers, scope, translation to and from natural language, reasoning with quantifiers and arguments of predicate logic are explored. • Chapter 5. Functions: Back to the Basics. Functions are particular type of binary relations, but this chapter introduces
  • 14. x A Tale of Discrete Mathematics them as rules of correspondence between sets satisfying certain conditions. The notion of a well-defined function is introduced. Binary operations on sets and their properties are studied from the point of view of functions. Like sets, we consider functions defined recursively. Injective, surjective and bijective functions and their properties are studied. Invertible functions and their relation with bijective functions are also considered at the end of the chapter. • Chapter 6. Elementary Number Theory: The Basics, Primes, Congruences and A Bit More. As discrete mathematics is concerned with discrete numeral system, it is only natural that integers are studied in any textbook on the subject. The chapter starts with a formal axiomatic definition of the integers. From this definition, some immediate properties of the integers are established as well as the introduction of the standard order in Z. The chapter proceeds to explore the notions of divisibility and prime numbers. The Fundamental Theorem of Arithmetic, the gcd, the lcm and the Euclidean algorithm are studied. The chapter also touches on the notion of linear congruence, the famous Chinese remainder theorem and the famous Euler phi function. As an application, the chapter ends with the RSA algorithm for ciphering messages. • Chapter 7. Relations. This chapter is an extension of Chapters 2 and 5 on set theory and functions. Relations occur very often in mathematical theories as a mean to compare elements. The emphasis in the chapter is on binary relations. Representations of relations using Boolean matrices and direct graphs are introduced and methods to create new relations from old ones are explained. The chapter revisits the notion of functions defined in Chapter 5 and a more formal definition of functions is given in terms of relations. Important properties of relations are introduced (reflexivity, symmetry, transitivity, . . .) as well as their closures. In particular, Warshall’s algorithm to compute the transitive closure is given. Two important classes of relations are studied in this chapter: the equivalence relation and the partial order relation. The well-ordering principal is introduced in a general setting. The chapter ends with the notion of topological sorting. • Chapter 8. Basic Combinatorics: The Art of Counting Without Counting. Combinatorics is the branch of discrete mathematics that is concerned with arrangements of objects and counting outcomes. This is a vast area of mathematics and
  • 15. Preface xi the goal of the chapter is to just give an introduction of the topic and its main results. The chapter starts with the basic counting principles: the sum rule, the product rule and the principle of inclusion–exclusion. The pigeonhole principle is then introduced and first examples are given. The chapter moves on to explore permutations and combinations of a finite number of objects, with and without repetitions. The number of surjective functions between two finite sets and derangements of objects are counted. The chapter also explores the binomial theorem and some applications. • Chapter 9. Basics of Graph Theory. This chapter starts phase 2 of this book. Started as a simple puzzle in the 18th century, graph theory has developed through the years to be an important field of study with a wide range of applications in mathematics, chemistry, computer science and engendering. Basic definitions are given including a list of basic simple graphs, the adjacency and incidence matrices associated with a graph. The first result about graph theory, the handshaking lemma, is given in Section 3. The section also looks at the question of determining if a list of natural numbers is graphical. The Havel–Hakimi algorithm to answer this question is given with several examples on how to apply it. Many important and interesting topics of graph theory are covered in the remainder of the chapter: subgraph, line graph, complement, Hamiltonian closure, connectivity, bipartite graphs, matching in bipartite graphs, Hall’s marriage theorem, isomorphism of graphs. The chapter ends with the notion of a flow in a network, and the Ford–Fulkerson algorithm to solve the maximum flow problem. There is a lot of flexibility in this chapter. Sections 9.4.4, 9.5.2, 9.7, 9.8 and 9.10 can be treated as optional but instructors are strongly encouraged to cover some of them. • Chapter 10. More on Graph Theory. The chapter continues to investigate important results and applications of graph theory. Planar graphs and Kuratowski’s theorem (without proof) are given in the first section. Eulerian and Hamiltonian graphs and their properties are studied in Sections 2 and 3. The chapter finishes with the topic of graph colouring and its applications. Graph colouring ties graph theory with algebra by associating a polynomial, called chromatic polynomial, to every graph. Coefficients of the chromatic polynomial gives many interesting features of the graph.
  • 16. xii A Tale of Discrete Mathematics • Chapter 11. Trees. Trees are special type of graphs which are very useful in computer science, chemistry and in modeling some real life problems. After establishing first results about trees (including characterizing a tree), we investigate the topic of tree traversal and its applications. Modeling with trees, prefix, infix and postfix notations and coding using trees are presented. Depth-First and Breadth-First searches are studied and the question of minimal spanning tree is tackled. 0.2 Key features of the book There are many excellent textbooks on discrete mathematics out there, so why another one on the subject? If I have to cite couple of reasons, I would say accessibility and the breadth-depth approach. But there are certainly other features that set this textbook apart from others on the subject. • Accessibility. Many students taking an introductory discrete math class have little mathematics in their final high school years. Others are returning to university after years of being in the work force and away from academia. Unlike calculus and linear algebra, topics covered in a discrete math class are not universal and can vary significantly between educational institutions, and even between different programs at the same institution. After many years of teaching logic and discrete mathematics courses, I came to realize that most textbooks on the subject fall into two categories. In the first category, the authors assume that the reader has acquired a certain level of mathematical maturity which results in a high level of abstraction and complexity in the textbook. In the second, the authors stick to the basics and students with higher mathematical maturity find themselves almost repeating what they already learned in high school. My intent in writing this book is to present the topics in a way that is accessible to students with modest mathematical maturity, but also to give all students the chance to advance gradually in acquiring a wide range of advanced topics. • Breadth and depth. A key feature of this textbook is the scope of topics it covers. The following topics are explored in the book but are not standard in an introductory textbook in discrete mathematics: the method of truth tree (Chapter 1), sum
  • 17. Preface xiii of products, product of sums and Karnaugh maps (Chapter 2), recursive definitions of sets and functions and structural induction (chapters 3 and 5), the Euler phi function and the RSA algorithm (Chapter 6), closures of relations, Warshall’s algorithm and topological sorting (Chapter 7), the Havel–Hakimi algorithm, Hamiltonian closure, matching in bipartite graphs, the Hall’s marriage theorem, flow in a network, the Ford–Fulkerson algorithm (Chapter 9), chromatic polynomial (Chapter 10) and ruskal’s and Prim’s algorithms (Chapter 11). The fact is each chapter can be explored in a full textbook on its own. Efforts are made to ensure that the treatment of each topic goes as deep as possible to capture the most important features of the topic in the most direct and concise way possible. • A straightforward language. The textbook is written for students from various mathematical and cultural backgrounds. Mathematical concepts can be challenging enough, and the last thing students need is a complex language to add to the challenge. Definitions are given using simple straightforward language, theorems are stated in a clear and concise matter with little room for misinterpretation. Proofs include as much details as possible to facilitate comprehension. • Focus on proofs. After every semester teaching a discrete mathematics class, I survey students on a list of the most challenging components of the class. By far, mathematical proof tops the list every semester. Many students have difficulties reading and understanding a mathematical proof, let alone writing one. Mathematical proofs require a lot of reading, patience and exercise. An important feature of this book is the combination between sound mathematics and interesting applications. By sound mathematics, I mean precise results with their complete proofs. This combination is precisely what students should get from a discrete mathematics course. In this sense, the textbook is suitable for math majors as well computer science and engineering students. With the exception of very few theorems, the proof of every result is presented with all necessary details. Students are strongly encouraged to read every proof carefully and to try hard to rewrite it on their own. In every section, a certain number of exercises is dedicated to proofs of mathematical results. I always recommend
  • 18. xiv A Tale of Discrete Mathematics to my students to start a proof by writing the first and the last sentence of the proof and then gradually fill it the lines in between. • Early introduction to the language of mathematics. The book introduces logic and mathematical reasoning at an early stage. A clear and thorough understanding of mathematical logic is key to fully grasp any mathematical concept. My experience teaching some transitional courses like real analysis or group theory shows that students’ difficulties are not so much in grasping the theoretical concepts, but rather in properly expressing their reasoning and understanding of statements. A typical example is the confusion between the hypothesis and the conclusion in an implication. • A wealth of examples. The book contains hundreds of fully worked examples, carefully written to eliminate ambiguities and to cover as many scenarios as possible. Understanding these examples is key to fully grasp definitions and results. Many of the worked examples are also mirrored in the exercises to allow students to have a firm grasp on new concepts. • Extensive set of exercises. Every section of the book ends with a set of suggested exercises designed to offer students a variety of practice problems on the topics covered in the section. Students are strongly encouraged to try as many exercises as possible. Some exercises have similarities with worked out examples in the section, others are designed to offer a bit more challenge to students. Exercises are also used in some occasions to explore some concepts not covered in the section in some informal fashion. • Solutions to selected exercises. To provide some guidance to students, Appendix A contains full solutions to selected set of exercises (indicated by ?) from each section. These selected exercises are carefully chosen to give students enough material to practice the theory in the section. Students are strongly encouraged to try their absolute best to work these exercises before they consult the solutions. It is only by grappling with these problems that students will gain confidence and experience in the topic. • Flexibility. Flexibility is desirable in any textbook, but difficult to achieve in general. This is even more challenging in a textbook on a subject of a cumulative nature like mathematics. The diversity of topics covered in the textbook offers instructors and students a comfortable level of flexibility in choosing the order in which
  • 19. Preface xv topics are covered. For example, one can choose to completely skip the chapter on predicate logic and still have good grasp on the remaining topics of the book. Another example is the chapter on functions that can be approached from the point of view of Chapter 7 on relations. Even within the same chapter, some sections can be treated independently of other sections. In addition, some sections can be treated as optional and left to the discretion of the instructor. • Introduction to algorithms. The book contains several important algorithms in various topics. The combination of abstraction and practical algorithms enriches the book and widens the range of students who could benefit from it. Although the book does not include a chapter on writing and verifying algorithms, it lays down the mathematical foundation that fuels these algorithms. We explore, among others, Warshall’s algorithm to compute the transitive closure of a binary relation, the Euclidean algorithm to compute the gcd of two integers and express it as a linear combination of the integers, Havel–Hakimi algorithm to test if a sequence of natural numbers is graphical, the Ford–Fulkerson algorithm to find the maximum flow in a network, Depth-first and Breadth-first search algorithms to traverse a graph, Kruskal’s and Prim’s algorithms to generate a minimal spanning tree.
  • 20. This page intentionally left blank This page intentionally left blank This page intentionally left blank This page intentionally left blank
  • 21. About the Author Joseph Khoury received his Ph.D. in Mathematics in 2001 from the University of Ottawa, Canada. He is currently an instructor and the director of the Math Help Center at the University of Ottawa. Dr. Khoury is a co-editor and a co-author of previously published World Scientific books, Jim Totten’s Problems of the Week and The Mathematics that Power Our World, How Does It Work? xvii
  • 22. This page intentionally left blank This page intentionally left blank This page intentionally left blank This page intentionally left blank
  • 23. Contents Preface vii About the Author xvii 1. Propositional Logic: The Foundation of Mathematical Reasoning 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Basic terminologies and logic connectives . . . . . . . . . 2 1.2.1 Logic connectives . . . . . . . . . . . . . . . . . . 3 1.2.2 Truth table . . . . . . . . . . . . . . . . . . . . . . 4 1.2.3 Operations on binary strings . . . . . . . . . . . . 11 1.2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 12 1.3 Propositional logic: Formal point of view . . . . . . . . . . 15 1.3.1 Valuations and truth tables of logic formulas . . . 16 1.3.2 Special types of logic formulas and coherency . . . 18 1.3.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 19 1.4 Logic formulas in natural language: Translation between English and propositional logic . . . . . . . . . . . . . . . 21 1.4.1 Logic arguments . . . . . . . . . . . . . . . . . . . 23 1.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 24 1.5 The island of knights and knaves . . . . . . . . . . . . . . 26 1.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 29 1.6 Logical equivalence . . . . . . . . . . . . . . . . . . . . . . 30 1.6.1 Using a truth table to write an expression for a logic formula . . . . . . . . . . . . . . . . . . . . . 34 1.6.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 35 1.7 The method of truth trees . . . . . . . . . . . . . . . . . . 38 1.7.1 Description of the method . . . . . . . . . . . . . 40 xix
  • 24. xx A Tale of Discrete Mathematics 1.7.2 Tautologies and the method of truth tree . . . . . 43 1.7.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 44 1.8 Validity of logic arguments . . . . . . . . . . . . . . . . . 45 1.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 50 1.9 Formal proof of validity of an argument: Rules of inference for propositional logic . . . . . . . . . . . . . . . . . . . . 53 1.9.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 56 1.10 Normal forms . . . . . . . . . . . . . . . . . . . . . . . . . 57 1.10.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 63 2. Set Theory and Introduction to Boolean Algebra: A Naı̈ve Approach 65 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.2 Basic definitions and terminology . . . . . . . . . . . . . . 66 2.2.1 Describing sets . . . . . . . . . . . . . . . . . . . . 67 2.2.2 Set equality: Finite and infinite sets . . . . . . . . 70 2.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 71 2.3 Subsets and power set . . . . . . . . . . . . . . . . . . . . 75 2.3.1 Intervals in R . . . . . . . . . . . . . . . . . . . . 78 2.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 80 2.4 Operations on sets . . . . . . . . . . . . . . . . . . . . . . 82 2.4.1 Intersection . . . . . . . . . . . . . . . . . . . . . . 83 2.4.2 Union . . . . . . . . . . . . . . . . . . . . . . . . . 85 2.4.3 Difference, complement and symmetric difference 87 2.4.4 Cartesian product . . . . . . . . . . . . . . . . . . 90 2.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 92 2.5 Partition of a set . . . . . . . . . . . . . . . . . . . . . . . 97 2.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 99 2.6 Introduction to Boolean algebra . . . . . . . . . . . . . . . 100 2.6.1 Boolean expressions . . . . . . . . . . . . . . . . . 105 2.6.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 107 2.7 Sum of products (SOP), product of sums (POS), and Karnaugh maps . . . . . . . . . . . . . . . . . . . . . . . . 109 2.7.1 Sum of products (SOP) . . . . . . . . . . . . . . . 109 2.7.2 Product of sums (POS) . . . . . . . . . . . . . . . 111 2.7.3 Karnaugh maps . . . . . . . . . . . . . . . . . . . 112 2.7.4 Two-variable Karnaugh maps . . . . . . . . . . . 113 2.7.5 Three-variable Karnaugh maps . . . . . . . . . . . 114 2.7.6 Four-variable Karnaugh maps . . . . . . . . . . . 115 2.7.7 Using Karnaugh to minimize a Boolean expression 116
  • 25. Contents xxi 2.7.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . 119 2.8 Logic gates . . . . . . . . . . . . . . . . . . . . . . . . . . 121 2.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 124 3. Prove It: Mathematical Proof Techniques 127 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 127 3.2 Proving an implication and a biconditional . . . . . . . . 128 3.2.1 Direct proof . . . . . . . . . . . . . . . . . . . . . 128 3.2.2 Indirect proof . . . . . . . . . . . . . . . . . . . . 130 3.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 132 3.3 Proving a biconditional . . . . . . . . . . . . . . . . . . . 133 3.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 134 3.4 Proof by contradiction . . . . . . . . . . . . . . . . . . . . 134 3.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 136 3.5 Proof by separation of cases . . . . . . . . . . . . . . . . . 138 3.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 140 3.6 Proof by induction . . . . . . . . . . . . . . . . . . . . . . 142 3.6.1 The principle of weak induction . . . . . . . . . . 142 3.6.2 The principle of strong induction . . . . . . . . . 147 3.6.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 152 3.7 Recursive definition of sets and the principle of structural induction . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 3.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 162 4. Introduction to Predicate Logic: One Step Further 167 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 167 4.2 The basics of predicate logic . . . . . . . . . . . . . . . . . 168 4.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 172 4.3 Quantifiers: The language of predicate logic . . . . . . . . 173 4.3.1 Negation of a quantified statement . . . . . . . . . 176 4.3.2 Multiple quantifiers . . . . . . . . . . . . . . . . . 177 4.3.3 Syntax of the predicate logic language . . . . . . . 179 4.3.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 181 4.4 Translation from and to predicate logic . . . . . . . . . . 184 4.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 186 4.5 Scope of a quantifier, bound and free variables . . . . . . 190 4.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 194 4.6 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . 195
  • 26. xxii A Tale of Discrete Mathematics 4.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 197 4.7 Reasoning with quantifiers: Arguments of predicate logic . . . . . . . . . . . . . . . . . . . . . . . . 199 4.7.1 The universal instantiation (UI) . . . . . . . . . . 199 4.7.2 The universal generalization (UG) . . . . . . . . . 199 4.7.3 The existential instantiation (EI) . . . . . . . . . 201 4.7.4 The existential generalization (EG) . . . . . . . . 201 4.7.5 Arguments of predicate logic . . . . . . . . . . . . 202 4.7.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . 204 5. Functions: Back to the Basics 207 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 207 5.2 Basic definitions and terminology . . . . . . . . . . . . . . 208 5.2.1 Combining real-valued functions . . . . . . . . . . 212 5.2.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 214 5.3 Some special functions . . . . . . . . . . . . . . . . . . . . 218 5.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 222 5.4 Binary operations . . . . . . . . . . . . . . . . . . . . . . . 223 5.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 226 5.5 Functions defined recursively . . . . . . . . . . . . . . . . 229 5.5.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 233 5.6 Injective, surjective and bijective functions . . . . . . . . . 235 5.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 239 5.7 Composition of functions and invertible functions . . . . . 242 5.7.1 Invertible functions . . . . . . . . . . . . . . . . . 246 5.7.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 248 6. Elementary Number Theory 253 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 253 6.2 Integers defined axiomatically . . . . . . . . . . . . . . . . 253 6.2.1 Order on the integers . . . . . . . . . . . . . . . . 256 6.2.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 258 6.3 Division in Z: Prime numbers . . . . . . . . . . . . . . . . 259 6.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 263 6.4 The division algorithm . . . . . . . . . . . . . . . . . . . . 266 6.4.1 Representing integers in different bases . . . . . . 267 6.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 269
  • 27. Contents xxiii 6.5 The Fundamental Theorem of Arithmetic, the gcd, the lcm and the Euclidean algorithm . . . . . . . . . . . . 271 6.5.1 The least common multiple . . . . . . . . . . . . . 277 6.5.2 Finding the gcd and the lcm . . . . . . . . . . . . 279 6.5.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 283 6.6 Introduction to modular arithmetic . . . . . . . . . . . . . 285 6.6.1 Linear congruence equations . . . . . . . . . . . . 287 6.6.2 The Chinese remainder theorem . . . . . . . . . . 291 6.6.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 293 6.7 The Euler phi function . . . . . . . . . . . . . . . . . . . . 294 6.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 302 6.8 Caesar cipher: The RSA algorithm . . . . . . . . . . . . . 303 6.8.1 The RSA scheme . . . . . . . . . . . . . . . . . . 305 6.8.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 307 7. Binary Relations 309 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 309 7.2 Basic definitions and terminology . . . . . . . . . . . . . . 309 7.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 312 7.3 Representations of binary relations: Boolean matrices . . 315 7.3.1 Properties of Boolean matrices . . . . . . . . . . . 317 7.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 321 7.4 Functions as relations . . . . . . . . . . . . . . . . . . . . 323 7.4.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 324 7.5 New relations from old . . . . . . . . . . . . . . . . . . . . 325 7.5.1 Composition of relations . . . . . . . . . . . . . . 329 7.5.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 333 7.6 Paths and connectivity . . . . . . . . . . . . . . . . . . . . 339 7.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 345 7.7 Properties of binary relations . . . . . . . . . . . . . . . . 347 7.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 351 7.8 Closures of a relation . . . . . . . . . . . . . . . . . . . . . 354 7.8.1 Warshall’s algorithm . . . . . . . . . . . . . . . . 357 7.8.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 360 7.9 Equivalence relations . . . . . . . . . . . . . . . . . . . . . 362 7.9.1 Equivalence classes and partition of a set . . . . . 366 7.9.2 Well-defined operations on the quotient set . . . . 370 7.9.3 Equivalence relation generated by an arbitrary relation . . . . . . . . . . . . . . . . . . . . . . . . 372
  • 28. xxiv A Tale of Discrete Mathematics 7.9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 373 7.10 Order relation . . . . . . . . . . . . . . . . . . . . . . . . . 380 7.10.1 Digraph of a partial order: The Hasse diagram . . 384 7.10.2 Total order . . . . . . . . . . . . . . . . . . . . . . 386 7.10.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 387 7.11 Special elements in a poset, lattices, well-ordering principle and topological sorting . . . . . . . . . . . . . . . . . . . . 389 7.11.1 Lattices . . . . . . . . . . . . . . . . . . . . . . . . 393 7.11.2 The well-ordering principle and the well-ordered sets . . . . . . . . . . . . . . . . . . . . . . . . . . 396 7.11.3 Application: The topological sorting . . . . . . . . 397 7.11.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 399 8. Basic Combinatorics: The Art of Counting Without Counting 405 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 405 8.2 Basic counting principles . . . . . . . . . . . . . . . . . . . 405 8.2.1 The sum principle . . . . . . . . . . . . . . . . . . 405 8.2.2 The product principle . . . . . . . . . . . . . . . . 407 8.2.3 The principle of inclusion–exclusion . . . . . . . . 410 8.2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 415 8.3 The pigeonhole principle . . . . . . . . . . . . . . . . . . . 418 8.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 421 8.4 Permutation . . . . . . . . . . . . . . . . . . . . . . . . . . 423 8.4.1 Permutation without repetition . . . . . . . . . . 423 8.4.2 Circular permutation . . . . . . . . . . . . . . . . 426 8.4.3 Permutations of objects not all distinct . . . . . . 427 8.4.4 Permutations with repetitions . . . . . . . . . . . 429 8.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 430 8.5 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . 433 8.5.1 Number of surjective functions: Derangements . . 436 8.5.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 438 8.6 The binomial theorem . . . . . . . . . . . . . . . . . . . . 441 8.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 443 8.7 Combinations with repetition . . . . . . . . . . . . . . . . 444 8.7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 447 9. Basics of Graph Theory 451 9.1 Introduction and a bit of history . . . . . . . . . . . . . . 451
  • 29. Contents xxv 9.2 Basic definitions and terminology . . . . . . . . . . . . . . 453 9.2.1 Some common simple graphs . . . . . . . . . . . . 456 9.2.2 Adjacency and incidence matrices . . . . . . . . . 458 9.2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 461 9.3 Degree of a vertex, the Handshaking lemma and graphical sequences . . . . . . . . . . . . . . . . . . . 464 9.3.1 Graphical sequences . . . . . . . . . . . . . . . . . 468 9.3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 472 9.4 Subgraphs and new graphs from old . . . . . . . . . . . . 476 9.4.1 Induced and spanning subgraphs . . . . . . . . . . 478 9.4.2 New subgraphs from old . . . . . . . . . . . . . . 479 9.4.3 Complement of a graph . . . . . . . . . . . . . . . 480 9.4.4 Line graph, Hamiltonian closure of a graph . . . . 481 9.4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 483 9.5 Walks, trails, paths, cycles and graph connectivity . . . . 487 9.5.1 Graph connectivity . . . . . . . . . . . . . . . . . 489 9.5.2 Vertex-connectivity, edge-connectivity . . . . . . . 492 9.5.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 496 9.6 Bipartite graphs . . . . . . . . . . . . . . . . . . . . . . . 499 9.6.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 504 9.7 Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 9.7.1 Matching in general graphs . . . . . . . . . . . . . 508 9.7.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 509 9.8 Matching in bipartite graphs and Hall’s Theorem . . . . . 510 9.8.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 517 9.9 Isomorphism of simple graphs . . . . . . . . . . . . . . . . 518 9.9.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 523 9.10 Maximum flow in a network, the Ford–Fulkerson algorithm and maximum bipartite matching . . . . . . . . . . . . . . 526 9.10.1 Residual network . . . . . . . . . . . . . . . . . . 532 9.10.2 The Max-Flow Min-Cut theorem, the Ford–Fulkerson algorithm . . . . . . . . . . . . . . 534 9.10.3 Maximum bipartite matching . . . . . . . . . . . . 538 9.10.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 540 10. More on Graph Theory 545 10.1 Planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . 545 10.1.1 Kuratowski’s theorem . . . . . . . . . . . . . . . . 550 10.1.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 552
  • 30. xxvi A Tale of Discrete Mathematics 10.2 Euler trails and Euler circuits . . . . . . . . . . . . . . . . 555 10.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 561 10.3 Hamiltonian circuits and Hamiltonian paths . . . . . . . . 565 10.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 572 10.4 Graph coloring . . . . . . . . . . . . . . . . . . . . . . . . 576 10.4.1 The chromatic polynomial . . . . . . . . . . . . . 581 10.4.2 Coloring planar graphs: Five and four-color theorems . . . . . . . . . . . . . . . . . . . . . . . 588 10.4.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . 590 11. Trees 595 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 595 11.2 Basic definitions and terminology . . . . . . . . . . . . . . 595 11.2.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 600 11.3 First results about trees . . . . . . . . . . . . . . . . . . . 603 11.3.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . 605 11.4 Traversal of trees . . . . . . . . . . . . . . . . . . . . . . . 607 11.4.1 Binary search tree . . . . . . . . . . . . . . . . . . 612 11.4.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . 616 11.5 Modeling with trees . . . . . . . . . . . . . . . . . . . . . 619 11.5.1 Chemistry . . . . . . . . . . . . . . . . . . . . . . 619 11.5.2 Digital arithmetic expressions . . . . . . . . . . . 620 11.5.3 Prefix, postfix and infix notations . . . . . . . . . 622 11.5.4 Coding . . . . . . . . . . . . . . . . . . . . . . . . 626 11.5.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . 630 11.6 Spanning subtrees and graph search . . . . . . . . . . . . 633 11.6.1 Graph search . . . . . . . . . . . . . . . . . . . . . 635 11.6.2 Search algorithms and graph connectivity . . . . . 640 11.6.3 Minimal spanning tree . . . . . . . . . . . . . . . 641 11.6.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . 645 Appendix: Solutions to Suggested Exercises 649 Index 787
  • 31. Chapter 1 Propositional Logic: The Foundation of Mathematical Reasoning 1.1 Introduction Throughout history, many civilizations have realized the need to formalize rules for reasoning and proof techniques. For example, a pilar in ancient Greece education system was the trivium (three roads in Latin), which refers to the study of grammar, rhetoric, and logic to young students. With the development of new mathematical theories, the need for a precise set of rules to determine what constitutes a valid mathematical proof became paramount and preoccupied mathematicians for centuries. Historically speaking, logic origins are hard to trace as many ancient philosophers and scientists contributed to the development of the discipline. It is however widely believed that the discipline started to take the shape we know today in ancien Greece. Aristotle, a Greek philosopher and mathematician (384–322 BC), is considered to be the author of the earliest known document on formal logic. His main goal was to develop the logic theory as a complete mathematical system to analyze human reasoning and effective arguments. While this philosophical aspect of logic remains a central component of the subject some 25 centuries after Aristotle, this area of mathematics has significantly evolved in the last century to become a key tool not only in pure and applied mathematics but also in many applications of computer science. There are two main formal systems of mathematical logic: the propositional logic and predicate logic. Propositional logic studies statements which have truth values (either true or false) and logical operators on these statements like the words “and”, “or” and others. In this context, we 1
  • 32. 2 A Tale of Discrete Mathematics refer to the statements as propositions and to the operators on them as logic connectives. A unit (or atomic) statement of propositional logic is a proposition that contains no connective and as such, it is not further analyzable. Logic connectives are used to connect propositions together and form more complex ones. Propositional logic analyses statements with truth values depending uniquely and entirely on the units on which they are built. There are however mathematical statements with truth values depending not only on their underlying units but also on their interpretation within a given context. This type of statements requires a richer system of analysis and will be studied in Chapter 4 on predicate logic. 1.2 Basic terminologies and logic connectives In the English language, the following are well-known types of sentences. (1) The imperative sentence. This is a sentence that gives a command or an order. For example, “Bring me the book”. (2) The interrogative sentence. This is a sentence that asks a direct question and which always ends with a question mark. For example, “Is 1051 a prime number?”. (3) The declarative sentence. This is a sentence that states a fact or gives some sort of information. For example, “1051 is not a prime number” and “Ottawa is the capital city of Canada”. What distinguishes a declarative sentence from other types of sentences is the fact that it is either true or false but not both at the same time. From a propositional logic perspective, a declarative sentence is called a proposition. If a proposition p is true, we say that its truth value is T and we write v(p) = T. If a proposition p is false, we say that its truth value is F and we write v(p) = F. Some authors assign 1 and 0 as truth values for a true and false proposition, respectively. Propositions like “ 33 + 3 is an even number” and “the equation x2 − 3x + 2 = 0 has no real roots” can be easily characterized as true or false. The first is true as 33 + 3 = 30 is an even number and the second is false since x = 1 and x = 2 are real roots of the equation. The ease of determining the truth values of these two statements is unfortunately not an indication on the hardship of this task in general. Things can get complicated very quickly as we combine statements. For example, the task of determining the truth value of the declaration: “6851 is a prime number or ππ is a rational number if and only
  • 33. Propositional Logic: The Foundation of Mathematical Reasoning 3 if x3 −12354x2 +3x−1200 = 0 has a rational root” is certainly not a trivial one, even if we know the truth value of each of the individual components of the declaration. In the syntax of propositional logic, propositions are usually referred to using letters. So we write things like A : “25 > 33”, B : “31 is an even number” and p : “The domain of the function f(x) = √ x + 1 is the set of all real numbers.” Example 1.1. In each case, determine if the expression is a proposition. If the expression is a proposition, determine its truth value. (a) p: “8 1 3 = 2”. (b) q: “8 1 3 ”. (c) r: “The sum of two odd numbers”. (d) s: “The sum of two odd numbers is odd”. (e) t: “The equation 4x2 − 4x − 3 = 0 has at least one integer solution”. Solution. (a) p is a proposition. It states that the cubic root of 8 is equal to 2. This is true since 23 = 8. (b) q is not a proposition. It simply gives a number, namely 8 1 3 = 2. (c) r is not a proposition. It does not declare anything. (d) s is a proposition. It declares that when we add two odd numbers, the result is always an odd number. The truth value of s is F (false) since, for example, 1 + 3 = 4 is even. (e) t is a proposition. Its truth value is F since the equation has two solutions x = −1 2 and x = 3 2 and neither one of them is an integer. ♦ 1.2.1 Logic connectives In any natural language, a word is a sequence of symbols chosen from a set called the alphabet of the language. Sentences are formed by connecting words together with special connectors like “or”, “and”, a comma, etc. Propositional logic is no different from any other language. its alphabet consists of a set of propositional units, the special symbols ∧, ∨, →, ↔ and ¬, commas and parentheses: “(” and “)”. The role of the special symbols is to connect propositions together to create new ones. For example, the following (compound) proposition: “The sun is shining or the lion is roaring if and only if it is pouring in the forest and the hunter hides behind the
  • 34. 4 A Tale of Discrete Mathematics trees unless the leaves are falling” is formed by connecting the (atomic) propositions “The sun is shining”, “The lion is roaring”, “It is pouring in the forest”, “The hunter hides behind the trees” and “The leaves are falling” using the words “or”, “if and only if ”, “and”, and “unless” that we call the logic connectives or the logic operators . There are five basic logic connectives. Table 1.1 gives the names and symbols of these basic connectives. Note that, with the exception of the negation connective ¬, each of these connectives is a binary operation which means it requires two input propositions. For instance, the connective ∨ takes two input propositions p and q and produces the new proposition “p or q”. Table 1.1 Basic logic connectives Connective Name Symbol English Expressions Conjunction ∧ and Disjunction ∨ or Implication → implies Biconditional ↔ if and only if Negation ¬ not A proposition with no logic connectives in it is called an atomic proposition or simply an atom. A logic proposition containing one or more logic connectives is called a compound proposition. For example, “Ottawa is the capital city of Canada unless the sun rises from the west” is a compound proposition formed by the disjunction of the two atoms “Ottawa is the capital city of Canada” and “The sun rises from the west”. 1.2.2 Truth table The truth table of a logic proposition p is a table listing the truth values of p for all possible truth values of the components of p (also called the logical variables of p). Each list of truth values of the logical variables of p is called a valuation of p (see Definition 1.3 below). For example, if p is a proposition with two logical variables A and B, then there are four possible valuations of p, namely (T, T), (T, F), (F, T) and (F, F). Example 1.2. The truth table of a logic proposition p is given below. A B p T T F T F T F T F F F T
  • 35. Propositional Logic: The Foundation of Mathematical Reasoning 5 The table can be interpreted as follows: the proposition p is true when A is true and B is false or when both A and B are false. It is false when both A and B are true or when A is false and B is true. We look next at each of the five basic connectives in a bit more detail. Table 1.2 at the end gives a summary that will serve as a basis for the rest of the discussion on propositional logic. 1.2.2.1 The conjunction connective If p and q are two propositions, their conjunction is the compound proposition “p and q” that we denote by (p ∧ q). The conjunction (p ∧ q) is true if and only if both propositions p and q are true. The truth table of the conjunction connective is the following. p q (p ∧ q) T T T T F F F T F F F F Example 1.3. The proposition Washington is the capital city of Canada and 3125689 + 11 is a prime number is false since the first component is false. Note that we did not need to know if 3125689 + 11 is a prime number. Example 1.4. The proposition “8− 1 3 = 1 2 and √ 7 ≤ 3” is true since it is the conjunction of two true statements. 1.2.2.2 The disjunction connective If p and q are two propositions, their disjunction is the compound proposition “p or q” that we denote by (p ∨ q). The disjunction (p ∨ q) is always true except in the unique case when both p and q are false. The truth table of the disjunction connective is as follows. p q (p ∨ q) T T T T F T F T T F F F
  • 36. 6 A Tale of Discrete Mathematics Example 1.5. The proposition Ottawa is the capital city of Canada or the sun rises from the west is true since the first component is true. Note that it does not matter what the truth value of the second component is in this case since we know that the proposition Ottawa is the capital city of Canada is true. Example 1.6. The proposition “8 1 3 = 1 2 or √ 7 > 3” is false since it is the disjunction of two false propositions. Example 1.7. The proposition “Ottawa is the capital city of Canada and the sun rises from the west, or 3 √ −8 = −2” is true since the second component is clearly true. Note that the proposition “Ottawa is the capital city of Canada and the sun rises from the west” is false in this case. Remark 1.1. The symbol ∨ is used to represent the disjunction “or” in the inclusive sense. To explain this, imagine you ask a friend about his plan to get to Toronto today and he answers with the following disjunction: “I will drive or I will take the train”. Note that exactly one of the two components of this disjunction can be true in this context. We say in this case that the disjunction “or” is used in an exclusive sense. On the other hand, the disjunction “or” in the proposition “I drink my coffee or I read my book” is used in an inclusive sense since the components “I drink my coffee” and “I read my book” can happen simultaneously (can be true at the same time). The symbol ⊕ is usually used to specify the exclusive disjunction. So (p ⊕ q) is true when exactly one of p, q is true and it is false when both are true or both are false. 1.2.2.3 The implication connective A big part of human interactions comes in the form of conditional and sequential statements. Sentences like If you walk under the rain, you will catch a cold or Reading this book is sufficient to have a basic understanding of Discrete Mathematics are called conditional statements. Such statements give some information (conclusion) based on a certain assumption (hypothesis). In propositional logic, a conditional statement is referred to as an implication. If p and q are two propositions, the proposition “p implies q” (or equivalently “if p then q”) is represented with the notation (p → q). For the implication (p → q), p is called the hypothesis and q is called the conclusion.
  • 37. Propositional Logic: The Foundation of Mathematical Reasoning 7 Example 1.8. The statement If the stars are shining in the sky at night, then it is going to be sunny in the morning is an implication with The stars are shining in the sky at night as the hypothesis and It is going to be sunny in the morning as the conclusion . Example 1.9. The proposition “the sum of two rational numbers is a rational number” does not sound at first like an implication but rather like one atomic proposition. But a bit of deflexion shows that the proposition is actually stating the following: “If x and y are two rational numbers, then x+y is a rational number”. This makes it an implication with “x and y are two rational numbers” as the hypothesis and “x + y is a rational number” as the conclusion. Unlike the conjunction and the disjunction connectives, the truth table of the implication connective is not obvious and requires some explanation. A classic scenario used to explain the truth table of the implication connective is the following. During an election campaign, the candidate Joe makes the following statement: “If I am elected, there will be income tax cut for the middle class in the first hundred days after the elections” (sounds familiar?). When can you accuse Joe of lying? If Joe was not elected, then no one can accuse him of lying regardless of wether there was an income tax cut for the middle class in the first hundred days or not. In this case, his initial statement would still be valid since we don’t know what would have happened had he been elected. If Joe is elected and he managed to reduce income tax for middle class in the first hundred days after the elections, then he spoke no fallacy during the campaign and his statement is true. Now, Joe would be in hot water (one would hope!) if he was elected but no income tax reduction followed for the middle class in the first hundred days after the elections. So, there is only one scenario where we can confirm that Joe’s statement is false: he is elected but no income tax reduction follows for the middle class in the first hundred days after the elections. This suggests that an implication (p → q) is always true except in the unique case where p (the hypothesis) is true and q (the conclusion)is false. In particular, an implication with a false hypothesis is always true. The truth table of the implication connective is the following. p q (p → q) T T T T F F F T T F F T
  • 38. 8 A Tale of Discrete Mathematics Example 1.10. The proposition “If Washington is the capital city of Canada, then 24 = −1” is true since it is an implication with a false hypothesis. Example 1.11. The proposition “If 8 1 3 = 2 and the equation x2 + 1 = 0 has no real roots, then √ 7 > 3” is false since it is an implication with a true hypothesis (a conjunction of two true propositions) and a false conclusion. Definition 1.1. For the implication (p → q): the implication (¬q → ¬p) is called the contrapositive implication and the implication (q → p) is called the converse implication. The reader should be very careful not to confuse the contrapositive and the converse of an implication. They are different propositions with different meanings. The following example explains the difference in a natural language context. Example 1.12. Consider the proposition φ: “If there is a storm, then the school bus is cancelled”. This is clearly an implication with “There is a storm” as the hypothesis and “The school bus is cancelled” as the conclusion. The contrapositive of φ is “If the school bus is not cancelled, then there is no storm” while the converse of φ is: “If the school bus is cancelled, then there is a storm”. Example 1.13. For the implication “If n is an odd integer, then n3 + 1 is an even integer”, the contrapositive is “If n3 + 1 is an odd integer, then n is an even integer”, and the converse is “If n3 + 1 is an even integer, then n is an odd integer”. 1.2.2.4 The biconditional connective If p and q are two propositions, the compound proposition “p if and only if q” (or p is a necessary and sufficient condition for q) is called the biconditional of p and q that we denote with (p ↔ q). The biconditional (p ↔ q) is true when p and q have the same truth value (both are true or both are false) and is false when p and q have different truth values (one is true and the other is false). The truth table of the biconditional connective is the following.
  • 39. Propositional Logic: The Foundation of Mathematical Reasoning 9 p q (p ↔ q) T T T T F F F T F F F T Example 1.14. The proposition Washington is the capital city of Canada if and only if 24 = 16 is false since its first component is false but its second is true. Example 1.15. The proposition 4 √ 8 = 2 if and only if √ 7 > 3 is true since both components of the proposition are false. Example 1.16. The proposition 4 √ 8 = 2 or 8 1 3 = 2 if and only if √ 7 < 3 and √ 3 < 2 is true since both components of the proposition are true. 1.2.2.5 The negation connective Unlike the other four logic connectives, the negation connective is a unary operation (as opposed to binary for the other four). It takes one proposition as its input and produces another at the input. If p is a logic statement, then the statement “not p” is called the negation of p that we denote with the symbol ¬p. The negation of p has the opposite truth value than p. The truth table of the negation connective is the following. p ¬p T F F T Example 1.17. If p is the proposition √ 7 < 3, then ¬p is the proposition √ 7 ≥ 3. Example 1.18. The negation of the proposition There exists a real number x that satisfies x2 + 1 = 0 (which is false) is No real number satisfies x2 + 1 = 0 (which is true). 1.2.2.6 Summary Table 1.2 gives a summary of the truth tables of the five basic logic connectives. Propositional logic calculus is mainly based on this table.
  • 40. 10 A Tale of Discrete Mathematics Table 1.2 Basic logic connectives p q (p ∧ q) (p ∨ q) (p → q) (p ↔ q) ¬p ¬q T T T T T T F F T F F T F F F T F T F T T F T F F F F F T T T T Example 1.19. In each case, determine the truth value of the compound proposition. (a) 23 is odd or the equation ln(2x+3)+ex+2 = 37 has an integer solution. (b) If 1 + 2 = 4, then pigs can fly. (c) 3123456 + 1 is a prime number and the equation x2 + 1 = 0 has at least one real root. (d) The equation x2 + 1 = 0 has at least one real root if and only if pigs can fly. (e) If 1 − 2 = −1, then 212456790 + 3 is even. Solution. (a) The proposition is true since it is the disjunction of two propositions with the first one true. Note that it does not matter what the truth value of the second component is in this case. (b) The proposition is true since it is an implication with a false hypothesis. (c) The proposition is false since it is a conjunction with the second component (pigs can fly) is false. Note that it does not matter what the truth value of the first component is in this case. (d) The proposition is true since it is a biconditional with both components have the same truth value (both are false in this case). (e) The proposition is false since it is an implication of the form (T → F). ♦ Using Table 1.2, we can determine the truth value of any complex logic proposition as a function of the truth values of its components. Example 1.20. Construct the truth table of the compound proposition φ : ((p ∧¬q) ∨¬(q → p)) where p and q are logic propositions. In particular give all truth values of p and q for which φ is true. Solution. The proposition φ is the disjunction of the two propositions (p ∧ ¬q) and ¬(q → p). First, we determine the truth value of (p ∧ ¬q) and ¬(q → p) and then we use the truth table for the disjunction connective. All the steps are included in the following table.
  • 41. Propositional Logic: The Foundation of Mathematical Reasoning 11 p q ¬q (q → p) ¬(q → p) (p ∧ ¬q) ((p ∧ ¬q) ∨ ¬(q → p)) T T F T F F F T F T T F T T F T F F T F T F F T T F F F In particular, φ is true when p and q have opposite truth values. ♦ 1.2.3 Operations on binary strings Information is usually processed by computers using bit strings: a sequence of 0’s and 1’s. This type of sequences plays a central role in mathematics and computer science. We give a formal definition of binary strings as we need to refer to them in many places in this book. Definition 1.2. A binary string is an (ordered) sequence of 0’s and 1’s, each of which is called a bit (short for binary digit). The length of a binary string is the number of bits in the sequence. A string of length zero is called the empty string (the string with no bits in it), that we denote by λ. Because of their binary nature, bits can be used to represent truth values of logic propositions with 1 and 0 representing true and false, respectively. Logic connectives can then be applied to 1 and 0 the same way they apply to T and F. From a computer science perspective, connectives ∧, ∨ and ⊕ are of particular importance. In this context, ∧, ∨ and ⊕ are referred to as the AND, OR and XOR operators, respectively. Actions of these operators on Boolean variables p and q (these are variables which take values over the set {0, 1}) are summarized in Table 1.3 below. The bit operations in Table 1.3 can be generalized to operations on binary strings having the same length. If s1 = a1a2 · · · an and s2 = b1b2 · · · bn are two binary strings of the same length, then s1 ∧ s2 is the string c1c2 · · · cn where ci = ai ∧ bi for each i. Strings s1 ∨ s2 and s1 ⊕ s2 are defined similarly. Example 1.21. Let s1 = 110100111 and s2 = 010100100. Then s1 ∧ s2 = 010100100, s1 ∨ s2 = 110100111 and s1 ⊕ s2 = 100000011. Another important operation on binary strings is the concatenation. Given two binary strings s1 = a1a2 · · · an and s2 = b1b2 · · · bn, the concatenation of s1 and s2 is the string s1s2 = a1a2 · · · anb1b2 · · · bn. In particular, if n is a natural number and s is a binary string, then sn is the string obtained
  • 42. 12 A Tale of Discrete Mathematics by concatenating n copies of s. In this definition, it is understood that s0 is the empty string λ. Example 1.22. Let s = 11010 and t = 1010100100. Then st = 110101010100100, s2 = 1101011010 and s3 = 110101101011010. Table 1.3 AND, OR and XOR p q p ∧ q p ∨ q p ⊕ q 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1.2.4 Exercises (1) In each case, determine if the expression is a logic proposition. (a) Is it raining now? ?(b) The sum of two even numbers is even. ?(c) 21012 + 5. ?(d) 21012 + 5 is odd. (e) Finish your assignment! (f) No prime number is even except 2. (g) n2 + 3n + 1 is odd for some integer n. (h) A permutation of five objects. (i) There are 120 ways to permute five objects. (j) If Oxygen is a perfect gas, then so is Nitrogen. ?(k) An infinite number of odd numbers. (2) In each case, the given expression is the start of a logic proposition. Complete the expression to form a: (i) true proposition (ii) false proposition. There are many possible answers for each part. ?(a) The sum of the squares of two integers. (b) 21012 + 5. (c) The product of two positive integers. (d) (−64) 1 3 . ?(e) There exists a real number. (f) There exists no integer. (3) In each case, a compound logic proposition is given. Determine the main logic connective of the statement. That is, write the proposition
  • 43. Propositional Logic: The Foundation of Mathematical Reasoning 13 under the form (p θ q) where p and q are two (possibly compound) propositions and θ is a logic connective. (a) 3 is an odd and a prime number. (b) Either √ 2 is a rational number, or √ 2 √ 2 is a rational number and a root of the equation x4 − 1 = 0. (c) If I fail the exam, then either I did not prepare or I was sick. ?(d) Joe fails the course if and only if he does not do the effort and the professor does not warn him. (e) Joe is a smart and an honest person, or he can be really hard to deal with if and only if he senses dishonesty on your part. (4) In each case, the statement is the disjunction of two propositions. Determine if the disjunction is used in an inclusive or an exclusive sense. (a) You study or you fail. ?(b) I will either swim or take the boat to get to the island today. (c) You can choose English or French to answer the question. (d) You can either dial 0 or 1 on you phone to speak to a costumer service representative. (e) Joe can speak either English or French. (5) Determine the truth value of each of the following logic propositions. (a) 2 − 3 = −1 or 31080 + 7 is a multiple of 17. (b) The equation x4 + 1 = 0 has no real roots and √ 9 = 3. (c) If 2 − 3 = −1, then √ 10 > 3. (d) If Washington is the capital city of the US and 23 = 8, then 1 + 2 = 5. (e) If Boston is the capital city of the US and 23 = 8, then 1 + 2 = 5. ?(f) If 3345687609876651 is a prime number and every dog is a cat, then √ 9 = 3. ?(g) 823432 −1 is even if and only if the equation x3 −4x2 = 0 has three distinct real roots. (h) There is no integer n such n3 − 2 = 0 if and only if 3 √ 64 = 8 or 3 √ 7 > 2. (6) A and B are two atomic propositions such that the proposition (B → ¬A) is false. Determine the truth value of each of the following propositions.
  • 44. 14 A Tale of Discrete Mathematics (a) (A ∨ B) (b) (A ∧ B) (c) (¬A ∨ ¬B) ?(d) (¬(A ∨ B) → A) (e) ((A ∧ B) → B) (f) ((A ∨ B) → (¬A ∧ B)) (g) ¬(¬A → B) (h) (¬A ↔ ¬B) ?(i) (¬A ↔ (A ∧ B)) ?(j) (¬B ↔ (¬A ∧ B)) ?(7) Give an example of an implication which is true but its converse is false. (8) Each of the following statements is an implication. State: (i) the contrapositive and (ii) the converse of the implication. (a) If you snooze, you loose. ?(b) If a function is differentiable on the interval [a, b], then it is continuous on that interval. (c) For an even integer n, 5n + 2 is even. (d) The product of two even integers is even. (9) Let φ and ψ be two propositions with the same set of logic variables. We say that φ and ψ have the same truth table if every valuation of the logic variables assigns the same truth value for φ and ψ. In each case, verify that the two compound propositions have the same truth table. (a) (p ⊕ q), ((p ∨ q) ∧ ¬(p ∧ q)) (b) ¬(p ∨ q), (¬p ∧ ¬q) (c) (p → q), (¬p ∨ q) ?(d) (p ↔ q), ((p → q) ∧ (q → p)) (10) Show that the logic formula φ : ((A ∧ ¬B) ∨ ¬(B → A)) → (¬A ∨ ¬B) is true for any valuation of the variables A and B (we call such a proposition as we will see later). (11) Consider the logic proposition φ : ((p → ¬q) ∨ ¬(q → r)) in three logic variables p, q and r. Construct the truth table of φ and give all valuations that satisfy it. Note that in this case, there are eight different valuations of φ. (12) In each case, two binary strings s and t are given. Find: s∧t, s∨t, s⊕t and st (the concatenation). (a) s = 10, t = 11 (b) s = 1001, t = 1100 ?(c) s = 110100, t = 110011 (d) s = 00011001, t = 10010111 (13) Let s, t and v be three binary strings of the same length. In each case, determine if the statement is true or false. Justify your answer.
  • 45. Propositional Logic: The Foundation of Mathematical Reasoning 15 (a) s ∧ t = t ∧ s (b) s ∨ t = t ∨ s ?(c) (s ∧ t) ∧ v = s ∧ (t ∧ v) (d) (s ∨ t) ∨ v = s ∨ (t ∨ v) (e) s ⊕ (t ∧ v) = (s ⊕ t) ∧ (s ⊕ v) (f) s ⊕ (t ∨ v) = (s ⊕ t) ∨ (s ⊕ v) ?(g) (s ⊕ t)v = (s ⊕ v)(t ⊕ v) (h) sλ = s 1.3 Propositional logic: Formal point of view The logic expression P → Q ∨ R can be interpreted in two different ways. One can look at it as the disjunction of P → Q and R, or as an implication with P as hypothesis and Q ∨ R as conclusion. In other words, it is not clear what the main connective in the expression is. In order to determine the truth value of a logic proposition, the latter should present no ambiguity and its main connective should be clear. A proposition that is written with no ambiguity about its meaning is called a well-formed logic formulas or simply formulas of propositional logic, that we abbreviate with wff (plural: wffs). To formally define wffs, we start by fixing a set A = {A, B, . . . , A1, B1, . . .} of letters and indexed letters whose elements are called propositional variables. Then the set of wffs of propositional logic over A is defined recursively using the following rules. (1) Every propositional variable is a wff that we call an atomic formula. (2) If φ is a wff, then ¬φ is also a wff. (3) If φ and ψ are wffs, then (3.1) (φ ∧ ψ) is a wff. (3.2) (φ ∨ ψ) is a wff. (3.3) (φ → ψ) is a wff. (3.4) (φ ↔ ψ) is a wff. (4) The symbols T and F (True and False) are wffs. (5) Nothing else is a wff. That is to say, only expressions that can be generated using the above rules are wffs. Remark 1.2. Like the grammar of any natural language, one has to follow the above rules to the letter in forming a wff. For instance, the expression φ → ψ does not constitute a wff since it cannot be generated following the above rules (parentheses are missing), even if there is no ambiguity in its meaning. There are, however, some instances where the rules can be relaxed a bit as we will see later. We also point out that it is sometimes convenient to use square brackets as outer denominators instead of round parentheses to improve readability of certain formulas. For example, one
  • 46. 16 A Tale of Discrete Mathematics can write [(φ → ψ)∨(ρ∧)] instead of ((φ → ψ)∨(ρ∧)) without violating the above rules. Example 1.23. The expression ¬A is a wff by rules (1) and (2) above. The expressions ¬(A) and (¬A), on the other hand, are not wffs since they cannot be constructed using the above rules. Example 1.24. The following provides a step by step proof of the fact that the expression: ¬((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is indeed a wff. 1. A, B and C are wffs: Rule (1). 2. ¬A is a wff: Line 1 and Rule (2). 3. (¬A ∨ B) is a wff: Lines 1, 2 and Rule (3.2). 4. (C ∧ B) is a wff: Line 1 and Rule (3.1). 5. (A → (C ∧ B)) is a wff: Lines 1, 4 and Rule (3.3). 6. (A → (C ∧ B)) is a wff: Line 5 and Rule (2). 7. ((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff: Lines 3, 6 and Rule (3.4). 8. ¬((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff: Line 7 and Rule (2). Note that if φ is a wff over the set A of logic variables and A is a subset of B, then φ is also a wff over the set B. For example, the expression φ : ((¬A ∨ B) ↔ ¬(A → (C ∧ B))) is a wff over the set A = {A, B, C} but it can also be considered as a wff over the set B = {A, B, C, D, X, Y, Z, T} containing A. 1.3.1 Valuations and truth tables of logic formulas We have seen already how to construct the truth table of a logic proposition in the first section. In this section, we use a more formal approach. Definition 1.3. Given a set E = {e1, . . . , en} of logic variables, a valuation of E is a list (v1, . . . , vn) where vi = v(ei) is a truth value for the logic variable ei for i = 1, 2, . . . n}. Since there are only two choices for every truth value, there are 2n different valuations for a set E containing n propositional variables. The formal proof of this fact will be given in Chapter 8. Example 1.25. If E = {A, B, C}, then there are 23 = 8 possible valuations of the set E, namely (T, T, T), (T, T, F), (T, F, T), (T, F, F), (F, T, T), (F, T, F), (F, F, T), and (F, F, F).
  • 47. Propositional Logic: The Foundation of Mathematical Reasoning 17 Given a set E of logic variables and a wff φ over E, every valuation α of E determines a unique truth value for φ. For example, the valuation α = (T, F, F) of the set E = {A, B, C} assigns the truth value T for the formula φ : (C ↔ (A ∧ B)) (since in this case, φ has the form F ↔ F which is true). The valuation (T, F, T), on the other hand, assigns F as a truth value for φ (for this valuation, φ has the form T ↔ F which is false). We say that the valuation α satisfies the formula φ if the truth value of φ determined by α is T. Hence, the valuation α = (T, F, F) satisfies the formula φ : (C ↔ (A ∧ B)) while (T, F, T) does not. The truth table of φ is the listing of all truth values of φ, in a tabular form, in relation with all possible valuations of E. Example 1.26. The truth table of the formula φ : (C ↔ (A ∧ B)) is given below. It is important to notice that in the table on the left, the column of (A ∧ B) is not really a part of the truth table of φ. It is included to give us a better understanding how the last column is formed. The truth table of φ can be restricted to the table on the right. From the table, we see that the valuations that satisfy φ are: (T, T, T), (T, F, F), (F, T, F) and (F, F, F). A B C (A ∧ B) φ : (C ↔ (A ∧ B)) T T T T T T T F T F T F T F F T F F F T F T T F F F T F F T F F T F F F F F F T A B C φ T T T T T T F F T F T F T F F T F T T F F T F T F F T F F F F T Example 1.27. For the formula ψ : (((¬C ∨ A) → B) → (A ∧ ¬C)), the truth table is given below. Each component of the formula is analyzed separately. A B C ¬C (¬C ∨ A) ((¬C ∨ A) → B) (A ∧ ¬C) ψ T T T F T T F F T T F T T T T T T F T F T F F T T F F T T F T T F T T F F T F F F T F T T T F F F F T F F T F F F F F T T F F T
  • 48. 18 A Tale of Discrete Mathematics Once again, the column of ¬C, (¬C ∨ A), ((¬C ∨ A) → B) and (A ∧ ¬C) are included to give us a better understanding of how the last column is formed. The valuations that satisfy ψ are: (T, T, F), (T, F, T), (T, F, F) and (F, F, F). 1.3.2 Special types of logic formulas and coherency Let φ be a wff of propositional logic. If φ is true then (φ ∨ ¬φ) is true. If φ is false, then ¬φ is true and so (φ ∨ ¬φ) is true. This means that (φ ∨ ¬φ) is true regardless of what the truth value of φ is. On the other extreme, we can prove similarly that (φ ∧ ¬φ) is false regardless of what the truth value of φ is. Formulas which are always true (for any valuation of their logic variables) play a central role in propositional logic. This type of formulas is directly linked to other concepts in logic, like the validity of arguments and the notion of logic equivalence. Definition 1.4. We say that the logic formula φ is a tautology if its truth value is T for any valuation of its logic variables. We say that φ is a contradiction if its truth value is F for any valuation of its logic variables. If φ is neither a tautology nor a contradiction, we say that it is a contingency (or a contingent formula). The truth table of a tautology consists of T’s only, that of a contradiction consists of F’s only and the truth table of a contingency has both T’s and F’s in it. Example 1.28. In each case, use a truth table to determine if the formula is a tautology, a contradiction or a contingency. (a) φ : ((P ∨ (Q ∧ R)) → ((P ∨ Q) ∧ (P ∨ R))) (b) ψ : (((¬C ∨ A) → B) → (A ∧ ¬C)) (c) η : ¬((A ∨ B) ∨ (¬A ∧ ¬B)) Solution. (a) The truth table of φ is the following: P Q R (Q ∧ R) (P ∨ (Q ∧ R)) (P ∨ Q) (P ∨ R) ((P ∨ Q) ∧ (P ∨ R)) φ T T T T T T T T T T T F F T T T T T T F T F T T T T T T F F F T T T T T F T T T T T T T T F T F F F T F F T F F T F F F T F T F F F F F F F F T The formula is a tautology.
  • 49. Propositional Logic: The Foundation of Mathematical Reasoning 19 (b) The truth table of ψ was constructed in Example 1.27 above. The table contains both T’s and F’s. The formula is a contingency. (c) The truth table of η is the following. A B ¬A ¬B (A ∨ B) (¬A ∧ ¬B) ((A ∨ B) ∨ (¬A ∧ ¬B)) η T T F F T F T F T F F T T F T F F T T F T F T F F F T T F T T F The table consists of F’s only, η is a contradiction. ♦ Definition 1.5. A set E of logic formulas over a set F of logic variables is called coherent (or Consistent) if there exists at least one valuation of F that satisfies all formulas in E. The set E is called incoherent otherwise. Example 1.29. The set E = {(A ∨ B), (A → B), (¬A ∧ B)} is coherent. The valuation (F, T) satisfies all the formulas in E as shown in the following truth table of the formulas in E. A B ¬A (A ∨ B) (A → B) (¬A ∧ B) T T F T T F T F F T F F F T T T T T F F T F T F Example 1.30. The set E = {(A ∧ B), (A → B), (¬A ∧ B)} is incoherent. From the truth table of each of the formulas in E given below, we see that none of the four possible valuations of {A, B} satisfies all the formulas in E at the same time. A B ¬A (A ∧ B) (A → B) (¬A ∧ B) T T F T T F T F F F F F F T T F T T F F T F T F 1.3.3 Exercises (1) In each case, determine if the expression is a wff of propositional logic. If you say that the expression is a wff, determine its main logic connective. (a) ¬¬¬A ?(b) (¬(¬A ∧ B) → (A ↔ (¬C ∨ B)))
  • 50. 20 A Tale of Discrete Mathematics (c) (A ∨ B) → ¬(C → ¬B) (d) ¬((A ∨ ¬(¬B → C)) ↔ ((¬A ∧ B) ∨ (C → ¬B))) ?(e) (((A → B ∧ C) → ¬(A ∨ B)) (f) (((A → (B → C)) ↔ ((A → B) → C)) → (A → C)) (2) Prove that the following expression φ is a wff: ((A ∨ ¬(¬B → D)) → ((¬A ∧ B) ∨ (C → ¬E))). How many rows are there in the truth table of φ? (3) In each case, form the truth table of the logic formula. Determine if the formula is a tautology, a contradiction or a contingency. If you say that the formula is a contingency, give all valuations that satisfy the formula. (a) ((A → B) → (A ∧ ¬B)) (b) ((A → ¬B) ↔ (¬C → (A → B)) ?(c) ((P → (Q → R)) → ((P → Q) → (P → R))) (d) ((P → Q) → R)) → (P → (Q → (P → R))) (e) ((A ∨ B) → ¬(C → ¬B)) (f) ((A ∨ ¬(¬B → C)) ↔ ((¬A ∧ B) ∨ (C → ¬B))) ?(g) ((A ∨ B) ↔ ¬(¬B → A)) (4) In each case, determine if the given set of logic formulas is coherent. If you say it is, give at least one valuation of the logic variables that satisfies all the formulas in the set. (a) {¬(A → ¬B), (¬A ∨ B), ¬(A ∨ ¬B)} (b) {(¬A → B), (¬B → ¬A), (¬A ∧ B)} ?(c) {¬(Q ∧ R), ((¬P → Q) ∧ (¬R → P)), (P ∨ ¬R), (P → (Q → ¬R))} (5) Consider the valuation α : (v(A) = T, v(B) = T, v(C) = F, v(D) = F) of the set {A, B, C, D} of logic variables. In each case, determine if α satisfies the given formula. (a) (¬A → (B ↔ (C ∨ D))) ?(b) (((A ∧ B) → ¬C) → (A ∧ (C ∨ D))) (c) ((C ∨ ¬D) ↔ ¬B) ∨ (B → ¬A)) ?(d) (((A → B) → C) → D) (e) (A → ((B → C) → D)) (6) Consider the wff φ : (D ∨ (B ∧ ¬C)) ∧ (B → (A → C) ∧ ¬D))). If α = (v(A).v(B), v(C), v(D)) is a valuation of the set {A, B, C, D} that satisfies φ and such that v(B) = T, determine the values of v(A), v(C) and v(D).
  • 51. Propositional Logic: The Foundation of Mathematical Reasoning 21 1.4 Logic formulas in natural language: Translation between English and propositional logic Automated translation softwares have been around for many years now and have came a long way in achieving good quality translations. Still, you have probably noticed how silly some translated sentences could sound using a computer software. The task of capturing the exact meaning in two different languages is certainly not an easy one, even for professional translators. The same is true when it comes to translation between natural languages and the language of propositional logic. The ability of manipulating formal logic formulas and laws is very important but has little value if one cannot express a natural language statement into a formal expression of propositional logic and vice a versa. In most cases, the difficulty of translating a natural language text into logic arises from the complexity of the text itself and the way it is written. For example, saying: “Failing a course is a necessary condition for not studying” sounds much harder to understand than saying :“If you don’t study, you fail”, although the two sentences say the same thing in two different ways. Table 1.1 above gives one way of expressing each of the basic logic connectives in English. There are, however, many other expressions in English that capture the same meaning for these connectives. In what follows, we explore the most common ways of expressing logic connectives in English. This is key in analysing statements of propositional logic. • Conjunction ((p ∧ q)): p and q; p but q; p even though q; p, moreover q; p although q. • Disjunction ((p ∨ q)): p or q; p unless q; either p or q; p, otherwise q; p except if q. • Implication ((p → q)): p implies q; If p, then q; If p, q; q if p; p only if q; q is a necessary condition for p; p is a sufficient condition for q; For p, it is necessary that q; For q, it is sufficient that p; For q, it suffices that p. • Biconditional ((p ↔ q)): p if and only if q; p is equivalent to q; p is a necessary and a sufficient condition for q; for q, it is necessary and sufficient that p. Example 1.31. Translate each of the following sentences into a wff of propositional logic using the following atoms:
  • 52. 22 A Tale of Discrete Mathematics • J: Joe passes the course • C: Joe attends all classes • N: Joe takes notes in class • E: Joe does well on the exam (a) To pass the course, it is necessary that Joe attends all classes and that he takes notes in class. (b) Doing well on the exam is sufficient for Joe to pass the course. (c) Neither attending all classes nor taking notes in class guarantees that Joe passes the course. (d) Joe does not do well on the exam if and only if he skips some classes unless or does not take notes in class. (e) Joe passes the course only if he does well on the exam or he does not take notes in class. Solution. (a) The sentence has the form “For p, it is necessary that q” which translates to (p → q) in propositional logic language. Note that the conjunction is main connective of the conclusion q. The translation of the sentence is (J → (C ∧ N)). (b) The sentence is of the form “E is sufficient for J” which translates as (E → J) in propositional logic. (c) the sentence can be rephrased as follows: It is not true that attending all classes implies that Joe will pass course and it is not true that taking notes in class implies that Joe will pass the course. The translation into a wff of propositional logic is: (¬(C → J) ∧ ¬(N → J)) . (d) This is a biconditional with a disjunction as the main connective in the second component: (¬E ↔ (¬C ∨ ¬N)). (e) This is a implication (only if connective) where the conclusion is a disjunction of two propositions: (J → (E ∨ ¬N)) . ♦ Example 1.32. Translate the following sentence using symbols of propositional logic: If Joe goes to class only if he does not go to work or Fred is working, then he will not pass the course unless he does not go to work and Fred does not go to class. Solution. We identify the following atomic propositions in the sentence: • J: Joe goes to class • W: Joe goes to work • F: Fred goes to work • C: Joe will pass the course • D: Fred goes to class
  • 53. Propositional Logic: The Foundation of Mathematical Reasoning 23 A quick look at the statement shows that it is of the form “If p, then q” with: • p: Joe goes to class only if he does not go to work or Fred is working; • q: Joe will not pass the course unless he does not go to work and Fred does not go to class. Each of p and q is a compound proposition on its own and it can be formed using the above atomic sentences as follows: p : (J → (¬W ∨ F)) and q : (¬C ∨ (¬W ∧ ¬D)). We conclude that the translation of the sentence is the wff: ((J → (¬W ∨ F)) → (¬C ∨ (¬W ∧ ¬D))). ♦ 1.4.1 Logic arguments Consider the following paragraph: “If the arms race continues, the world is heading to a war. Joe is elected as a president only if the arms race continues. Joe will never be elected unless the steel industry endorses him. The steel industry endorses Joe for presidency if and only if the arms race continues and the world is heading to a war. Therefore, the world is heading to a war.” The paragraph sounds like a statement made by some political opponent of Joe to make the case why he should not be elected as a president. The paragraph draws a conclusion based on several facts (or premises). From the propositional logic perspective, the above paragraph is called an argument. We all make arguments almost on a daily basis to push an opinion forward or to persuade others about an opinion. The more “coherent” the argument, the more convincing it is. Propositional logic gives us a way to assess and measure an argument in terms of its validity that we will introduce later. Definition 1.6. An argument of propositional logic is a list of the following form: φ1 . . . φn ∴ ψ where φ1, φ2, . . . , φn and ψ are logic formulas. The formulas φ1, φ2, . . . , φn are called the premises and the formula ψ is called the conclusion of
  • 54. 24 A Tale of Discrete Mathematics the argument. A small horizontal line separates the premises from the conclusion of an argument and the symbol ∴ stands for “therefore”. In most cases, logic arguments are given in natural languages sentences which makes them hard to analyze. As we will see later, the first step to determine the validity of an argument is to break it down to the form given in Definition 1.6 above. Example 1.33. Write the logic argument given at the beginning of this section in standard form given in Definition 1.6. Solution. The following propositions are the atoms in the argument: • A: The arms race continues • B: The world is heading to a war • C: Joe is elected as a president • D: The steel industry endorses Joe The first premise translates as (A → B), the second as (C → A), the third is (¬C ∨ D) and the fourth as (D ↔ (A ∧ B)). The conclusion is simply B. The translation of the argument into logic symbols is: (A → B) (C → A) (¬C ∨ D) (D ↔ (A ∧ B)) ∴ B ♦ 1.4.2 Exercises (1) Translate the following statement into a formula of propositional logic. Start by identifying the atomic components of the statement: “If the European union wants to standardize its economy, then it must follow the French or the Swedish model but not both at the same time.” (2) In each case, translate the given sentence into a wff of propositional logic using the following atoms. • P: The wind is blowing • Q: The temperature drops below the freezing degree • R: A snow storm is coming (a) If the wind is blowing or the temperature drops below the freezing degree, then a snow storm is coming.
  • 55. Random documents with unrelated content Scribd suggests to you:
  • 56. We shall have to leave it for my father's home. True. But that, I trust, may be a long while off. And then we could re-sell Raven's Priory. Yes, of course. It is a nice place, William? Charming, he replied with enthusiasm. For, of course, all things, the proposed residence included, were to him the hue of couleur-de- rose. I have never been inside it, she observed. No. The Wests are churlish people, keeping no company. Report says that Mrs. West is a hypochondriac. They let me go in this morning, and I went over all the house. It is the nicest place, love-- and not too large or too small for us; and the Wests have kept it in good condition. You will be charmed with the drawing-rooms, Mary; and the conservatory is one of the best I ever saw. They want us to take to the plants. Are they nice? Beautiful. The Wests are moving to London, to be near good advice for her, and they do not expect to get anything of a conservatory there; at least, that is worth the name. I wonder what your papa will think about this house, Mary? We might tell him of it now. Where is he? He is out, she answered. Just as he was going up to dress, Thomas Hill sent for him downstairs, and they went out somewhere together. Papa ran up to tell me he would be back as soon as he could, but that I must for once receive the people alone. I wish I might stand by your side to help receive them! he said, impulsively. Would any of them faint at it? Do you think Mrs. Webb would, if she were here? he continued, with a smile. Ah, well--a short while, my darling, and I shall have the right to stand by you.
  • 57. He stole his arm round her waist, and whispered to her a repetition of those love vows that had so often before charmed her ear and thrilled her heart. Her cheek touched his shoulder; the faint perfume of her costly fan, that she swayed unconsciously as it hung from her wrist, was to him like an odour from Paradise. He recounted to her all the features he remembered of the house that neither of them doubted would be their future home; and the minutes passed, in, to both, bliss unutterable. The crashing up of a carriage--of two carriages it seemed--warned them that this sweet pastime was at an end. Sounds of bustle in the hall succeeded to it: the servants were receiving the first guests. Oh, William--I forgot--I meant to tell you, she hurriedly whispered. I had the most ugly dream last night. And you know I very rarely do dream. I have not been able to get it out of my mind all day. What is it, Mary? I thought we were separated, you and I; separated for ever. We had quarrelled, I think; that point was not clear; but you turned off one way, and I another. It was in the gallery of this house, William, and we had been talking together. You went out at the other end, by the door near the dining-room, and I at this end; and we turned at the last and looked at one another. Oh, the look was dreadful! I shall never forget it: so full of pain and sadness! And we knew, both of us knew, that it was the last farewell look; that we should never again meet in this world. Oh, my love! my love! he murmured, bending his face on hers. And you could let it trouble you!--knowing it was but a dream! Nothing but the decree of God--death--shall ever separate us, Mary. For weal or for woe, we will go through the life here together. He kissed away the tears that had gathered in her eyes at the remembrance; and Miss Castlemaine turned hastily into one of the
  • 58. larger rooms, and took up her standing there in expectation. For the feet of the gay world were already traversing the gallery. She welcomed her guests, soon coming in thick and threefold, with the gracious manner and the calm repose of bearing that always characterised her, apologising to all for the absence of her father; telling that he had been called out unexpectedly on some matter of business, but would soon return. Amid others, came the party from Greylands' Rest, arriving rather late: Mrs. Castlemaine in black velvet, leaning on the arm of her stepson; Ethel Reene walking modestly behind, in a simple dress of white net, adorned with white ribbons. There was many a fine young man present, but never a finer or more attractive one than Harry Castlemaine; with the handsome Castlemaine features, the easy, independent bearing, and the ready tongue. Is it of any use to ask whether you are at liberty to honour me with your hand for the first dance, Mary Ursula? he inquired, after leaving Mrs. Castlemaine on a sofa. Not the least, Harry, answered Miss Castlemaine, smiling. I am engaged for that, and for the second as well. Of course. Well, it is all as it should be, I suppose. Given the presence of Mr. Blake-Gordon, and no one else has so good a right as he to open the ball with you. You will find a substitute for me by the asking, Harry. See all those young ladies around; not one but is glancing towards you with the hope that you may seek her. He laughed rather consciously. He was perfectly well aware of the universal favour accorded by the ladies, young and old, to Harry Castlemaine. But this time, at any rate, he intended to disappoint them all. He turned to Miss Reene.
  • 59. Will you take compassion upon a rejected man, Ethel? Mary Ursula won't have me for the first two dances, you hear; so I appeal to you in all humility to heal the smart. Don't reject me. Nonsense, Harry! was the young lady's answer. You must not ask me for the first dance; it would be like brother and sister dancing together; all the room would resent it in you, and call it bad manners. Choose elsewhere. There's Miss Mountsorrel; she will not say you nay. For the dances, no but she'll not condescend to speak three words to me while they are in process, returned Mr. Harry Castlemaine. If you do not dance them with me, Ethel, I shall sit down until the two first dances are over. He spoke still in the same laughing, half joking manner; but, nevertheless, there was a ring of decision in the tone of the last words; and Ethel knew he meant what he said. The Castlemaines rarely broke through any decision they might announce, however lightly it was spoken; and Harry possessed somewhat of the same persistent will. If you make so great a point of it, I will dance with you, observed Ethel. But I must again say that you ought to take anyone rather than me. I have not seen my uncle yet, remarked Miss Castlemaine to Ethel, as Harry strolled away to pay his devoirs to the room generally. Where can he be lingering? Papa is not here, Mary Ursula. Not here! How is that? Really I don't know, replied Ethel. When Harry came running out to get into the carriage to-night--we had been sitting in it quite five minutes waiting for him but he had been away all day, and was
  • 60. late in dressing--Miles shut the door. 'Don't do that,' said Harry to him, 'the master's not here.' Upon that, Mrs. Castlemaine spoke, and said papa was not coming with us. I suppose he will be coming in later, remarked Mary Ursula, as she moved away to meet fresh guests. The dancing began with a country dance; or, as would have been said then, the ball opened with one. Miss Castlemaine and her lover, Mr. Blake-Gordon, took their places at its head; Harry Castlemaine and Miss Reene were next to them. For in those days, people stood much upon etiquette at these assemblies, and the young ladies of the family took precedence of all others in the opening dance. The dance chosen was called the Triumph. Harry Castlemaine led Mary Ursula down between the line of admiring spectators; her partner, Mr. Blake-Gordon, followed, and they brought the young lady back in triumph. Such was the commencement of the figure. It was a sight to be remembered in after years; the singular good looks of at least two of the three; Harry, the sole male heir of the Castlemaines, with the tall fine form and the handsome face; and Mary Ursula, so stately and beautiful. Ethel Reene was standing alone, in her quiet loveliness, looking like a snowdrop, and waiting until her turn should come to be in like manner taken down. The faces of all sparkled with animation and happiness; the gala robes of the two young ladies added to the charm of the scene. Many recalled it later; recalled it with a pang: for, of those four, ere a year had gone by, one was not, and another's life had been blighted. No prevision, however, rested on any of them this night of what the dark future held in store; and they revelled in the moment's enjoyment, gay at heart. Heaven is too merciful to let Fate cast its ominous shade on us before the needful time. The banker came in ere the first dance was over. Moving about from room to room among his guests, glancing with approving smile at the young dancers, seeing that the card-tables were filled, he at
  • 61. length reached the sofa of Mrs. Castlemaine. She happened to be alone on it just then, and he sat down beside her. I don't see James anywhere, he remarked. Where is he hiding himself? He has not come, replied Mrs. Castlemaine. No! How's that? James enjoys a ball. Yes, I think he does still, nearly as much as his son Harry. Then what has kept him away? I really do not know. I had thought nearly to the last that he meant to come. When I was all but ready myself, finding James had not begun to dress, I sent Harriet to remind him of the lateness of the hour, and she brought word back that her master was not going. Did he say why? asked Mr. Peter Castlemaine. No! I knocked at his study door afterwards and found him seated at his bureau. He seemed busy. All he said to me was, that he should remain at home; neither more nor less. You know, Peter, James rarely troubles himself to give a reason for what he does. Well, I am sorry. Sorry that he should miss a pleasant evening, and also because I wanted to speak to him. We may not have many more of these social meetings. I suppose not, said Mrs. Castlemaine, assuming that her brother-in-law alluded in an indirect way to his daughter's approaching marriage. When once you have lost Mary Ursula, there will be nobody to hold, festivities for. No, said the banker, absently.
  • 62. I suppose it will be very soon now. What will be soon? The wedding. James thinks it will be after Easter. Oh--ay--the wedding, spoke Mr. Peter Castlemaine, with the air of a man who has just caught up some recollection that had slipped from him. I don't know yet: we shall see: no time has been decided on. Close as his brother thought Mrs. Castlemaine. No likelihood, that he will disclose anything unless he chooses. Will James be coming in to Stilborough to-morrow? asked the banker. I'm sure I cannot tell. He goes out and comes in, you know, without any reference to me. I should fancy he would not be coming in, unless he has anything to call him. He has not seemed well to- day; he thinks he has caught a cold. Ah, then I daresay that's the secret of his staying at home to- night, said Mr. Peter Castlemaine. Yes, it may be. I did not think of that. And he has also been very much annoyed to-day: and you know, Peter, if once James is thoroughly put out of temper, it takes some little time to put him in again. The banker nodded assent. What has annoyed him? A very curious thing, replied Mrs. Castlemaine: you will hardly believe it when I tell you. Some young man----
  • 63. Breaking off suddenly, she glanced around to make sure that no one was within hearing. Then drawing nearer to the banker, went on in a lowered voice: Some young man presented himself this morning at Greylands' Rest, pretending to want to put in a claim to the estate. Abstracted though the banker had been throughout the brief interview, these words aroused him to the quick. In one moment he was the calm, shrewd, attentive business man, Peter Castlemaine, his head erect, his keen eyes observant. I do not understand you, Mrs. Castlemaine. Neither do I understand, she rejoined. James said just a word or two to me, and I gathered the rest. Who was the young man? Flora described him as wearing a coat trimmed with fur; and Miles thought he spoke with somewhat of a foreign accent, replied Mrs. Castlemaine, deviating unconsciously from the question, as ladies sometimes do deviate. But don't you know who he was? Did he give no account of himself? He calls himself Anthony Castlemaine. As the name left her lips a curious kind of change, as though he were startled, passed momentarily over the banker's countenance. But he neither stirred nor spoke. When the card was brought in with that name upon it--James happened to be in the red parlour, talking with me about a new governess--I said it must be an old card of your father's that somebody had got hold of. But it turned out not to be that: and,
  • 64. indeed, it was not like the old cards. What he wants to make out is, that he is the son of Basil Castlemaine. Did James see him? Oh dear yes, and their interview lasted more than an hour. And he told James he was Basil's son?--this young man. I think so. At any rate, the young man told Ethel he was. She happened to meet him as he was leaving the house and he introduced himself to her as Anthony Castlemaine, Basil's son, and said he had come over to claim his inheritance--Greylands' Rest. And where's Basil? asked the banker, after a pause. Dead. Dead? So the young man wishes to make appear. My opinion is he must be some impostor. An impostor no doubt, assented the banker, slowly. At least--he may be. I only wonder that we have not, under the circumstances, had people here before, claiming to be connected with Basil. And I am sure the matter has annoyed James very much, pursued Mrs. Castlemaine. He betrayed it in his manner, and was not at all like himself all the afternoon. I should make short work of it if the man came again, were I James, and threaten him with the law. Mr. Peter Castlemaine said no more, and presently rose to join other of his guests. But as he talked to one, laughed with another, listened to a third, his head bent in attention, his eyes looking
  • 65. straight into their eyes, none had an idea that these signs of interest were evinced mechanically, and that his mind was far away. He had enough perplexity and trouble of his own just then, as Heaven knew; very much indeed on this particular evening; but this other complexity, that appeared to be arising for his brother James, added to it. To Mrs. Castlemaine's scornfully expressed opinion that the man was an impostor, he had assented just in the same way that he was now talking with his guests--mechanically. For some instinct, or prevision, call it what you will, lay on the banker's heart, that the man would turn out to be no impostor, but the veritable son of the exile, Basil. Peter Castlemaine was much attached to his brother James, and for James's own sake he would have regretted that any annoyance or trouble should arise for him; but he had also a selfish motive for regretting it. In his dire strait as to money--for to that it had now come--he had been rapidly making up his mind that evening to appeal to James to let him have some. The appeal might not be successful under the most favourable auspices: he knew that: but with this trouble looming for the Master of Greylands, he foresaw that it must and would fail. Greylands' Rest might be James's in all legal security; but an impression had lain on the mind of Peter Castlemaine, since his father's death, that if Basil ever returned he would set up a fight for it. Supper over--the elaborate, heavy, sit-down supper of those days- -and the two dances following upon it, most of the guests departed. Mr. Blake-Gordon, seeking about for the banker to wish him goodnight, at length found him standing over the fire in the deserted card-room. Absorbed though he was in his own happiness, the young man could but notice the flood-tide of care on the banker's brow. It cleared off, as though by magic, when the banker looked up and saw him. Is it you, William? I thought you had left.
  • 66. I should hardly go, sir, without wishing you goodnight. What a delightful evening it has been! Ay, I think you have all enjoyed yourselves. Oh, very, very much. Well, youth is the time for enjoyment, observed the banker. We can never again find the zest in it, once youth is past. You look tired, sir; otherwise I--I might have ventured to trespass on you for five minutes' conversation, late though it be, pursued Mr. Blake-Gordon with some hesitation. Tired!--not at all. You may take five minutes; and five to that, William. It is about our future residence, sir. Raven's Priory is in the market: and I think--and Mary thinks--it will just suit us. Ay; I heard more than a week ago that the Wests were leaving. The words took William Blake-Gordon by surprise. He looked at the banker. Did you, sir!--more than a week ago! And did it not strike you that it would be a very suitable place for us? I cannot say that I thought much about it, was the banker's answer; and he was twirling an ornament on the mantelpiece about with his hand as he spoke: a small, costly vase of old china from Dresden. But don't you think it would be, sir? I daresay it might be. The gardens and conservatories have been well kept up; and you and Mary Ursula have both a weakness for rare flowers.
  • 67. That was perfectly true. And the weakness showed itself then, for the young man went off into a rapturous description of the wealth of Raven's Priory in respect of floriculture. The ten minutes slipped away to twenty; and in his own enthusiasm Mr. Blake-Gordon did not notice the absence of it in his hearer. But I must not keep you longer, sir, he suddenly said, as his eyes caught the hands of the clock. Perhaps you will let me see you about it to-morrow. Or allow my father to see you--that will be better. Not to-morrow, said Mr. Peter Castlemaine. I shall be particularly engaged all day. Some other time. Whenever you please, sir. Only--we must take care that we are not forestalled in the purchase. Much delay might---- We can obtain a promise of the first refusal, interrupted the banker, in a somewhat impatient tone. That will not be difficult. True. Goodnight, sir. And thank you for giving us this most charming evening. Goodnight, William. But Mr. Blake-Gordon had not yet said his last farewell to his betrothed wife; and lovers never think that can be spoken often enough. He found her in the music-room, seated before the organ. She was waiting for her father. We shall have Raven's Priory, Mary, he whispered, speaking in accordance with his thoughts, in his great hopefulness; and his voice was joyous, and his pale face had a glow on it not often seen there. Your papa himself says how beautiful the gardens and conservatories are. Yes, she softly answered, we shall be sure to have it.
  • 68. I may not stay, Mary: I only came back to tell you this. And to wish you goodnight once again. Her hand was within his arm, and they walked together to the end of the music-room. All the lights had been put out, save two. Just within the door he halted and took his farewell. His arm was around her, his lips were upon hers. May all good angels guard you this happy night--my love!--my promised wife! He went down the corridor swiftly; she stole her blushing face to the opening of the door, to take a last look at him. At that moment a crash, as of some frail thing broken, was heard in the card-room. Mr. Blake-Gordon turned into it Mary Ursula followed him. The beautiful Dresden vase lay on the stone flags of the hearth, shivered into many atoms. It was one that Mary Ursula set great store by, for it had been a purchase of her mother's. Oh papa! How did it happen? My dear, I swept it off unwittingly with my elbow: I am very sorry for it, said Mr. Peter Castlemaine.
  • 69. CHAPTER VI. ANTHONY CASTLEMAINE ON HIS SEARCH. The hour of dinner with all business men in Stilborough was half- past one o'clock in the day. Perhaps Mr. Peter Castlemaine was the only man who did not really dine then; but he took his luncheon; which came to the same thing. It was the recognized daily interregnum in the public doings of the town--this half hour between half-past one and two: consequently shops, banks, offices, all were virtually though not actually closed. The bank of Mr. Peter Castlemaine made no exception. On all days, except Thursday, market day, the bank was left to the care of one clerk during this half hour: the rest of the clerks and Mr. Hill would be out at their dinner. As a rule, not a single customer came in until two o'clock had struck. It was the day after the ball. The bank had been busy all the morning, and Mr. Peter Castlemaine had been away the best part of it. He came back at half-past one, just as the clerks were filing out. Do you want me, sir? asked Thomas Hill, standing back with his hat in his hand; and it was the dreadfully worn, perplexed look on his master's face that induced him to ask the question. Just for a few minutes, was the reply. Come into my room. Once there, the door was closed upon them, and they sat in grievous tribulation. There was no dinner for poor Thomas Hill that
  • 70. day; there was no lunch for his master: the hour's perplexities were all in all. On the previous evening some stranger had arrived at Stilborough, had put up at the chief inn there, the Turk's Head; and then, after enquiring the private address of Mr. Peter Castlemaine's head clerk, had betaken himself to the clerk's lodgings. Thomas Hill was seated at tea when the gentleman was shown in. It proved to be a Mr. Fosbrook, from London: and the moment the clerk heard the name, Fosbrook, and realized the fact that the owner of it was in actual person before him, he turned as cold as a stone. For of all the men who could bring most danger on Mr. Peter Castlemaine, and whom the banker had most cause to dread, it was this very one, Fosbrook. That he had come down to seek explanations in person which might no longer be put off, the clerk felt sure of: and the fact of his seeking out him instead of his master, proved that he suspected something was more than wrong. He had had a little passing, private acquaintance with Mr. Fosbrook in the years gone by, and perhaps that induced the step. Thomas Hill did what he could. He dared not afford explanation or information himself, for he knew not what it would be safe to say, what not. He induced Mr. Fosbrook to return to his inn, undertaking to bring his master to wait on him there. To the banker's house he would not take the stranger; for the gaiety of which it was that night the scene was not altogether a pleasant thing to show to a creditor. Leaving Mr. Fosbrook at the Turk's Head on his way, he came on to apprise Mr. Peter Castlemaine. Mr. Peter Castlemaine went at once to the inn. He had no resource but to go: he did not dare do otherwise: and this it was that caused his absence during the arrival of the guests. The interview was not a long one; for the banker, pleading the fact of having friends at home, postponed it until the morning.
  • 71. It was with this gentleman that his morning had been spent; that he had now, half-after one o'clock, just come home from. Come home with the weary look in his face, and the more than weary pain at his heart. And what is the result, sir? asked Thomas Hill as they sat down together. The result is, that Fosbrook will wait a few days, Hill three or four, he says. Perhaps that may be made five or six: I don't know. After that--if he is not satisfied by tangible proofs that things are right and not wrong, so far as he is concerned--there will be no further waiting. And the storm must burst. The storm must burst, echoed Peter Castlemaine. Oh but, sir, my dear master, what can be done in those few poor days? cried Thomas Hill, in agitation. Nothing. You must have more time allowed you. I had much ado to get that much, Hill. I had to LIE for it, he added, in a low tone. Do you see a chance yourself, sir? Only one. There is a chance; but it is a very remote one. That last venture of mine has turned up trumps: I had the news by the mail this morning: and if I can realize the funds in time, the present danger may be averted. And the future trouble also, spoke Thomas Hill, catching eagerly at the straw of hope. Why, sir, that will bring you in a mine of wealth.
  • 72. Yes. The only real want now is time. Time! time! I have said it before perhaps too sanguinely; I can say it in all truth now. And, sir--did you not show this to be the case to Mr. Fosbrook? I did. But alas, I had to deny to him my other pressing liabilities-- and he questioned sharply. Nevertheless, I shall tide it over, all of it, if I can only secure the time. That account of Merrit's--we may as well go over it together now, Thomas. It will not take long. They drew their chairs to the table side by side. A thought was running through Thomas Hill's mind, and he spoke it as he opened the ledgers. With this good news in store, sir, making repayment certain--for if time be given you, you will now have plenty--don't you think Mr. Castlemaine would advance you funds? I don't know, said the banker. James seems to be growing cautious. He has no notion of my real position--I shrink from telling him--and I am sure he thinks that I am quite rich enough without borrowing money from anybody for fresh speculations. And, in truth, I don't see how he can have much money at command. This new trouble, that may be looming upon him, will make him extra cautious. What trouble? asked Thomas Hill. Some man, I hear, has made his appearance at Greylands, calling himself Anthony Castlemaine, and saying that he is a son of my brother Basil, replied the banker, confidentially. Never! cried the old man. But, sir, if he be, how should that bring trouble on Mr. Castlemaine? Because the stranger says he wants to claim Greylands' Rest.
  • 73. He must be out of his mind, said Thomas Hill. Greylands' Rest is Mr. Castlemaine's; safe enough too, I presume. But a man such as this may give trouble, don't you see. No, sir, I don't see it--with all deference to your opinion. Mr. Castlemaine has only to show him it is his, and send him to the right about---- A knock at the room door interrupted the sentence. The clerk rose to open it, and received a card and a message, which he carried to his master. The banker looked rather startled as he read the name on it: Anthony Castlemaine. Somewhere about an hour before this, young Anthony Castlemaine, after a late breakfast a la fourchette, had turned out of the Dolphin Inn to walk to Stilborough. Repulsed by his Uncle James on the previous day, and not exactly seeing what his course should be, he had come to the resolution of laying his case before his other uncle, the banker. Making enquiries of John Bent as to the position of the banker's residence, he left the inn. Halting for a few seconds to gaze across beyond the beach, for he thought the sea the most beautiful object in nature and believed he should never tire of looking at it, he went on up the hill, past the church, and was fairly on his road to Stilborough. It was a lonely road enough, never a dwelling to be seen all the way, save a farm homestead or two lying away amid their buildings; but Anthony Castlemaine walked slowly, taking in all the points and features of his native land, that were so strange to his foreign eye. He stood to read the milestones; he leaned on the fences; he admired the tall fine trees, leafless though they were; he critically surveyed the two or three carts and waggons that passed. The sky was blue, the sun bright, he enjoyed the walk and did not hurry himself: but nevertheless he at length reached Stilborough, and found out the house of the banker. He rang at the private door.
  • 74. The servant who opened it saw a young man dressed in a rather uncommon kind of overcoat, faced with fur. The face was that of a stranger; but the servant fancied it was a face he had seen before. Is my uncle Peter at home? Sir! returned the servant, staring at him. For the only nephew the banker possessed, so far as he knew, was the son of the Master of Greylands. What name did you please to ask for, sir? Mr. Peter Castlemaine. This is his residence I am told. Yes, sir, it is. Can I see him? Is he at home? He is at home, in his private room, sir; I fancy he is busy. I'll ask if you can see him. What name shall I say, sir? You can take my card in. And please say to your master that if he is busy, I can wait. The man glanced at the card as he knocked at the door of the private room, and read the name: Anthony Castlemaine. It must be a nephew from over the sea, he shrewdly thought: he looks foreign. Perhaps a son of that lost Basil. We have seen that Thomas Hill took in the card and the message to his master. He came back, saying the gentleman was to wait; Mr. Peter Castlemaine would see him in a quarter of an hour. So the servant, beguiled by the family name, thought he should do right to conduct the stranger upstairs to the presence of Miss Castlemaine, and said so, while helping him to take off his overcoat. Shall I say any name, sir? asked the man, as he laid his hand on the handle of the drawing-room door.
  • 75. Mr. Anthony Castlemaine. Mary Ursula was alone. She sat near the fire doing nothing, and very happy in her idleness, for her thoughts were buried in the pleasures of the past gay night; a smile was on her face. When the announcement was made, she rose in great surprise to confront the visitor. The servant shut the door, and Anthony came forward. He did not commit a similar breach of good manners to the one of the previous day; the results of that had shown him that fair stranger cousins may not be indiscriminately saluted with kisses in England. He bowed, and held out his hand with a frank smile. Mary Ursula did not take it: she was utterly puzzled, and stood gazing at him. The likeness in his face to her father's family struck her forcibly. It must be premised that she did not yet know anything about Anthony, or that any such person had made his appearance in England. Anthony waited for her to speak. If I understood the name aright--Anthony Castlemaine--you must be, I presume, some relative of my late grandfather's, sir? she said at length. He introduced himself fully then; who he was, and all about it. Mary Ursula met his hand cordially. She never doubted him or his identity for a moment. She had the gift of reading countenances; and she took to the pleasant, honest face at once, so like the Castlemaines in features, but with a more open expression. I am sure you are my cousin, she said, in cordial welcome. I think I should have known you for a Castlemaine had I seen your face in a crowd. I see, myself, how like I am to the Castlemaines, especially to my father and grandfather: though unfortunately I have not inherited their height and strength, he added, with a slight laugh. My mother was small and slight: I take after her.
  • 76. And my poor uncle Basil is dead! Alas, yes! Only a few weeks ago. These black clothes that I wear are in memorial of him. I never saw him, said Miss Castlemaine, gazing at the familiar-- for indeed it seemed familiar--face before her, and tracing out its features. But I have heard say my uncle Basil was just the image of his father. And he was, said Anthony. When I saw the picture of my grandfather yesterday at Greylands' Rest, I thought it was my father's hanging there. It was a long while since Miss Castlemaine had met with anyone she liked so well at a first interview as this young man; and the quarter of an hour passed quickly. At its end the servant again appeared, saying his master would see him in his private room. So he took leave of Mary Ursula, and was conducted to it. But, as it seemed, Mr. Peter Castlemaine did not wait to receive him: for almost immediately he presented himself before his daughter. This person has been with you, I find, Mary Ursula! Very wrong of Stephen to have brought him up here! I wonder what possessed him to do it? I am glad he did bring him, papa, was her impulsive answer. You have no idea what a sensible, pleasant young man he is. I could almost wish he were more even than a cousin--a brother. Why, my dear, you must be dreaming! cried the banker, after a pause of astonishment. Cousin!--brother! It does not do to take strange people on trust in this way. The man may be, and I dare say is, an adventurer, he continued, testily: no more related to the Castlemaines than I am related to the King of England.
  • 77. She laughed. You may take him upon trust, papa, without doubt or fear. He is a Castlemaine all over, save in the height. The likeness to grandpapa is wonderful; it is so even to you and to uncle James. But he says he has all needful credential proofs with him. The banker, who was then looking from the window, stood fingering the bunch of seals that hung from his long and massive watch-chain, his habit sometimes when in deep thought. Self- interest sways us all. The young man was no doubt the individual he purported to be: but if he were going to put in a vexatious claim to Greylands' Rest, and so upset James, the banker might get no loan from him. He turned to his daughter. You believe, then, my dear, that he is really what he makes himself out to be--Basil's son? Papa, I think there is no question of it. I feel sure there can be none. Rely upon it, the young man is not one who would lay himself out to deceive, or to countenance deception: he is evidently honest and open as the day. I scarcely ever saw so true a face. Well, I am very sorry, returned the banker. It may bring a great deal of trouble upon James. In what way can it bring him trouble, papa? questioned Mary Ursula, in surprise. This young man--as I am informed--has come over to put in a claim to Greylands' Rest. To Greylands' Rest! she repeated. But that is my uncle James's! How can anyone else claim it? People may put in a claim to it; there's no law against that; as I fear this young man means to do, replied the banker, taking thought and time over his answer. He may cost James no end of bother and expense.
  • 78. But, papa--I think indeed you must be misinformed. I feel sure this young man is not one who would attempt to claim anything that is not his own. But if he supposes it to be his own? What, Greylands' Rest his? How can that be? My dear child, as yet I know almost nothing. Nothing but a few words that Mrs. Castlemaine said to me last night. But why should he take up such a notion, papa? she asked, in surprise. From his father, I suppose. I know Basil as much believed Greylands' Rest would descend to him as he believed In his Bible. However, I must go down and see this young man. As soon as Peter Castlemaine entered his private room, and let his eyes rest on the face of the young man who met him so frankly, he saw the great likeness to the Castlemaines. That it was really his nephew, Basil's son, he had entertained little doubt of from the first; none, since the recent short interview with his daughter. With this conviction on his mind, it never would have occurred to him to deny or cast doubts on the young man's identity, and he accepted it at once. But though he called him Anthony, or Anthony Castlemaine--and now and then by mistake Basil--he did not show any mark of gratification or affection, but was distant and cold; and thought it very inconvenient and ill-judged of Basil's son to be bringing trouble on James. Taking his place in his handsome chair, turned sideways to the closed desk, he faced the young man seated before him. A few minutes were naturally spent in questions and answers, chiefly as to Basil's career abroad. Young Anthony gave every information freely--just as he had done to his uncle James on the
  • 79. Welcome to our website – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com