CMPT 260 Introduction
1

Couse Overview
●
Review syllabus, grading, textbook, and contact information
●
Assignment design - heavy work load first month front
loaded, and early quiz, then it tapers off.
●
To get rolling want to give
very
quick overview of discrete
math (as opposed to continuous math of calculus)
2

Discrete Math
●
Is the world smooth and continuous, like calculus assumes, or
does it consist of discrete chunks? Certain things are
“obviously” continuous - like water or time or your degree of
belief in a sentence(!). And some are obviously not - the
number of stones in a plate.
●
Artificial intelligence? Are thoughts continuous, fuzzy, or can
they be represented with symbols? Do words (which are
chunky) represent thoughts? Can we do this with 1’s and 0’s).
●
3

Propositional Logic
●
First we see this subject as the arithmetic of truth. Very simple
sentences and symbols representing simple “logical” ideas”
●
coffee or tea?
●
if cloudy then rain
●
Symbols can be arranged in sequences that resemble arguments
if cloud then rain
cloud
Therefore, rain
•
Propositional logic provides the fundamental basis of computer
hardware and software
4
The first two sentences represent the ideas “if it’s
cloudy, it will rain” and the observation “cloudy”. From
these two, we can conclude “it will rain.” (Concluding
line of argument.)

Predicate Logic
●
Predicate Logic contains two kinds of objects, a universe of
individuals (with names) and predicates, which can be
properties of objects or relationships among objects, e.g.
●
has-red-hair(kelly)
●
sibling(kelly, jody)
●
triangle(vertex1, vertex1, vertex3)
●
Also permits generalizations, e.g.
Everyone pays taxes.
Somebody doesn’t pay taxes.
Much more expressive power - yet a modular extension of
propositional logic.
∀
X
pays-taxes
(
X
)
∃
X
∼
pays-taxes
(
X
)
5

Computational Logic
●
A variation of logic that allows computers to reason with
(part of) the full power of logic
●
Python implementation
6

Sets
●
A set is a collection of objects
7

CMPT 260
Sets
We review set notation, because we use it a lot in this class.
S
=
A set is unordered, elements the same even if listed more than
once
is read as “2 is an element of S”
Some sets
R – reals, Z – integers, Q – rationals,
Z
+
positive integers
{1,2,3} = {3,2,1} = {2,1,3} = {2,2,1,3,1}
2
∈
S
8

CMPT 260
Sets
●
Subset
●
Proper subset
●
How many subsets are there are of
?
●
Is
●
Is
●
The empty set, written
, or
, which is a subset of every set
●
●
How many elements are there is
How many subsets?
࠵?
⊆
࠵?
࠵?
⊂
࠵?
S = {
࠵?
,
࠵?
,
࠵?
,
࠵?
}
࠵?
∈
࠵?
?
{
࠵?
}
∈
࠵?
?
∅
{}
࠵?
=
{
{
࠵?
,
࠵?
},
࠵?
, {
࠵?
},
࠵?
,
࠵?
}
࠵?
?
9

Can a set be a subset of itself?
●
Can
Some thought, why not? Some thought - it’s impossible.
Since we are computer scientists, and (I’ve just learned Python),
and we are living in the era of Artificial Intelligence, let’s ASK A
COMPUTER!

#### You've reached the end of your free preview.

Want to read all 56 pages?

- Spring '14