Course notes for CSC 165 H: Mathematical Expression and Reasoning for Computer Science
Gary Baumgartner and Danny Heap and Richard Krueger (with revisions by Franois Pitt) c Winter 2009
P
Contents
1
Introduction
IFI IFP IFQ IFR PFI PFP PFQ PFR PFS PFT PFU
CSC 165 H1
Tutorial # 4
Fall 2012
1. Write detailed proof structures for each of the following statements. Dont write complete proofs for
now, focus on the proof structure only and leave out all of the actual content.
(a) x Z, y Z, x 6 y z Z, x 6 z 6 y
(b
CSC 165 H
Tutorial # 3
Fall 2012
1. Justify each equivalence below by providing a derivation from one expression to the other (with a brief
justification for each step of your derivation), or show that the equivalence does not hold. (Warning! You
cannot u
CSC 165 H1 / L5101
Aids Allowed: none
1.
Quiz # 10
Worth: 1.5%
29 November 2012
Duration: 10 minutes
Describe an appropriate reduction to show that the following function is not computable, where P is any
program that takes exactly one input x. Dont forge
CSC 165 H1 / L5101
Aids Allowed: none
1.
Quiz # 9
Worth: 1.5%
22 November 2012
Duration: 10 minutes
Find a good upper bound on the worst-case running time of the following algorithm, then prove that your
bound is correct. (Finding the bound is the easy pa
CSC 165 H1 / L5101
Aids Allowed: none
1.
Quiz # 8
Worth: 1.5%
15 November 2012
Duration: 10 minutes
Write a detailed structured disproof that
f : N R+ , g : N R+ , max(f, g) O(f )
where max(f, g) is defined in the obvious way: n N, max(f, g)(n) = max(f (n
CSC 165 H1 / L5101
Aids Allowed: none
1.
Quiz # 6
Worth: 1.5%
25 October 2012
Duration: 10 minutes
Compute the exact number of steps carried out by the following algorithm in the worst-case, for all lists
L of length n. Count 1 step for each of the follow