Solution of Homework 2: Language of Mathematics
Q1. Prove
AB =AB
without using the De Morgans law and Venns Diagram.
Answer
To prove that two sets are equal, we need to prove that each set is a subset of the
other:
i) To prove that A B A B :
x A B
xAB
/
CS 182 Fall 2010
Michael S. Kirkpatrick
Name:
MIDTERM #1
This is an open book, open notes exam. However, you are not allowed to share any
material with anyone else during the exam. Any evidence of academic dishonesty will be
dealt with strictly in accorda
Solution of Homework 3
* Note that the approximate functions shown below are not unique and
are provided for the sake of illustration not perfection.
Prob. 1
n
n!
e
Using Stirlings formula:
n
n
2n
ln k
= ln n ! n (ln n 1 ) + 0 . 5 ln( 2 n )
k =1
Algori
CS 182 Fall 2009
Prof. Ananth Grama
Final Exam
Answer Key
PROBLEM 1
Let P (x, y ) be the statement x-y = x+y. The domain for both variables is the set of all
integers Z. What are the truth values of the following? Justify your answer.
a. (2 pts) P (1, 1)
CS182 Spring 2013 Homework 3
Prof. Alex Pothen and Vernon Rego
Due date: Friday, February 22, 2013 (before class).
1. (4pts) Find these terms of the sequence cfw_an , where an = (2)n + 5n.
(a) a0 .
(b) a1 .
(c) a3 .
(d) a6 .
2. (12pts) Find f (1), f (2),
CS182 Spring 2013 Homework 7
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Friday April 26, 2013
(LE1: Before Class; LE2: 9 A.M. in CS undergrad oce).
Late HW will not be accepted.
1. (10 points)
(a) Use the Extended Euclidean algorithm to nd an inver
[50] Homework 2. Language of Mathematics Each problem is worth 10 points [10] Prove that for any sets A and B A = (A - B) (A B). [10] Let x and y be integers. Determine whether the following relations are reflexive, symmetric, antisymmetric, or tra
CS182 Spring 2013 Homework 1
Prof. Alex Pothen and Vernon Rego
Due date: Friday, January 25th, 2013 (before class).
1. (8pts) Show that each of these implications is a tautology by using truth tables.
(a) [q (p q )] q .
p q pq
TT
T
TF
F
FT
T
FF
T
q (p q )
CS182 Spring 2013 Homework 6
Prof. Alex Pothen and Vernon Rego
Due date: Friday, April 12, 2013 (before class).
1. (9pts) How many binary strings of length 6 are there that
(a) (3pts) start with a 1 and end with a 0?
(b) (3pts) either start with 01 or sta
CS182 Spring 2013 Homework 5
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Friday, March 29, 2013 (before class).
On the upper right corner of the rst page please if the following details are not mentioned or if they are
incorrectly mentioned, deduct
CS182 Spring 2013 Homework 5
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Friday, March 29, 2013 (before class).
On the upper right corner of the rst page please mention the following details.
Name: <In CAPITAL LETTERS>
Sec: LE1 / LE2
Course Identier
CS182 Spring 2013 Homework 3
Prof. Alex Pothen and Vernon Rego
Due date: Friday, February 22, 2013 (before class).
1. (4pts) Find these terms of the sequence cfw_an , where an = (2)n + 5n.
(a) a0 .
a0 = (2)0 + 5 0 = 1.
(b) a1 .
a1 = (2)1 + 5 1 = 3.
(c) a3
CS182 Spring 2013 Homework 4
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Monday 5pm, March 18, 2013 (in the CS undergrad oce).
Note: This is due AFTER the Spring break.
1. (8pts)
(a) (4pts) Let P (n) be the statement that 2 | n2 + n (i.e., 2 divides
CS182 Spring 2013 Homework 4
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Monday 5pm, March 18, 2013 (in the CS undergrad oce).
Note: This is due AFTER the Spring break.
1. (8pts)
(a) (4pts) Let P (n) be the statement that 2 | n2 + n (i.e., 2 divides
CS182 Spring 2013 Homework 2
Prof. Alex Pothen and Vernon Rego
Due date: Friday, February 8, 2013 (before class).
1. (4pts) Let A = cfw_a, b, c, d, e and B = cfw_a, b, c, d, e, f, g, h. Find
(a) A B .
cfw_a, b, c, d, e, f, g, h.
(b) A B .
cfw_a, b, c, d,
CS182 Spring 2013 Homework 2
Prof. Alex Pothen and Vernon Rego
Due date: Friday, February 8, 2013 (before class).
1. (4pts) Let A = cfw_a, b, c, d, e and B = cfw_a, b, c, d, e, f, g, h. Find
(a) A B .
(b) A B .
(c) A B .
(d) B A.
2. (15pts) Let A, B , and
Module 2: Language of Mathematics
Theme 1: Sets
A set is a collection of objects. We describe a set by listing all of its elements (if this set is nite and
not too big) or by specifying a property that uniquely identies it.
Example 1: The set
of all decim
Module 1: Basic Logic
Theme 1: Propositions
English sentences are either true or false or neither. Consider the following sentences:
1. Warsaw is the capital of Poland.
2.
.
3. How are you?
The rst sentence is true, the second is false, while the last one
Module 3: Proof Techniques
Theme 1: Rule of Inference
Let us consider the following example.
Example 1: Read the following obvious statements:
All Greeks are philosophers.
Socrates is a Greek.
Therefore, Socrates is a philosopher.
This conclusion seems to
CS182 Spring 2013 Homework 7
Prof. Alex Pothen and Prof. Vernon Rego
Due date: Friday April 26, 2013
(LE1: Before Class; LE2: 9 A.M. in CS undergrad oce).
Late HW will not be accepted.
Note: In the last few homework assignments, we have found that some of
CS182 Spring 2013 Homework 6
Prof. Alex Pothen and Vernon Rego
Due date: Friday, April 12, 2013 (before class).
1. (9pts) How many binary strings of length 6 are there that
(a) (3pts) start with a 1 and end with a 0?
24 = 16 binary strings.
(b) (3pts) eit
Logic
o Proposition: declarative sentence
Either true or false
Propositional variable:
A variable corresponding to a proposition
Propositional variable has a truth value. The truth value can be
true or false (T or F).
Compound proposition is compoun
Module 5: Basic Number Theory
Theme 1: Division
Given two integers, say a and b, the quotient b=a may or may not be an integer (e.g., 16=4 = 4 but
12=5 = 2:4). Number theory concerns the former case, and discovers criteria upon which one can
decide about
CS182 Spring 2016: Homework 2
Due date: Friday, February 5, 2016 (before class).
1. Let the universe of discourse be the set of all real numbers. Let P (x) be the statement
x is an integer, Q(x) be the statement x is a rational number, and R(x) be the
sta
CS182 Spring 2016: Homework 3
Due date: Friday, February 19, 2016 (before class).
1. Prove or disprove the following statements:
(a) For all positive integers n, if n is a perfect square then n + 3 is not a perfect
square. (Recall the denition of a perfec
CS 18200
Study Guide
Written by Ian Renfro and Kevin Xia
Table of Contents
Break Up Problem-wise for the final
Chapter 1: Logic and Proofs
Propositions
Truth Tables
Equivalences/DeMorgans Laws
Predicates and Quantifiers
Nested Quantifiers
Rules of Inferen
Homework 3
CS182
Due date: Friday, October 7th, 2016 (before class).
Note: PSO Number must be presented on the submitted homework.
Problem 1. Consider the following sets:
A = cfw_1, 2, 3, 4
B = cfw_2, 2, 3, 1, 4
C = cfw_1, 2
D = cfw_1, 2, 3, cfw_4, 5
E=Z
CS182 Fall 2016: Homework 1
Due date: (September 9th before class).
1. Construct Truth Table for each of these compound propositions:
(a) (p q) r
(b) (q p) (p q).
(c) [p (q r)] p.
(d) [(p q) (q r)] (p r).
2. Determine whether (p q) (p r) (q r) is a tautol