Skip to main content
RanneR's user avatar
RanneR's user avatar
RanneR's user avatar
RanneR
  • Member for 5 months
  • Last seen more than a month ago
  • Frankfurt, Germany
comment
Loading…
comment
Equal segmentation of a series of numbers
without pause statement using asymptote.ualberta.ca works fine
awarded
awarded
comment
Equal segmentation of a series of numbers
I'll follow up with more tests, but for now THIS IS THE SOLUTION. Thank you.
comment
Equal segmentation of a series of numbers
Hi @fedja, progress looks good. First I tried to run your program using asymptote.ualberta.ca unfortunately always timeout, also with small n and m. So I converted your program to JavaScript, looks currently more like Fortran, but seams to work. And the first results are very good. I have test data with n=60 and m=7 and can compare: Test 1: brute force Segments: [8, 8, 8, 9, 9, 10, 8], Mean: 11.096, Squarediff: 1.083, Stddev: 3.8 %, runtime 30.13 s Test 2: dyn prog (fedja) Segments: [8, 8, 8, 9, 9, 10, 8], Mean: 11.096, Squarediff: 1.083, Stddev: 3.8 %, runtime 222.1 ms
comment
Equal segmentation of a series of numbers
Hi @fedja, thank you very much for your comments and your answer. I have to read thoroughly, try to understand and compare results. So I'll need some time for that and then come back,
comment
Equal segmentation of a series of numbers
@fedja photo application behind: arrange n images with different aspect ratios $r_i$ in m stripes. All images within each stripe has same height, but the height of the stripes differ so that all stripes have same width.
comment
Equal segmentation of a series of numbers
@fedja typical number ranges are n<200, m<20
comment
Equal segmentation of a series of numbers
@GerryMyerson and fedja Thanks for your comments, I did some search on "n-ary search" finding a lot. On a first sight the examples look to me, that these are based on a sorted array (which is not the case in my problem). So does n-ary seach always need a sorted array? Or what are the mathematical keywords to improve my search?
awarded
Loading…