Vladimir Bondarenko wrote:
> Cyber Tester announces that it will pay a prize of $1000 to
> the first public re****ter of a Mathematica 6 timing-depending
> defect.
> Timing[YourSolution] (* input #1 *)
> and
> YourSolution (* input #2 *)
> yield mathematically non-identical results, or one of the
> above inputs crashes Mathematica, or makes it running for
> an unreasonably long span of time like hours, or presents
> any Mathematica bug.
I have found what I think is a at least
a fraction of a solution :-) (I'm not that greedy).
There are several inputs such that
Timing[Inp] takes to compute about twice the time it takes
Inp. This is a curious discrepancy.
To measure the elapsed time I used both the linux "time" function
and the Mathematica TimeUsed[] function.
In every case I start a new session of Mathematica to avoid
chaching side-effects.
For example,
t = TimeUsed[];
Integrate[Sinc[E x+Pi] Exp[-x^2], {x, -Infinity, Infinity}]
TimeUsed[]-t
gives about 89 seconds, while
t = TimeUsed[];
Timing[Integrate[Sinc[E x+Pi] Exp[-x^2],{x,-Infinity,Infinity}]]
TimeUsed[]-t
took about 173 seconds to finish, and the time returned by
Timing is about 100 seconds.
If one has patience enough, then complicating a little
the function, like for example,
Integrate[Sinc[E x+Pi] Cos[Pi x/3+E] Exp[-x^2],{x,-Infinity,Infinity}]
increases the above running times of about 9 times.
giovanni


|