How can I remove the repeat solution of 24 points game?

Hi all,

I made a program that can obtain all the solutions of four numbers ranging from 1 to 13, but there are always repeat solutions such as:

(3+(3/7))*7
((3/7)+3)*7
7*(3+(3/7))
7*((3/7)+3)

Is there any good idea to remove the redundant combinations?
It's not hard to tell (write a function which can tell) that all of those are the same.
Do post your algorithm though. There may be ways better than filtering the results.
Topic archived. No new replies allowed.