-2
$\begingroup$

Let

$\theta(x)=\begin{cases} 0 & \text{ if } x<0 \\ 1 & \text{ if } x\ge 0 \end{cases}$

Do you know any way to calculate this number:

$$\sum_{r=493701}^{506199}\sum_{k=0}^{100}(-1)^k\frac{\binom{100}{k}\binom{r-10001k+99}{99}\theta(r-10001k+99)}{\binom{r+99}{r}}$$ or estimate it within 0.01. Gap and wolfram failed to calculate it. Also octave seems to be unable to calculate it.

$\endgroup$
21
  • 2
    $\begingroup$ So this would look quite a lot easier if you removed the theta. For r in the range 493701 to 499950, k ranges from 0 to 49 (inside this range theta is 1; outside it's 0). For r in the range 499951 to 506199, k ranges from 0 to 50. $\endgroup$ Commented Sep 12, 2015 at 7:16
  • 2
    $\begingroup$ Why not try to get an estimate by replacing sums with integrals and binomials with quotients and products of gamma functions? Maybe it is possible to estimate the error and see if the precision suffices. $\endgroup$ Commented Sep 12, 2015 at 8:22
  • 2
    $\begingroup$ @user47958: But that means that GAP has computed the result. -- To see it, just use the function 'Display' or 'Print'; thus if you enter Display(last); just after the result you cite, you will see the number. $\endgroup$
    – Stefan Kohl
    Commented Sep 12, 2015 at 8:33
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because after the OP's last comment, answering it amounts to simple advice on using GAP. $\endgroup$
    – Stefan Kohl
    Commented Sep 12, 2015 at 8:36
  • 2
    $\begingroup$ with mpmath I compute the sum. It is equal to 0.0000000013060480365934635751811931267930306865307928780 $\endgroup$
    – juan
    Commented Sep 12, 2015 at 8:49

1 Answer 1

2
$\begingroup$

By comments after adding mpmath package to python one can run this program to see the result:

from mpmath import *
mp.dps=50

def th(x):
    if x<0:
        return 0
    else:
        return 1


def f(r,k):
    a=(-1)**k*binomial(100,k)*binomial(r-10001*k+99,99)*th(r-10001*k+99)
    a= a/binomial(r+99,r)
    return a

from timeit import default_timer as clock
time0 = clock()

s=0
for r in range(493701,506200):
    for k in range(0,101):
        s=s+ f(r,k)
time1 = clock()
print 'The result is'
print s
print 'computed in ', round(time1-time0,3), 'sec'


"""
Result:
0.0000000013060480365934635751811931267930306865307928

"""

mpmath is available in Ubuntu repository. Also one can write a C++ program using GMP: http://rextester.com/TGS53335 (this can be run only in a local computer with gmb installed and -lgmb library introduced to the compiler).

Gap can calculate to a fraction but cannot show the decimal representation.

$\endgroup$
6
  • 1
    $\begingroup$ Are you sure that is a limitation of GAP as opposed to something you just don't yet know how to do in GAP? I would bet on the latter. gap-system.org/Manuals/doc/ref/chap19.html $\endgroup$ Commented Sep 27, 2015 at 10:36
  • $\begingroup$ @DouglasZare give me a working code instead of broadcasting news about you bet on. There is a seemingly unofficial FUtil package for gap which may produce the result I did not test it. I have searched internet and used anything I found. If there anything else then I bet that gap with such poor documentation developed with such bad command formation does not deserve anyone's betting. $\endgroup$ Commented Sep 27, 2015 at 11:13
  • $\begingroup$ This is a site for the discussion of research level mathematics, not a site for the discussion of your problems with the documentation of a particular program or for you to demand that people give you working code. $\endgroup$ Commented Sep 27, 2015 at 15:43
  • $\begingroup$ @DouglasZare: Gap can show the decimal representation of a fraction. But it could not show the decimal representation of the question's calculation. If you have code that GAP has calculated and shown the decimal representation of the calculations above give the code. give the code. " I explained how you could do the calculation" really? where? You did not give me any calculating code in Gap or wolfram? did you? Just you informed me about what you felt about the question. $\endgroup$ Commented Sep 27, 2015 at 16:37
  • $\begingroup$ So I can bet that GAP, the version I have installed, is unable to show the decimal rep. If you give me a working code, which I no longer need, I will comment out that part in the answer. $\endgroup$ Commented Sep 27, 2015 at 23:23

Not the answer you're looking for? Browse other questions tagged .