Solution
Solution
Code:
(2½ Hours)
[Total Marks: 75]
b. Define Cartesian product. Let R denote the set of all real numbers. Describe R x
R.
Solution Given sets A and B, the Cartesian product of A and B, denoted A × B and read
“A cross B,” is the set of all ordered pairs (a, b), where a is in A and b is in B.
Symbolically:
A × B = {(a, b) | a ∈ A and b ∈ B}.
R × R is the set of all ordered pairs (x, y) where both x and y are real numbers. If
horizontal and vertical axes are drawn on a plane and a unit length is marked off,
then each ordered pair in R × R corresponds to a unique point in the plane, with
the first and second elements of the pair indicating, respectively, the horizontal and
vertical positions of the point. The term Cartesian plane is often used to refer to a
plane with this coordinate system, as illustrated in Figure:
Q. P. Code:
Another valid argument form is called modus tollens. It has the following
form:
If p then q.
∼q
∴ ∼p
Here is an example of modus tollens:
If Zeus is human, then Zeus is mortal.
Zeus is not mortal.
∴ Zeus is not human.
Modus tollens is Latin meaning “method of denying” (the conclusion is a
denial).
Solution • “∀x, r (x) is a sufficient condition for s(x)” means “∀x, if r (x) then s(x).”
• “∀x, r (x) is a necessary condition for s(x)” means “∀x, if ∼r (x) then ∼s(x)”
or, equivalently, “∀x, if s(x) then r (x).”
• “∀x, r (x) only if s(x)” means “∀x, if ∼s(x) then ∼r (x)” or, equivalently, “∀x,
if r (x) then s(x).”
i. A formal version of the statement is
∀x, if x is a square, then x is a rectangle.
Or, in informal language:
If a figure is a square, then it is a rectangle.
ii. Using formal language, you could write the answer as
∀ people x, if x is younger than 35, then x cannot be President of the United States.
Or, by the equivalence between a statement and its contrapositive:
∀ people x, if x is President of the United States, then x is at least 35 years old.
c. A college cafeteria line has four stations: salads, main courses, desserts, and
beverages. The salad station offers a choice of green salad or fruit salad; the main
course station offers spaghetti or fish; the dessert station offers pie or cake; and
the beverage station offers milk, soda, or coffee. Three students, Uta, Tim, and
Yuen, go through the line and make the following choices:
Uta: green salad, spaghetti, pie, milk
Tim: fruit salad, fish, pie, cake, milk, coffee
Yuen: spaghetti, fish, pie, soda
Write each of following statements informally and find its truth value.
i. ∃ an item I such that ∀ students S, S chose I.
ii. ∃ a student S such that ∀ items I, S chose I.
iii. ∃ a student S such that ∀ stations Z, ∃ an item I in Z such that S chose I.
iv. ∀ students S and ∀ stations Z, ∃ an item I in Z such that S chose I.
Solution i. There is an item that was chosen by every student. This is true; every student
chose pie.
ii. There is a student who chose every available item. This is false; no student
chose all nine items.
iii. There is a student who chose at least one item from every station. This is
true; both Uta and Tim chose at least one item from every station.
iv. Every student chose at least one item from every station. This is false; Yuen
did not choose a salad.
Q. P. Code:
d. Define a prime number and composite number. Give symbolic definitions of the
same. Disprove the following by giving two counter examples:
i. For all real numbers a and b, if a < b then a2 < b2.
ii. For all integers n, if n is odd then (n – 1)/2 is odd.
iii. For all integers m and n, if 2m + n is odd then m and n are both odd.
Solution An integer n is prime if, and only if, n>1 and for all positive integers r and s, if
n=rs, then either r or s equals n. An integer n is composite if, and only if, n>1 and
n=rs for some integers r and s with 1<r<n and 1<s<n.
In symbols:
n is prime ⇔ ∀positive integers r and s, if n = rs
then either r = 1 and s = n or r = n and s = 1.
n is composite ⇔ ∃positive integers r and s such that n = rs and 1 < r < n and
1 < s < n.
i. a = – 2 , b = 1; a = – 3 , b = 2 (Any values can be taken)
ii. n=5; n=7 (Any values can be taken)
iii. m=2, n=1; m=4, n=3 (Any values can be taken)
e.
Solution If n and d are integers and d _= 0 then
n is divisible by d if, and only if, n equals d times some integer.
Instead of “n is divisible by d,” we can say that
n is a multiple of d, or
d is a factor of n, or
d is a divisor of n, or
d divides n.
The notation d | n is read “d divides n.” Symbolically, if n and d are integers and
d ≠ 0:
d | n ⇔ ∃an integer k such that n = dk.
Proof: Suppose a, b, and c are any integers such that a | b and a | c. [We must show
that a | (b + c).]
By definition of divides, b = ar and c = as for some integers r and s. Then
b + c = ar + as = a(r + s) by algebra.
Let t = r + s. Then t is an integer (being a sum of integers),
and thus b + c = at where t is an integer. By definition of divides, then, a | (b + c)
[as was to be shown].
Similarly,
Suppose a, b, and c are any integers such that a | b and a | c. [We must show that a
| (b + c).]
By definition of divides, b = ar and c = as for some integers r and s. Then
b - c = ar - as = a(r - s) by algebra.
Let t = r - s. Then t is an integer (being a sum of integers),
Q. P. Code:
and thus b - c = at where t is an integer. By definition of divides, then, a | (b - c)
[as was to be shown].
f. Use the quotient-remainder theorem with d = 3 to prove that the product of any
three consecutive integers is divisible by 3. Use the mod notation to rewrite the
result
Solution Proof: Suppose n, n + 1, and n + 2 are any three consecutive integers. [We must
show that n(n + 1)(n + 2) is divisible by 3.]
By the quotient-remainder theorem, n can be written in one of the three forms, 3q,
3q + 1, or 3q + 2 for some integer q. We divide into cases accordingly.
Case 1 (n = 3q for some integer q): In this case,
n(n + 1)(n + 2)
= 3q(3q + 1)(3q + 2) by substitution
= 3· [q(3q + 1)(3q + 2)] by factoring out a 3.
Let m = q(3q + 1)(3q + 2).
Then m is an integer because q is an integer, and sums and products of integers are
integers. By substitution,
n(n + 1)(n + 2) = 3m where m is an integer.
And so, by definition of divisible, n(n + 1)(n + 2) is divisible by 3.
Case 2 (n = 3q + 1 for some integer q): In this case,
n(n + 1)(n + 2)
= (3q + 1)((3q + 1) + 1)((3q + 1) + 2)
by substitution
= (3q + 1)(3q + 2)(3q + 3)
= (3q + 1)(3q + 2)3(q + 1)
= 3· [(3q + 1)(3q + 2)(q + 1)] by algebra.
Let m = (3q + 1)(3q + 2)(q + 1). Then m is an integer because q is an integer,
and sums and products of integers are integers. By substitution,
n(n + 1)(n + 2) = 3m where m is an integer.
And so, by definition of divisible, n(n + 1)(n + 2) is divisible by 3.
Case 3 (n = 3q + 2 for some integer q): In this case,
n(n + 1)(n + 2)
= (3q + 2)((3q + 2) + 1)((3q + 2) + 2)
by substitution
= (3q + 2)(3q + 3)(3q + 4)
= (3q + 2)3(q + 1)(3q + 4)
= 3· [(3q + 2)(q + 1)(3q + 4)] by algebra
Q. P. Code:
Let m = (3q + 2)(q + 1)(3q + 4). Then m is an integer because q is an integer,
and sums and products of integers are integers. By substitution,
n(n + 1)(n + 2) = 3m where m is an integer.
And so, by definition of divisible, n(n + 1)(n + 2) is divisible by 3.
In each of the three cases, n(n + 1)(n + 2) was seen to be divisible by 3. But by
the quotient-remainder theorem, one of these cases must occur. Therefore, the
product of any three consecutive integers is divisible by 3.
For all integers n, n(n + 1)(n + 2) mod 3 = 0.
f. Let X = {a, c, b}, Y = {x, y, z}, and Z = {u, v,w}. Define f : X → Y and g: Y → Z
by the arrow diagrams below.
Q. P. Code:
Solution
ii.
Q. P. Code:
d Imagine that the diagram shown below is a map with countries labeled a–g. Is it
possible to color the map with only three colors so that no two adjacent countries
have the same color? To answer this question, draw and analyze a graph in which
each country is represented by a vertex and two vertices are connected by an edge
if, and only if, the countries share a common border.
Q. P. Code:
Solution
Vertex e has maximal degree, so color it with color #1. Vertex a does not share an
edge with e, and so color #1 may also be used for it. From the remaining uncolored
vertices, all of d, g, and f have maximal degree. Choose any one of them, say d, and
use color #2 for it. Observe that vertices b, c, and f do not share an edge with d, but
c and f share an edge with each other, which means that color #2 may be used for
only one of c or f . So color b with color #2, and choose to color f with color #2
because the degree of f is greater than the degree of c. From the remaining uncolored
vertices, g has maximal degree, so color it with color #3. Then observe that because
g does not share an edge with c, color #3 may also be used for c. At this point, all
vertices have been colored.
e i. Find the adjacency matrix of the following graph:
ii. Find directed graphs that have the following adjacency matrix:
1 0 1 2
0 0 1 0
[ ]
0 2 1 1
0 1 1 0
Solution i.
ii.
Q. P. Code:
f For the following either draw the graph as per the specifications or explain why no
such graph exists:
i. Graph, circuit-free, nine vertices, six edges
ii. Tree, six vertices, total degree 14
iii. Tree, five vertices, total degree 8
iv. Graph, connected, six vertices, five edges, has a nontrivial circuit
v. Graph, two vertices, one edge, not a tree
ii. There is no tree with six vertices and a total degree of 14. Any tree with six
vertices has five edges and hence a total degree of 10, not 14.
iii. One such tree is shown.
iv. No such graph exists. A connected graph with six vertices and five edges is
a tree. Hence such a graph cannot have a nontrivial circuit.
v.
iii. A small town has only 500 residents. Must there be 2 residents who have
the same birthday? Why?
iv. Given any set of four integers, must there be two that have the same
remainder when divided by 3? Why?
Yes. There are only three possible remainders that can be obtained when an integer
is divided by 3: 0, 1, and 2. Thus, by the pigeonhole principle, if four integers are
each divided by 3, then at least two of them must have the same remainder. More
formally, call the integers n1, n2, n3, and n4, and consider the function R that sends
each integer to the remainder obtained when that integer is divided by 3:
Q. P. Code:
v. Given any set of three integers, must there be two that have the same
remainder when divided by 3? Why?
No. For instance, {0, 1, 2} is a set of three integers no two of which have the same
remainder when divided by 3.
d. i. How many distinguishable ways can the letters of the word HULLABALOO
be arranged in order?
e. A bakery produces six different kinds of pastry, one of which is eclairs. Assume
there are at least 20 pastries of each kind.
i. How many different selections of twenty pastries are there? 53130
ii. How many different selections of twenty pastries are there if at least three
must be eclairs? 26,334
iii. How many different selections of twenty pastries contain at most two
eclairs? 26, 796
_____________________________