昨天看到一句话,斐波那契数列的第50个数字是多少?我直觉大概几万吧。然后就打开R算了下究竟是多少,看完我有点吃惊了,让我想起了国王的麦粒。 往下看之前,你也可以先自己猜测下大概是多少。
output <- vector("numeric", 50)
for (i in 3:50) {
output[1] = 1
output[2] = 1
output[i] = output[i-1]+output[i-2]
}
output
> output
[1] 1 1 2 3 5 8 13 21
[9] 34 55 89 144 233 377 610 987
[17] 1597 2584 4181 6765 10946 17711 28657 46368
[25] 75025 121393 196418 317811 514229 832040 1346269 2178309
[33] 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155
[41] 165580141 267914296 433494437 701408733 1134903170 1836311903 2971215073 4807526976
[49] 7778742049 12586269025
然后突然又想起来之前看过的一句话,类似复利,是关于进步的。假如每天进步一点点,比如0.01,虽然具体数字无法度量,但我们每天的进步自己是可以感觉到了。那365天会进步多少?反之,每天退步0.01,365天之后呢?
forward_alittle <- vector("numeric")
backward_alitter <- vector("numeric")
for (i in 1:365) {
rate = 0.01
forward_alittle[1] = 1
forward_alittle[i] = (1+rate)^i
backward_alitter[1] = 1
backward_alitter[i] = (1-rate)^i
}
forward_alittle
backward_alitter
> forward_alittle
[1] 1.000000 1.020100 1.030301 1.040604 1.051010 1.061520 1.072135 1.082857 1.093685 1.104622 1.115668 1.126825 1.138093
[14] 1.149474 1.160969 1.172579 1.184304 1.196147 1.208109 1.220190 1.232392 1.244716 1.257163 1.269735 1.282432 1.295256
[27] 1.308209 1.321291 1.334504 1.347849 1.361327 1.374941 1.388690 1.402577 1.416603 1.430769 1.445076 1.459527 1.474123
[40] 1.488864 1.503752 1.518790 1.533978 1.549318 1.564811 1.580459 1.596263 1.612226 1.628348 1.644632 1.661078 1.677689
[53] 1.694466 1.711410 1.728525 1.745810 1.763268 1.780901 1.798710 1.816697 1.834864 1.853212 1.871744 1.890462 1.909366
[66] 1.928460 1.947745 1.967222 1.986894 2.006763 2.026831 2.047099 2.067570 2.088246 2.109128 2.130220 2.151522 2.173037
[79] 2.194768 2.216715 2.238882 2.261271 2.283884 2.306723 2.329790 2.353088 2.376619 2.400385 2.424389 2.448633 2.473119
[92] 2.497850 2.522829 2.548057 2.573538 2.599273 2.625266 2.651518 2.678033 2.704814 2.731862 2.759181 2.786772 2.814640
[105] 2.842787 2.871214 2.899927 2.928926 2.958215 2.987797 3.017675 3.047852 3.078330 3.109114 3.140205 3.171607 3.203323
[118] 3.235356 3.267710 3.300387 3.333391 3.366725 3.400392 3.434396 3.468740 3.503427 3.538461 3.573846 3.609585 3.645680
[131] 3.682137 3.718959 3.756148 3.793710 3.831647 3.869963 3.908663 3.947749 3.987227 4.027099 4.067370 4.108044 4.149124
[144] 4.190616 4.232522 4.274847 4.317595 4.360771 4.404379 4.448423 4.492907 4.537836 4.583215 4.629047 4.675337 4.722091
[157] 4.769311 4.817005 4.865175 4.913826 4.962965 5.012594 5.062720 5.113347 5.164481 5.216126 5.268287 5.320970 5.374180
[170] 5.427921 5.482201 5.537023 5.592393 5.648317 5.704800 5.761848 5.819466 5.877661 5.936438 5.995802 6.055760 6.116318
[183] 6.177481 6.239256 6.301648 6.364665 6.428311 6.492594 6.557520 6.623096 6.689326 6.756220 6.823782 6.892020 6.960940
[196] 7.030549 7.100855 7.171863 7.243582 7.316018 7.389178 7.463070 7.537701 7.613078 7.689208 7.766100 7.843761 7.922199
[209] 8.001421 8.081435 8.162250 8.243872 8.326311 8.409574 8.493670 8.578606 8.664392 8.751036 8.838547 8.926932 9.016201
[222] 9.106363 9.197427 9.289401 9.382295 9.476118 9.570880 9.666588 9.763254 9.860887 9.959496 10.059091 10.159681 10.261278
[235] 10.363891 10.467530 10.572205 10.677927 10.784707 10.892554 11.001479 11.111494 11.222609 11.334835 11.448183 11.562665 11.678292
[248] 11.795075 11.913026 12.032156 12.152477 12.274002 12.396742 12.520710 12.645917 12.772376 12.900100 13.029101 13.159392 13.290985
[261] 13.423895 13.558134 13.693716 13.830653 13.968959 14.108649 14.249735 14.392233 14.536155 14.681517 14.828332 14.976615 15.126381
[274] 15.277645 15.430422 15.584726 15.740573 15.897979 16.056959 16.217528 16.379703 16.543500 16.708935 16.876025 17.044785 17.215233
[287] 17.387385 17.561259 17.736872 17.914240 18.093383 18.274317 18.457060 18.641630 18.828047 19.016327 19.206490 19.398555 19.592541
[300] 19.788466 19.986351 20.186214 20.388077 20.591957 20.797877 21.005856 21.215914 21.428073 21.642354 21.858778 22.077365 22.298139
[313] 22.521120 22.746332 22.973795 23.203533 23.435568 23.669924 23.906623 24.145689 24.387146 24.631018 24.877328 25.126101 25.377362
[326] 25.631136 25.887447 26.146322 26.407785 26.671863 26.938581 27.207967 27.480047 27.754847 28.032396 28.312720 28.595847 28.881805
[339] 29.170624 29.462330 29.756953 30.054523 30.355068 30.658618 30.965205 31.274857 31.587605 31.903481 32.222516 32.544741 32.870189
[352] 33.198891 33.530880 33.866188 34.204850 34.546899 34.892368 35.241291 35.593704 35.949641 36.309138 36.672229 37.038951 37.409341
[365] 37.783434
> backward_alitter
[1] 1.00000000 0.98010000 0.97029900 0.96059601 0.95099005 0.94148015 0.93206535 0.92274469 0.91351725 0.90438208 0.89533825 0.88638487
[13] 0.87752102 0.86874581 0.86005835 0.85145777 0.84294319 0.83451376 0.82616862 0.81790694 0.80972787 0.80163059 0.79361428 0.78567814
[25] 0.77782136 0.77004315 0.76234271 0.75471929 0.74717209 0.73970037 0.73230337 0.72498034 0.71773053 0.71055323 0.70344769 0.69641322
[37] 0.68944909 0.68255460 0.67572905 0.66897176 0.66228204 0.65565922 0.64910263 0.64261160 0.63618549 0.62982363 0.62352539 0.61729014
[49] 0.61111724 0.60500607 0.59895601 0.59296645 0.58703678 0.58116641 0.57535475 0.56960120 0.56390519 0.55826614 0.55268348 0.54715664
[61] 0.54168508 0.53626823 0.53090554 0.52559649 0.52034052 0.51513712 0.50998575 0.50488589 0.49983703 0.49483866 0.48989027 0.48499137
[73] 0.48014146 0.47534004 0.47058664 0.46588078 0.46122197 0.45660975 0.45204365 0.44752321 0.44304798 0.43861750 0.43423133 0.42988901
[85] 0.42559012 0.42133422 0.41712088 0.41294967 0.40882017 0.40473197 0.40068465 0.39667781 0.39271103 0.38878392 0.38489608 0.38104712
[97] 0.37723665 0.37346428 0.36972964 0.36603234 0.36237202 0.35874830 0.35516081 0.35160921 0.34809311 0.34461218 0.34116606 0.33775440
[109] 0.33437686 0.33103309 0.32772276 0.32444553 0.32120107 0.31798906 0.31480917 0.31166108 0.30854447 0.30545903 0.30240444 0.29938039
[121] 0.29638659 0.29342272 0.29048849 0.28758361 0.28470777 0.28186070 0.27904209 0.27625167 0.27348915 0.27075426 0.26804672 0.26536625
[133] 0.26271259 0.26008546 0.25748461 0.25490976 0.25236066 0.24983706 0.24733869 0.24486530 0.24241665 0.23999248 0.23759255 0.23521663
[145] 0.23286446 0.23053582 0.22823046 0.22594816 0.22368867 0.22145179 0.21923727 0.21704490 0.21487445 0.21272570 0.21059845 0.20849246
[157] 0.20640754 0.20434346 0.20230003 0.20027703 0.19827426 0.19629151 0.19432860 0.19238531 0.19046146 0.18855685 0.18667128 0.18480456
[169] 0.18295652 0.18112695 0.17931568 0.17752253 0.17574730 0.17398983 0.17224993 0.17052743 0.16882216 0.16713394 0.16546260 0.16380797
[181] 0.16216989 0.16054819 0.15894271 0.15735328 0.15577975 0.15422195 0.15267973 0.15115293 0.14964141 0.14814499 0.14666354 0.14519691
[193] 0.14374494 0.14230749 0.14088441 0.13947557 0.13808081 0.13670000 0.13533300 0.13397967 0.13263988 0.13131348 0.13000034 0.12870034
[205] 0.12741334 0.12613920 0.12487781 0.12362903 0.12239274 0.12116882 0.11995713 0.11875756 0.11756998 0.11639428 0.11523034 0.11407804
[217] 0.11293725 0.11180788 0.11068980 0.10958291 0.10848708 0.10740221 0.10632818 0.10526490 0.10421225 0.10317013 0.10213843 0.10111704
[229] 0.10010587 0.09910482 0.09811377 0.09713263 0.09616130 0.09519969 0.09424769 0.09330522 0.09237216 0.09144844 0.09053396 0.08962862
[241] 0.08873233 0.08784501 0.08696656 0.08609689 0.08523592 0.08438357 0.08353973 0.08270433 0.08187729 0.08105852 0.08024793 0.07944545
[253] 0.07865100 0.07786449 0.07708584 0.07631498 0.07555183 0.07479632 0.07404835 0.07330787 0.07257479 0.07184904 0.07113055 0.07041925
[265] 0.06971505 0.06901790 0.06832772 0.06764445 0.06696800 0.06629832 0.06563534 0.06497899 0.06432920 0.06368590 0.06304905 0.06241855
[277] 0.06179437 0.06117643 0.06056466 0.05995901 0.05935942 0.05876583 0.05817817 0.05759639 0.05702043 0.05645022 0.05588572 0.05532686
[289] 0.05477359 0.05422586 0.05368360 0.05314676 0.05261530 0.05208914 0.05156825 0.05105257 0.05054204 0.05003662 0.04953626 0.04904089
[301] 0.04855049 0.04806498 0.04758433 0.04710849 0.04663740 0.04617103 0.04570932 0.04525222 0.04479970 0.04435171 0.04390819 0.04346911
[313] 0.04303442 0.04260407 0.04217803 0.04175625 0.04133869 0.04092530 0.04051605 0.04011089 0.03970978 0.03931268 0.03891955 0.03853036
[325] 0.03814505 0.03776360 0.03738597 0.03701211 0.03664199 0.03627557 0.03591281 0.03555368 0.03519815 0.03484617 0.03449770 0.03415273
[337] 0.03381120 0.03347309 0.03313836 0.03280697 0.03247890 0.03215411 0.03183257 0.03151425 0.03119911 0.03088711 0.03057824 0.03027246
[349] 0.02996974 0.02967004 0.02937334 0.02907960 0.02878881 0.02850092 0.02821591 0.02793375 0.02765441 0.02737787 0.02710409 0.02683305
[361] 0.02656472 0.02629907 0.02603608 0.02577572 0.02551796
分别又看了每天进步和退步的差值和比值。然后掐头去尾看了下。
day_data <- data.frame(day = 1:365, forward = forward_alittle, backward = backward_alitter) %>%
mutate(difference_minus = forward-backward, difference_fold = forward/backward)
head(day_data)
tail(day_data)
> head(day_data)
day forward backward difference_minus difference_fold
1 1 1.000000 1.0000000 0.000000 1.000000
2 2 1.020100 0.9801000 0.040000 1.040812
3 3 1.030301 0.9702990 0.060002 1.061839
4 4 1.040604 0.9605960 0.080008 1.083290
5 5 1.051010 0.9509900 0.100020 1.105175
6 6 1.061520 0.9414801 0.120040 1.127501
> tail(day_data)
day forward backward difference_minus difference_fold
360 360 35.94964 0.02683305 35.92281 1339.752
361 361 36.30914 0.02656472 36.28257 1366.818
362 362 36.67223 0.02629907 36.64593 1394.430
363 363 37.03895 0.02603608 37.01292 1422.601
364 364 37.40934 0.02577572 37.38357 1451.340
365 365 37.78343 0.02551796 37.75792 1480.660
library(ggplot2)
library(cowplot)
x_plot <- ggplot(data = day_data, aes(x = day))
for_plot <- x_plot + geom_point(aes(y = forward), color = "red")+
labs(title = "每天进步一点点")
bac_plot <- x_plot + geom_point(aes(y = backward), color = "green")+
labs(title = "每天退步一点点")
minus_plot <- x_plot+ geom_point(aes(y = difference_minus), color = "black")+
labs(title = "每天相差一点点")
fold_plot <- x_plot + geom_point(aes(y = difference_fold), color = "blue")+
labs(title = "每天倍增一点点")
plot_grid(for_plot, bac_plot, minus_plot, fold_plot, labels = c(LETTERS[1:4]))
上面这四个图都是非线性变化。 A图,开始的进步相对较小,不容易看出来,这可能是让人开始很难坚持做某件事的原因。但只要坚持住就可以厚积薄发,大概200天的时候开始飞跃。而等到后期快符合荷花定律了。 B图,开始的退步就非常明显,滑梯一般下降,50天左右已经面目全非了。 逆水行舟,不进则退 C图,进步和退步之间的差距,开始也不明显,从0开始,但到了后期变得陡峭。进入大学或工作之后,不停奔跑的人。 D图,前200天,差异不显著,但260左右,直升机般上升。如果要做的出类拔萃,真的需要耐得住时间和开始不显著的差异。
ggplot(data = day_data, aes(y = day)) +
geom_point(aes(x = forward), color = "red") +
geom_point(aes(x = backward), color = "green") +
geom_point(aes(x = difference_fold), color = "blue")
1.每天跑步一个小时。 每天跑步一小时,坚持下来并不容易。但是每天的锻炼对我们的影响并非线性叠加。每天的肌肉都比前一天更好,而不是比第一天更好。在跑步中获得的信心,自由也都比前一天更强。每天的基数不断增加,而进步在持续,这实际就是复利。 2.知识的获取 新知识如果要更好被记忆,被理解,被应用,需要挂靠到我们已经熟知或熟悉的已有知识体系中,不断扩大的知识网络提供了更大更坚实的搭载系统,这是知识复利。 3.如果说锻炼是硬件复利的增长,那软件的增长也有复利系统。 一点一滴的改变自己,用好的理念好的支持体系给予自己强大的信念,不为外界风雨左右这种改变。也会越来越好。虽然开始的改变可能很难很慢,甚至根本无从觉察。但是一旦播下好的理念的种子,假以时日,就会由恍然大悟提醒自己式的改变变成自己思维内在的一部分自发行为。复利已经开始生长。
还有很多很多的复利系统存在我们的生活中……
跟自己比,每天都比昨天更好,在这过程中更理解人性,你知道其中从挣扎到挣脱的过程,就像花朵突然绽放,它想必也很累,需要举重一般突然发力,在这个过程中也知道学习与成长的规律,你的孩子或学生需要重复这个过程,你将是一个很好的引领者,可让他保持速度,又让他充满希望。你的成长,就是你所处系统的成长。 跟自己比,明天的足迹必须必今天的自己更好,智慧增多一点,能力加强一点,财富增加一点,这应当成命令。人的一生,只要是和自己比,一生的进步和快乐,只会终止于死亡。
聪明又勤奋的人,认定一件事,做半辈子,没有不登峰造极的。这样的人会坚持一辈子。 勤奋是一种主动的选择,一个人想勤奋就可以勤奋,大方向不错,勤奋地聚焦于一件事,不需要半辈子,10年之后,你在专注的事业上,就很聪明了。 继续在自己专注的领域勤奋吧。细水长流,直至天长地久。
往前一步,再往前一步,不慌乱。只要一直在走。不要在开始看不到进步的时候想着放弃,只要思考过后觉得可行的,坚定一步一个脚印走下去,定会走出宽阔大道。