concrete math for algorithm