V63-0120-004: Discrete Mathematics
Midterm 1
correction
[3 points] Using mathematical induction, prove that for all n 0
n
(i + 2).2i ) = (n + 1).2n+1
i=0
Basis step: n = 0: (0 + 2)20 = 2 1 = 2 = (0 + 1) 21
n
i
n+1
Inductive step: assume that:
for some n 0
Homework 6
solutions
8.2
17)
Gcy
y
y
Gcccyyy cccc
GG c yy c
GG ccc yyyccc
yy
GG
GG
GG
G
or, (same graph, with a more symmetric presentation) :
cc
ccc
cc
c
c
cc
cc
cc
c
cc
ccc
cc
c
32)
The graph is connected and all vertices have even degree, so the
Homework 5
solutions
6.7
8)
(a + ax + x)(a + x)4 = (a + x)5 + ax(a + x)4
and a2 x3 does not appear in ax(a+x)4 . So the coecient is C (5, 2) =
10.
11)
A term in the expansion is of the form cwi1 xi2 y i3 z i4 , where i1 , . . . i4
are non negative integer
Homework 4
correction
6.2
19)
First put the 8 Jovians in line, which gives 8! possibilities. Then
each Martian occupies one of 9 possible positions (before the 1st
Jovian, between the 1st and the 2nd,., after the 8th). Since the
Martians are distinct, thi
Homework 3
correction
5.1
5)
For d = 2, . . . , 18, (n mod d = 0) is false. For d = 19, (n
mod d = 0) is true, and the algorithm exits, returning 19.
20)
From the prime factorizations 2091 = 3.17.41 and 4807 = 11.19.23,
it appears that gcd(2091, 4807) = 1
Homework 2
correction
4.1
4)
secondsmallest(a,b,c)cfw_
if (a>b)
swap(a,b)
if (c>b)
return b
else
if (c>a)
return c
else
return a
10)
lastocclargest(s,n)cfw_
index=1
for i=2 to n
if (si sindex )
index=i
return index
24)
issum(s,n,x)cfw_
for i=1 to (n-1)
Homework 1
Correction
1.7
3) Prove that 1(1!) + + n(n!) = (n + 1)! 1 for all n 1.
Basis step: the statement is true for n = 1 : 1(1!) = (2!) 1.
Inductive step: assume that the statement is true for some n 1, and let us
prove that it is then true for n + 1