CMPUT 272 Fall 2016
Solutions Extra Exercises
1. Define function f : R cfw_1 7 R cfw_1 by the rule: For all real numbers x 6= 1, f (x) =
x+1
x1 .
a) (Epp 7.2.18) Is f one-to-one? Prove or give a counterexample.
b) Is f onto? Prove or give a counterexample
UNIVERSITY OF ALBERTA
CMPUT 272
Sample Term Test 1, Oct 2016
Duration: 70 min.
Last Name:
First Name:
Do not turn this page until you have received the signal to start.
(In the meantime, please fill out the identification section above.)
Aids allowed: One
UNIVERSITY OF ALBERTA
CMPUT 272
Term Test 2, Nov 2016
Duration: 75 min.
Practice Test
Aids allowed: One single sheet of notes (double sided). Nothing else.
Total Pages = 8
Page 1
contd. . .
Last Name:
Question 1.
Student ID:
Consider the following recursi
CMPUT 272 Fall 2016
Extra Exercises
1. Define function f : R cfw_1 7 R cfw_1 by the rule: For all real numbers x 6= 1, f (x) =
x+1
x1 .
a) (Epp 7.2.18) Is f one-to-one? Prove or give a counterexample.
b) Is f onto? Prove or give a counterexample.
2. Let R
Gorilla Mourguefiles.org
LincolnPark-01b.jpg
1.With ape-like fury (Pg. 16)Compares Hydes fury with that of
an apes, gives a vivid description in
few words.
2.Where the lamps glimmered like
carbuncles (Pg.22)- A carbuncle is
a dark grayish red gem. This si
Using Crowdmark to Submit your Written Assignments
All written assignments for this course will be administered through Crowdmark. Crowdmark is a
web-based platform for the online marking of written work by students. It is free to use for
students!
How to
Elementary Number Theory
First we will see one more example about the relational database system
of a library we were discussing last week. Let's consider the following
query:
\Find the names of all subscribers who have borrowed all books written
by \Will
Coefficient Questions
Question: What is the coefficient of x^2y^3z^3 in (x+y+z)^8?
(x+y+z)^8=(x+y+z)(x+y+z).(x+y+z) (8 times).
The coefficient of x^2y^3z^3 is the number of ways we can
select x from 2 of the terms, y from 3 of them, and z from the
remaini
Propositional Logic (Overview):
\A collection of rules for deductive reasoning that are intended to
serve as a basis for the study of every branch of knowledge."
The concept of argument form (versus its content)
Logical analysis is to analyze an argument'
Prove by induction that for all natural numbers n >= 0:
n
sum i^2 = n(n + 1)(2n + 1)/6
i=1
n
. Let S(n) be " sum i^2 = n(n + 1)(2n + 1)/6".
i=1
. We prove that S(n) holds for all integers n >= 1.
, Base: S(1) is trivially true, since: 1^2 = 1 = 1(1 + 1)(2
Applications to Cryptograph and Proofs
Theorem: p2 is irrational.
Proof: By way of contradiction, assume that p2 is rational, i.e.
there are integers a; b 6= 0 such that p2 = a
b
.
Without loss of genrality, we assume that a and b do not have any
commont
Some Common Errors:
There is a gap between the basis and induction step.
We \prove" the following predicate for all n 1:
Given any set of n 1 di
erent lines in the plane no two of which
are parallel to each other, all lines must have one point in common.
More examples of logical equivalences:
Example 1: It is easy to see that:
9x(P(x) ^ q(x) ) 9x P(x) ^ 9x Q(x)
but these are not equivalent; for example let P(x) be 2x + 1 = 5
and Q(x) be x2 = 9.
Example 2:
9x(P(x) _ q(x) 9xP(x) _ 9xQ(x)
Example 3:
8x(P(x)
Truth Test Questions
We say a statement form is satisfiable if there is a
truth assignment to its variable such that the whole statment
becomes true. Therefore, a formula that is not satisfiable is always
False, i.e. it is a contradiction. For each formul
Rules of Interference
Statement: a declarative sentence that is either true or false, but
not both
{ E.g., \The sum of x and y is greater than 0" is NOT a statement
Argument: a sequence of statements aimed at demonstrating the
truth of an assertion
Statem
Proving By Induction Natural Numbers
Prove by induction that for all natural numbers x >= 2 and n >= 0,
x^n - 1 is divisible by x - 1.
. Let S(n) to be "for all natural numbers x >= 2, x^n - 1 is divisible by
x - 1".
. We prove that S(n) is true for all n