Timeline for Compute the most efficient binary function
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 22, 2017 at 4:13 | vote | accept | isaacg | ||
Mar 21, 2017 at 22:42 | answer | added | orlp | timeline score: 6 | |
Mar 21, 2017 at 21:18 | comment | added | orlp |
Actually, the approach from my previous comment doesn't work. ((0, (0, (0, 0))), 0) is lexicographically smaller than (((0, 0), 0), (0, 0)) , however the latter has a smaller left hand side.
|
|
Mar 21, 2017 at 19:24 | answer | added | halfflat | timeline score: 6 | |
Mar 21, 2017 at 7:37 | comment | added | orlp | Alright, so I don't think it'd make a good golfed answer, but what you can do to make it reasonably efficient is repeatedly subtract Catalan numbers from the function arguments until they're smaller than the next Catalan number. Then you've found the length of their expressions. Then you can use the ranking/unranking functions from this paper, with modification, to calculate the result. Perhaps after doing all that it's possible to 'cancel out' bits of code in the middle and find a reasonably elegant solution. | |
Mar 20, 2017 at 22:28 | answer | added | orlp | timeline score: 5 | |
Mar 20, 2017 at 18:36 | comment | added | orlp | This is the first challenge in a while that puzzles me somewhat to calculate efficiently. I believe something is possible with Catalan numbers, but can't immediately think of a solution. Hmm... | |
Mar 20, 2017 at 17:22 | comment | added | kennytm | Looks similar to A072766, but differs starting from f(3, 1). | |
Mar 20, 2017 at 14:37 | history | tweeted | twitter.com/StackCodeGolf/status/843833843144691712 | ||
Mar 20, 2017 at 8:58 | history | edited | Martin Ender | CC BY-SA 3.0 |
s/equation/expression/g
|
Mar 20, 2017 at 6:54 | history | edited | isaacg | CC BY-SA 3.0 |
deleted 130 characters in body
|
Mar 20, 2017 at 4:39 | history | asked | isaacg | CC BY-SA 3.0 |