MATH-UA.120.A
Short Answers
(4 points each) Place your final answer to each question in the box at the bottom. Some partial credit may
be awarded, but only an accurate answer will receive full credit.
1 Let a be a positive integer. Consider the set
S = x
Midterm 2
November 10, 2008
PROBLEM ONE
1. Consider 7 consecutive coin ips. We represent the outcome of each ip
as H (heads) or T (tails). For example, a possible sequence of coin ips is
THHTHTT.
(a) How many sequences are there in total?
(b) How many seq
Final Exam Solutions
1. Consider the set X = cfw_1, 2, 3.
(a) List all invertible functions from X to X.
Solution: I will list their ordered pairs:
cfw_(1, 1), (2, 2)(3, 3), cfw_(1, 2), (2, 3), (3, 1), cfw_(1, 3), (2, 1), (3, 2),
cfw_(1, 1), (2, 3), (3, 2
Homework 7 Solutions
PROBLEM ONE
1. Let Sn = cfw_1, 2, 3, ., n. We saw in class that the number of invertible functions from the set Sn to itself (permutations of n
elements) is n!. A special case of this is S3 . The number of invertible functions from S3
Homework 7: due Wednesday, 15 October, 2008
PROBLEM ONE
1. Let Sn = cfw_1, 2, 3, ., n. We saw in class that the number of invertible
functions from the set Sn to itself (permutations of n elements) is n!. A
special case of this is S3 . The number of inver
Homework 10: due Wednesday, 29 Oct.
Find the number of lines executed in the following algorithms when
(a) n = 3 and (b) n is arbitrary.
Line
1
2
3
4
1.
Code
x=1
for(i = 1 to n) cfw_
for(j = i to n) cfw_
x=x+1
(a) When n = 3, 20 lines are executed.
(b)
Homework 11 Solutions
PROBLEM ONE (Counting)
1. (a) In how many ways can we choose 3 distinct numbers from
the set
cfw_1, 2, 3, ., 10
so that no two numbers are adjacent? Here our choices are
unordered.
Solution: Let us place 10 blanks and choose 3 of the
Homework 14: due Thursday, Dec. 4
PROBLEM ONE
1. Solve the traveling salesman problem for the following graphs.
(a)
(b)
2. Trace through Dijkstras algorithm for the graph in exercise 1(a) with
starting vertex A and ending vertex D. Next, trace through wit
Homework 14 Solutions
PROBLEM ONE
1. Solve the traveling salesman problem for the following graphs.
(a)
Solution: We rst look to nd edges which must be present in any
Hamiltonian cycle. I suggest that you circle them or shade them
as I list them. Since ve
Homework 15 Solutions
PROBLEM ONE (Trees)
1. Recall the denition of a tree: a tree is a connected, undirected
graph which has no cycles. Which of the following denitions
are equivalent to this denition of a tree? For each, if it is not
equivalent, give a
Homework 2: due Mon, 15 Sep, 8:55 AM
PROBLEM ONE
In class we created an algorithm which multiplies two numbers. Let us call
this algorithm MULT. We want to use MULT to create an algorithm which
computes exponents. Suppose that we have three variables: x,
Homework 8: due Monday, 20 October, 2008
PROBLEM ONE (Exercises from the book, 7th edition.)
1. Section 6.2 33-37: These exercises refer to a club consisting of six distinct
men and seven distinct women.
(a) In how many ways can we select a committee of v
Homework 4 Solutions
PROBLEM ONE
Prove that for all sets A, B we have
A B (A B)
Solution: To show that the set on the left is a subset of the one on the right,
we must show that for every x A B, we also have x (A B). To this end,
let x A B. By denition, t
Homework 1: due Mon, 8 Sep, 8:55 AM
PROBLEM ONE
Remember our setup from class. I am a robot standing in front of many
boxes, lined up to my left and to my right. I also have a huge stack of pennies
and each box starts with some number of pennies in it (th
Homework 2 Solutions
PROBLEM ONE
1. Trace through this algorithm with the initial data x = 3, y = 4, z =
0.
Solution:
i
?
?
1
1
2
2
3
3
4
4
x
3
3
3
3
3
3
3
3
3
3
y
4
4
4
4
4
4
4
4
4
4
z
0
1
1
3
3
9
9
27
27
81
RETURN 81
2. Draw a owchart for this algorithm
Homework 3: due Mon, 22 Sep, 8:55 AM
PROBLEM ONE (Exercises from the text: all pages and sections are from
the seventh edition. If you have the sixth edition, you can consult its section on
sets. I do not know if these problems are in the sixth edition, s
Homework 15: due Thursday, Dec. 11, by 5 PM
PROBLEM ONE (Trees)
1. Recall the denition of a tree: a tree is a connected, undirected graph
which has no cycles. Which of the following denitions are equivalent to
this denition of a tree? For each, if it is n
Homework 5: due Mon, 29 Sep, 8:55 AM
PROBLEM ONE (Exercises from the text (7th edition).)
In class, we dened the terms reexive, transitive, and symmetric in reference
to relations. We make one more denition: a relation R on a set X is said to
be antisymme
Homework 9 Solutions
PROBLEM ONE
1. (Exercises from the book, 6th edition, 6.6, 1-3.) Determine the
number of distinct orderings of the letters given:
(a) GUIDE
Solution: 5!
(b) SCHOOL
Solution: 6!
2
(c) SALESPERSONS
12!
Solution: 4!2!
2. (Exercises from
Homework 9: due Monday, 27 October, 2008
PROBLEM ONE
1. (Exercises from the book, 6th edition, 6.6, 1-3.) Determine the number of
distinct orderings of the letters given:
(a) GUIDE
(b) SCHOOL
(c) SALESPERSONS
2. (Exercises from the book, 6th edition, 6.6,
Homework 8 Solutions
PROBLEM ONE (Exercises from the book, 7th edition.)
1. Section 6.2 33-37: These exercises refer to a club consisting of
six distinct men and seven distinct women.
(a) In how many ways can we select a committee of ve persons?
Solution:
Homework 13: due Tuesday, Nov. 25
PROBLEM ONE
1. Solve the recurrence relation
X(n) = 3X(n 1) + 5X(n 2) : n 2
X(0) = 1
X(1) = 2
2. Solve the recurrence relation
X(n) = 4X(n 1) 4X(n 2) : n 2
X(0) = 0
X(1) = 1
3. Let N (n) be the number of length n strings
DISCRETE MATHEMATICS - SPRING 2017
EXAM 2 - SKETCHED SOLUTION
NEW YORK UNIVERSITY
Name:
Signature:
Instructions:
Do not open next page until the time starts.
No note, no book, no calculator, no cellphone.
There are 7 questions, 110 points total.
Time:
MATH-UA.120.A
MATH-UA.120: Discrete Mathematics
Midterm Exam I
Spring 2014
NetID:
Name:
This exam is scheduled for 110 minutes. No calculators, notes, or other outside materials are permitted.
Show all work to receive full credit, except where specified.
MAP-UA.120: Discrete Mathematics
Midterm Exam II
Spring 2013
Name:
C
This exam is scheduled for 110 minutes. No calculators, notes, or other outside materials
are permitted. Show all work to receive full credit, except where specified. The
exam is worth 8
MATH-UA.120.A
MATH-UA.120 Discrete Mathematics:
Final Exam
Spring 2014
Name:
This exam is scheduled for 110 minutes. No calculators, notes, or other outside materials are permitted.
Show all work to receive full credit, except where specified. The exam is
MATH-UA 120.004: DISCRETE MATHEMATICS
SYLLABUS - FALL 2017
Instructor: Thang Nguyen.
E-mail: [email protected]
Office: WWH 619.
Office Hours: M 11 am :12 pm, T 6-7 pm or by appointments.
Lecture: - MW 3:30 pm5:20 pm at WAVE 367.
Course description: This co
DISCRETE MATH - FALL 2017
HOMEWORK 1
(1) Textbook problem 3.5.
(2) Define parallel lines on plane.
(3) Check if the following numbers are even/odd/prime/composite. Give explanation for you answer.
(a) 0.
(b) 1.
(c) 7.
(4) Textbook 4.5.
(5) Textbook 4.6.
(
DISCRETE MATHEMATICS - SPRING 2017
EXAM 1
NEW YORK UNIVERSITY
Name:
Signature:
Instructions:
Do not open next page until the time starts.
No note, no book, no calculator, no cellphone.
There are 7 questions, 105 points total.
Time: 110 minutes.
Show
DISCRETE MATH - FALL 2017
HOMEWORK 3
(1)
(2)
(3)
(4)
(5)
(6)
Textbook 9.10.
How many different 10-digit numbers with all digits are different are there?
Textbook 10.3.
Let A, B be two sets. Show that A = B if and only if AB = .
Show that cfw_x Z : 6|x cfw
DISCRETE MATH - FALL 2017
HOMEWORK 2
(1) Textbook 6.6.
(2) Disprove:
(a) There are only finitely many Pythagorean triples. (Pythagorean triple
means a triple of positive integers satisfying Pythagorean equality.)
(b) For a, b are integers, a2 = b2 iff a =
Discrete Mathematics (Math-UA-120.003)
Fall 2017
Quiz 1
Tuesday, September 12
Name:
1. (a) (2 points) Rewrite the following statement in the form If A, then B.
The product of four consecutive integers is divisible by four.
(b) (3 points) Consider the foll
Discrete Mathematics (Math-UA-120)
Fall 2017
Lecture 1a Worksheet
Definition (3)
1. Determine which of the following are true and which are false, according to the definition of divisibility from lecture.
(a) 3 | 33.33
(c) 7 | 7
(e) 11 | 0
(b) 4 | 24
(d)