Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

U of H calculator contest

4 views
Skip to first unread message

Wes

unread,
Nov 4, 2009, 10:08:46 AM11/4/09
to
I came across an interesting site for the annual University of Houston
Mathematics Contest for high school students (http://
mathcontest.uh.edu/). One of the contests is a calculator test. I
tried the 2009 test:

http://mathcontest.uh.edu/Exams09/calculator.pdf

It was interesting. The 20 questions range from reasonably easy to
downright hard to completely ridiculously and confusing.

The contest is supposed to be one hour, but I took closer to two.
Unfortunately, after I finished, I realized that there is no answer
key given, so I couldn't check my results, but it was still a fun
challenge.

Enjoy,
-wes

ddoherty03

unread,
Nov 8, 2009, 12:27:01 PM11/8/09
to
Wes,

Thanks for this pointer. I am always looking for good calculator
problems, and these were good ones. It took me around five hours, but
I wasn't racing, just enjoying. I will compare answers, if you
promise not to laugh.

Regards,

Dan

Wes

unread,
Nov 22, 2009, 1:22:32 PM11/22/09
to

Sorry it took so long to respond to this. I couldn't find the scrap
paper that I had written all my answers on, but I finally had a chance
to sit down and take the test again. I found at least one that I
misread the first time.

I found that this test seemed to particularly emphasize strengths of
the HP-50g. The ability to cob together quick little programs to
solve a problem is just what I think the designers of RPL had in
mind. Also, the NEXTPRIME & PREVPRIME commands proved invaluable
several times.

Interestingly, the Univ of Houston contest info states: "Any
calculator can be used on the Calculator Exam." However, the contest
results pages shows a "TI-83/84" catagory of winners and a "TI-89/92"
catagory of winners, so maybe "any calculator" really meant "any TI
calculator." Or perhaps it really mean "CAS" and "non-CAS"
catagories. I'll have to try it again using an 89 to see how it
compares. I've got a nephew in Texas who has been active on his high
school's math team and he told me that some on his team use hp's, so I
know it's not unheard of for high school students to use them in these
contests.

Here are my answers below, mistakes and all. The instructions said to
"round your answers to 8 decimal places" but perhaps it meant 8
significant digits as some of the questions could not be written to 8
decimal places with any standard calculator. I just ignored the this
and listed the full precision.

Wes's Answers to the 2009 contest:

1. 950753

2. 552426

3. 752

4. 3.42871301499E-6

5. -2.14968960968

6. 232366.502395

7. 102400

8. 15.4097986727

9. 0.321750554396

10. -2689/890

11. $310,000.00 (did I miss something here?)

12. 937 (not 941)

13. This question serves no purpose other than to see if a student can
follow an intentionally confusing question. I refuse to answer it on
principle. (ie, I didn't have the gumption follow it either.)

14. 17610

15. 0.634247256824, 0.695933022105, 0.634830752548

16. 0.451499600416

17. 0.494190956873

18. $295356.71857 (nearest penny: $295,356.72)

19. 160

20. 1/74 = 0.0135135135135 (Assuming that "prime numbers in increasing
order" meant "consecutive prime numbers in increasing order."
Otherwise, it's a _much_ harder question.)


Any corrections?

Enjoy,
-wes

Crawl

unread,
Nov 22, 2009, 4:24:40 PM11/22/09
to

> 17. 0.494190956873
>

> 20. 1/74 = 0.0135135135135 (Assuming that "prime numbers in increasing
> order" meant "consecutive prime numbers in increasing order."
> Otherwise, it's a _much_ harder question.)
>

For 17, it looks like you gave the answer if they only sampled one
point. I think the question said they sampled 10 points (with uniform
random distribution?) so it would be your answer to the 10th
power=8.688x10-4.

For 20, I did not think they implied the prime numbers needed to be
consecutive (nor the composites, for that matter), but with that most
general case, I couldn't solve the problem (and would be surprised if
there was a closed form solution that could be computed in realistic
time in that case) Using Monte Carlo simulation, though, I got P~0.6.

Wes

unread,
Nov 22, 2009, 5:00:16 PM11/22/09
to
On Nov 23, 12:24 am, Crawl <crawland1...@lycos.com> wrote:
> > 17. 0.494190956873
>
> > 20. 1/74 = 0.0135135135135 (Assuming that "prime numbers in increasing
> > order" meant "consecutive prime numbers in increasing order."
> > Otherwise, it's a _much_ harder question.)
>
> For 17, it looks like you gave the answer if they only sampled one
> point.  I think the question said they sampled 10 points (with uniform
> random distribution?) so it would be your answer to the 10th
> power=8.688x10-4.

Yes, you're right. I remember now doing it correctly the first time I
took the test, but I forgot where I was going with it this time. So
change my answer to:

17) 8.68856271971E-4

The question stated: "10 randomly chosen values in the interval" so I
think a uniform random distribution seems reasonable.


> For 20, I did not think they implied the prime numbers needed to be
> consecutive (nor the composites, for that matter), but with that most
> general case, I couldn't solve the problem (and would be surprised if
> there was a closed form solution that could be computed in realistic
> time in that case)  Using Monte Carlo simulation, though, I got P~0.6.

Considering that the test is for high school students and that they
asked for 8 decimal places, I'm guessing that they intended the easier
consecutive case. I'll have to give it some more thought. For
anybody who's interested, the question was:

Thirteen men and nineteen women are placed in line so that 3 women are
at the front of the line, 4 women are at the end of the line, and men
and women alternate in the line from the fourth position to the 29th
position, with a man standing in the 4th position. Each of the first
31 people choose a random number in the set {2, 3, … , 100}. You don’t
know their choices, but you know that the 32nd person knows their
choices, and you hear her say that all of the men have chosen prime
numbers in increasing order, and all of the women have chosen
composite numbers in increasing order. What is the probability that
she can choose a composite number in the set {2, 3, … , 100} that is
larger than any of the numbers chosen by the women and forces the sum
of all chosen numbers to be an integer multiple of 103?

-wes

Scott Hemphill

unread,
Nov 25, 2009, 5:42:40 PM11/25/09
to
Wes <wjlte...@yahoo.com> writes:

> 8. 15.4097986727

I get 3.12155183758.

I interpreted each term in the product as (1+1/3^k)^(k+1) with k
running between 1 and 14. Oh, I think you summed the terms instead of
multiplying.

> 13. This question serves no purpose other than to see if a student can
> follow an intentionally confusing question. I refuse to answer it on
> principle. (ie, I didn't have the gumption follow it either.)

Yeah, it's confusing. I attempted it and got 8:20. I didn't check my
work.

> 15. 0.634247256824, 0.695933022105, 0.634830752548

We got simmilar answers, but I'm a little surprised. The function is a
well known one from chaos theory. I thought that round off error was
going to cause the errors to explode.

> 17. 0.494190956873

This one was corrected in another thread.

> 18. $295356.71857 (nearest penny: $295,356.72)

I got 295356.84. This should be exact if bankers round to the nearest
penny each month.

> 20. 1/74 = 0.0135135135135 (Assuming that "prime numbers in increasing
> order" meant "consecutive prime numbers in increasing order."
> Otherwise, it's a _much_ harder question.)

Yes, it's hard. I spent three hours on this one problem, and I solved
it with Mathematica, not a pocket calculator. I also wrote a Monte
Carlo implementation to check my work. The answer I get is
approximately 0.0286152273889. I'm withholding the exact fraction
in case someone wants to confirm the result.

Scott
--
Scott Hemphill hemp...@alumni.caltech.edu
"This isn't flying. This is falling, with style." -- Buzz Lightyear

Scott Hemphill

unread,
Nov 25, 2009, 5:58:30 PM11/25/09
to
Wes <wjlte...@yahoo.com> writes:

> On Nov 23, 12:24 am, Crawl <crawland1...@lycos.com> wrote:

[snip]

>> For 20, I did not think they implied the prime numbers needed to be
>> consecutive (nor the composites, for that matter), but with that most
>> general case, I couldn't solve the problem (and would be surprised if
>> there was a closed form solution that could be computed in realistic
>> time in that case)  Using Monte Carlo simulation, though, I got P~0.6.

I didn't think they needed to be consecutive either. I did it in
three hours in Mathematica. My anwer was 0.0286152273889, and took
only a few seconds to calculate. (I have an exact fraction, also.) I
checked my method with a Monte Carlo implementation, too. Before I
got both my Mathematica and Monte Carlo code debugged, I had to do the
case with 1 man and 2 women. I also did 2 men and 3 women.

> Considering that the test is for high school students and that they
> asked for 8 decimal places, I'm guessing that they intended the easier
> consecutive case. I'll have to give it some more thought. For
> anybody who's interested, the question was:

It could have been something to keep the students busy until they ran
out of time.

> Thirteen men and nineteen women are placed in line so that 3 women are
> at the front of the line, 4 women are at the end of the line, and men
> and women alternate in the line from the fourth position to the 29th
> position, with a man standing in the 4th position. Each of the first
> 31 people choose a random number in the set {2, 3, … , 100}. You don’t
> know their choices, but you know that the 32nd person knows their
> choices, and you hear her say that all of the men have chosen prime
> numbers in increasing order, and all of the women have chosen
> composite numbers in increasing order. What is the probability that
> she can choose a composite number in the set {2, 3, … , 100} that is
> larger than any of the numbers chosen by the women and forces the sum
> of all chosen numbers to be an integer multiple of 103?

Scott

Scott Hemphill

unread,
Nov 25, 2009, 6:09:33 PM11/25/09
to
Wes <wjlte...@yahoo.com> writes:

> 12. 937 (not 941)

By the way, that's exactly the way I wrote the answer on my answer
sheet.

Wes

unread,
Nov 26, 2009, 11:03:18 AM11/26/09
to
On Nov 26, 1:42 am, Scott Hemphill <hemph...@hemphills.net> wrote:

> Wes <wjltemp...@yahoo.com> writes:
> > 8. 15.4097986727
>
> I get 3.12155183758.
>
> Oh, I think you summed the terms instead of multiplying.

Yep, I hit SigmaList instead of PiList. I hate it when I make the
silly mistakes that I warn my students against. :-)

> > 15. 0.634247256824, 0.695933022105, 0.634830752548
>
> We got simmilar answers, but I'm a little surprised. The function is a
> well known one from chaos theory. I thought that round off error was
> going to cause the errors to explode.

s -> r*s*(1-s), r=3, initial s=0.5

When I took the test, I thought we might be looking at a place where
the function had a periodicity of 2, but if you make a bifurcation
plot, you see that r=3 is right where the plot bifurcates, so s_n
actually converges, albeit slowly. It would have been of more
historical significance to use a value like r=3.83 where the
periodicity is 3. ("Period Three Implies Chaos"
http://pb.math.univ.gda.pl/chaos/pdf/li-yorke.pdf )

Fortunately, they did not choose a value of r that is chaotic. Using
r=3.80 on the 12 digit 50g, s_53 is accurate to only 2 decimal
places. The 14 digit TI's fair a bit better, accurate to 5 digits (as
does the 50g using 15 digit extended reals).


> > 18. $295356.71857 (nearest penny: $295,356.72)
>
> I got 295356.84. This should be exact if bankers round to the nearest
> penny each month.

Do banker's round to the nearest penny each month? I've heard stories
(urban legends?) of bankers skimming a fraction of a penny from
thousands of accounts each day, adding up to a tidy sum.

> > 20. 1/74 = 0.0135135135135 (Assuming that "prime numbers in increasing
> > order" meant "consecutive prime numbers in increasing order."
> > Otherwise, it's a _much_ harder question.)

> It could have been something to keep the students busy until they ran
> out of time.

I agree. There are clearly more problems than can be done in the
allotted time. Part of the test is to figure out which problems are
doable in a reasonable amount of time. It's important to recognize
what you cannot do.

> Yes, it's hard. I spent three hours on this one problem, and I solved
> it with Mathematica, not a pocket calculator. I also wrote a Monte
> Carlo implementation to check my work. The answer I get is
> approximately 0.0286152273889. I'm withholding the exact fraction
> in case someone wants to confirm the result.

I'll give it some more thought and see what I come up with.

Thanks for the corrections.

-wes

Wes

unread,
Nov 27, 2009, 10:09:23 AM11/27/09
to
Concerning Question #20

On Nov 23, 12:24 am, Crawl <crawland1...@lycos.com> wrote:
> For 20, I did not think they implied the prime numbers needed to be
> consecutive (nor the composites, for that matter), but with that most
> general case, I couldn't solve the problem (and would be surprised if
> there was a closed form solution that could be computed in realistic
> time in that case) Using Monte Carlo simulation, though, I got P~0.6.

On Nov 26, 1:42 am, Scott Hemphill <hemph...@hemphills.net> wrote:

> Yes, it's hard. I spent three hours on this one problem, and I solved
> it with Mathematica, not a pocket calculator. I also wrote a Monte
> Carlo implementation to check my work. The answer I get is
> approximately 0.0286152273889. I'm withholding the exact fraction
> in case someone wants to confirm the result.


The more I look at this problem, the more confused I am about what
it's even asking. After the setup, the actual question is: "What is


the probability that she can choose a composite number in the set {2,

3, ... , 100} that is larger than any of the numbers chosen by the


women and forces the sum of all chosen numbers to be an integer
multiple of 103?"

There are so many ways to interpret this question. The ambiguity is
that the given is unclear. For instance:

1) Given that she chooses a composite number the set {2, ... , 100},
what's the probability that it has the following properties:
a) it is larger than any of the others chosen by the women
b) it forces the the sum of all chosen numbers to be an integer
multiple of 103

2) Given that she chooses a composite number the set {2, ... , 100}
that is larger than any of the others chosen by the women, what's the
probability that it has the following properties:
a) it forces the the sum of all chosen numbers to be an integer
multiple of 103

3) My original (probably incorrect) interpretation was that it meant
consecutive primes and composites and that she was randomly selecting
from 1 of the 74 composites from 2 to 100. I answered P=1/74 since
there was only one such composite that was larger than the other
women's and made the sum a multiple of 103. However, since the
question asked for the probability that she "can" choose such a
number, my answer should have then been 100%. Since the woman knows
what everyone else has chosen, she CAN choose a number that works.
But like I said, this interpretation is probably not what they
intended.

It looks like I'm not the only one seeing different possibilities
since the two other suggests answers are P~0.6 and P~0.0286

-wes

Scott Hemphill

unread,
Nov 27, 2009, 1:54:16 PM11/27/09
to
Wes <wjlte...@yahoo.com> writes:

I don't believe that it is either of these two choices. I didn't
think it was so unclear. The woman knows what everyone else has
chosen. Given all the ways that everyone else chosen numbers which
meet the requirements, what is the probability that she CAN choose a
number that meets her special requirements. It is not 100%. If the
woman before her has chosen 100, then there aren't any composites left
for her to pick, since she is limited to 2 to 100 and it must be
greater than that last woman's. Or, if the last woman picked 99, then
there is only one number left that she can choose: 100. But when 100
is added to everyone else's numbers, the result might be a multiple of
103.

Here's the text again:

Thirteen men and nineteen women are placed in line so that 3 women are
at the front of the line, 4 women are at the end of the line, and men
and women alternate in the line from the fourth position to the 29th
position, with a man standing in the 4th position. Each of the first
31 people choose a random number in the set {2, 3, … , 100}. You don’t
know their choices, but you know that the 32nd person knows their
choices, and you hear her say that all of the men have chosen prime
numbers in increasing order, and all of the women have chosen

composite numbers in increasing order. What is the probability that
she can choose a composite number in the set {2, 3, … , 100} that is


larger than any of the numbers chosen by the women and forces the sum
of all chosen numbers to be an integer multiple of 103?

ddoherty03

unread,
Nov 28, 2009, 1:23:59 AM11/28/09
to
Ok, I missed (or didn't try, in the case of #20), 7 out of 20. I feel
good that I made the same mistake as wes on #8 and #17,
but I made stupid errors on some of the others.

Obviously, it is very doubtful that I will ever get into the
University of Houston.

But help me here, get an education. On number 12, I wrote a recursive
function, Q, to come up with Q(48) = 980, less 39, gives me 941. Why
not 941?
Do you happen to know this family and know that 3 of them didn't show
up to the 2008 meeting?

Cheers,

Dan Doherty

Wes

unread,
Nov 28, 2009, 2:27:55 AM11/28/09
to
On Nov 28, 9:23 am, ddoherty03 <ddohert...@gmail.com> wrote:
> I feel good that I made the same mistake as wes on #8 and #17,
> but I made stupid errors on some of the others.

I'm glad I could contribute to your "feel good" index. :-)

> But help me here, get an education. On number 12, I wrote a recursive
> function, Q, to come up with Q(48) = 980, less 39, gives me 941. Why
> not 941?

The first time I worked the test, I got 941, but the second time I
noticed that the question said: "each year the family grew ... by an
amount equal to the largest integer less than 6% of the total from the
previous year." The key is that is says "less," NOT "less than or
equal to." So instead of using FLOOR or IP to round down, you can use
CEIL and subtract one. In 1975, Q(15)=150. A 6% increase gives you
exactly 159, which means Q(16)=158. The same thing happens three more
times.

-wes

Wes

unread,
Nov 28, 2009, 2:04:03 PM11/28/09
to
On Nov 26, 1:42 am, Scott Hemphill <hemph...@hemphills.net> wrote:
> Yes, it's hard. I spent three hours on this one problem, and I solved
> it with Mathematica, not a pocket calculator. I also wrote a Monte
> Carlo implementation to check my work. The answer I get is
> approximately 0.0286152273889. I'm withholding the exact fraction
> in case someone wants to confirm the result.

Okay, I think I finally understand the question. I still don't know
how to solve it, but I did write my own Monte Carlo program (in C
using microsoft's rand_s() instead of rand() ). My results are
hovering around P=0.02858 after some 60 million simulations, so I seem
to be in the ballpark.

George Polya's Steps for Solving a Problem:
1. Understanding the problem.
2. Devising a plan.
3. Carrying out the plan.
4. Looking back.

One down, three to go.

-wes

Scott Hemphill

unread,
Nov 28, 2009, 5:51:50 PM11/28/09
to
Wes <wjlte...@yahoo.com> writes:

> On Nov 26, 1:42 am, Scott Hemphill <hemph...@hemphills.net> wrote:
>> Yes, it's hard. I spent three hours on this one problem, and I solved
>> it with Mathematica, not a pocket calculator. I also wrote a Monte
>> Carlo implementation to check my work. The answer I get is
>> approximately 0.0286152273889. I'm withholding the exact fraction
>> in case someone wants to confirm the result.
>
> Okay, I think I finally understand the question. I still don't know
> how to solve it, but I did write my own Monte Carlo program (in C
> using microsoft's rand_s() instead of rand() ). My results are
> hovering around P=0.02858 after some 60 million simulations, so I seem
> to be in the ballpark.

I consider this to be quite an achievement. Since simulating the
problem as written is very unlikely to produce any of the events which
you are counting, you have to be very careful to change the problem in
ways that don't affect the probability. I confess that I never
simulated the whole problem--I just simulated the results for smaller
numbers of men and women, and verified my answers to several decimal
places. I used the GNU C library's drand48(). By the way, the
expected error in your estimate is sqrt(0.02858*(1-0.02858)/60e6) ~=
2e-5. The actual difference is about 3.5e-5, which is less than two
standard deviations, and wouldn't be considered a significant
difference.

> George Polya's Steps for Solving a Problem:
> 1. Understanding the problem.
> 2. Devising a plan.
> 3. Carrying out the plan.
> 4. Looking back.
>
> One down, three to go.

That quote is pretty good. In this case I found it useful to repeat
steps 2, 3 and 4 a couple of time.

2. Devise a plan that works for small numbers of men and women, but
would require too much memory and/or CPU time to work for the
numbers in the problem.

3. Carry out the plan, and check the results versus Monte Carlo
simulation.

4. Look at ways to reduce memory and/or CPU usage, and go back to 2
with a better plan.

If I say too much about what I did, I run the risk of guiding you to
getting the same (possibly wrong) answer that I did, but I can give
you some hints if you are interested.

Wes

unread,
Nov 29, 2009, 4:17:40 AM11/29/09
to
On Nov 29, 1:51 am, Scott Hemphill <hemph...@hemphills.net> wrote:

> Wes <wjltemp...@yahoo.com> writes:
> > Okay, I think I finally understand the question. I still don't know
> > how to solve it, but I did write my own Monte Carlo program (in C
> > using microsoft's rand_s() instead of rand() ). My results are
> > hovering around P=0.02858 after some 60 million simulations, so I seem
> > to be in the ballpark.
>
> I consider this to be quite an achievement. Since simulating the
> problem as written is very unlikely to produce any of the events which
> you are counting, you have to be very careful to change the problem in
> ways that don't affect the probability.

Best I can tell, I didn't change the problem at all. I started with a
list of primes <=100 and a list of composites <=100. I assigned a
random value to each number in the two lists, then sorted each list by
the random values. The first 13 primes were the men's choices and the
first 18 composites were the women's choices. For the 19th woman's
possible choices, starting with the next composite after the largest
of the 18 women's choices, I checked each composite up to 100 to see
whether or not the sum of everybody's choices was a multiple of 103.
If it was a multiple, I stopped looking and mark one down for "yes,
she can choose such a number." Then repeated ad infinitum.

-wes

Scott Hemphill

unread,
Nov 29, 2009, 3:35:44 PM11/29/09
to
Wes <wjlte...@yahoo.com> writes:

You changed the problem a little bit, but maybe you consider those
changes trivial.

In some problems, you have to be careful that the events that you
count are equal probability. For example, if you are calculating the
probabilites of rolling two dice totaling 2,...,12 you can't assign
those 11 events equal probabilities if you want to get the correct
answer. (I know you know this, but this is sort of what I meant when
I said you have to be careful when you change the problem.)

In the original problem, the first 31 people generate 99^31 equal
probability events. We are not concered with the ones where the men
choose composite numbers, the women choose prime numbers, or where
someone chooses the same number as someone else in his group. So it
doesn't matter that your method doesn't even generate these kind of
events. We are also not concerned with events where the members of a
group choose numbers out of order. Instead discarding these event,
however, you treat the numbers as if they had been chosen in order.
This works because for each of the events we care about, your method
generates exactly 18! permutations (for the women, or 13! permutations
for the men) with equal probability.

(partial spoiler)

Out of the total 99^31 events, the ones we are interested total
C(74,18)*C(25,13) = 377893220518123106330800. This number is too big
to fit in a 64-bit integer, so depending on your hardware you might
have to either use multiple precision, or settle for an approximate
answer with floating point arithmetic. My method grouped events
together based on the only two things we need to know about them: the
number that the last person chose, and the total mod 103. I kept a
two dimensional array with the total number of events that fell into
each of these categories, which I built up person-by-person. I did
the men first, followed by the women.

ddoherty03

unread,
Nov 29, 2009, 8:01:22 PM11/29/09
to
Ah, now I see. Thanks, Wes.

Dan Doherty

0 new messages