Imagine that a CEO of a large company wants to know how many people work for him. One option is to spend a tremendous amount of personal effort counting up the number of people on the payroll. However, the CEO has other more important things to do, and so implements another, more clever, option. At the next meeting with his department directors, he asks everyone to tell him at the next meeting how many people work for them. Each director then meets with all their managers, who subsequently meet with their supervisors who perform the same task. The supervisors know how many people work under them and readily report this information back to their managers (plus one to count themselves), who relay the aggregated information to the department directors, who relay the relevant information to the CEO. In this way, the CEO accomplishes a difficult task (for himself) by delegating similar, but simpler, tasks to his subordinates.This method of solving difficult problems by breaking them up into simpler problems is naturally modeled by recursive relationships, which are the topic of this chapter and form the basis of important engineering problem solving techniques. By the end of this chapter, you should be able to recognize recursive relationships and program them using recursive functions.
学豆不足请充值：充值 开通VIP全站课程免学豆下载：开通VIP QQ:2659147209