Download solutions for HW #4

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Large numbers wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

Abuse of notation wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Mathematics of Sudoku wikipedia , lookup

Non-standard calculus wikipedia , lookup

Collatz conjecture wikipedia , lookup

Elementary mathematics wikipedia , lookup

Laws of Form wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Naive set theory wikipedia , lookup

Number theory wikipedia , lookup

Addition wikipedia , lookup

System of polynomial equations wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Math 4575 : HW #4
Chapter 6: #1, 3, 7, 9, 11, 12, 14, 21, 29, 32.
• #1
Find the number of integers between 1 and 10000 inclusive that are not divisible
by 4,5, or 6.
Let S be the set of all numbers 1 to 10000, Let A1 be the subset of numbers
divisible by 4, A2 the subset of numbers divisible by 5, and A3 the subset of
numbers divisible by 6. By the inclusion-exclusion principle,
|Ā1 ∩Ā2 ∩Ā3 | = |S|−|A1 |−|A2 |−|A3 |+|A1 ∩A2 |+|A1 ∩A3 |+|A2 ∩A3 |−|A1 ∩A2 ∩A3 |.
We have |S| = 10000, |A1 | = 2500, |A2 | = 2000, |A3 | = b10000/6c =
1666. Since lcm(4, 5) = 20, lcm(4, 6) = 12, and lcm(5, 6) = 30, we also have
|A1 ∩ A2 | = 500, |A1 ∩ A3 | = 833, and |A2 ∩ A3 | = 333. Finally, since
lcm(4, 5, 6) = 60, we have |A1 ∩ A2 ∩ A3 | = 166. Putting it altogether, we have
|Ā1 ∩ Ā2 ∩ Ā3 | = 10000 − 2500 − 2000 − 1666 + 500 + 833 + 333 − 166
= 5334.
• #3
Find the number of integers between 1 and 10000 that are neither perfect squares
nor perfect cubes.
Let S be the set of integers between 1 and 10000. Let A1√be the set of perfect
squares, and A2 the set of perfect cubes. Clearly A1 = 10000 = 100, and
|A2 | = b100001/3 c = 21. A number is both a perfect square and a perfect
cube, if and only if it is a perfect sixth power, by the Fundamental Theorem of
Arithmetic. So A1 ∩ A2 = b100001/6 c = 4.
So by the inclusion-exclusion principle, the number of integers in S that are
neither perfect squares nor perfect cubes is
10000 − 100 − 21 + 4 = 9833.
• #7
Determine the number of solutions of the equation x1 + x2 + x3 + x4 = 14 in
nonnegative integers x1 , x2 , x3 , and x4 not exceeding 8.
Let S be the set of nonnegative
integer solutions to the equation. By stars and
bars counting, |S| = 17
.
Let
A
1 be the number of solutions where x1 ≥ 9.
3
Subtracting 9 everywhere, this is the same
as the number of nonnegative integer
solutions to y1 + y2 + y3 + y4 = 5, or 83 . Similarly define A2 , A3 , and A4 . The
same calculation shows that Ai = 83 for i = 1, 2, 3, 4. But it is not possible for
two of the variables to both be 9 or greater, since then the sum is already greater
than 14. So the pairwise (and higher) intersections of these sets are all empty. So
the number of solutions is
17
8
−4
.
3
3
1
• #9
Determine the number of integral solutions of the equation
x1 + x2 + x3 + x4 = 20
that satisfy
1 ≤ x1 ≤ 6, 0 ≤ x2 ≤ 7, 4 ≤ x3 ≤ 8, 2 ≤ x4 ≤ 6.
First, make the variable substitutions y1 = x1 − 1, y2 = x2 , y3 = x3 − 4, and
y4 = x4 − 2. Then we are counting integral solutions to
(∗) y1 + y2 + y3 + y4 = 13,
that satisfy
0 ≤ y1 ≤ 5, 0 ≤ y2 ≤ 7, 0 ≤ y3 ≤ 4, 0 ≤ y4 ≤ 4.
Let S denote the number of nonnegative integer solutions to (∗). Let A1 be the
subset of solutions with y1 ≥ 6, A2 the subset of solutions with y2 ≥ 8, A3 the
subset of solutions with y3 ≥ 5, and A4 the subset
of solutions
with y4 ≥ 5.
10
8
11
We have |S| = 16
,
|A
|
=
,
|A
|
=
,
|A
|
=
,
and
|A4 | = 11
1
2
3
3
3
3
3
3 .
Now compute the
sizes
of
the
pairwise
intersections.
We
have
|A
∩
A
| = 0,
1
2
|A1 ∩ A3 | = 53 , |A1 ∩ A4 | = 53 , |A2 ∩ A3 | = 33 , |A2 ∩ A4 | = 33 , and
|A3 ∩ A4 | = 63 . The intersection of any three (or more) of these subsets is
empty. So
|Ā1 ∩ Ā2 ∩ Ā3 ∩ Ā4 | = |S| − |A1 | − |A2 | − |A3 | − |A4 | + |A1 ∩ A2 | + |A1 ∩ A3 | + . . .
16
10
8
11
5
3
6
=
−
−
−2
+2
+2
+
3
3
3
3
3
3
3
• #11
Determine the number of permutations of {1, 2, . . . , 8} in which no even integer
is in its natural position.
By inclusion-exclusion, the number of such permutations is:
4
4
4
4
8! −
7! +
6! −
5! +
4!
1
2
3
4
• #12
Determine the number of permutations of {1, 2, . . . , 8} in which exactly four
integers are in their natural positions.
First, choose the 4 integers to be in their natural positions, and then choose a
derangement of the remaining 4. So the number of such permutations is
8
8
1
1
1
1
D4 =
4! 1 − + − +
.
1! 2! 3! 4!
4
4
2
• #14
Determine a general formula for the number of permutations of the set {1, 2, . . . , n}
in which exactly k integers are in their natural positions.
By the reasoning above, the number of such permutations is
n
Dn−k .
k
• #21
Prove that Dn is an even number if and only if n is an odd number.
We have the formula
1
1
1
1
1
Dn = n! 1 − + − + · · · + (−1)n
2! 3! 4! 5!
n!
n!
n!
n!
= n! −
+ · · · − · · · + (−1)n−1
+ (−1)n
2!
(n − 1)!
n!
Every term in the sum is even, except possibly the last two, since n(n−1) divides
all the other terms, and since either n or n − 1 is even. So we have
Dn ≡ (−1)n−1 n + (−1)n
(mod 2).
Since
1 ≡ (−1)n−1
(mod 2),
Dn ≡ n − 1
(mod 2),
we have
as desired.
• #29
A subway has six stops on its route from its base location. There are 10 people
on the subway as it departs its base location. Each person exits the subway at
one of its six stops, and at each stop at least one person exits. In how many ways
can this happen?
Let S be the set of ways people can get off the subway, if there are no restrictions
other than everyone gets off somewhere. Then by the multiplicative principle,
|S| = 610 .
Now, let Ai be the subset of ways where no one gets off at stop i, for i = 1, . . . 6.
By the same reasoning, |Ai | = 510 .
All the pairwise intersections have the same size, i.e. |Ai ∩ Aj | = 410 and there
are 62 such intersections. And so on.
By the inclusion-exclusion principle, the number of ways where at least one
person exits at each stop is
6 10
6 10
6 10
6 10
6 10
6 10
10
6 −
5 +
4 −
3 +
2 −
1 +
0 .
1
2
3
4
5
6
3
• #32
Let n be a positive integer and let p1 , p2 , . . . , pk be all the distinct primes numbers that divide n. Consider the “Euler function” φ defined by
φ(n) = | {i : 1 ≤ i ≤ n, gcd(i, n) = 1} |.
Use the inclusion-exclusion principle to show that
φ(n) = n
k Y
j=1
1
1−
pj
.
Let S be the set of integers {1, 2, . . . , n}. For every i = 1, 2, . . . , k, let Ai be the
subset of integers m in S such that pi | m. We note that
|Ai | =
n
,
pi
|Ai ∩ Aj | =
n
,
pi pj
etc. By the Fundamental Theorem of Algebra, a number m is relatively prime to
n if and only if pi - m for every i = 1, . . . , k, so
φ(n) = |Ā1 ∩ Ā2 ∩ . . . A¯k |.
By the inclusion-exclusion principle,
X 1
X 1
X 1
+
−
+ ...
φ(n) = n 1 −
pa
pa pb
pa pb pc
On the right side of this equation, the first sum is over all a = 1, . . . k, the
second sum is over all pairs, the third sum over all triples, etc. Finally, we apply
the identity
k Y
j=1
1−
1
pj
=1−
X 1
X 1
X 1
+
−
+ ...,
pa
pa pb
pa pb pc
to conclude that
X 1
X 1
X 1
1
φ(n) = n 1 −
=1−
+
−
+ ...,
pj
pa
pa pb
pa pb pc
as desired.
4