Overview

Today:

How can we calculate functions with unbounded input and output lengths?

Take an XOR function with $\{0,1\}^*$ input, we can just write a loop to process each bit.

This is known as a “Single Pass Algorithm” + constant additional memory.

Goal: Build a model for constant memory algorithms

Deterministic Finite Automata

Kinda like a Markov chain with deterministic state transitions.

XOR example: $C$ states over $\{0,1\}$ is a pair $D=(T,S)$ where $T:[C]\times \{0,1\}\to [C]$ and $S\subseteq [C]$.

We say a DFA $D=(T,S)$ computes a function $f:\{0,1\}^* \to \{0,1\}$ if $f(x) = D(x) \forall x\in\{0,1\}^*$.

We define a start state and and alphabet.

Anatomy of a DFA

Fixed: number of states, transition table, accepting states

Unbounded: input length