Testwiki:Reference desk/Archives/Mathematics/2013 February 15

From testwiki
Revision as of 04:31, 26 February 2022 by imported>MalnadachBot (Fixed Lint errors. (Task 12))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Error:not substituted

{| width = "100%"

|- ! colspan="3" align="center" | Mathematics desk |- ! width="20%" align="left" | < February 14 ! width="25%" align="center"|<< Jan | February | Mar >> ! width="20%" align="right" |Current desk > |}

Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 15

How do you solve n!(nr)!nr1ϵ for n?

How do you solve n!(nr)!nr1ϵ for n, given r and ϵ? The parameter values of interest are of the order r109 and ϵ105. Can someone give a good approximation formula that can be evaluated without overflows or gross loss of precision during computation? Thanks. --173.49.13.216 (talk) 03:56, 15 February 2013 (UTC)

I'm not a specialist of this kind of thing, but this can be rewritten (exactly) as

(11n)(12n)(1r1n)1ϵ

log(11n)+log(12n)++log(1r1n)log(1ϵ).

In approximate terms, we can write this as

1n2nr1nlog(1ϵ)

r(r1)2nlog(1ϵ)

nr(r1)2log(1ϵ)r22ϵ

In linearizing the logarithms, the error in the terms on the left is at most about r2n times their value. Given the approximate value of n, the error on the left is, in proportion, about ϵr. In other words, in using the formula nr(r1)2log(1ϵ) you commit an error of at most about ϵr1014 times the vaue of n. (In fact, a more careful calculation shows that the error is about 2/3 of this, and that it results in an underestimation of the minimum possible n.) If you replace r - 1 with r, this rises to about 1/r, or 10-9. If you replace log(1ϵ) with ϵ, the error rises to about ϵ/2=5×106 times the value of n. 64.140.122.50 (talk) 05:58, 15 February 2013 (UTC)

I forgot to mention this - I'm using natural logarithms here. 64.140.122.50 (talk) 06:08, 15 February 2013 (UTC)
Thanks. Your formula is more than good enough. --173.49.13.216 (talk) 12:15, 15 February 2013 (UTC)