# Saturday Leap and Sunday Push14

Posted by Ned Gulley,

As has become our custom, we will be running two mini-contests this weekend. The Saturday Leap prize goes to the person who makes the single biggest percent improvement for any entry with a submit time on Saturday, 16 April. Keep in mind that our times are registered against Universal Time; the time stamp on your submission is the thing that matters. The Sunday Push prize goes to the person who makes the biggest cumulative improvement for any number of submissions received on Sunday, 17 April.

Watch the statistics page for information showing who’s doing the best as the weekend progresses.

We will also be awarding a prize to the author of the best MATLAB Programming Contest Haiku. Whereas most of the contest is a purely objective competition that rewards steely logic and intellectual firepower, the Haiku Challenge judging will be completely subjective and arbitrary. It’s just a fun exercise for your neglected right brain. The prize is certain to be cheap. Submit your entries in the blog comments.

Have a great weekend!

### Note

Alan Chalker replied on : 1 of 14

So it was late last night and I misread the penultimate word in this entry as ‘code’ not ‘blog’ and posted a couple in the code comments. Here they are again:

The Matlab Contest:
Delightful and instructive
Thanks to The MathWorks!

Matlab Contest Pro
Nick Howe greets Daylight

The Prince of Darkness
Alfonso wins with two tries
Amazes us all

Coding and tweaking
Two different playing styles
Both have a function

Alan Chalker replied on : 2 of 14

I have calculated the
scoring formula

The score sums four parts
with special coefficients
changed for each contest

Part 1 is result
times k1 which is set to
.0025

Part 2 has k2:
divide 5 by 9000
to get it’s value

Multiply that by
an exponential: runtime
times k3’s value

k3 is equal
to 1 divided by 9
(seeing a pattern?)

For Part 3, k4
(with a value of 1) times
another factor

Which is either the
complexity minus ten
or zero (the min)

Finally Part 4:
Divide 1 by 900
(k5) times the nodes

Nick Howe replied on : 3 of 14

My wife Susannah has a haiku to share:

Oh no! Contest time.
I have lost my spouse again.
His mistress: MATLAB.

Alan Chalker replied on : 4 of 14

“Ditto for me”, said my wife
“Can’t wait for Wednesday”

Alan Chalker replied on : 5 of 14

“A Haiku Solver”
Entry 62029
by Alan Chalker

function board = ...
solver(words, weights, n, penalty)
count=ones(1);

line=ones(1);
len=cellfun('length',words);
done=0;

[vals,ord]=sort ...
(len); board=zeros(n);
col=ones(n);

while done==0
w=words{ord(count)};
word=length(w);

loc=col(line);
if word-1+loc ...
<= n

board(line,loc:loc+ ...
word-1) = w;
col(line)=loc;

col(line)=col ...
(line)+word+ones(1); else
done=1; end;

line=line+...
1; count=count+1;
if line>n

line=ones(1);
col=max(max(col))*...
ones(n,1); end; end;

Ned Gulley replied on : 6 of 14

I like the entries from the wives! Brilliant. Hmmm…

we should do contest
for puzzled spouses who watch

This haiku thing is dangerous. We could do haiku rules.

can’t resist tweaking
under many assumed names
I’m disqualified

Winners of the haiku challenge will be announced on Monday.

obsessive coding
endlessly optimizing

nathan q replied on : 7 of 14

encoded labour of love.
Submit. Drum F5.

Alan Chalker replied on : 8 of 14

Wednesday: Helen says
Darkness blinds us all

angst as errors revealed
Twilight lets us peek

Friday: weekend’s here
Best coder crowned by Ned
Daylight brings tweakers

Saturday is Leap
Hope nothing breaks on the site
while team is at home

Sunday queue backs up
Push rewards patient players
Spouses complain more

Monday: back to work
Can I sneak in some time for
the 1000 node challenge?

Tuesday: will their be
one last sub-contest for us?
Submissions slow down.

endgame strategy appears.
Queue closes. Good Luck!

Helen replied on : 9 of 14

A break from the game,
players turn to blog haiku,
to win a new prize from Ned!

Alan Chalker replied on : 10 of 14

Wish I could edit
penultimate paragraph –
replace “their” with “there”

P.S. – note to Helen
5,7,5 not 5,7,7
Haiku syllables

Thang replied on : 11 of 14

contest is hard
contest is fun
Darkness or daylight
Noone give up

Tweaking and cheating
Winners emerge!

And I am
an imaginary winner.
I congrats the real ones!

the cyclist replied on : 12 of 14

Darkness — theory? hope!
Twilight — struggle to compete
Daylight — tweak tweak tweak

the cyclist replied on : 13 of 14

Number Haiku tries
Alan Chalker flooding queue
Just like usual

oli replied on : 14 of 14

With my old Matlab,
Test suite refuses to run.
Sorry for spamming

Don’t know how to code
Just packaging people’s work
I’m a manager.