Ranchers don't generally do homework for you, unless maybe for a fee that would let me retire tomorrow.
Are you stuck on the math algorithms? I'd just Google for those. Give it a shot and see if you can get something going!
[ August 02, 2007: Message edited by: Stan James ]