June 15, 2009
Solution of assignment 1
Due: June 15, 6:00 p.m.
1. (a) p q .
(b) q r.
p (q r)
p (q r)
p (q r)
(p q ) r
(p q ) r
(p q ) r
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
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 .
Math 1019 W12, Assignment #3 solutions.
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
(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
1. If you have the current password, then
you can log onto the network.
2. You have a current password.
3. You can log onto the network.
An Argument is a sequence of propositions.
Application of functions
Applications of functions
Define discrete structures such as sequences
Represent the time that a computer takes to
solve problems of a given size
Represent the complexity of algorithms
Two sets can be combined in many
Set operations can be used to combine
Let A and B be sets.
The union of A and B, denoted by A B, is
the set containing those elements that are
Application of sets and functions
Data-type or type in computer programming
Constructing discrete structures
Finite state machine
Modeling computing machine
Representing computational complexity of
A set is
Introduction to proofs
Proofs are essential in mathematics and computer
Some applications of proof methods
Proving mathematical theorems
Designing algorithms and proving they meet their
Verifying computer pr
Proof methods and Strategy
Proof methods (review)
Proof by contraposition
Proof by contradiction
Premise: p q
Conclusion: a contradiction
Prove a theorem (review)
The Growth of Functions
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,
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 .
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.
P (1) is rooted tree T with 1 vertex has 0 edge.
Since a single vertex tree has no edge, P (1)
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.
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
A proposition is a statement that is either true or false, but not both. ( p )
Propositional logic is the area of log