CS 173, Spring 2013
Midterm 2, Lecture A, Solutions
Problem 1: Checkbox (14 points)
Check the box that best characterizes each item. (2 points each)
x Z, y N, x y
true
false
one-to-one but not onto
onto but not one-to-one
f : N R, f (x) = x2 + 2 is
neithe
CS 173, Fall 2012
Midterm 1, 2 October 2012
NAME:
NETID (e.g. hpotter23, not 123987654):
DISCUSSION DAY:
DISCUSSION TIME:
You will lose a point if you dont accurately write the day and time of the discussion
you are ocially registered for. If you dont kno
CS 173, Fall 2012, Midterm 1 Solutions
Problem 1: Multiple choice (10 points)
Check the most appropriate box for each statement. Check only one box per statement. If you
change your answer, make sure its easy to tell which box is your nal selection.
n2
7
CS 173: Discrete Structures, Spring 2013
Homework 5 Solutions
This homework contains 3 problems worth a total of 40 points. It is due on Wednesday,
Febuary 6th, at 9pm.
Remember to introduce your variables and assumptions at the start of the proof, put yo
CS 173: Discrete Structures, Spring 2013
Homework 4 Solutions
This homework contains 3 problems worth a total of 42 points. It is due on Wednesday,
Febuary 27th, at 9pm.
Remember to introduce your variables and assumptions at the start of the proof, put y
CS 173: Discrete Structures, Spring 2013
Homework 3 Solutions
This homework contains 3 problems worth a total of 38 points. It is due on Wednesday,
Febuary 13th, at 9pm
Remember to introduce your variables and assumptions at the start of the proof, put yo
CS 173: Discrete Structures, Spring 2013
Homework 2 Solutions
This homework contains 3 problems worth a total of 36 points. It is due on Wednesday,
February 6, at 9pm.
1. Congruence [12 points]
Prove the following:
For any integer, n, if n is not divisibl
Homework 1 Solutions
CS 173: Discrete Structures
1. Direct Proof
A point (x, y ) R2 is on the unit circle if and only if x2 + y 2 = 1. Lets dene an operation
points by
(x, y ) (s, t) = (xs yt, xt + ys)
on 2D
Prove the following claim using a direct proof
CS 173: Discrete Structures, Spring 2013
Homework 10
1. (12 points)
(a) (6 points) Maxwell Smart was told to design a machine that accepts strings x1 x2 .xn
for xi cfw_F, T with (x1 x2 ) x3 ) .) xn true. However, the design he produced
(above) only reads
CS 173: Discrete Structures, Spring 2013
Homework 9 Solutions
This homework two problems worth a total of 20 points. It is due on Wednesday, April 17,
at 11:55pm
1. Proof by Contradiction [12 points]
Prove by contradiction the following:
The equation 5x2
CS 173 : Discrete Structures, Spring 2013
Homework 8 Solutions
This homework contains four problems worth a total of 34 points. It is due on April 10 at
11:55pm.
1
BigO Notation (8 Points)
Denition: Recall the denition of BigO given in 14 of the textbook:
CS 173: Discrete Structures, Spring 2013
Homework 7 Solutions
This homework contains 3 problems worth a total of 40 points.
1. Recursion trees [12 points]
T (1) = c
T (n) = 2T ( n ) + n2 + c
4
When answering the following questions, you should assume th