# Today I Learned

Some of the things I've learned every day since Oct 10, 2016

## Monthly Archives: November 2016

## 51: Undecidability of Equality of Lambda Expressions

November 30, 2016

Posted by on In general, there is no algorithm which determines whether two lambda expressions are equivalent under the reduction rules of the lambda calculus. This is the problem for which the first proof of undecidability was given.

## 50: Normalization Property (Lambda Calculus)

November 29, 2016

Posted by on In a rewrite system, such as -reduction in the lambda calculus, a term may or may not satisfy either the weak normalization or the strong normalization property.

A term satisfies the **weak normalization property** if there exists a sequence of rewrites on that eventually results in a *normal form* of : a term which is irreducible.

A term satisfies the **strong**** normalization property** if *every* sequence of rewrites on eventually results in a normal form of .

If every term in a rewrite system satisfies the [weak | strong] normalization property, then the system itself is said to satisfy the same property.

Examples:

An example of a system which satisfies neither of the normalization properties is the pure untyped lambda calculus. An example of a non-normal term within this system is

.

Under -reduction, this term reduces to itself, and so it never terminates in an irreducible form.

Conversely, a term within this system which *is* weakly normal is

.

Under -reduction, this term reduces to just the variable , an irreducible term.

There are other forms of the lambda calculus, as well as other similar systems, which are normal. These can be viewed as programming languages in which every program eventually will (or can) terminate. A significant drawback to such a system, however, is that if a system is normal *it cannot be Turing complete*.

Additionally, in the lambda calculus every normalizing term has a *unique *normal form.

## 49: Church Numerals

November 28, 2016

Posted by on In Church encoding, an encoding system using lambda calculus, the **Church numerals** are the representation of the natural numbers. The distinguishing feature of the Church numerals is that the natural numbers are not treated as a primitive type, as they would typically be, but are simply represented by higher-order functions. Each higher-order function representing the number takes two arguments — a function and a second argument to be passed to — and returns the -fold composition of .

Examples:

0 is represented as , which given any function returns a function which simply returns without applying at all.

1 is represented as , which given any function returns a function which applies once to .

2 is represented as , which given any function returns a function which applies twice to .

3 is represented as , which given any function returns a function which applies three times to .

## 48: Self-Adjoint Linear Operators

November 27, 2016

Posted by on A linear operator is **self-adjoint **iff it is its own adjoint, i.e. iff

.

This is equivalent to the condition that the matrix of with respect to any orthonormal basis is Hermitian (the matrix is its own conjugate transpose).

In addition, if is self-adjoint, then there exists an *orthonormal eigenbasis* for such that the matrix representation of with respect to is a diagonal matrix with real entries.

## 47: Invariant Distributions as Eigenvectors

November 26, 2016

Posted by on Since a stationary distribution of a finite Markov chain satisfies , where is the transition matrix of , it can be seen as an eigenvector of eigenvalue under the linear transformation by . Specifically, is the intersection of the eigenspace with the hyperplane formed by the constraint that .

(Here the vector space in question is , where is the number of states in .)

## 46: Absorbing States of Markov Chains

November 25, 2016

Posted by on A state in a Markov chain is **absorbing** iff it is impossible for the chain to leave once it’s there. If an absorbing state is accessible from any arbitrary state in , then is likewise said to be absorbing.

## 45: Transient and Recurrent States of Markov Chains

November 24, 2016

Posted by on A state of a Markov chain is **transient **if, given we start from , there is a non-zero probability that we will never return to . A state is transient iff the expected number of visits to that state is finite.

Conversely, is **recurrent **if, given we start from , the probability we will eventually return to is 1. A state is recurrent iff the expected number of visits to that state is infinite.

## 44: Sophmore’s Dream

November 23, 2016

Posted by on **Sophmore’s dream** refers to the identity

.

The name refers to the fact that this is an identity which, although true, seems ‘too good to be true’ in some sense, and looks at first like the naive misapplication of ideas not well-understood by the user. A good second example of this is the *freshman’s dream*, which refers to the mistaken identity .

## 43: Aperiodicity of Markov Chains

November 22, 2016

Posted by on A state in a Markov chain is **aperiodic **iff there exists an such that

.

That is, a state is aperiodic if the chain can always loop back to this state in an arbitrary number of steps.

A Markov chain is aperiodic iff every state in the chain is aperiodic. If the chain is irreducible, then the existence of a single aperiodic state implies that the entire chain is aperiodic.

## 42: Adjoint Operators

November 21, 2016

Posted by on In linear algebra, if is a linear operator over a finite vector space , then there exists a unique , the **adjoint operator**, such that

for all .

## Recent Comments