PS.4.MAA.4: Write an algorithm from a mathematical model