For some problems, we have also included, for your benefit, additional explanation which would not need to be included in your exam answers.
(p r)
(p r)
|
(F F)
(F F)
|
F F
| |
T
|
So (in this case) the statement has truth value "true."
Notes: If p=r=F, then
p
r=F, and p
r=F. Since the antecedent and consequent are
both false, the implication is by definition true. Another way to
see this is that since the implication is equivalent to the
disjunction ¬(p
r)
(p
r), and one of
the terms in that disjunction, namely ¬(p
r), is true, the whole statement is true.
The contrapositive is logically equivalent.
Notes: A statement of the form ``p
only if r'' says that a minimum condition for p being
true is that r is true. That is, p can possibly be
true only in cases when r is true, and no others. So
if p is true, this implies that r must be true. The
statement is the same as ``p implies r.'' So,
ignoring tense, the statement can be written as ``(I go to
Disneyworld) implies (the hurricane doesn't hit Florida).'' That
is, with p = ``I go to DW'' and r = ``The hurricane
hits Fla.,'' the statement is (p
¬r). The converse means swapping the terms,
(¬r
p), which would mean,
``If the hurricane doesn't hit Florida, then this implies I will go
to Disneyworld.'' The two clauses can be swapped with "if" moved to
the middle, so this is just "I will go to DW if the hurricane
doesn't hit Florida," our first answer. The contrapositive, which
means swapping and negating the terms, (r
¬p), would be ``If the hurricane
hits, then this implies I will not go to Disneyworld." As a
general rule, it is only the contrapositive that is
logically equivalent to the original statement. ``p only if
r'' does not imply ``p if r.''
| (1) | (2) | (3) | (4) | (5) | (6) |
| p | r | p r
| ¬p | r ¬p
| ¬(r ¬p)
|
|---|---|---|---|---|---|
| -- | -- | ----- | --- | ------- | ---------- |
| F | F | F | T | T | F |
| F | T | F | T | T | F |
| T | F | F | F | T | F |
| T | T | T | F | F | T |
Columns 3 and 6 (corresponding to the two given statements) are identical, therefore the given statements are equivalent.
p r
| ¬(¬p
¬ r)
| - DeMorgan's law |
¬(¬r ¬p)
| - Commutative law for disjunction | |
¬(r ¬p)
| - Definition of `` '':
a b
¬a b
|
r
¬(r
¬p)
| p | r | s | p r
| r s
| ((p r) s)
| (p (r s))
|
|---|---|---|---|---|---|---|
| -- | -- | -- | ----- | ----- | --------- | --------- |
| F | F | F | T | T | F | F |
| F | F | T | T | F | T | T |
| F | T | F | F | F | T | T |
| F | T | T | F | T | F | F |
| T | F | F | F | T | T | T |
| T | F | T | F | F | F | F |
| T | T | F | T | F | F | F |
| T | T | T | T | T | T | T |
The last two columns are equivalent, therefore, the associative law
holds for
.
x Q(x) is FALSE because,
for example, Q(x) is not true for x=0.
(x2+1 = 1, whereas x - 2 = -2).
x Q(x) is also FALSE,
because the equation Q(x) has no real-valued roots.
Note: Show how you got the second answer by sketching the function graphs, or by expressing x using the quadratic formula, and checking the square-root term.
m
n P(n,m) is TRUE because
if we let m=0, then all non-negative integers n are
greater than or equal to m.
m
n
(P(n,m)
P(m,n)) is also TRUE, because for any value
of m, just let n=m, and then
P(n, m) and P(m, n) are
both true.
A - (B C)
| = { x | (x A)
¬(x
(B C)) }
|
= { x | (x A)
¬((x B)
(x C)) }
| |
= { x | (x A)
(¬(x B)
¬(x C)) }
| |
= { x | ((x A)
¬(x
B))
((x A)
¬(x C)) }
| |
= { x | x
(A - B)
x
(A - C) }
| |
= (A - B) (A - C)
|
or, a clear answer in English is also acceptable:
The elements of A - (B
C) are, by definition, in A, but not in both B
and C. Therefore they are in A, and either not in
B, or not in C. Therefore they are either in A but
not B, or A but not C. So they are in the
union of (A - B) and (A - C). (And all
also conversely.)
No, f over the domain of the integers has a range which does not cover all integers. All values of f(n) are odd, so no even integer is covered by f. Therefore, f with a domain of the integers is not onto the integers.
Note: This happened to be a special case in
which f was its own inverse. Another function of
this sort is f(x) = 1/x, over a domain and
codomain of {x If, on the other hand, f had not happened to be
its own inverse, then you would have had to write out all the
values of f-1, as was done for f in the
problem statement.
|
x
0}.
, there is an x in the domain, namely 3y,
such that f(x) = y.
| 5 | (j=3) | (j=4) | (j=5) | ||||||
![]() |
8 | = | 8 | + | 8 | + | 8 | = | 24 |
| j=3 |
| 3 | (j=-1) | (j=0) | (j=1) | (j=2) | (j=3) | ||||||
![]() |
-j+2 | = | [-(-1)+2] | + | (-0+2) | + | (-1+2) | + | (-2+2) | + | (-3+2) |
| j=-1 | = | 3 | + | 2 | + | 1 | + | 0 | + | (-1) | |
| = | 5 |
| 300 | |
![]() | 4 = 300 4 = 1200. |
| j=1 |
This next one is a little tricky:
| 50 | / | 25 | \ | / | 25 | \ | |||||
![]() |
(-1)j | = | | | ![]() |
(-1)2k | | | + | | | ![]() |
(-1)2k-1 | | |
| j=1 | \ | k=1 | / | \ | k=1 | / | |||||
| / | 25 | \ | / | 25 | \ | ||||||
| = | | | ![]() |
1k | | | + | | | ![]() |
1k/(-1) | | | ||
| \ | k=1 | / | \ | k=1 | / | ||||||
| / | 25 | \ | / | 25 | \ | ||||||
| = | | | ![]() |
1 | | | + | | | ![]() |
-1 | | | ||
| \ | k=1 | / | \ | k=1 | / | ||||||
| = | 25 | + | -25 | ||||||||
| = | 0 |
Note: What we are doing here is splitting the summation into the terms with even values of j, which we represent as 2k, and the terms with odd values of k, which we represent as 2k - 1, with an appropriate range of indexes for k so that all the original values of j are covered. For all the even values of j, the -1 raised to the power of j is just 1, and similarly all the odd terms are -1. There are the same number (25) of both, so they all cancel out.
| 2n2 - 3n + 7 | < 2n2 + 7 | (when n>0) |
| < 2n2 + 7n2 | (when n>1) | |
| = 9 n2 |
so, 2n2 - 3n + 7 < 9 n2 when n>1.
So, there exist constants k=1 and c=9, such that
n>k: 2n2
- 3n + 7 < c n2.
Thus, 3n2 + 8n + 7 is O(n2).
| n | n | |||
| (j2 + 1) | < | (n2 + 1)
| (when n > 1) |
| j=1 | j=1 | |||
| = | n (n2 + 1) | |||
| = | n3 + n | |||
| < | n3 + n3 | (when n>1) | ||
| = | 2n3 |
so, for k=1, c=2,
| n |
(j2 + 1) < c
n3.
|
| j=1 |
Another acceptable answer (Since the question did not ask for c and k):
Since j is no greater than n, each term (j2 + 1) in the summation is O(n2), since the high-order sub-term of the term is no greater than n2. There are n of these O(n2) terms in the summation, so the maximum order of the entire summation is the product of O(n) and O(n2), or O(n3).
O(x).
(Let k=1, c=1.)
| log(3 x4) | = log(x4) + log 3 |
| = 4 log x + log 3 | |
O(log x).
|
So, x1/2 log(3 x4) is O(x log x).
log(2x) = x log 2
O(x).
f(x) is the sum of an O(x log x) function and an O(x) function, so f is O(x log x).