How did the practical needs of the ancient egyptians tie in to their development of sophisticated scientific and mathematical concepts?