MATLAB Programming Contest Blog

April 12th, 2006

Tuesday Leap Winner

Markus is the winner of our Tuesday Leap challenge. His entry, submitted at 9:31AM, made the single biggest improvement to the top score.

Meanwhile, David Jones has been pushing the timeout and coming up with a best result of 82058 (85008 is the current leader’s result), showing there’s plenty of room for further improvement if you can find a way to compute it efficiently. The timing penalty grows exponentially, but the “secret” constants are tuned so that it is quite flat below a certain threshold. (Has anyone back-calculated these contents yet?) Of course, the leading entries tend to gravitatate to elbow. The “results vs. time tradeoff” plot at the bottom of the Statistics show this in action.

3 Responses to “Tuesday Leap Winner”

  1. Alan Chalker replied on :

    Constants are:
    k1 = 0.01
    k2 = 0.001
    k3 = 0.125

  2. Alan Chalker replied on :

    Interestingly, the ‘elbow’ is somewhere in the 75 - 95 second range, depending upon how you define it. The curve is flat until 60-65 seconds, which means the current leading entries with 60-61 seconds are right at the point where any additonal time gain has to be offset by result reductions.

    At the current point in the curve with ~85000 as the result and ~61 seconds time, each point taken off the result equals ~0.05s of extra time allowed for computation.

    Since the tweakers are steadily pushing the time down by tenths of a second, they are probably on the right path unless some major algorithm change occurs that drops a lot of points off the result. I suspect, unfortunately, the contest is going to come down to whomever gets a ‘lucky’ break in the timing variation between 5 and 10PM tonight since the queue will probably be spammed this afternoon.

  3. Alan Chalker replied on :

    I stand a bit corrected. Just as I was composing that last note, an algorithm improvement bumped the results down 677 points, while increasing the time by only 10s. Perhaps there is hope yet for the spirit of collaboration.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


The MATLAB Programming Contest is a semi-annual competition where contestants submit MATLAB code to try to solve a challenge. For more information, see the overview.
  • gopal: This is a try
  • Amtu: Well done Alfonso ! Congratulations ! Thanks MATLAB team, I’m already looking forward to the next time.
  • Alan Chalker: Just wanted to post here as well that I think Alfonso should be declared the grand winner since the top...
  • Alan Chalker: Just noticed something curious on the statistics page. While some of the charts are updating correctly,...
  • Ned: To Oliver: There will not be a late stage twilight in this contest. So it’s full daylight right to the end.
  • Oliver Woodford: Much obliged, Mike. For anyone looking for a speed boost to that approach I recommend “Basic...
  • MikeR: I agree with Oliver that if possible making the final few hours of the contest conceal the entries will be...
  • Oliver Woodford: When does late stage twilight begin, and will it then run on until the end of the contest?
  • Alan Chalker: As I traditionally do about this time in the contest, I’ve submitted a heavily commented version...
  • the cyclist: Looks like there might be a problem with the statistics page. For one thing, Alan Chalker holds all 20...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.