Solution Hints and Common Problems

advertisement
HINTS AND COMMON PROBLEMS
IN-CLASS ASSIGNMENT 1:
Common Problems
Question 1:
 There were no significant problems with the first question.
Question 2:
 The biggest problem was that students didn’t justify all of their steps.
Hints
Question 2:
 Any time that a student uses a specific number in their calculations, they need to justify
their use of it with what facts led them to that estimate.
IN-CLASS ASSIGNMENT 1: (extra credit):
Hints
 Use Taylor series, a Taylor polynomial of sin(x) around π is defined as:
T(x)= (x-π)^1/1! + (x-π)^3/3! + (x-π)^5/5! + …
(http://en.wikipedia.org/wiki/Taylor_series )
 So T(3) = -(3-π) + (3-π)^3/6 + O((.1)^(-7)) = 0.1415 + 0.000472191 + O((.1)^(-7))
O((.1)^(-7)) represents the rest of the terms in the series. The order of magnitude of these
terms is at most (.1)^(-7) .
 It is obvious that 0.000472191 + O((.1)^(-7)) does not contribute to the decimal term
required, then T(3) = sin(3) ≈ 0.14
IN-CLASS ASSIGNMENT 2:
Hints
 Consider looking forward only 3 or 4 generations and try and notice a pattern.
Common Problems
 Arithmetic errors.
 Some students attempted to use statistical analysis tools that were much more complex
than needed, and made the problem much more difficult than it actually was.
HW#2
Common Problems
Question 1:
 Some students did not include the initial state to compute the average. The number of
terms for the average is the number of steps plus 1 (the initial condition).
 Some students did not take the inputs as a single line in the command line.
 Some students had their print statements such that either the initial condition or the final
calculated step would not be printed.
 Some of the student’s program did not take input, but instead provided functions, that
took the values as parameters.
 Some students who programmed in Java did not provide a main method.
Question 2:
 The only problem was that some students did not describe the meaning of the standard
deviation in the experiment.
Hints
Question 1:
 The best ways for the students to read the input would be to use the scanner class, or to
use the Buffered Reader class and then break up the string with the StringTokenizer
class.
 In order to get the correct average, students should initialize the sum to the starting
value, and then continue to add each calculated value in the for/while loop, and then
divide by the number of steps + 1 in the end.
 The number of steps that is specified is the number of movement calculations that need
to be made after the starting value. So a walk with 0 steps would still contain 1 value,
the starting value.
Question 2:
 The following equations are used to compute the average and the standard deviation
(SD):
Average(or mean) = 1/n * (x1+x2+…+xn)
SD = ( ( (x1-mean)^2 + (x2-mean)^2 + … + (xn-mean)^2 ) / n )^(1/2)
Where “n” is the number of students, and “xi” represent the number of parameters at
which student “i” figured out the correct shape.
QUIZ #1
Common Problems
Question 1 & 2:
 There were no significant common problems for these questions.
Hints
Question 1:
 Introvert/Extravert: Energy from within, reflect/act/reflect vs. energy from without,
act/reflect/act
 Sensing/iNtuition: Method, facts build the pattern (bottom-up) vs. insight, fit facts to the
pattern (top-down)
 Thinking/Feeling: Head, logic, impersonal, objective vs. heart, harmony, personal,
subjective
 Judging/Perceiving: Planful,likes things decided, on time vs. improvise, open, take-as-itcomes.
Question 2:
 You need to explain your reasoning along with each of the four dichotomies.
HW#3
Common Problems
Question 1:
 The most common problem was that some groups made a wrong assignment of the
probabilities for each bit.

Some students did not strictly follow the guidelines, and did not put the input parameters
in one single line.
Question 2:
 Some groups could not find the correct trend ( L ~ sqrt(t) ) probably because they used
too short times and too few trials. This part did require some work!
 Some groups did not attempt to make any argument for which law they chose beyond
just "eyeballing" it.
 Many groups did not collect enough data, and so there data sets were too noisy to pull
any meaningful information from them
Hints
Question 1:
 This problem is a general version of the problem 1 of Homework #2, so it is a good idea
to start from that.
 The key for this problem is the assignment of the 3 probabilities from a given random
number (assuming that 0< Random Number < 1). One way to do this is through the
following code:
if( RandomNumber< p)
bit_1 = complementary_bit(bit_1) ;
else if (RandomeNumber< p + q)
bit_2 = complementary_bit(bit_2) ;
else
bit_3 = complementary_bit(bit_3) ;
Question 2:
 In order to get the correct trend it is necessary to test various values of “t”. A large range
of “t” values also helps, some groups went beyond t=100 up to t=1000 .
 Some students obtained a very clear and correct trend averaging the results of different
trials for the same values of “t” .
IN-CLASS ASSIGNMENT 2: (extra credit):
Common Problems
- The most common problem was stating that the solution was for everyone to board the ship;
this is incorrect as the problem states that a person only goes if he is a redhead. This
solution would also require the communication of the plan for everyone to board among the
population.
- Another common problem was stating that all redheads would board on day one when they
see the other redheads not moving. This could not be true, as just seeing the other redheads
not moving is not enough to guarantee that you are a redhead.
Hints
- The easiest way to solve the problem is by using “simplify”. First work out at the cases
where the number of redheads is equal to 1, 2, and 3, and then generalize to where the
number of redheads is equal to N+1. Use induction if you want a rigorous proof. Thing it
through from your own perspective. N=1: “I come to the square. I see only greenheads
around me. Ergo, I am a readhead. I must board. Ergo, all readheads leave that same day”.
N=2: “I come to the square. I see one redhead. But he has not boarded that day. Ergo, it is
not N=1 case, and I am a readhead too. We both board next day”. For greenheads, the N=2
logic would be like “I see two readheads. They boarded on day 2. Ergo, I am not a
readhead, I don’t need to board. “
QUIZ #2
Common Problems

Some students tried to approach the problem by finding a combined packing factor for
marbles and pellets. While this seems to be a correct reasoning, it would require a
rigorous determination of the new combined packing factor value.
Hints
 For this problem it is necessary to apply the “sphere packing problem” twice. The
marbles will take approximately ¾ of the container, so the available space for the small
pellets is (1- ¾)*16 = 4 gallons. The pellets will fill the free space in the same way the
marbles did (They will fill ¾ of the available space). So, the space for water is (1-3/4)*4
gallons, this is 1 gallon space for water. Some students used slightly different values for
the “best” packing, which is OK as long as the assumptions were spelled out.
HW # 4:
Common Problems
Question 1:
 The most common problem was just finding the highest bet (that was a power of 2) that
is less than the $1000, instead of compounding together each of the previous bets to
make the total. The error would lead to finding the max bet to be $512, instead of
correct $256.
Question 2:
 The most common problem was not using the externalize method (finding a way to
visualize the problem) to find the solution.
Question 3:
 Some students mentioned a game that was played on 1930, even though no game was
played during that year.
Question 4:
 The most common problem was stating that the relationship was “ is surrounded by
___”, as surrounded means “to enclose on all sides”, this does not work.
Question 5:
 There were no significant common problems for this question.
Hints
Question 1:
 The best way to get started is to simply make a few charts with different starting bets,
just like we did in class (“get your feet wet”), and perform the bet doubling strategy to
see at what point a loss might occur for each starting bet. From there, you will be able
to see that starting the bet at $1 will give you the most chances to bet, and thus a higher
chance of attaining a win as defined. Form then, the solution is easy.
Question 2:
 Using a Venn Diagram gives an easy way to visualize the problem.
Question 3:
 One simple way to go about the problem would be to first make a list of what all of the
games were, and then organize these games into a timeline in order to figure out the year
in which each was played.
Questions 4 and 5:
 One approach to these problems is to write out different relationship sentences until you
find one that works for both pairs of words.
QUIZ #3

Problem 1:
Songs are not eliminated after they are played. Which makes it an easier problem than
the one discussed in class. Again, we want to use the “complementarity” heuristic and
find probability of NOT hearing the song and then use it to answer the question.
Each time you have a 1/N chance of hearing the song and (N-1)/N chance of NOT
hearing the song.
After k presses, there is a ((N-1)/N)^k chance that you will not hear your song.
And 1-((N-1)/N)^k chance that you hear your song at least once.
 Problem 2:
First calculate ((N-1)/N)^k; Assume ((N-1)/N)^k = X
log X = log(((N-1)/N)^k) = k * log((N-1)/N) = k * log(1-1/N)
k* log(1-1/N): Taylor series: k * log(1-1/N) ~= k * (-1/N ) = Y;
Substituting the values of k and N we can find log X = Y;
In this problem e = 3 =>e^Y = X => 1 - ((N-1)/N)^k = 1 – X
 Problem 3:
As there are 4 letters S, which can be counted as same and 2 letters P which also can be
counted as same, and all other letters (including colored Is) I are counted as different, the
formula is:
11! / (4! * 2!)
HW #6
Common Problems
Question 1:
 There were no significant common problems for this question.
Question 2:
 The most common problem with this question was not finding where the symmetry
occurs.
Question 3:
 The most significant problem with this question was stating that the number of code
words is half of N instead of half of the number of permutations of N.
Hints
Question 1:
 The biggest hint for this problem is that the wings of the butterfly are symmetric, so
figuring out the line of symmetry and using a reflection technique will give an accurate
way to repair the picture
Question 2:
 The biggest part of this problem is figuring out where the symmetry occurs. By looking
at the first few even N = 2,4, etc., you can see that the number of permutations with a
certain number of 0s is symmetric about N/2 zeroes (the number with no zeros is the
same as the number with all zeros, the number with 1 zero is the same as the number
with all but one zero, … until you reach the middle, N/2). Suppose there is X of such
strings (and, by symmetry, X strings with up to N/2 ones. Now, unlike the odd N case
worked out in class, we have a special string with exactly N/2 zeroes, which is the same
string as one with exactly N/2 ones. Suppose the total number of such strings is Y.
Obviously, 2X + Y = 2^N. But what you need is X + Y. You can now use the
Mississippi formula to compute Y = N!/((N/2)! (N/2)!). Thus X = (2^N –Y)/2 with Y
from the above.
Question 3:
 There are N+1 different numbers of zeroes that the word could have (since it can from 0
to N inclusive), and since N is odd, N+1 must be even. With this in mind, you can see
that there must be the same number of words with an odd number of zeros as there are
with an even number of zeroes.
IN-CLASS ASSIGNMENT 3: (extra credit):
Hint



First, turn on the switches #1 and #2 and leave both switches for some time, with
switch #3 being off during this time.
Then, turn off switch number #2. and go to the basement.
You can identify which switch controls the bulb by looking if the light bulb is on or off ,
and by cheeking if the bulb is hot or cold.
Download