Function as Type

We say type A is a subtype of type B, if everything we can do with B, we can do with A. Or we say, A can be treated as

這個問題從兩個角度來看,一個是從使用的角度,一個從理論的角度。 使用上 從使用的角度來看,假設潛規則有兩個原因,一個是為了溝通,令一個是為了簡少資訊量。   溝通上來說很好理解,如果今天我寫 $$ a  x^2 + b x + c$$ Bob覺的是 $$(((((a* x)^2) + b)*x) + c)$$ Alice覺的是 $$(a* (x^2)) + (b*x) + c$$ 那我們根本無法溝通。   這跟C++規定assignment

Singularity analysis provides an alternative way to anlyze the growth of generating funtion precisely. It is systematic and reliable.

The question of selecting a winner/loser is extremely easy to understand but is not at all trivial to analyze.... Here I present Prodinger's method with Rice's method.

Which is faster? ++i; or i++;   Both ++i and i++ are expression with side effects. The side effects are the same (increment i by one), but the return value

From Probability to Statistics In the world of probability, we look at the set of all possible outcomes of an experiment. This set of all possible outcomes is called sample

The following text assumes the definitions and notations used in Definitions of Markov Chain With the additional concept on period and reducibility. We denote the period of a state $i$ by

Stochastic Process Let $T$ be a set, and $\{N(t) | t \in T\}$ be a set of random variables, $\{N(t) | t \in T\}$ is called a stochastic process. If

The following text assumes the definitions and notations used in Definitions of Markov Chain Specifically, we define $P^n_{ij}$ as $[P^n]_{ij}$, which is the $i-j$th entry of the matrix $P^n$. The physical meaning