Home
Xinyue Liu's Blog
Cancel

Easy Foundations for Programming Languages VI — PCF Extensions (Unit, Sum, Recursive Types)

In this article, we introduce several important extensions of PCF. All are obtained by adding new types. The first extension is a very simple one, a type unit with only one element. The second ext...

Easy Foundations for Programming Languages V — PCF Iteration and Recursion

In this article, we will discuss how to represent iterations in PCF using recursions. Then we are going to compare the natural-number functions definable in PCF with the classes of total and partia...

Easy Foundations for Programming Languages IV — PCF Semantics

In the last article, we have seen all of the structure of PCF, now we will take a step back and discuss the meaning, or semantics, in a general way. We want our discussion can be applied to a varie...

Randomized Algorithm XII — Prediction with Expert Advice

In some esports tournaments (like CS2, Dota, etc.), game officials often open up channels for fans to participate in guessing which professional team will win. People want to benefit by betting on ...

Randomized Algorithm XI — 2-SAT & Markov Chain

There are two normal forms in propositional logic: disjunctive normal form (DNF) and conjunctive normal form (CNF). In the last article, we know that DNF satisfying problem is easy to solve; howeve...

Easy Foundations for Programming Languages III — The Language PCF & Its Syntax

In this article, we will present a language for Programming Computable Functions called PCF. This is a typed functional language based on lambda calculus, and is originally formulated by Dana Scott...

Randomized Algorithm X — DNF & Monte Carlo Method

Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. This article introduces the applica...

Randomized Algorithm IX — Hashing

A Bloom filter is a space-efficient probabilistic data structure, conceived by Burton Howard Bloom in 1970, that is used to test whether an element is a member of a set. This article will describe ...

Randomized Algorithm VIII — Balls into Bins

The balls into bins problem is a classic problem in probability theory that has many applications in computer science. It aims to answer how to balanced allocate resources in a random way. In this ...

Easy Foundations for Programming Languages II — Notation and Mathematical Conventions

In this article, we recover some notation and mathematical conventions that will be frequently used in subsequent articles. We assume readers have basic knowledge of grammar and logic. Grammars G...