Ode to a matrix / Ode to a Haggis

Here is one of Iain Duff's favorite poems (and one of mine too), mangled into a sparse matrix theme. I wrote it for the 20th Anniversary meeting of CERFACS, in October 2007. A Haggis is a special Scots pudding, made of sheep's entrails, onions, and oatmeal, boiled in a sheep's stomach held together with a wooden pin. A reading of the Ode to a Haggis, by Robert Burns forms the centerpiece of a Burn's supper, which is a celebration of the poetry of Robert Burns.

Hover your mouse over a word to see its definition, or see below for a glossary of Scots and Sparse-Matrese.

If you like this poem, you can find more poems at Horror Matrices and Other Mathematical Poetry, and in particular, A Duffian Tale. Click here for an index of my serious poetry.


       
       
Ode to a Haggis, by Robert Burns         Ode to a matrix, by T. D.
MP3: Listen to John Cairney's rendition       MP3: Listen to my rendition

Fair fa' your honest, sonsie face,
Great chieftain o' the puddin-race !
Aboon them a' ye tak your place,
        Painch, tripe, or thairm:
Weel are ye wordy of a grace
        As lang 's my arm.

The groaning trencher there ye fill,
Your hurdies like a distant hill,
Your pin wad help to mend a mill
        In time o' need,
While thro' your pores the dews distil
        Like amber bead.

His knife see rustic Labour dight,
An' cut ye up wi' ready slight,
Trenching your gushing entrails bright,
        Like onie ditch;
And then, O what a glorious sight,
        Warm-reekin, rich !

Then, horn for horn, they stretch an' strive:
Deil tak the hindmost, on they drive.
Till a' their weel-swall'd kytes belyve
        Are bent like drums;
Then auld Guidman, maist like to rive,
        " Bethankit ! " hums.

Is there that owre his French ragout,
Or olio that wad staw a sow,
Or fricassee wad mak her spew
        Wi' perfect sconner,
Looks down wi' sneering, scornfu' view
        On sic a dinner ?

Poor devil ! see him owre his trash,
As feckless as a wither'd rash,
His spindle shank a guid whip-lash,
        His nieve a nit;
Thro' bluidy flood or field to dash,
        O how unfit !

But mark the Rustic, haggis-fed,
The trembling earth resounds his tread,
Clap in his walie nieve a blade,
        He'll make it whissle ;
An' legs, an' arms, an' heads will sned
        Like taps o' thrissle.

Ye Pow'rs, wha mak mankind your care,
And dish them out their bill o' fare,
Auld Scotland wants nae skinking ware.
        That jaups in luggies ;
But, if ye wish her gratefu' prayer,
        Gie her a Haggis !

     
Fair fa' your sparsest frontal mats,
Great chieftain o' the matrix-ranks !
Aboon them a' ye tak your fill,
        Permute, factor, tril.
Weel are ye wordy of an ode
        As lang 's Duff's code.

The groaning memory there ye fill,
Your cliques 's like a huge frontil,
Your pinv wad help find rank until
        Iain's code ye need,
While thro' your cores diags distil
        Like Iain's beard.

His multifrontal knife ye slice,
An' cut ye up wi' factors slight,
Trenching solution with a quite
        tidy resid;
And then, O what a glorious sight,
        Low-condest, did!

Then, row or col, they scale an' strive:
Deil tak the pivots, on they drive.
Till a' their weel-swall K-Bytes be live
        and filled wi' ones;
Then LU man, maist like to rive,
        " Befactared! ", hums.

Is there that owre his chol skyline,
Or LLT that wad stall pipeline,
Or factorize wad mak her fill
        Wi' awful order,
Looks down wi' sneering, scornfu' view
        On sic a coder ?

Poor devil ! collectin' all his trash,
As malloc'd, free'd a bit too rash,
Disk spindle head a guid whip-lash,
        His page got hit;
Thro' pagin' flood or mem to thrash,
        O cache unfit !

But mark the Rustic, Fortran-fed,
The trembling code resounds and sped,
Clap in his MATLAB, sparse backslash,
        He'll make it whissle ;
An' fors, an' whiles, an' ifs ran fast
        Like HSL.

Ye users wha mak matrix your care,
And dish them out to be facta'red,
Auld Scotland wants nae skinking tar,
        gzip'ed, in C ;
But, if ye wish her gratefu' prayer,
        Gie her HSL !


 

 

 

 

 

Glossary of the Scots dialect:

a' all
aboon above
an' and
auld old
belyve by-and-by, after a short while
bethankit pray of thanks after a meal
bill o' fare daily meals
bluidy bloody
Deil devil
dight to wipe
fa' fall
fricasse meat cut into pieces in a gravy
gie give
grace prayer
gratefu' grateful
guid good
Guidman husband (literally, goodman)
haggis sheep's entrails, onions, and oatmeal, boiled in a sheep's stomach
horn-for-horn "horn" is a spoon made of horn
hurdies buttocks, loins
jaups splashes
kytes bellies
luggies a small wooden dish with a handle
maist most
mak make
nae no
nieve fist
nit nut (something small)
olio Italian, olive oil
onie any
o' of
owre over
painch paunch, belly
pin used to hold a haggis closed
Pow'rs powers
puddin pudding
reekin reeking, smoking
rive to be split, to burst
rustic someone from the country-side
sconner loathing
scornfu' scornful
sic such
skinking watery
sned to lop, to cut
sonsie pleasant, good-natured
sow female pig
spindle shank
staw to disgust
swall'd swollen, swelled
tak take
taps tops
thairm intensine
thrissle thistle, a thorny plant, a weed
thro' through
trencher cutting-board
trenching cutting
tripe stomach lining
wad would
walie ample, large, robust
ware product (as in the ware the warehouse)
weel well
wha who
wi' with
ye you

Glossary of the Sparse-Matrese dialect:

LU man Iain Duff, who else ... ?
backslash x=A\b in MATLAB solves the linear system A*x=b
befactored factorized
cache small memory where the CPU keeps its intermediate results
chol Cholesky factorization
clique a completely connected subgraph
col a column of a matrix (or a pivot column)
collectin' garbage collection reclaims memory no longer needed by a program
condest condition estimation; requires a factorization first
C the C programming language
diags diagonals of a matrix
disk spindle head   the read/write head of a hard disk (poetic license here...)
facta'red factored; but rhymes with 'aired' (poetic license...)
factor factorize a matrix into the product of two or more factors
fill fill-in; introduction of new nonzeros during factorization
for a 'for' loop statement, in C, MATLAB, ('do' in Fortran)
Fortran the Fortran programming language
free free memory allocated by malloc (in C)
frontil frontal matrix; a clique in the graph of the matrix
gzip a file compression method
hit when a referenced page is in memory
HSL formerly the Harwell Subroutine Library
if an 'if' conditional statement in C, MATLAB, and Fortran
K-Bytes Kilobytes; one KB is 1024 Bytes, a measure of memory size
LLT a Cholesky factorization (A=LLT)
LU an LU factorization (A=L*U)
malloc allocating memory (in C)
MATLAB a matrix programming environment and language, by The MathWorks
mat matrix
mem memory
mulitfrontal a method that factorizes a matrix using more than one frontal matrix
order see permute
page a chunk of virtual memory, on disk or in main memory
paging bringing pages into memory from disk, or visa versa
permute reordering the rows and columns to reduce fill-in
pinv pseudo-inverse
pipeline stall an empty slot in the CPU instruction execution process
pivot a diagonal entry of the factor U (for example)
rank number of linearly independing rows or columns
resid residual; the vector r=Ax-b, zero if x is the solution to Ax=b
row a row of a matrix (or a pivot row)
skyline entries between the diagonal topmost nonzero in each column
solution the solution to the linear system Ax=b
sparse mostly zero
tar a file containing an archive, or the method used to create it
thrash memory contention, when paging is excessive
while a 'while' loop statement in C, MATLAB, and Fortran