且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要帮助理解算法的感应证明的解释

更新时间:2023-11-24 08:49:04

归纳仅适用于以*开头的整数,所以即使作者没有对正在使用的数字做任何其他陈述,也可以假设一切都完全在整数领域。



此外,如果计算导致非整数值,则非整数部分被切断,而不是舍入。这是标准整数数学:5/2 = 2(加上余数)



在这些假设下,m + 1/2被解释为m。



*:更准确地说,感应适用于任何有序和可数的集合(甚至可数无限),但除非另有说明,否则暗示总是一组整数。 br $> b $ b



在旁注中,我发现作者选择不清楚是不幸的。感应不是一个简单的解释方法,它不会在示例中不必要地引入绊脚石。
Induction only works on whole numbers to start with*, so even if the author didn't make any other statement as to the numbers being used, it's reasonable to assume everything is completely in the realm of integers.

Also, in case of calculations resulting in non-integral value, the non-integral part is cut off, not rounded. This is standard integer mathematics: 5/2 = 2 (plus remainder)

Under these assumptions, m+1/2 is interpreted as m.

*: to be more precise, induction works on any set that is ordered and countable (even countably infinite), but the implication is always the set of whole numbers, unless stated otherwise.


On a sidenote, I find it unfortunate that the author chose not to be clearer. Induction is not a trivial method to explain, it doesn't help to needlessly introduce tripping stones in the example(s).