mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2019-12-06, 12:44   #12
Dieter
 
Oct 2017

89 Posts
Default

Quote:
Originally Posted by LaurV View Post
Well, you are right, and I was a bit stupid, haha... Of course, if you have 61 values, you add them and divide the result by 61. If you have 89, you add them and divide the result by 89. If you have M82589933 values, you add them and divide the result by M82589933. When you integrate, that is how those little rectangles work... Grrr...


However, we solved this puzzle already, after half hour of playing with MS Excel, with a much smaller epsilon than the required one. It is quite simple, if you consider two things, starting from the mentioned theorem, you need to find the largest degree polynomial that you can write down with 15 operations (no powering, you must write x^n as x*x*x... n times, hehe) and then one of the two things that you have to consider is the fact that the function is symmetric in x therefore you can double the degree of the polynomial, and yet use the same amount of operations, and the second one, you will find by yourself... hehe...
I don‘t know if it is allowed to write
y=x*x, f(x)=(a*y+b)*y+...,
because we have to find „ an expression with no more than 15 operations ...“.
In my understanding it has to be one expression (ein geschlossener Ausdruck).
Dieter is offline   Reply With Quote
Old 2019-12-06, 16:43   #13
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

66478 Posts
Default

I have submitted a solution to the December 2019 "Ponder This."
Dr Sardonicus is offline   Reply With Quote
Old 2019-12-06, 20:03   #14
what
 
Dec 2019
Kansas

24 Posts
Default

So brackets are not allowed, ex. x*(5*x+2) would have to be written as 5*x*x+2*x?

Last fiddled with by what on 2019-12-06 at 20:14
what is offline   Reply With Quote
Old 2019-12-06, 20:46   #15
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

2·3·13·43 Posts
Default

Quote:
Originally Posted by what View Post
So brackets are not allowed, ex. x*(5*x+2) would have to be written as 5*x*x+2*x?
I think parentheses are allowed, but not separate sections. Their example has parentheses, but is a single expression.
EdH is online now   Reply With Quote
Old 2019-12-06, 23:47   #16
what
 
Dec 2019
Kansas

24 Posts
Default

so far I got 0.0005108359660008244 with 11 operations using fourier approximation with some tweaking. I think i need a different approach

Last fiddled with by what on 2019-12-06 at 23:55
what is offline   Reply With Quote
Old 2019-12-07, 02:35   #17
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

19×461 Posts
Default

Nobody said anything about separate expressions.
Of course, you have to write everything in one expression, y=f(x), where you expand f.

Parenthesis are allowed, see their example.
LaurV is offline   Reply With Quote
Old 2019-12-07, 02:45   #18
what
 
Dec 2019
Kansas

100002 Posts
Default

Quote:
Originally Posted by LaurV View Post
Well, you are right, and I was a bit stupid, haha... Of course, if you have 61 values, you add them and divide the result by 61. If you have 89, you add them and divide the result by 89. If you have M82589933 values, you add them and divide the result by M82589933. When you integrate, that is how those little rectangles work... Grrr...


However, we solved this puzzle already, after half hour of playing with MS Excel, with a much smaller epsilon than the required one. It is quite simple, if you consider two things, starting from the mentioned theorem, you need to find the largest degree polynomial that you can write down with 15 operations (no powering, you must write x^n as x*x*x... n times, hehe) and then one of the two things that you have to consider is the fact that the function is symmetric in x therefore you can double the degree of the polynomial, and yet use the same amount of operations, and the second one, you will find by yourself... hehe...
"therefore you can double the degree of the polynomial, and yet use the same amount of operations"
how do you do so?

Last fiddled with by what on 2019-12-07 at 02:46
what is offline   Reply With Quote
Old 2019-12-07, 04:59   #19
what
 
Dec 2019
Kansas

24 Posts
Default

Quote:
Originally Posted by what View Post
"therefore you can double the degree of the polynomial, and yet use the same amount of operations"
how do you do so?
nevermind its easy. I wasnt thinking
what is offline   Reply With Quote
Old 2019-12-08, 01:05   #20
matzetoni
 
matzetoni's Avatar
 
Feb 2019

73 Posts
Default

I chose a non-polynomial approach and got a MSE of 1.4107e-05 with 11 operations by optimizing coefficients of the ansatz function.
matzetoni is offline   Reply With Quote
Old 2019-12-11, 04:54   #21
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

19·461 Posts
Default

I may be able to prove that the best you can do in such a way that all constants that you use are integers that fit in 16-bit word (two's complement. i.e. from -32768 to +32767), is about 2.3e-5 (which is a viable solution) regardless of arrangement of operations.

Last fiddled with by LaurV on 2019-12-11 at 04:55
LaurV is offline   Reply With Quote
Old 2019-12-13, 22:41   #22
Max0526
 
"Max"
Jun 2016
Toronto

701 Posts
Default

Nine operations did it for me (plot 1). I sent the solution yesterday. The coefficients were decimal though. The plot goes off beyond [-1, 1] of course (plot 2).
The fifteen operations produce the MSE ten times better than expected (plot 3).
Attached Thumbnails
Click image for larger version

Name:	plot.png
Views:	106
Size:	70.1 KB
ID:	21431   Click image for larger version

Name:	plot2.png
Views:	86
Size:	70.5 KB
ID:	21432   Click image for larger version

Name:	plot3.png
Views:	160
Size:	77.0 KB
ID:	21433  

Last fiddled with by Max0526 on 2019-12-13 at 22:52 Reason: added two more plots
Max0526 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
December 2018 Xyzzy Puzzles 6 2019-01-06 23:07
December 2017 Batalov Puzzles 4 2018-01-04 04:33
December 2016 Xyzzy Puzzles 11 2017-01-24 12:27
December 2015 Xyzzy Puzzles 15 2016-01-06 10:23
December 2014 Xyzzy Puzzles 13 2015-01-02 19:41

All times are UTC. The time now is 16:37.

Wed Sep 30 16:37:16 UTC 2020 up 20 days, 13:48, 0 users, load averages: 1.51, 1.78, 1.80

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.