CS 136 Assignment 3
Final 100124.5
Due Thursday, January 28 at 22:00 sharp.
No late marks will be awarded.
All work must be submitted to the
Marmoset submission system
. See the preamble of
assignment 1
for more
information.
Assignment 3 Problem 1.
20 Marks (10 Marmoset; 10 Hand Marked) File: order.ss
This problem consists of 5 parts: A3P1a through A3P1e. For each part you will submit a distinct solution to
Marmoset.
Read
this reference on order notation
.
f(x) is O(g(x))
is defined to mean:
There exist constants c and x
0
such that f(x) ≤ c*g(x) for all x ≥ x
0
.
For each of a number of pairs of definitions for
f(x)
and
g(x)
, you must do the following:
•
provide a function
(findx c x0)
that consumes positive values
c
and
x
0
and produces
x≥x
0
such
that
f(x)>c*g(x)
. If no such value exists, produce
'impossible
.
•
provide values
c
and
x0
for which
(findx c x0)
produces
'impossible
. If there is no such
pair of values, define
c
and
x0
both to have the value
'none
.
If your implementation of
findx
is correct, you will be able to find suitable values of
c
and
x0
if and only
if
f(x) is O(g(x))
. In either case, you must justify your answer using embedded comments. Half of your mark
will be based on handmarking of these comments.
Technology permitting, you may receive the mark and comments
for one release test only
prior to the
deadline by email (to
[email protected]
where
uwid
is your Marmoset login). After
the deadline,
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '10
 cormack
 Following, Universal quantification, Existential quantification, Playing card, Secret, C preprocessor

Click to edit the document details