Combing of a group 2026-10-14
Choose a finite symmetric generating alphabet and one word representing each group element, with the empty word. The associated paths in the Cayley graph start at the identity and traverse one edge per unit time, remaining at their endpoint after completion. A synchronous combing has a constant such that paths to adjacent endpoints stay within at equal times. An asynchronous version permits increasing reparametrizations. The formal language need not be a regular language; regular synchronous representative languages define automatic groups.
Concatenation of formal languages Created 2026-10-05 Updated 2026-10-06
For formal languages over the same alphabet, concatenate each word over an alphabet in with each word over an alphabet in . This operation is associative, has identity and absorbing element the empty language.
Dead state of a finite automaton Created 2026-10-06 Updated 2026-10-14
A dead state of a finite automaton has no path to an accepting state. In a complete deterministic finite automaton, all dead states may be merged into one rejecting sink without changing the accepted formal language.
Decision problem 2026-09-24
A decision problem asks for one of two answers, conventionally encoded as zero and one. Equivalently, it asks whether an input belongs to a formal language.
Deterministic finite automaton Created 2026-09-24 Updated 2026-10-14
A deterministic finite automaton has exactly one automaton transition for every automaton state and input symbol. Formally, a DFA is a tuple : is a nonempty finite set of automaton states, a finite alphabet, a function, the initial automaton state, and the accepting automaton states. Its unique path on a word accepts if it ends in after consuming the entire input. Visiting earlier does not suffice.
For a concrete binary divisibility automaton, recognize the words whose values in the binary numeral system are divisible by three. Choose , , , and . Each automaton state names the congruence class of the integer read so far. Appending a binary digit changes its value to , so the automaton transition isThe modular arithmetic therefore needs only three automaton states, whatever the input length. The full function is , , , , , and .
A three-state DFA for binary digits representing integers divisible by three, with accepted and rejected traces
. Details. For , the successive automaton states are , so the word is accepted. For , they are , so it is rejected. Leading zeros are allowed: they leave the initial automaton state unchanged. We explicitly assign value zero to the empty word, which is accepted because the initial automaton state is accepting. This is a convention for a formal language, rather than a claim that ordinary written numerals include a blank numeral.
The generator checks every word of up to eight binary digits, comparing the final automaton state with the integer value modulo three. Each length includes all words, preserving leading zeros as distinct inputs:
All 511 checks agree. They are useful for catching a reversed arrow or mistaken label, but the reason the DFA works at every length is its invariant: after reading any word of value , its automaton state is . The update preserves that statement by mathematical induction. Through the extended transition function of a deterministic finite automaton, this becomes .
Empty language 2026-10-05
The formal language containing no words over an alphabet. It differs from the language containing only the empty word, which is a multiplicative identity for concatenation of formal languages.
Finite-state machine 2026-10-14
A finite-state machine processes inputs using a finite set of automaton states and input-dependent automaton transitions. An automaton state records everything the machine remembers; an automaton transition says how that memory changes on the next symbol. A finite-state machine may also emit outputs. Here the emphasis is on recognizing a formal language: start in a designated automaton state, read a word from an alphabet, and accept exactly when the final automaton state is designated accepting.
Finite memory does not impose a maximum input length. A finite-state machine can read arbitrarily long words, revisiting its automaton states indefinitely. The restriction is that the part already read must be compressed into one of finitely many summaries. For divisibility by three, a word of binary digits can describe an enormous integer, yet its congruence class modulo three is all that the machine needs to retain. Two already-read words giving the same automaton state behave identically under every subsequent continuation in a DFA.
This makes finite-state machines useful whenever past details can be forgotten safely: checking whether a sequence of commands follows an allowed order, or recognizing a pattern with a regular expression. The beautiful design question is which distinctions about the past matter to the future. DFA minimization makes that question precise by merging indistinguishable states of a deterministic finite automaton. Both DFAs and NFAs recognize exactly the regular languages.
Left quotient of a formal language 2026-10-06
For a word and a formal language , the left quotient is the possible continuation language after the prefix . Two prefixes have the same left quotient exactly when they are Myhill-Nerode equivalent. For a regular language only finitely many distinct left quotients occur.
Mathematical logic Created 2026-09-24 Updated 2026-10-13
Mathematical logic studies formal languages, formal proofs, model theory, computability theory, and the foundations of mathematics. It makes the rules of reasoning explicit enough that reasoning itself becomes an object of mathematics. Proof theory studies deductions; model theory studies interpretations in which statements hold.
Three questions organize the subject: is an expression a well-formed first-order formula, is it true in a specified first-order structure, and does it have a formal proof from specified axioms? These questions are distinct. For example, is a first-order sentence in an appropriate first-order language; it is false in the natural numbers but true in the rational numbers, with .
The beauty of mathematical logic is that the same logical connectives and rules of universal quantification and existential quantification organize arguments across mathematics. Classical propositional logic uses two truth values; Intuitionistic propositional logic interprets logical implication through constructions on proofs, without unrestricted law of excluded middle. This proof-based framework is developed in Frank Pfenning, Natural Deduction, sections 1–3.
Padded convolution of words 2026-10-06
The padded convolution of words reads two finite words over an alphabet in parallel, extending the shorter with a fresh padding symbol until the longer ends. Its length is . Padding may only occur as a suffix, and a column is excluded. This encodes synchronous two-tape relations as formal languages over a finite paired alphabet.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 5 4 iii Solution Created 2026-10-03 Updated 2026-10-14
First construct the bounded-difference automaton. Fix as above, enlarging it if necessary. Its states are the finitely many elements , together with a reject state and finite flags recording when padding has started on each tape. The initial state is . Read the pair of words synchronously, padding their ends with a symbol representing the identity. If the current prefixes represent , the difference state is . A letter pair updates it byReject if the new difference lies outside ; padding must occur only in the final suffix of a tape. The accepting state for the generator is . Induction on the prefix length proves that the machine accepts exactly the padded pairs whose prefix differences stay bounded by and whose final difference is . In particular it correctly recognizes multiplication by for any pair of the chosen combing representatives with adjacent endpoints. Taking accepting state gives the equality machine.
If the combing formal language is regular, take the product with its two word acceptors. These are the usual group multiplier automata, accepting exactly with . From a known representative , a finite-state automaton search with its first tape fixed finds a representative of : existence is guaranteed, so the breadth-first search terminates. Equality is tested by the identity multiplier. Starting with a representative of , repeat these operations over the generators, identifying equal vertices, to build any prescribed finite-radius region of the Cayley graph and all its generator-labelled edges. Iterating multiplication over an input word and testing equality with the identity gives a word problem algorithm.
A bare geometric combing does not imply that is a regular language. Nor can a finite-state automaton recognize the indicated endpoint relation on all words without any restriction: in , which has its usual geodesic synchronous combing, fixing the second word to would make the multiplier for recognize precisely the first words equal to the identity. Intersecting those words with gives , a nonregular language: pumping the initial block changes its exponent without changing the inverse block, contradicting acceptance of precisely the equal exponents. Thus the literal unrestricted-pair request is false; the machines above recognize bounded fellow-travelling pairs, or full representative-pair relations under the additional automatic-language hypothesis.
Nevertheless the final decidability assertion is true for a synchronous combable group, without a regular-language assumption. Here is a terminating filling bound, avoiding any assumption that the given combing is computable. Let be the number of words of length at most over . A horizontal row of the diagram in part (ii) is encoded by its ordered rung words, so there are at most possible row types. If two rows have the same word tuple, delete the band between them and identify corresponding labelled rungs. This preserves the outside boundary and leaves a valid diagram of the same short relators. Equivalently, the first column is always at , so identical rung tuples describe the same vertex configuration. Repeatedly remove such bands. At most distinct rows remain, with at most short-relator cells per layer.
This finite-state row shortening of a combing diagram gives the recursive bound . For the given finite group presentation, every short identity in the finite set has some fixed diagram over its defining relators. Let bound their areas. Replacing each short face by its fixed diagram givesPart 3(ii) now supplies a terminating word decider. This also constructs finite Cayley graph regions for a nonregular combing: enumerate words of bounded length, use the decider on to identify vertices, and use it on to determine the generator edges. The finite ball and transition table of the bounded-difference machines can consequently be computed. The constants depend on a fixed combing and are not a uniform procedure certifying combability of an arbitrary input group presentation. Every finite group presentation of this synchronous combable group has solvable word problem, by the presentation-invariance proof in Q3.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 5 4 i Solution Created 2026-10-03 Updated 2026-10-14
Work with a finite symmetric alphabet . If , its path starts at , visits at integer time , travels at unit speed along the intervening generator edges, and stays at its endpoint for .
Two such paths synchronously -fellow travel ifAn asynchronous version permits increasing time reparametrizations. Checking all integer times suffices after a bounded enlargement of for the edge interiors.
A combing of a group chooses a representative word for every , with empty. A synchronous combing has a uniform constant such that representatives with adjacent endpoints satisfy the synchronous fellow-traveller property. A group admitting this is a synchronous combable group. The formal language need not be regular or computable. A regular language of representatives satisfying the synchronous condition instead gives an automatic group. This distinction is relevant to the finite-state automata request in part (iii); the present argument uses the synchronous meaning throughout. The definitions and distinction are also made explicitly in Combings of Groups and the Grammar of Reparameterization, Section 1.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 1 Solution Created 2026-10-03 Updated 2026-10-07
Fix a finite alphabet . A regular expression is built recursively from , , and the letters , using union, concatenation, and Kleene star. Its interpretation is a formal language: the basic expressions denote , , and , while , , and denote , , and all finite concatenations of members of , including the empty concatenation. In particular, and are different expressions with different meanings.
Kleene theorem identifies exactly the languages described by regular expressions with those recognized by finite-state automata. Start with a deterministic finite automaton (DFA) having states , initial state , accepting set , and transition function . Let describe paths from to whose internal states lie among . At stage zero use the union of letters labelling direct transitions from to , with added if ; use if there are no such possibilities. Define the finite-state path expressions recursively byA path either avoids internally or decomposes at its visits to : an initial piece into , any number of return pieces at , and a final piece out. Each piece has no internal occurrence of . This proves the recursion by induction, including paths with or , where empty pieces are permitted. Thusis a regular expression for the DFA's accepted formal language. An empty accepting set gives the expression . This is the path form of state elimination for finite automata.
A nondeterministic finite automaton (NFA) replaces a single successor state by a set of possible successors. It accepts if there exists an accepting run with and . Rejection means that no accepting run exists, rather than that some run rejects. For an Epsilon-NFA, transitions labelled consume no symbol; acceptance means a path whose non-epsilon labels spell . In particular, acceptance of the empty word is tested using the epsilon closure of the initial state.
The same Kleene theorem holds for nondeterministic finite automata. For an NFA without epsilon transitions, the powerset construction has state set , initial state , transition on letter , and accepting subsets meeting . Induction on word length shows that its state is exactly the set of possible current NFA states. For an Epsilon-NFA, start from , where is epsilon closure, and useThis subset construction with epsilon transitions preserves the accepted formal language and gives a DFA with at most states. The already proved direction of Kleene theorem therefore gives a regular expression for every NFA language.
For the converse, recursively construct an Epsilon-NFA with a designated initial state and final state for a regular expression. Use two states with no connecting path for , one epsilon edge for , and one edge labelled for . Keep component state sets disjoint. Union uses a fresh initial state with epsilon edges into both components, and epsilon edges from their finals to a fresh final. Concatenation joins the first final to the second initial by an epsilon edge. For Kleene star, use fresh initial and final states, an epsilon edge directly between them for zero iterations, an edge into the old initial, and epsilon edges from the old final both back to the old initial and out to the new final. Each construction has exactly the intended union, concatenation, or iteration semantics. Induction on the regular expression proves correctness; the subset construction with epsilon transitions then gives a DFA. This proves both directions of Kleene theorem.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 21 2 ii Solution Created 2026-10-03 Updated 2026-10-06
Yes: regular languages are closed under the shuffle of formal languages. The construction must allow letters common to both alphabets to be assigned to either input word.
Take complete deterministic finite automata recognizing . Construct a nondeterministic finite automaton on over . Its initial state is and its accepting states form . On a letter , its possible moves from areBoth moves are allowed when belongs to both alphabets. They may coincide; that causes no difficulty.
For every run, record whether each move updated the first or the second coordinate. The letters assigned to each coordinate, in their original order, form two words . The final coordinate states are exactly the states reached by reading in . Thus an accepting run expresses the input as an interleaving of a word of and a word of .
Conversely, given such an interleaving, assign each input position to the word from which it came. The corresponding choices of transitions form a run ending in . This proves equality between the recognized formal language and the shuffle of formal languages, in both directions. No assumption of disjoint alphabets is needed. If one contributing word is the empty word, no move need update that coordinate; the initial pair is accepting exactly when both empty words are accepted.
Apply the powerset construction to this nondeterministic finite automaton to obtain a deterministic finite automaton. In particular,
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 4H a Solution Created 2026-09-24 Updated 2026-10-05
Use state elimination for finite automata on a generalized finite automaton, whose directed edges are labelled by regular expressions. Add a fresh initial state with an -edge to the old initial state and a fresh final state with -edges from all old accepting states. Every missing edge has label , the empty language; parallel edges are merged by union. The label denotes the language containing just the empty word.
When eliminating a state , replace the label on each surviving edge byHere juxtaposition means concatenation of formal languages, and the Kleene star allows zero or more traversals of the loop at . Then delete and its incident edges. Eliminate every original state; the remaining label is a regular expression for exactly the accepted formal language. The update accounts for paths avoiding and paths entering , looping there any number of times, and leaving it.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 4F Solution Created 2026-09-24 Updated 2026-09-29
An alphabet is a finite nonempty set of symbols. A word over an alphabet is a finite sequence of symbols from , including the empty word ; the set of all words is . A formal language over is any subset .
A regular expression is defined recursively from , , and the individual symbols by the operations of finite union, concatenation, and Kleene star. Its language is defined by
There are only countably many regular expressions: each is a finite word over a finite collection of symbols and punctuation. On the other hand, for every nonempty finite alphabet, is countably infinite, so its power set is uncountable by the Cantor theorem. Thus there are uncountably many languages but only countably many languages denoted by regular expressions. Consequently
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 4F i Solution Created 2026-09-24 Updated 2026-09-29
A context-free grammar is a quadruple consisting of a finite set of nonterminal symbols, a disjoint finite alphabet of terminal symbols, a start symbol , and a finite set of productions with and . A sentence is a terminal word over an alphabet with , and the generated formal language is .
The first language is context-free. For example, the productionsgenerate exactly : each recursive production adds two s to the left and two s to the right.
Recursive language Created 2026-10-05 Updated 2026-10-06
A formal language is decidable if a Turing machine halts on every input and correctly determines membership. Equivalently its encoded words form a recursive set. A computably enumerable language requires only a machine that eventually accepts every member; it may run forever on nonmembers.
