Summary for midterm test 2 • Hash tables, direct-addressing hash table, average length of list in hash table, hash functions, universal family of hash functions,…
5. Weighted FSAs 1 Reminder/summary: (Boolean) FSAs Generation of strings is fundamentally defined like this: (1) x1x2…xn ∈L(M) ⇐⇒ ··· I(q0)∧∆(q0,x1,q1)∧···∧∆(qn−1,xn,qn)∧F(qn) q0∈Q…
7. Transition-based parsing of CFGs 1 Embedding and acceptability patterns The following collection of sentences provides a motivating “test set” for basic theories of human…
8. Tree grammars 1 Review: Stringsets and string grammars The kind of thing we’ve done with strings many times now follows this pattern: (1) a.…
4. More on FSAs: Limitations and closure properties 1 Interchangeable subexpressions Now forget about FSAs for a moment, and just consider sets of strings “out…
2. Recursive types and recursive expressions 1 Representing propositional formulas in Haskell You may have seen recursive definitions like (1) before. (1) The set F…
1. Expressions, variables and substitution An expression (or term) is a piece of code, or a program. Examples include 3, 3 + 4, “hello” and…
Module Code COM00023I BEng, BSc, MEng and MMath Degree Examinations 2020-2021 Department: Computer Science Title: Theory 3 (THE3) Time Allowed: 24 hours (NOTE: Late papers…
3. Introducing finite-state automata First some standard stage-setting definitions: (1) For any set Σ, we define Σ∗ as the smallest set such that: • ε∈Σ∗,and…
6. Context-free grammars A canonical first example of a context-free grammar (CFG) is shown in (1). This grammar generates the stringset {anbn | n ≥…