CS245 Assignment 8 Solution
May 2, 2010
1
Q(4.4-8)
The coefcient is C (17, 8) 38 29 .
2
Q(4.4-14)
Let m n/2 and m 1.
=
=
C (n, m)/C (n, m 1)
n!
(m 1)!(n m + 1)!
m!(n m)!
n!
(n m + 1)
m
m
Since m n/2 , we have m n/2 and therefore (nm +1) > 1. We have
C (n,
CS245 Final Exam, Spring 2010
1
[10 points]
Let fk denote the k th Fibonacci number, dened by f0 = f1 = 1 and fk = fk1 + fk2 . What is
gcd(fk , fk+1 ) for k 0?
2
[10 points]
Dene u0 = u1 = 1, and dene un = (n 1)un2 for n = 2, 3, 4,., By convention, 0! = 1
CMPT 245 Midterm Exam
March 15, 2010
1. Consider the propositional formula
(p q ) r) (q r).
(a) Find all settings of truth values for p, q and r for which this formula has
the value true.
(b) Write an equivalent formula using only the connectives and . Ma
CS245 Assignment 7 Solution
May 2, 2010
1
Q.44 (page 3-60)
For the basis case, the tree has a single leaf node and there is zero internal node.
Therefore, we have l(T ) = 1 = 1 + i(T ).
Now consider a tree T with a root node r connected to a left tree T 1
fl. C-PV3)/\C7PVVD'\>CZO\/r)
a '7apvg9AC7Pvr))1/Cg\/V)
; (TFA'Tg/CPAW) vZa V P
saw/Hg) v 20) v (CF/Hr) V r)
3 (@Fvg)A(7gvg)) \/(C;>vr) ACWVPD)
E mam) VCJW")
a TV§VF
.= T
2. I) Vac (den)~> F09)
EEC33; 0.? fm) /\ C(5=H)~ in») A ~-- Affyayxw)
5 .1765?) Apex
CS245 Assignment 1 Solutions
February 9, 2010
Q1.
1) and 3) are not propositions. 2) and 4) are propositions. 2) is false (just my
guess). 4) is true.
Q2.
1) p q translates to I bought a lottery ticket this week and I won the million
dollar jackpot on Fri