Name_ Sample Exam 1 CS 336
General Instructions: Do all of your work on these pages. If you need more space, use the backs (to ensure the grader sees it, make a note of it on the front). Make sure you
Sample Exam 1 CS 336
General Instructions: Do all of your work on these pages. If you need more space, use the backs (to ensure the grader sees it, make a note of it on the front). Make sure your name
Exam #2
Put your name on every page you hand in, and show all your work. Note:
all graphs are nite without self-loops and without parallel edges.
1. For the graphs given on the board, let V denote the
Exam 3, CS 336
April 16, 2012
Solutions by Tandy Warnow
1. Give the formula for n choose k, written as C (n, k ).
Solution:
n!
(nk)!k!
2. Evaluate C (10, 8).
Solution:
10!
8!2!
= 90/2 = 45
3. Let P (n
Exam 3, CS 336
April 16, 2012
NOTE: For problems 5-7, provide at least some English explanation of how you
obtain your answers to each question.
all graphs are nite and simple (no self-loops or multi
CS 336 Analysis of Programs - Fall 2012
Homework #2 Solutions
o
o
CS 336 Analysis of Programs - Fall 2012
o
cfw_x + | x 2 > 5
o
cfw_ f : | a s.t. f ( a ) = a
o
cfw_ f : | x0 s.t. f ( x0 ) = x0 and x
CS 336 Analysis of Programs - Spring 2012
Homework #3 Solutions
Problem 1.
This problem is similar to the version of the rock game, the difference being that the players
have one more option, namely t
CS 336 Analysis of Programs - Fall 2012
Homework #4 Solutions
Problem 1.
(a) Let A = [ a1 , a 2 ,., a m ] and B = [ b1 , b2 ,., bn ]. Let Ai [a1 , a 2 ,., ai ] (the array containing
the first i elemen
CS 336 Analysis of Programs - Fall 2012
Homework #5 Solutions
Problem 32, page 330.
We will prove that 3 | n 3 2n, n * by induction.
Basis Step. For n=1, 3 | 3 13 2 1 .
Inductive Step. Assume 3 | n 3
Homework #7
March 23, 2012
Problem 1
y B, x A s.t. f (x) = y
x A s.t. f (x) = x
x A, y B, f (x) = y <=> g (y ) = x
S X, |S | = 1
S1 , S2 X, S1 S2 = S1 S2 S2 S1
Problem 2
Y
Y
Y
Y
= cfw_S X | |cfw_x S |
Homework #8
March 24, 2012
Problem 1
We will prove that a graph with maximum degree at most d can be properly
vertex-colored using d + 1 colors by induction on the number of vertices in
the graph. (W
CS 336 Analysis of Programs - Fall 2012
Exam #1 Solutions
1. Let T(n) be a function defined for n = 1, 2, , by
T(1) = 7
T(n) = 3 T(n-1) + 1
Prove that T (n) 3 n for all integers n 1 , using induction.
CS 336
Homework 1 Solutions
1. Section 1.1, 12: Let P: You have the u, Q: You miss the nal exam, R: You pass the
course
Express each of the following propositions as an English sentence.
a) P Q
If you
CS336
Homework Assignment 2 Solutions
Section 2.2
2. A = set of sophomores in your school, B = set of students in discrete math at your school.
Let the Universe U = the set of all students at your sch
Sample Exam 1CS 336
General Instructions: Do all of your work on these pages. If you need more space, use the backs (to ensure the grader sees it, make a note of it on the front). Make sure your name
8/24/10
Whatwellcover
CS 336
Lecture1
Theoperation Reviewofpredicates
ThePeople
Instructor: Dr. Maggie Myers [email protected] Office hours: TTH, and extra hours as announced Office: Aces 2.112 P
CS336
Homework Assignment 8 Solutions
Section 8.1, 6
a) Let sn be the number of such sequences. Any string ending in n must be a string ending
in some value less than n, followed by n. So
sn = sn1 + s
CS 336 - homework 8
Staple the pages of your solution set together, and put your name and EID on the top of
the rst page. Answer each question clearly. The logic you use to produce your answers is
the
CS336
Homework Assignment 7 Solutions
1. 6.2, 4.
A bowl contains 10 red balls and 10 blue balls. A woman selects balls at random
without looking at them.
a) How many balls must she select to be sure o
CS336
Homework Assignment 6 Solutions
1. For each of the following sets, determine if it is nite, countably innite, or uncountable.
Prove your answer, using the denitions given in class (not in the bo
CS336
Homework Assignment 5 Solutions
Section 2.3
4.
Domain is listed rst, followed by range
a) N, cfw_0, 1, ., 9
b) Z+ , Z2
c) cfw_0, 1, N
d) cfw_0, 1, N
6.
a) Z+ Z+ , Z+
b) Z+ , Z+
c) cfw_0, 1, Z
d)
CS336
Homework Assignment 3 Solutions
Section 1.5
20. U = Z, N (x) : x is negative, P (x) : x is positive
a) xy [N (x) N (y ) P (xy )]
b) xy [P (x) P (y ) P ( x+y ]
2
c) xy [N (x) N (y ) N (x y )]
d)
Homework #9
March 24, 2012
Problem 1
(a) 22N , since X has cardinality 2N .
(b) 22N 1
(c) 2N +1 1
Let M be the set of men and W be the set of women. We know that
|M | = |W | = N , so the number of sub
Homework #13
April 11, 2012
Problem 1
C (n, k ) =
n!
k!(nk)!
Problem 2
C (10, 8) =
10!
8!(108)!
=
10!
8!2!
=
910
2
= 9 5 = 45
Problem 3
cfw_x, y A, (x, y ) E
Problem 4
S = cfw_A V |cfw_x, y A, (x, y
Homework #14, Solutions by Andrei Margea
April 27, 2012
Problem 4, Page 432
In the rst day, the student can pick a sandwich of any of the 6 types,
i.e. the student has 6 options. For each option he pi
CmSc 175 Discrete Mathematics
Lesson 11: SETS IDENTITIES
Using the operation unions, intersection and complement we can build expressions over
sets.
Example:
A - set of all black objects
B - set of al
ICS 141: Discrete Mathematics I (Fall 2014)
1.7 Introduction to Proofs
A proof is a valid argument that establishes the truth of a statement.
Types of Proofs
Trivial proof: Prove q by itself
Vacuous
i
WELCOME
Discrete Mathematics consists of material from this booklet, Lecture Notes, and from the
booklet, Tutorials and Practice Classes: Questions. Each of the 24 sections in these notes is
approxi
Logic and proof
Basic proof styles - suggested problems - solutions
All of the proofs below dont require any specific knowledge in a particular area, other than some
basic facts about numbers:
An eve