## patdistheman 2 years ago B is generated from the formula below. B = roundeddown((H + 1) / 10)) The following table shows that when H = 150 that B = 15. Without knowing the formula in advance how do you use just the information in the table to determine the formula? 150 15 165 16 181 18 199 20 219 22 241 24 265 26 291 29 320 32 352 35 387 38 425 42 467 46 513 51 564 56 620 62 682 68 750 75 825 82 907 90

1. wio

What do we get to assume? That the function uses rounding and is linear?

2. patdistheman

Well what would be ideal is to not be able to assume anything look at the table and generate the formula listed above which predicts future outcomes.

3. campbell_st

this is called a floor function that rounds down to an integer value. The graph is a step function or piece wise function. Someone asked the other day about ceiling functions that I'd not heard of... I looked it up and its and found out about floor and ceiling functions. the notation is something like |dw:1356938017922:dw| so if you put in a value of H say 155 you get (155 +1)/10 = 15 when rounded down. thats about all I know on these things

4. patdistheman

I am trying to determine how to go from the table of numbers to the formula but any information that you could provide is appreciated. Thank You.

5. campbell_st

look up floor function it may help

6. patdistheman

The floor function rounds the number down. I do not see the connection to determining the formula from the table of data.

7. sauravshakya

B= roundeddown((H+2)/10) will also generate the same table

8. sauravshakya

So, from the given table u cannot find a uniqe formula

9. patdistheman

It stands to reason that if the formula generates the table that if you have a sufficient amount of the table results there must be way of determining the formula. However based on the fact that no on here has been able to answer this question in quite some time it may not be a universal math formula that can used to get the solution.

10. LogicalApple

I can only think of recursive approaches to this, but no useful formula. This is an interesting problem.

11. patdistheman

It appears it would have to be recursive due to the way that b relies on the value of h...

12. LogicalApple

I wrote a java application for it the other day but the recursion was too much to calculate. I couldn't get to the 100th cycle.

13. patdistheman

Interesting...

14. LogicalApple

If anyone can generate a straightforward formula for this I would love to see it!

15. patdistheman

I would be willing to put some prize money... lol

16. wio

The thing is, there are multiple solutions to the problem. In fact you could make a continuous polynomial to perfectly match the data.

17. wio

That is why any program that makes up a best fit curve will ask you to at least narrow it down to a distribution (linear, quadratic, power, exponential, etc).

18. wio

@LogicalApple Did you use any memoization/caching, or did it have to do redundant recursive calls?

19. LogicalApple

If you could determine THAT equation based on the output, then you must be privy to some mathematical enigma that eludes the rest of it. @wio said there are so many solutions to this...but the original equation here uses a floor function... that makes determining an equation even harder.

20. LogicalApple

No caching just plain recursion. I once tried to program an Ackermann function ...

21. patdistheman

If you type in the pattern into wolfram alpha with fit in front of it... For example... fit (0,0) (1,5) (2,10) (3,15) it will generate the formula for you but I do not think this formula matches any of those criteria. (linear, quadratic, power or exponential)

22. wio

23. patdistheman

Of what wolfram alpha?

24. patdistheman
25. wio

yeah, wolfram alpha coming up with a formula that has a floor function.

26. patdistheman

I did not reference wolframalpha and a floor function. Just the results of punching fit (0,0) (1,5) (2,10) (3,15) into wolframalpha.

27. wio

ah, I see.

28. patdistheman

Although yuo can use the floor function on wolframalpha... http://www.wolframalpha.com/input/?i=floor+9.11

29. wio

Right, what wolfram does is just tries out multiple distributions and gives you the most reasonable ones.