show/hide this revision's text 2 added a complexity reference.

Actually, this is a research level question, and here is what's known about it:

http://en.wikipedia.org/wiki/Partition_problem

EDIT If you read the wikipedia article, and follow the links, you will see that if the size of the elements is bounded (for example, by $10$) the problem can be solved using dynamic programming in $O(n^2)$ time, where $n$ is the number of "digits".

show/hide this revision's text 1

Actually, this is a research level question, and here is what's known about it:

http://en.wikipedia.org/wiki/Partition_problem