I'm writing some children's Math Education software for a class.

I'm going to try and present problems to students of varying skill level with randomly generated math problems of different types in fun ways.

One of the frustrations of using computer based math software is its rigidity. If anyone has taken an online Math class, you'll know all about the frustration of taking an online quiz and having your correct answer thrown out because your problem isn't exactly formatted in their form or some weird spacing issue.

So, originally I thought, "I know! I'll use an expression parser on the answer box so I'll be able to evaluate anything they enter and even if it isn't in the same form I'll be able to check if it is the same answer." So I fire up my IDE and start implementing the [Shunting Yard Algorithm.](http://en.wikipedia.org/wiki/Shunting_yard_algorithm)

This would solve the problem of it not taking fractions in the smallest form and other issues.

However, It then hit me that a tricky student would simply be able to enter most of the problems into the answer box and my expression parser would dutifully parse and evaluate it to the correct answer!

So, should I not be using an expression parser in this instance? Do I really have to generate a single form of the answer and do a string comparison?