Time for another Problem of the Week! This one is rather elementary, but is connected with a pet topic of mine which I plan to write a post on soon:

If a baseball player’s batting average is .334, what is the minimum number of times he’s been up at bat?

[Note for those who are not fans of baseball: a player's batting average is (number of hits made)/(number of times at bat), rounded to three decimal places.]

Please submit solutions to **topological[dot]musings[At]gmail[dot]com** by **Wednesday, July 30**, 11:59 pm (UTC); do **not** submit solutions in Comments. Everyone with a correct solution will be inducted into our Hall of Fame! We look forward to your response.

### Like this:

Like Loading...

*Related*

## 8 comments

Comments feed for this article

July 24, 2008 at 2:46 pm

Paul ShearerThis is the usual rounding procedure, right? Where .3335 would be rounded up to .334? So the average is contained in the interval [.3335, .3345)?

July 24, 2008 at 3:45 pm

Todd TrimblePaul — that’s right.

July 31, 2008 at 12:14 pm

Solution to POW-8: Ups at bat « Todd and Vishal’s blog[...] 2008 in Elementary Math Problem Solving, Problem of the Week (POW) by Todd Trimble Solutions to POW-8 are in! This one may have stuck in some readers’ craws, since obviously one could just [...]

September 2, 2008 at 4:43 am

Name that fraction « Antimatroid, The[...] in Algorithms, Computer Science, Mathematics, Number Theory Awhile ago the guys over at Topological Musings posted a pretty simple question relating to batting averages: If a baseball player’s batting [...]

May 14, 2009 at 8:13 am

Sune Kristian JakobsenHere is some similar problems I had thought about before, but I think I forgot to ask you about it:

Suppose a soccer-team have won 66% (rounded to integer-percentages) of their matches and got a draw in 12%. What is the least number of games they may have played? How do you solve it in general? What if we know that they have lost 23% of their games (so the rounded fractions sums to 101%)? What if there is n different values instead of 2 or 3 (votes who can vote for n different parties)? What if the fractions doesn’t have to sum to 100% (if we know how large a fraction of the voters voted for the democrats, and how large a fraction of the voters where men)?

May 14, 2009 at 10:03 pm

Todd TrimbleAs a warm-up, I’ll tell you how I dealt with the specific problem of 66% wins, 12% ties (rounding to nearest percentage). We know

<

for any integer between 9 and 66. We know

<

for any . So I just solved the integer equation

subject to these inequality constraints, and quickly came up with 41 as the smallest solution. So 41 games for that specific problem.

Working more generally, given rationals 0 < r < s < 1 and 0 < r’ < s’ < 1, we want to find the least n such that

r ≤ m/n < s

r’ ≤ m’/n < s’

for some m, m’. The continued fractions for r and s agree up to some point, e.g., [1, 1, 1...] for r = .655, s = .665, so they have the same rational approximants up to some point: 0, …, , . Similarly, the continued fractions for r’ and s’ agree up to some point: 0, …, , . We then want to solve

an integer equation of the form

subject to some inequality constraints on x/y and x’/y’. I’m not sure I want to write up an algorithm for how this might be effectively done, but I don’t think it’s very hard to find a minimal solution (ignoring the constraints, but letting x, y, x’, y’ be positive integers), and then we generate all solutions using elementary number theory tricks, and then work in the constraints.

I’m not sure I feel like going into full detail on the general method! It’s probably best illustrated on specific examples, and I may come back to this later. (Sadly, I’m very busy with other stuff recently.)

May 16, 2009 at 6:02 am

Sune Kristian JakobsenHow do you know that 41 is the smallest solution (it is: I have checked it using brute force)? There are rational numbers between 0.115 and 0.125 with denominator and both 3/26 and 4/34 have denominator <41.

May 16, 2009 at 6:02 pm

Todd TrimbleSune,

You’re right, but in the second part of my previous (somewhat hurried) comment, I left myself an escape clause. Here’s what it would say as applied to the present problem: we are looking for the smallest number of the form

subject to the constraints

<

(if it’s not clear where these numbers are coming from, let me know).

Here the values of are positive integers.

It’s not very hard to write down the general solution to the linear equation above. As of this writing, I’m not sure what is the best general method for working in the inequality constraints. But the rough rule of thumb is that since solutions to the linear equation are fairly plentiful, and since (in view of the inequalities) taking large forces to be correspondingly large, I pretty much assumed it likely that we would get a minimal solution just by taking . Clearly I don’t claim this works every time, so please take it as the ad hoc rule of thumb I said it was.

26 games misses by a hair, as you surely realized, since 17/26 rounds off to 65%. Notice we have 26 = 3x + 2y when x = 8, y = 1, but this pair (8, 1) doesn’t quite satisfy the inequality constraint written down above.

It might be nice to write down an effective algorithm for the general problem. I haven’t had a chance to look into this carefully yet.