Oh sure, if you were trying to make retrieval more efficient, then certainly you do all sorts of indexing to improve on just searching the whole string. But I'm wondering about ways to pay more CPU in exchange for less pre-computed data, short of just calculating all the digits in the app. --Michael On Wed, Apr 9, 2014 at 8:26 AM, David Makin <makinmagic@tiscali.co.uk>wrote:
Obviously use even more memory and store the digits referenced by locations found - just for 0 to 9 or from 00 to 99 etc.
On 9 Apr 2014, at 03:40, Michael Kleber wrote:
Surely all funsters carrying smartphones in their pockets immediately see the need for the "Find this sequence of digits in pi" app available at http://fathom.info/pi.
This seems to be implemented in the obvious way: the app itself is 47.68 MB large, which is precisely what you would need to store 100,000,000 digits at two decimal digits in each byte. Loading and searching both take a while.
At the other end of the spectrum, the app could be tiny and just include an algorithm to generate the digits itself. It would end up quite slow, certainly. But for some trade-off between data transmission time and cpu speed, that would be the right implementation.
Are there any other interesting points on this trade-off curve? What might one want to do, other than pre-compute all or none of the digits?
--Michael
-- Forewarned is worth an octopus in the bush. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
The meaning and purpose of life is to give life purpose and meaning. The instigation of violence indicates a lack of spirituality.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Forewarned is worth an octopus in the bush.