Who was the inventor of Utility function? To my knowledge, the idea of representing weak-order with a function dates back to Cantor. So my questions are: 

1) Was Cantor the first person to rigorize these kinds of representation? 

2) Were there anyone in the ancient world who (though not rigorously) developed the idea of representing social choice or preference by a function?
Not to be too obvious about it, but couldn't you just say Jeremy Bentham? The calculus of choosing bundles that maximizes pleasure specified a very simple utility function in words.