Determining Simplest Formula