Submitted by: Submitted by poohbear238177
Views: 432
Words: 597
Pages: 3
Category: Other Topics
Date Submitted: 05/13/2013 01:54 PM
Math week 2
4.1 5a. Consider the following program segment (written in pseudocode):
for i := 1 to 123 do
for j := 1 to i do
print i * j
a) How many times is the print statement of the third line
executed? 7626
4.2 18. Consider the permutations of 1, 2, 3, 4. The permutation
1432, for instance, is said to have one ascent—namely, 14
(since 1 < 4). This same permutation also has two descents—
namely, 43 (since 4 > 3) and 32 (since 3 > 2). The permutation
1423, on the other hand, has two ascents, at 14 and 23—and
the one descent 42.
a) How many permutations of 1, 2, 3 have k ascents, for
k _ 0, 1, 2?
123:2 ascents
132:1 ascent
213:1 ascent
231:1 ascent
312: 1 ascent
321: o ascent
So the permutation of (1,2,3) have 1 ascent of 2, 4 acents of 1 and 1 zero ascent.
4.3 4. If a, b, c ∈ Z+ and a|bc, does it follow that a|b or a|c?
Yes it does because a/bc implies that bc can be a multiple of a
However it can’t be a factor of ab because it would have to be a factor of b or a.
4.4 1. For each of the following pairs a, b ∈ Z+, determine
gcd(a, b) and express it as a linear combination of a, b.
a) 231, 1820
gcd(1820, 231) = 7 =1820(8) + 231(−63)
5.1 4. For which sets A, B is it true that A _ B _ B _ A?
5.2 4. If there are 2187 functions f : A→B and |B| _ 3, what
is |A|?
[pic] is the number of functions from A to B
2187 = 3^|A|
then you have to solve for |A| and you get
|A| = 7
5.3 1. Give an example of finite sets A and B with |A|, |B| ≥ 4
and a function f : A→B such that
a) f is neither one-to-one nor onto;
answer A _ {1, 2, 3, 4}
5.4 13. Let Ai , 1 ≤ i ≤ 5, be the domains for a table D ⊆ A1 _
A2 _ A3 _ A4 _ A5, where A1 _ {U, V,W, X, Y, Z} (used as
code names for different cereals in a test), andA2 _ A3 _ A4 _
A5 _ Z+. The table D is given as Table 5.7.
a) What is the degree of the table?
The answer is 5
Exercise 5.7, problem 1a 293
1. Use the...