in reply to Odd number of elements error

Odd number of elements in hash assignment at ...

Ever mindful of the ambiguity of "odd", I always laugh whenever I see this error. My mind drifts back to (circa) 1969 ... Deniliquin High School, Remedial Maths (Donald Firth, the presiding teacher):

Mr. Firth: Here's the problem. We have 18 horses, and 5 stalls ... we have to house those 18 horses in the 5 stalls in such a way that there is at least one horse in each stall, and there is an odd number of horses in each stall.

Young syphilis: Can't be done, Sir. We put one horse in each stall (to satisfy the first requirement) ... that leaves 13 horses to be accommodated. They have to be accommodated in multiples of 2 (to preserve the oddness). No matter how we do that there will always be an odd number of horses left over which, when assigned to a particular stall, will mean there's an even number of horses in that stall.

Mr. Firth: Not so, young syphilis, we merely put one horse in each of the first 4 stalls and 14 horses in the 5th stall.

Young syphilis: But Sir ... 14 is not an odd number !!

Mr. Firth: Au contraire, young syphilis ... "14" is a very odd number of horses to be housed in the one stall !!

Never argue with a Maths Teacher.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Odd number of elements error
by dsheroh (Monsignor) on Jul 15, 2007 at 17:08 UTC
    Along similar lines:

    $ fortune -m "Alexander the Great"
    (science)
    %
    (1) Alexander the Great was a great general.
    (2) Great generals are forewarned.
    (3) Forewarned is forearmed.
    (4) Four is an even number.
    (5) Four is certainly an odd number of arms for a man to have.
    (6) The only number that is both even and odd is infinity.

    Therefore, Alexander the Great had an infinite number of arms.
    %

Re^2: Odd number of elements error
by wazoox (Prior) on Jul 15, 2007 at 16:38 UTC
    Young syphilis, despite off-topic this is an excellent story :)
Re^2: Odd number of elements error
by wazoox (Prior) on Jul 15, 2007 at 16:38 UTC
    Young syphilis, despite it's off-topic this is an excellent story :)