求递归调用运行的时间c语言,递归调用(c语言)(Recursive call (C language)).doc

递归调用(c语言)(Recursive call (C language))

递归调用(c语言)(Recursive call (C language))

Recursive call - mathematical view of recursionWhen I think of college, recursive calls have been such a headache. I've been teaching for nearly two years now, and I've got a clearer idea of recursion

Mathematics inside recursion, called recursion, is actually a recursive relationship. There is very typical of middle school mathematics is actually the practice of recursive part, but the teachers are not how to expand, new curriculum standards for the second chapter five series should be the concept of our first contact recursion.

In fact, when it comes to recursion, everybody knows that you're tuning yourself up, and that's what you all know, but how do you adjust it? How to control? And how do you see what you want? Believe or very dizzy, the following from middle school mathematics inside to have a look

The first part, two typical examples, arithmetic and geometric series

In fact, this is actually an example of teaching I often ask students: "what is the arithmetic progression?" Of course, the students will answer: "the latter is always more than the previous one, the number remains the same..." and some say: "the latter is minus the former as a constant."..."

So we often use expressions to represent

A (n) =a (n-1) +d

TeX syntax for

\[a_n=a_{n-1}+d\]

That's another problem. Is there a sequence here? Of course not, I said, the latter is 2 more than the previous one. What's the sequence?

Is it 1,3,5,7,9, or 2,4,6,8,10?,...

Of course, I don't know. Why? Since the series we are talking about needs to have a first item, that is, the value of the first item, so when it comes to the recursive sequence, there should be two elements, one is the relation between successive items, and the other is the first relation

Then you can use the superposition method to calculate:

Suppose the first item here is 1, that is, a (1) =1, and this constant is 2

that

A (n) =a (n-1) +2

A (n-1) =a (n-2) +2

A (n-2) =a (n-3) +2

A (n-3) =a (n-4) +2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值