Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.theory |
| Subject | Re: Fiting squares under a curve. |
| Date | 2021-09-17 20:59 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87a6kbc6sz.fsf@bsb.me.uk> (permalink) |
| References | (4 earlier) <d57c2f56-04fe-4e6d-b682-7472d477c01dn@googlegroups.com> <87y27xe7nj.fsf@bsb.me.uk> <1d92eb66-4403-44b5-b97b-6f5afa4e18d8n@googlegroups.com> <87fsu3cp5f.fsf@bsb.me.uk> <si2c18$1odo$1@gioia.aioe.org> |
Andy Walker <anw@cuboid.co.uk> writes:
> On 17/09/2021 14:22, Ben Bacarisse wrote:
>> *Main> error_of_i int_id [0, 1/3, 1]
>> 5.5555555555555663e-2
>> *Main> error_of_i int_id [0, 1/9, 1/3, 1]
>> 6.17283950617295e-3
> [...]
>> But the progression above immediately suggests we should try:
>> *Main> error_of_i int_id [0, 1/27, 1/9, 1/3, 1]
>> 6.858710562415376e-4
>> which is indeed a better fit, [...]
>
> I'm still confused by the problem, by Malcolm's description
> of it, and by Ben's Haskell! But in the case f(x) == x, perhaps
> worth noting that the situation with N tiles with the last starting
> at X consists of the problem with N-1 tiles scaled by a factor X,
> together with the last tile.
That's a good observation. I was too caught up in investigating
numerical solutions to look at the bigger picture.
> So the error with N tiles is
>
> E[N] == X^2 E[N-1] + { error with tile size 1-X between X and 1 } ,
>
> which is more-or-less quadratic in X [somewhat confused by the mod
> in the error term], and so can be solved by "easy" calculus/algebra.
> If indeed X == 1/3 is correct for all N, then it follows immediately
> that the general solution is of form
>
> [0, ..., 1/81, 1/27, 1/9, 1/3, 1] ,
>
> and each extra tile is taking away 8/9 of the error. Formal proof
> and details left as an exercise ....
It seemed clear that for simple functions an optimal solution could be
obtained by algebra but it did not seem worth the effort to look, partly
because I don't know what kinds of functions Malcolm wants solutions
for.
--
Ben.
Back to comp.theory | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 06:59 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-15 15:17 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 08:06 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-15 22:33 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-15 15:01 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-16 00:33 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-17 03:25 -0700
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-17 14:22 +0100
Re: Fiting squares under a curve. Andy Walker <anw@cuboid.co.uk> - 2021-09-17 16:25 +0100
Re: Fiting squares under a curve. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-17 20:59 +0100
Re: Fiting squares under a curve. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-09-23 02:14 -0700
csiph-web