Blog posts

2021

如何求解 $\dot{x} = x+f(t)$

1 minute read

Published:

最近在看Dayan和Abbott的Theoretical Neuroscience。虽然是数学系学生但是由于太浪,分析代数几何都学了个遍,感觉哪科都没学好,于是后遗症就是像傅里叶变换这种极为重要的东西竟然不是很熟。 于是我决定先把书后面的数学Appendix先光速过一遍,以免在读正文的时候尴尬卡壳。在附录讲微分方程的部分有一个方程: \(\begin{equation} C\frac{dV}{dt} = \frac{E-V}{R} + I_e \end{equation}\) 这是比较容易求解的,令$W = -V+E+RI_e$, 我们有 \(\begin{equation} RC(-W)' = W \end{equation}\) 愉快地分离变量就能得到$W = C’\exp(-t/\tau)$. 把$V(0)$ 这个初始条件代进去就有$C’ = W(0) = -V(0)+E+RI_e$。 我们就能得到书上列出的解 \(\begin{equation} V(t) = V\_\inf +(V(0)- V\_\inf) \exp(-t/\tau) \end{equation}\)

Sprague-Grundy Theorem and the Game of Nim

7 minute read

Published:

Halo, recently I reacquainted myself with the Sprague-Grundy theorem and would like to introduce the gist of it. I think Wikipedia does a great job explaining the detailed proof, but I would like to fill in some gaps and provide some intuitions. It is recommended to read about the rule of the game of nim (and the wiki page if you are interested in technical details) before reading.

Chinese Remainder Theorem

4 minute read

Published:

I recently decided to pick up competitive programming, not only because I enjoy programming, but also because this is a fail safe for my academic career. With the tension between China and US rises, any Chinese research personnel in the US is bound to be persecuted in one way or another (it already begins with the visa application). It will be increasingly risky to put all the eggs in one basket. And the recent Wenhua Jiang Incident further dims the light on the path to tenure in China for many researchers. So in short, doing competitive programming is an act of interest (pun intended).

Limit of Binomial Distribution

1 minute read

Published:

In computational neuroscience, Poisson distribution is very important in that spike trains are usually modeled as a Poisson process. This article demonstrates that the Poisson distribution can be obtained as a limit of Binomial Distribution.