《Programming Abstractions In C》学习第58天,p166-p175总结。

一、技术总结

1.斐波那契数列(Fibonacci Sequenc)

(1)斐波那契数列来源

斐波那契数列来自于《Liber Abaci》一书里兔子繁殖问题,相关资料很多,这里不赘述。

(2)关于《Liber Abaci》一书

《Liber Abaci》——Liber:a book(意思是“书”);Abaci:abacus的复数形式(意思是“算盘”)。

根据Laurence Sigler《Fibonacci’s Liber Abaci: A Translation into Modern English of Leonardo Pisano’s Book of Calculation》一书第9页内容“One should here again make the point, that while derived from the word abacus the word abaci refers in the thirteenth century paradoxically to calculation without the abacus. Thus Liber abaci should not be translated as The Book of the Abacus......”在13世纪, abaci是指直接使用印度数字(Hindu numerals),而不用“算盘”进行计算。所以,这本书恰当的中文译名应该是《计算之书》(The Book of Calculation,注:纪志刚翻译的中文版用的就是这个名字)。

(3)关于“斐波那契”这个名字

既然称为斐波那契数列,那么作者的名字是否叫斐波那契?根据百科说法是:Liber Abaci is a historic 1202 Latin manuscript on arithmetic by Leonardo of Pisa, posthumously known as Fibonacci。Fibonacci是“filius Bonacci”,即“son of Bonacci”(波那契之子)。参考Keith Devlin所著《The Man of Numbers: Fibonacci's Arithmetic Revolution》一书)。

2.递推关系(recurrence realtion)

p173:

tn = tn-1 + tn-2

An expression of this type, in which each element of a sequence is defined in terms of earlier elements, is called a recurrence relation。

3.斐波那契序列的C语言实现

/*
* File: fib.c
* -----------
* This program lists the terms in the Fibonacci sequence with
* indices ranging from MinIndex to MaxIndex
*/ #include <stdio.h>
#include "genlib.h" /* Constants */
#define MinIndex 0
#define MaxIndex 12 /* private function prototype */
int Fib(int n); /* Main program */ int main() {
int i; printf("This program lists the Fibonacci sequence.\n");
for (i = MinIndex; i < MaxIndex; i++) {
printf("Fib(%d)", i);
if (i < 10) { // 打印对齐
printf(" ");
}
printf(" = %4d\n", Fib(i));
}
return 0;
} /*
* Function: Fib
* Usage: t = Fib(n)
* -----------------
* This function returns the nth term in the Fibonacci sequence
* using a recursive implementation of the recurrence relation
*
* Fib(n) = Fib(n - 1) + Fib(n - 2)
*/ int Fib(int n) {
if (n < 2) {
return n;
} else {
return (Fib(n - 1) + Fib(n - 2));
}
}

二、英语总结

1.suspcious什么意思?

答:

(1)suspicious < suspicion:adj. feel doubt or not trust(可疑的)。 语法结构:be suspicious of。

(2)suspicion < suspect:c/u.

(3)suspect: vt. sub-("up to") + *spek-("to observe"),The notion behind the word is "look at secretly," hence, "look at distrustfully"(怀疑)。

2.supersede是什么意思?

答:p168,The frame for Fact temporarily supersedes the frame for Main。vt. super-(above) + *sed-(to sit),即“displace, replace”之意。

3.essence是什么意思?

答:u. the basic or most import quality of sth(本质、核心)。示例:p174, The essence of recursion is to break problems down into simpler ones that can be solved by calls to exactly the same function。形容词格式:essential。之前老是不记得essential是什么意思,这里对比着来记。

三、参考资料

1. 编程

(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414

2. 英语

(1)Etymology Dictionary:https://www.etymonline.com

(2) Cambridage Dictionary:https://dictionary.cambridge.org

欢迎搜索及关注:编程人(a_codists)

Programming abstractions in C阅读笔记:p166-p175的更多相关文章

  1. Mongodb Manual阅读笔记:CH3 数据模型(Data Models)

    3数据模型(Data Models) Mongodb Manual阅读笔记:CH2 Mongodb CRUD 操作Mongodb Manual阅读笔记:CH3 数据模型(Data Models)Mon ...

  2. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画 学习目标 熟悉蒙皮动画的术语: 学习网格层级变换 ...

  3. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试 代码工程地址: https://github.co ...

  4. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制 代码工程地址: https://gi ...

  5. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化 学习目标 对Direct 3D编程在 ...

  6. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数 学习目标: 理解矩阵和与它相关的运算: 理解矩阵的乘 ...

  7. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数 学习目标: 学习如何使用几何学和数字描述 Vecto ...

  8. 阅读笔记 1 火球 UML大战需求分析

    伴随着七天国庆的结束,紧张的学习生活也开始了,首先声明,阅读笔记随着我不断地阅读进度会慢慢更新,而不是一次性的写完,所以会重复的编辑.对于我选的这本   <火球 UML大战需求分析>,首先 ...

  9. [阅读笔记]Software optimization resources

    http://www.agner.org/optimize/#manuals 阅读笔记Optimizing software in C++   7. The efficiency of differe ...

  10. 《uml大战需求分析》阅读笔记05

    <uml大战需求分析>阅读笔记05 这次我主要阅读了这本书的第九十章,通过看这章的知识了解了不少的知识开发某系统的重要前提是:这个系统有谁在用?这些人通过这个系统能做什么事? 一般搞清楚这 ...

随机推荐

  1. 使用Docker将Vite Vue项目部署到Nginx二级目录

    Vue项目配置 使用Vite创建一个Vue项目,点我查看如何创建 配置打包路径 在Nginx中如果是二级目录,例如/web时,需要设置线上的打包路径 在项目跟路径下创建两个文件:.env.produc ...

  2. jQuery控制图片墙自动+手动淡入淡出切换

    先来看一下效果:http://39.105.101.122/myhtml/Jquery/img_switch/img_switch.html(甄嬛的眼睛有木有变大) 添加一个div(class=con ...

  3. JAVA SE基础《一》----JAVA入门

    初识Java 1.Java背景知识 java是美国sun公司(Stanford University Network)在1995年推出的一门计算机高级编程语言. Java早期称为Oak(橡树),后期改 ...

  4. 什么是 CSR、SSR、SSG、ISR - 渲染模式详解

    本文以 React.Vue 为例,介绍下主流的渲染模式以及在主流框架中如何实现上述的渲染模式. 前置知识介绍 看渲染模式之前我们先看下几个主流框架所提供的相关能力,了解的可跳到下个章节. 挂载组件到 ...

  5. python:修改pdf的书签

    我觉得修改pdf书签总体来说最方便的方式就是: 导出pdf书签为文本文件,修改书签文本文件后再导入到pdf中. 1.直接修改pdf书签 python中比较好用的pdf处理的库是pymupdf: pip ...

  6. java协程线程之虚拟线程

    前言 众所周知,java 是没有协程线程的,在我们如此熟知的jdk 1.8时代,大佬们想出来的办法就是异步io,甚至用并行的stream流来实现,高并发也好,缩短事件处理时间也好:大家都在想着自己认为 ...

  7. 进程相关API

    ID与句柄 如果我们成功创建一个进程,CreateProcess函数会给我们返回一个结构体,包括四个数 据:进程编号(ID).进程句柄.线程编号(ID).线程句柄. 进程ID其实我们早见过了,通常我们 ...

  8. MIT 6.5840 Raft Implementation(2B, Log Replication)

    Raft实现思路+细节(2B) 任务分解 2B中最主要的任务就是进行日志的复制.Raft是一个强领导人的系统,这意味着所有的日志添加都是由领导人发起的,与之相类似的,还有很多其他的结论(它们都是比较显 ...

  9. ls 和 du显示文件大小不一样

    查看当前文件系统的磁盘使用 df -k / Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p2 97844508 37 ...

  10. .NET下数据库的负载均衡“经典方案”(大项目必备,建议收藏)

    [前言] 本文讲述的"数据库负载均衡"方案,为市面上最经典(没有之一),由.NET界骨灰级大佬推出.采用该技术方案的大公司,一年省下了几个亿的支出. [正文] 支持.Net Cor ...