  Graph labellings have been a very fruitful area of research in the last four
decades. However, despite the staggering number of papers published in the
field (over 1000), few general results are available, and most papers deal with
particular classes of graphs and methods. Here we approach the problem from the
computational viewpoint, and in a quite general way. We present the existence
problem of a particular labelling as a combinatorial optimization problem, then
we discuss the possible strategies to solve it, and finally we present a
heuristic for finding different classes of labellings, like vertex-, edge-, or
face-magic, and $(a, d)$-antimagic $(v, e, f)$-labellings. The algorithm has
been implemented in C++ and MATLAB, and with its aid we have been able to
derive new results for some classes of graphs, in particular, vertex-antimagic
edge labellings for small graphs of the type $P_2^r \times P_3^s$, for which no
general construction is known so far.
