2016年6月27日星期一

读后感《给青年的十二封信》(上)

    适逢暑假在校实习,每天工作下班回来之后都感觉特别疲惫,都是打代码惹得祸。因祸得福的是读书的习惯倒是在好久之后捡回来了——这说的不是看专业书籍啦。然后么,好处是学长还寄存在我这里一大箱书,正好给我每天晚上看看。

    今天挑了一本,朱光潜先生的《给青年的十二封信》,开卷不能释手。大家都知道朱光潜先生是美学大家,我高中毕业那会儿附庸风雅也读过《中国美学十五讲》,当中说了不少他的观点和想法。这本书呢,虽然写于民国时期,然而说的事情时至今日依然适用。话说今时今日已经不是当年那个“危急存亡之秋”了,可是先生探讨的青年人的问题依旧还是时下青年人的问题。好吧,估计是传统文化一脉相承,青少年身心发展具有特征和代表性,这些都远超意识形态了吧。

    既然开卷有益,就摘录一些我觉得写的非常好的话。

    《谈读书》
    兴味要在青年时设法培养,过了正当时节,便会萎谢。比方打网球,你在中学时喜欢打,你到老都喜欢大。假如你在中学时代错过机会,后来要发愿去学,比登天还要难十倍。养成读书习惯也是这样。

    如果你每天能抽出半点中钟,你每天至少可以读三四页,每月可以读一百页,到了一年也就可以都四五本书了。何况你在假期中每天断不会只能读三四页呢?你能否在课外读书,不是你有没有时间的问题,是你有没有决心的问题。


    《谈动》
    流行语中又有“闲愁”的字样,闲人大半易于发愁,就因为闲时生机静止而不舒畅。青年人比老年人易于发愁些,因为青年人的生机比较强旺。

    总之,愁生于郁,解愁的方法在泄,郁由于静止,求泄的方法在动。从前儒家讲心性的话,从近代心理学眼光来看,都很粗疏,只有孟子的“尽性”一个主张,含义非常深广。一些道德学说都不免肤浅,如果不从“尽性”的基点出发。如果把“尽性”两个字懂得透彻,我认为生活的目的在于词,生活方法也就在此。

    《谈中学生与社会运动》
    比分我欢喜谈国事,就蔑视你读书;你欢喜读书,就蔑视我谈国事。其实单方面锣鼓打不成闹台戏。要撑起中国场面,也要生旦净末丑角角俱全。

    蔡孑民先生说,“读书不忘救国,救国不忘读书,”这两句话是青年人最稳妥的座右铭。

    老实说,社会已经把你我们看成眼中钉了。这并非完全是社会的过处。现在一般学生,有几个配谈革命?吞剥捐款聚赌宿娼的是否曾充过代表,赴过大会?勾结绅士政客以捣乱学校的是否没曾谈过教育寺严?向日本政府立誓感恩以分润庚子赔款的,是否没曾喊过打倒帝国主义?

    《谈十字街头》
    一种社会所最可怕的不是民众浮浅顽劣,因为民众通常都是浮浅顽劣的。它最可怕的是没有在浮浅卑劣的环境中而能不浮浅不卑劣的人。比方英国民众就是很沉滞顽劣的,然而在这种沉滞顽劣的社会中,偶尔跳出一二个性坚强的人,如雪莱,卡莱尔,罗素等,其特立独行的胆于识,却非其他民族所可多得。这是英国人力量所在的地方。

    《谈多元宇宙》
    在恋爱的状态中,两人的脉搏一起一落,两人心灵一往一复,都恰能契合无间。在这种境界,如果身家财产、学业名誉道德等观念渗入一分,则恋爱真纯的程度须减少一分。真能恋爱的人只能因为恋爱而恋爱,恋爱以外,不复另有宇宙。

    《谈升学与选课》
    此全篇我都极为推荐,故不再摘抄。即使在今日看来,此文依然字字珠玑,不禁令人感叹历史总在重复着昨天的故事啊。
    在第一个升学的问题上,先生就说到当时的学生重文凭,轻学术。只求速成拿上证书,好去社会上谋个生路。(时下也是)还有各种崇洋媚外情结,想去留学镀金。就是在这样的大环境下,作为十里洋场的上海挂牌办的大学竟然超过了英法之和,还有各种美国注册的学校,就是为了迎合大家的需求么。
    然后到了专业,大众也是只挑热门而忽视兴趣。
    最后说到选课的问题,由于有欧洲留学经历,朱先生说到真正的学者在“术业有专攻”之前都是有一个非常扎实而宽泛的根基的。比如做文学的应该要懂各国文学,做哲学的应该要懂些历史。而国人常常想造空中楼阁,结果做出的文章都惹人笑话。

    本文写于1929年,差不多百年过去了,好像在文化积淀这一刻仍然还没有迈出一大步。其中战乱、斗争,过去的也就过去了。现在三、四十年重新来过,当年的老家当说实话也没留下多少,甚是可惜。时下办学热出国热依然高涨,好在信息交流加快了,大家也趋于理智了。然而何时才能办好自己的大学?这也是我们这代人的事情了。    

2016年6月17日星期五

2A - 还有三周

说说过去的P3情况

【P3】

【马尔科夫链和随机过程】
花心思很多的一门课。拿到书的时候发现两块内容基本都自学过,然而还是又好好读了书,做了习题,帮老师查了好多打印错误,拓展着看了Yuval的书可惜还没有看完。

可以认为Markov作为离散动力系统中的一环,随着计算机的发展已经变得和连续动力系统中的微分方程一样重要了。嗯,其实我们也常用Markov来模拟拉普拉斯方程的对吧?今天还读到关于Mixing Time的科普性文章,这个我非常喜欢。

简单说,Markov就是一个只和当下有关而不在乎过去的随机过程。我们关心周期性、渐进行为、渐进速度Mixing time、截断情况Cutoff。还有很多技巧,例如Couple 这些都是值得研究的。包括从纯数学角度,研究群结构意义下的随机游动也帮助我们知道群的结构。

离散鞅论就是连续鞅论的前奏,赌场股市必备神技的入门篇。当然概念来的很抽象啦,不过由于他特殊的结构,使得收敛证明其他条件减弱了。在信号方面他也有另一套说法,这些我也和同学介绍过。

【变分PDE】
变分类的PDE,核心就是Lax-Milgram定理,所用的其实是泛函中的表示定理。然后各种提条件方法,一些空间的介绍。

变分类问题也算数学上一大类了,时下机器学习盛行,很多时候也是优化一个目标函数。能用到变分方法的机会也还是不少的。这门课就是告诉大家:数学上,你要找到的上界就TMD是最大值。

还有计算特征值的方法(研究谱),也是一大类了,本课讲了最基本的观点。

这门课最后一个大的projet我们做了流传已久的“能不能从频率听出鼓形状”这样一个课题。用了Freefem,老实说到现在也不太会真正使用这个软件,就凑合着写了点边界条件吧。

【统计物理1】
统计物理1主要还是在说热力学的内容。统计物理的研究对象是大规模相同粒子的整体行为,但这个整体行为同时又是千千万万个体行为的综合表示。这个学科特别有意义,在于现实中很多事情都可以用这种类似的模型去类比,比如金融市场。

统计物理很多时候会和概率论扯在一块,这也是时下一个研究方向。la fonction de repartition 就是概率论中的统计物理1中粒子大多都是idd的。这也是理想气体的假设。

【Modal】
最后是Modal,又是NS方程,这个方程在本科时候已经和老师学过并且做了关于Onsager猜想的研究了。现在重新学了一遍,把之前不了解的经典理论补上了。

NS方程最经典的理论来自于Leray,他的方法导出了目前为止最主要的一些成果。通常我们在H^1空间中研究这个问题,比如NS方程在二维情况存在、唯一、正则性都是有的,但在3维忠就不对,因为空间嵌入不够好。

Leray的研究方法说起来就是对函数先阶段,然后微分算子在频率有界情况下就是有界算子了,那么ODE的存在唯一性都能用上(这里体现了ODE和PDE的差别)。对于一族解,再利用泛函里面的一些逼近性质就得到了解。

之前说了在三维中,因为空间嵌入不够好,就没有唯一性和正则性了,怎么办呢?我们还是有一些结论的,比如在初值小的情况下,正则性还是有的。比如我们可以研究换个函数空间这样的。

最后一个结论,在有科里奥利力的作用下,三维的力本质和二维差不多,也可以得到一些关于正则性的结论。这是最新的研究成果了,我们也就读到这里。

2016年5月14日星期六

Galton Waston Tree - base and description by random walk

Motivation

Galton Waston Tree is a basic model in probability theory and sometimes we call it branching process. This model can be taught in the introductory course of probability in Polytechnique during Tronc Commun, but its background is so profound that we can find it in so much domain in applied mathematics and pure mathematics, some examples for the former is the biological process like the gene and, however, some example for the later is the recent breakthrough in maths and physics like random mapping theory. In fact, we start from the BGW model and develop the continuous random tree, a continuous version as the convergence of the tree, and at last is the most fashionable object.

As I have passion to continue the study in this field, I will devote a series of blog in this domain. This first introduction comes from the talk given by Igor Kortchmeski last week.

Definition

The BGM process is can be defined as a tree. In each generation, the parent gives birth to its children and the law of production follows a random variable uniformly and independently. Usually we study the situation that the expectation of the production is finite and it is logical in reality.

The first problem comes from the biology: when the population will distinct? The answer is that when the expectation of production is less than 1, the population will die necessarily but even though this expectation is larger than 1, there is still a probability that the population die out. Then precise study of this problem relied the study by the generated function, who is in form of iterations.


Simulation of uniform tree

The second problem is how many generated tree without label? A famous formula of Cayley is n^(n-2). This can also be solved by BGW model and in fact our BGW model can simulate this process given certain probability of production. If the probability of production is like a geometry law, this gives a uniform ordered and root fixed tree, but if it follow the law of Poisson, it is the simulation of uniform non-labelled but root fixed tree. The technique detail will be given in the next section.

Characterization

In the lecture, Igor introduced two method to code the tree: one by the function of contour and the other by the random walk. The first one, each step is the height of the vertex in the tree in order of the depth first search and in the second one, we assign each move the law of production. Then the process of production becomes the process of random walk. This is nature since we can always consider the number of population in a given and then the number denote the random walk. The second method by random walk has incredible power: since we understand well the random walk and it can calculate many property like the number of non-labelled tree, which we have introduced int the previous section.

Some further study like the asymptotic growth of number of tree can be approximated by the local limit theorem, a extended version of central limit theorem. Until here we have presented almost all the content in this lecture and I will write some notes by simple description of these beautiful maths.

2016年1月23日星期六

2A 1/3 passé

这周结束了2A前两个小学期也就是一个大学期的考试,随便写点什么回顾一下学了什么以及后面的展望。

【P1】 = 统计 + 量子力学2 + INF411 + 动力系统(sup)

【统计】第一次给了我一个感觉统计也可以非常非常理论。应该说这个统计课就是告诉我们,在什么样的假设下,我们脑洞打开设计的方法是有道理的(estimateur), 或者随机变量之间应该有怎样的一种依赖性(regression),以及我们设计了一个方法,然后根据这个方法找变量的关系,这个方法的准确性是多少(test)。稍显美中不足的,过于理论了,甚至都没有拿这些方法做过什么。当下统计学习如此火热,我们当然要懂些原理,可是连一点点直觉都没有好像不太好。

【量子力学2】继续上学期的内容加强深化了些。物理毕竟外行没有学精,就记得好像我们推出了Pauli不相容原理,这个挺让我映像深刻的。

【INF411】继续打程序……链表二叉树深度优先广度优先最短路动态规划都一个个做了遍,原来算法计算机真的不难。

【动力系统】因为最后没有参加考试所以后来劲就送了,只能等到来年再来过了。不过我个人觉得这门课内容对我而言是有提升的。本科对ODE的了解就停留在解解方程了,而事实上呢?法国整个动力系统的框架完全是建立在更一般抽象的体系上的么。当然基石还是Cauchy Lipthiz.还有整个Flot的想法应该是渗透到了力学还有PDE当中去的。

不过最后因为和Section疯玩了一把,期末复习相当不到位,中间也没有抓的特别紧。说实话是要检讨的。成绩考出来也没有那么理想(但也不至于毁灭),想到未来成绩还是有用的,所以P2果断端正态度……

【P2】 = Distribution + 数值入门 + INF421 + 狭义相对论(sup)

【Distribution】在Coursera上已经上过了课拿了证书,再看老师上课的内容说实话还不如当时电子课。整个课程进度甚至比电子课更慢,留下了之后一大本关于PDE的内容,当中还有不少是很重要的,比如关于Laplacian的正则性。不过还好这门课开课的时候终于又捡回了TC的状态做掉了绝大部分习题。要给自己打分至少是个80分吧。

内容:分布理论就是把内积结构的一种推广。分布,紧支撑分布,缓增分布,Hopf方程,基本解和正则性。卷积一块是是比国内说的细的多,紧支撑分布可以各种和其他玩意儿做卷积。
(在此再次感谢当年李老师和雷老师教诲,X工程师教育再好,预科制度再棒,流水线生产比不过讨论班手把手拆招练出来的本事……)

【数值入门】整个学期最花精力的一门课。一方面因为刚刚上手觉得不花功夫难以学好,另一方面是这个里面的方程降低比上一门还要多些。事实也证明最后这门课学的得心应手。反思之处:还要多花时间写写数值解的程序啊。然后这门课虽然入门,但是体系里面该说的也说了特别多了。

内容:差分格式,变分和有限元,优化和算法。差分主要做热传导和波动,变分有限元则什么都能做。优化中说了些定性描述,优化算法还是有意思的。

当然目前的数学工具用的不多,可以感觉是各种数分习题的实践版本,我觉得一定有把小波这些高级工具用上的炫酷进阶版。

【INF421】stabe matching, DP, 各种最短路最小生成树,TPS,做了个Projet TTP,还有胡来的随机算法和启发式算法。
课程还不错无奈德国老师英语听着真累。反正每次我都带头做DM……当中还想出过一个关于随机树联通性的证明,也是佩服自己。


【狭义相对论】又当科普课上了,总算会用lorenz 变换写各种光啊波啊等等。

【小结】:说真的不是每一门课都那么喜欢,但是也强迫着自己拿出至少85分热情去面对了所以学着还挺好(?)吧。后面有概率模型,统计物理,BIG Data,还有NS方程。以及我们不能把PSC就这样落下啊。最后两个学期,是体现120分热情的时候了,小宇宙烧起来~

Three interesting questions

Yesterday, we talk about three interesting questions in the cuisine and luckily I have found the answers by myself for this three enigma. Now, I share them with you.

[Probability and a series of number]
A series of integers are coming but we don't know the total number of these integers. We have a fix number of memory. Try to design a way to give one number of them randomly.

Idea: Because we don't know the number, so in fact we keep the random during all the process. We start from the simple case. We we given one number, we just keep it. But once we have two, we must update it with the prob 0.5. That is the key. Once we know the total number until now, we have the method to update the data randomly.So two memory is OK.

[Find the polynomial]
We are given a polynomial of degree integer positive. We have two chance to test the polynomial by value. How we find it?

Idea: Intuitively, this is not so logical because in maths we know we can construct a polynomial of certain zeros. But pay attention to the positive integer coefficient. The addition of one polynomial cannot always be correct.

The correct way to think by maths: if we can separate the coefficient, we get it. But to separate the coefficient we have to know the range, so the first chance we can use it to test the range of coefficient. For example, we put 1 in it. We get the range. We put 100000~0 to it, then we get the coefficient.

RMK: It is said that this method can be used to attack the HashCode.

[The most frequent number]
Once again, we are given a series of integer and we know that there is one number which appears more than half of it. We don't know the number, try to find it.

Idea: this is one in which I use the most of time. I got the answer by intuition and then prove it by maths. We get one number, count the number from it, count the number it occurs. If the frequency is lower than half, erase all the data and re gain the number.

A better arrangement can reduce the memory to two. But the heart of this idea is that if we do partition of the interval, at least from one point, the frequency of this number is always above 0.5.

2015年11月11日星期三

Stable matching and two simple tricks(mix and comparison)

Stable matching

Recently, we begin our computer science lessons for the second period in A2 in X. The first course is a very interesting subject: Stable matching, which emerges in various situation like job-seeking and the choice of our marriage. (Oh, it's all about the big problem.)

An algorithm proposed by Gale and Shapley is very simple and it applies the idea that we do every day. Imagine that n boys would like to choose their girlfriend and there are n women. Everyone has a list totally ordered. The unstable matching means in two couples, the man and woman have intention to break up and regroup a new couple. So the algorithm of Gale works like this: one guy begins to find his girlfriend from the top to bottom of his list. He dates the girl available or replace the ex-boyfriend. If the latter happens, the poor ex-boyfriend has to find another girlfriend.

This algorithm always works and finishes with a stable matching because the configuration is always stable. Moreover, the boyfriends of the girls become better and better(according to the personal criteria) and the boy never asks a girl two times(so sad).

To implement this algorithm, we have to pay attention to the complexity. We can cut the branching for economize the time, but the greatest problem is that we should construct a table for avoiding the time consumed in comparison between two men. After all, the complexity is about O(n^2).(We can use stacks and lists but they are not essential)

Some other version various is like we can join the possibility of preference of being single. That is to say, we can put ourselves in the list. Then, we will not get married with the man or woman after ourselves.

Tip: Do not put yourself at the first place of the list TT.

Knuth mix
How to make a permutation more random? This is a question. In the famous paper about riffle-shuffle, Diaconis tells us that 7 times can make a deck of cards very random, but it is just a asymptotic way not a perfect solution.

A method from Knuth: we do one cycle and each time, we do the exchange of cards between it and the cards before it.

Some simple calculus shows that it works, but how to get this idea is really amazing.

How many times to get the max and min?
We know n times comparison makes the max, so does min. But if we want both of them, we need 2n times?

NO!We take 2n number and group two-by-two so that n pairs. Then one comparison in every group makes the n "big-one" and n "small-one". The max is in the n "big-one" and the min is in the "small-one". So 3n times comparison make the result.

Therefore, generally, for n number, 3/2 * n times comparison get help us get both the max and the min.

2015年10月17日星期六

To A2

【写这篇日志的原因】
写这篇日志的原因是今天看到李大潜先生给复旦本科生和研究生的一些讲话。李先生是土生土长的复旦人,后来也曾留学法国,在应用数学方面造诣相当深厚了。李先生的讲话大意可以分成三个。第一层是鼓励和激励:每个数学系的学生都应该有一个数学家的梦想,所以应该好好学数学。或者说,即使真的只是瞄准业界,也应该在本科阶段打好基本功。第二层是方法论,数学不好学,得花功夫,求精深而不应浅尝辄止或者泛泛而谈。第三层,大概是批评下时下的诸多现象,例如本科生只想着出国,最终大学四年只带走了一个成绩,成为复旦的匆匆过客。例如研究生博士生现在不努力,办公室总是空着。

作为一个都已经毕业一年的老人,现在看这些话觉得字字珠玑。很遗憾当年这样的谈话连一遍都没有听过,只记得软件学院老师告诉大家好好努力以后好找工作之类的话了。不过现在听起来也不晚吧,毕竟我还在读书。

哦,好吧,现在做的事情也不只是读书了。

【关于到目前为止的一切】
张媛学姐曾经有句话我还是认同的:直接去美国读PhD和来法国读工程师,当然是不一样的。但前者的收获未必会更多,后者也未必更少。

当然,我们对这句话的解释是不一样的。我发现好像去读PhD的同学并不都那么开心。他们有些感觉课业压力大,对怎样成为数学家有疑惑。有些对学校课程设置诸多不满,有些竞争环境太激烈了不开心。而一切都Hold住的又寂寞了,总在考虑人生大事到处相亲……好吧,还有他们不得不盼的绿卡。

要我说都是物质太丰富了,惯出来的。在山上多清净多好!

但我觉得真正意外的收获是两个。第一个是,学校还会非常认真负责的去照顾到每一个学生。或者说是制定规则和服从吧,反正我还挺喜欢的,或许是当年复旦给的自由太多了。第二个是,我在大学毕业后还有集体生活,尽管有时候价值观也不尽相同,总比办公室生活看起来好像有趣多了。

总结一下,来法国一半原因就是当年一时一个轻易的许诺,对X是什么我也不了解。当然了,我还是相信姚老师的,他给的建议还是靠谱的。

【关于A2
说说A2的课程。非常懂的数学课基本也上完了,后面的都是不懂的。开学了觉得还是挺吃力的,然而这种事情不就是攻坚战么,只有一步一步跨过去了。

我还是保留了相当数量的分析课,综上算是一个平衡吧。当然也在布局开拓一些其他可能发展的方向了。

然后哲学老师让我重新有了上哲学课的想法。所以一个“坏”的哲学家和一个好的哲学家差别还是很大的。

纵观人生,每个阶段的第二年都是非常艰难的,我在各个阶段的第二年往往会有一种懈怠的习惯,原因是第一年都还比较认真成绩不错。然后到第三年再来幡然悔悟奋发向上。好吧,这种烂俗的剧本我可不想再演了。其实每一天都是新的,都值得去珍惜,尤其是当年华不再的时候。

希望能像每天坚持跑步一样,在这一年的每一天里保持能量!

【关于未来】
虽然我来法国之前,还是糊里糊涂的,但是没有多久就把问题想清楚了。所以说困境和痛苦是能促进人思考问题的。

X的校长在第一天就和我们说过,我们每个人都会成功,只要我们努力,学校也会帮助我们。事实看起来学校资源确实很多,多到平摊到人均根本花不完。

那么如果学校愿意帮助我实现一个愿望(也只有一个哦),该怎么说呢?我想了还挺久的,觉得如果只能许一个愿望,那么还是希望能在这几年里面好好修炼,成为一个数学家吧。

也就是这么一个简单的愿望。

【最后】
最后的最后,感谢周围的朋友,尤其多说点的,像老秦、C哥、校长、小明、缪,还有周医生、张医生和黄同学,还有实际上从幼儿园同学一路做到大学同学的胡爷,还有我的二哥和朱老师啊。

还有我们山上的小伙伴,2004年我认识的小伙伴们陪我度过了人生美好的10年,希望山上的小伙伴们在接下来10岁月里,也能像家人一样,彼此激励、关心。