York University
CSE/MATH 1019
June 15, 2009
Solution of assignment 1
Due: June 15, 6:00 p.m.
1. (a) p q .
(b) q r.
2. (a)
p
T
T
T
T
F
F
F
F
q
T
T
F
F
T
T
F
F
(b)
p (q r)
p (q r)
p (q r)
(p q ) r
(p q ) r
(p q ) r
r
T
F
T
F
T
F
T
F
qr
T
F
T
T
T
F
T
T
Math 1019, section M, Fall 2012. Assignment #1. Due date: January 24, 8am.
Questions #5 and #6 will be graded this time.
(1) Find a proposition that only uses the variables p, q and the connectives and that has the
following truth table
p q
> >
>
> >
Math 1019, section M, W 2012. Assignment #4 solutions.
Questions 1 and 4 will be graded this time.
(1) Let X denote the set of all functions from cfw_0, 1, 2, . . . , 100 into cfw_0, 1, 2, 3.
(a) What is the cardinality of X?
Solution. |X| = 4101 .
(b) Wh
Math 1019 W12, Assignment #3 solutions.
(1) Find
the least n such that
is O( x3 + x2 + 3?
x3 + x2 + 3 is O(xn ). With the value of n that you have found, is it true that xn
Solution.
(It is assumed that n is a natural number.) We know that x3 + x2 + 3 is
Math 1019, section M, Fall 2012. Assignment #2. Due date: February 2, 8am.
(1) Prove that if x2 is irrational then x is irrational.
Solution. We use the method of indirect proof. Assume x is rational. Then x = a/b for some
integers a, b. So x2 = a2 /b2 ;
Rules of inference
Niloufar Shafiei
Argument
Argument:
1. If you have the current password, then
you can log onto the network.
2. You have a current password.
Therefore,
3. You can log onto the network.
An Argument is a sequence of propositions.
1
Premise
Functions
Niloufar Shafiei
Application of functions
Applications of functions
Define discrete structures such as sequences
and strings
Represent the time that a computer takes to
solve problems of a given size
Represent the complexity of algorithms
1
Func
Set Operations
Niloufar Shafiei
Set operations
Two sets can be combined in many
different ways.
Set operations can be used to combine
sets.
1
Union
Let A and B be sets.
The union of A and B, denoted by A B, is
the set containing those elements that are
ei
Sets
Niloufar Shafiei
Application of sets and functions
Databases
Data-type or type in computer programming
Constructing discrete structures
Finite state machine
Modeling computing machine
Representing computational complexity of
algorithms
1
Set
A set is
Introduction to proofs
Niloufar Shafiei
proofs
Proofs are essential in mathematics and computer
science.
Some applications of proof methods
Proving mathematical theorems
Designing algorithms and proving they meet their
specifications
Verifying computer pr
Proof methods and Strategy
Niloufar Shafiei
Proof methods (review)
pq
Direct technique
Premise: p
Conclusion: q
Proof by contraposition
Premise: q
Conclusion: p
Proof by contradiction
Premise: p q
Conclusion: a contradiction
1
Prove a theorem (review)
How
The Growth of Functions
Niloufar Shafiei
Algorithms
An algorithm is a finite set of precise
instructions for performing a computation or
for solving a problem.
Algorithms can be described using English
language, programming language, pseudocode,
1
Algori
York University
CSE/MATH 1019
July 6, 2009
Solution of assignment 4
Due: July 6, 6:00 p.m.
1. (A (B C ) = A (B C ) = A (B C ) = (A B ) (A C ) =
(A B ) (A C )
2. g 1 (0) = [2, 1)
g 1 (1) = [3, 2)
g 1 (2) = [4, 3)
g 1 (cfw_2, 1, 0) = [4, 1)
3. S A and T B .
York University
CSE/MATH 1019
July 18, 2009
Solution of assignment 6
Due: July 18, 7:00 p.m.
1. P (n): rooted tree T with n vertices has n 1 edges.
Basis step:
P (1) is rooted tree T with 1 vertex has 0 edge.
Since a single vertex tree has no edge, P (1)
York University
CSE/MATH 1019
June 29, 2009
Solution of assignment 3
Due: June 29, 6:00 p.m.
1. Case 1 : x and y are nonnegative.
|x| = x and |y | = y .
|x + y | = x + y and |x| + |y | = x + y .
So, |x + y | = |x| + |y |.
Case 2 : x and y are negative.
|x
York University
CSE/MATH 1019
June 22, 2009
Solution of assignment 2
Due: June 22, 6:00 p.m.
1. nmP (m, n) means There is an integer n such that for every integer
m, n < m. No matter what value we choose, there is some m (namely
m = n 1) that makes false.
DISCRETE MATHEMATICS AND ITS APPLICATIONS
by Kenneth H. Rosen
Chapter 1 - The Foundations: Logic and Proof, Sets, and Functions
1.1
Logic
A proposition is a statement that is either true or false, but not both. ( p )
Propositional logic is the area of log