Download HW0 Solution - UCSD VLSI CAD Lab

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

Randomness wikipedia , lookup

Inductive probability wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability box wikipedia , lookup

Probability interpretations wikipedia , lookup

Birthday problem wikipedia , lookup

Boy or Girl paradox wikipedia , lookup

Transcript
Yuncong Chen
Assignment HW0 due 04/03/2014 at 08:00am PDT
CSE21 Spring2014
A zero at the end of 1000! will result from a factor of 2 and a
factor of 5. There are fewer factors of 5 in 1000!, so we count
these to obtain the number of zeros at the end of 1000!. Note
that there are floor(1000/5) = 200 multiples of 5: 5, 10, 15, . . . ,
1000. This gives us 200 factors of 5. There are floor(1000/25)
= 40 multiples of 25 that each add another factor of 5 beyond
what we’ve already counted. And floor(1000/125) = 8 multiples
of 125 each add another factor of 5, as does the floor(1000/625)
= 1 multiple of 625. Total is 200 + 40 + 8 + 1 = 249 factors of
5.
1. (1 pt)
How many different rearrangements are there of the letters in
the word BUBBLE? (You can use n! to denote the factorial of
n)
SOLUTION:
If all of the B’s were distinct, say, B1, B2, B3, then by Theorem
4 (the case of n = k) the answer would be 6!. However, since
the B’s are not distinct, 6! would overcount by a factor of 3!.
Hence, the answer is 6!/3!.
Correct Answers:
• 249
4. (1 pt)
Correct Answers:
How many of the integers 1, 2, . . . , 10000 are divisible by 2, 3,
or 7?
• 6!/3!
2. (1 pt)
Bob and Mary arrange to meet for lunch at a restaurant. They
agree that the first person to arrive will wait at most 15 minutes for the other person. If the other person shows up within
15 minutes, then they will have lunch together. But if the other
person doesn’t show up, the first person will leave. If Bob and
Mary each arrive at a random time in the interval [12:00noon ,
1:00pm], what is the probability that they have lunch together?
SOLUTION:
|A ∪ B ∪C| = |A| + |B| + |C| − |A ∩ B| − |B ∩C| − |C ∩ A| + |A ∩
B ∩C|
10000
10000
10000
10000
answer = b 10000
2 c + b 3 c + b 7 c − b 2·3 c − b 3·7 c −
10000
10000
b 7·2 c + b 2·3·7 c = 7143
Correct Answers:
• 7143
SOLUTION:
5. (1 pt)
If we let x = Bob’s arrival time and y = Mary’s arrival time,
then their respective arrival times will define a point in a unit
square in the (x,y) plane. (Here, “unit” == the one hour from
noon to 1pm.) Note that every point (x,y) in this unit square is
equally likely to occur. Suppose that x = 0, i.e., Bob arrives at
noon. Then any value of y in the interval [0, 0.25] will allow
the two to have lunch. Suppose that x = 0.5, i.e., Bob arrives at
12:30pm. Then any value of y in the interval [0.25, 0.75] will
allow the two to have lunch. We see that the set of (x,y) points
that allow lunch to take place corresponds to a six-sided region,
with area = 7/16.
A point is selected uniformly at random on a stick. This stick
is broken at this point. What is the probability that the longer
piece is at least twice the length of the shorter piece?
Correct Answers:
Correct Answers:
SOLUTION:
Think about the whole stick as the range [0,1]. If the longer
piece is at least twice the length of the shorter piece, the break
point must be in the interval [0,1/3] or [2/3,1]. So the probability
is 2/3.
• 0.666666666666667
• 0.4375
3. (1 pt)
6. (1 pt)
How many consecutive zeros are at the end of “1000!”
?
A pair of fair, standard six-sided dice is tossed. Find the probability that the greatest common divisor of the two numbers is
one.
• A. 12/36
• B. 15/36
• C. 19/36
SOLUTION:
1
• D. 17/36
• E. 23/36
There are C(10,8) ways to choose 2 professors from 10 full professors, 8 ways to choose 1 associate professor from 8 of them,
and 5 ways to choose 1 assistant professor from 5 of them. So
together there are C(10, 2) ·C(8, 1) ·C(5, 1) choices for the committee.
SOLUTION:
Correct Answers:
• C(10,2)*C(8,1)*C(5,1)
We can enumerate all possible pairs of outcome whose GCD is
one:
8. (1 pt)
(1,1), (1,2), (1,3), (1,4), (1,5), (1,6)
For n ≥ 1, give a polynomial in the variable n that is equal to the
sum 7 + 14 + · · · + 7n.
(2,1), (2,3), (2,5)
(3,1), (3,2), (3,4), (3,5)
SOLUTION:
(4,1), (4,3), (4,5),
Notice that the sum is 7 · (1 + 2 + · · · + n). We then use the
familiar fact that the sum of the first n counting numbers is
n(n + 1)/2.
(5,1), (5,2), (5,3), (5,4), (5,6)
Correct Answers:
(6,1), (6,5)
• 7*(1+n)*n/2
There are 23 such cases. Divide this number by the number of
all possible pairs which is 6*6=36. We obtain the probability
23/36.
9. (1 pt)
A student has a sock drawer containing socks of three colors:
white, red and black. There are at least two socks of each color
in the drawer. If the student pulls socks out of the drawer with
her eyes closed, how many socks must she pull out in order to
be guaranteed a matching-color pair?
Correct Answers:
• E
7. (1 pt)
A CSE department faculty committee must be composed of exactly 2 full professors, 1 associate professor and 1 assistant professor. If the department faculty consists of 10 full professors,
8 associate professors and 5 assistant professors, in how many
distinct ways can the committee be chosen? (You can use C(n,k)
to denote the number of combinations of choosing k items from
n)
SOLUTION:
This is an application of the Pigeonhole (or, Dirichlet Drawer)
Principle. The colors of the socks are the “pigeonholes”, and the
socks selected are the “pigeons”. If there are three pigeonholes,
then once we select four pigeons there must be some pigeonhole
that has two pigeons.
Correct Answers:
SOLUTION:
• 4
c
Generated by WeBWorK,
http://webwork.maa.org, Mathematical Association of America
2