Figurespace

Public Spaces

Ready-made learning paths you can add to your own Figurespace.

Procedural Programming

ECS401U Procedural Programming - 2026

Materials
endterm2025
endterm2025
ECS401slides4-if-for
ECS401slides4-if-for
style-guide_merged
style-guide_merged
+16 more

Orient Yourself and Build a Route

Build Procedural Programs from Methods

Manipulate Values, Types, and Input

Make Decisions with Boolean Logic

Repeat Fixed Work with For Loops

Store and Process Bulk Data with Arrays

Model Entities with Records and Accessors

Search and Repeat with While Loops

Design and Use Abstract Data Types

Reason about References, Stack, and Heap

Dry Run Procedural Code Exactly

Solve with Recursion and Binary Search

Sort Arrays and Compare Algorithms

Read, Write, and Copy Files

Write High-Mark Explanations and Comparisons

Design, Write, and Test Full Programs

Run Mixed Readiness Checks and Repair

View ECS401U Procedural Programming - 2026

A complete, structured learning path for Procedural Programming, built considering the module’s lectures, labs, revision material and exam questions. The Space develops the knowledge and practical skills needed across the full module, including tracing code, predicting program behaviour, finding errors and writing clear solutions. Follow the path from the foundations or jump directly to the lessons you need, with each Session grounded in the relevant course material and exam-style tasks. You will end by doing a full exam paper.

Subject
Procedural Programming
Lessons
17
Materials
19

Materials

  • endterm2025.pdf
  • ECS401slides4-if-for.pdf
  • style-guide_merged.pdf
  • ECS401slides6-accessor-while.pdf
  • ECS401slidesWK11-12-sorting2025.pdf
  • ECS401slides1-2025.pdf
  • ECS401slides3-if.pdf
  • 2026ppe1.pdf
  • dry-run-guide.pdf
  • Markscheme-guidance.txt
  • guidance.txt
  • ECS401slides5-array.pdf
  • endtermanswers.pdf
  • ECS401slides2-assign.pdf
  • ECS401slides9-References.pdf
  • ECS401slides7-feedback.pdf
  • ECS401slidesWK10-RecursionDC2025.pdf
  • ECS401slides8-ADT.pdf
  • ECS401slidesWK11-file2025.pdf

Learning path

  1. Orient Yourself and Build a RouteA broad diagnostic maps the whole module and helps you enter the full route at the capabilities you actually need. Main objective: You will sample the major programming, tracing, explanation, data-structure, algorithm, and file-processing capabilities, identify precise gaps, and choose a prerequisite-aware route through the module.. Objectives: You will map the module into procedural structure, values and types, decisions, repetition, arrays and records, searching, ADTs, references, exact tracing, recursion, sorting, file processing, explanations, and full-program construction.; You will produce a short cold sample of an explanation, a dry-run table, a method-based program plan, and one algorithm or data-structure task without opening model answers.; You will classify each capability as secure, usable with checking, or needing repair and name the exact failure rather than writing a vague topic label.; You will be recommended the earliest lesson that repairs each gap while being allowed to skip capabilities you can already demonstrate independently.; You will begin a compact note set containing reusable method patterns, dry-run rules, comparison structures, and personal error traps, adding to it only after active attempts.. Materials: ECS401slides1-2025.pdf; 2026ppe1.pdf; Markscheme-guidance.txt; guidance.txt.
  2. Build Procedural Programs from MethodsYou will turn a small task into a complete Java procedural program made from focused, communicating methods. Main objective: You will construct a valid procedural-program skeleton and decompose a specification into small methods using local variables, arguments, returns, and clear input–process–output responsibilities.. Objectives: You will explain a program as a collection of named methods and identify calls, procedures, functions, classes, and the starting role of main.; You will write a complete class containing main and additional method definitions, with record-only classes kept separate when needed.; You will declare variables inside the smallest suitable method or block and never rely on global state.; You will choose a function when a result must be returned and a procedure when the method only performs an action.; You will pass information into methods through arguments and pass results back through return values.; You will split a task into input, processing, and output methods whose names reveal the program’s high-level algorithm.; You will use meaningful names, method comments, consistent indentation, and one clear task per method so the code can be understood and tested locally.. Materials: ECS401slides1-2025.pdf; style-guide_merged.pdf; ECS401slides2-assign.pdf; ECS401slides4-if-for.pdf.
  3. Manipulate Values, Types, and InputYou will use variables, expressions, assignment, keyboard input, output, and type conversion without semantic mistakes. Main objective: You will write and explain straight-line Java code that stores typed values, evaluates expressions, reads input with nextLine, converts it safely, updates variables by assignment, and prints exact results.. Objectives: You will explain a variable as named typed storage and distinguish the variable, the value currently stored, and the method in which it exists.; You will declare and initialise int, double, boolean, char, and String variables and explain how types constrain values and operations.; You will read assignment as copying the right-hand value into the left-hand variable and distinguish it from equality.; You will predict arithmetic and String-concatenation expressions in the correct evaluation order and avoid confusing numbers with numeric text.; You will create a Scanner, read complete lines with nextLine, and package repeated input behaviour into methods.; You will convert numeric text using Integer.parseInt before performing calculations and explain why the conversion is necessary.; You will dry run straight-line assignments one executed line at a time and state the exact printed output.. Materials: ECS401slides2-assign.pdf; ECS401slides3-if.pdf.
  4. Make Decisions with Boolean LogicYou will construct, trace, and explain defensive if/else decision logic using correct comparisons and complete branches. Main objective: You will write and dry run decision-making code that forms correct boolean expressions, distinguishes assignment from comparison, handles every valid and invalid case, and explains exactly which branch executes and why.. Objectives: You will treat boolean as a typed value and build true-or-false expressions from relational operators.; You will use == for primitive values, .equals for Strings, and never use assignment as a test.; You will combine tests with &&, ||, and ! while accounting for short-circuit evaluation and operator meaning.; You will write if, else-if, and final else branches that cover the intended cases without overlap or omissions.; You will use decisions inside a repetition structure to reject invalid input and give a useful retry message.; You will trace each test with current values, execute only the selected branch, and omit non-executed lines.. Materials: ECS401slides3-if.pdf; ECS401slides4-if-for.pdf; style-guide_merged.pdf.
  5. Repeat Fixed Work with For LoopsYou will design, trace, and debug counter-controlled and nested loops for fixed, countable repetition. Main objective: You will write for loops with correct initialisation, condition, update, bounds, accumulators, and nested structure, then prove their behaviour through exact dry runs and boundary tests.. Objectives: You will identify the counter’s start value, continuation test, update, and body, and state the exact values it takes.; You will choose < or <= and the correct initial value so the body executes exactly the required number of times.; You will initialise and update totals, counts, products, or constructed Strings exactly once per required iteration.; You will first make the one-iteration body correct, then place the loop around it instead of trying to debug both at once.; You will show every repeated condition test, including the final false test that exits the loop.; You will use rectangular and triangular nested loops when a task processes pairs, tables, or shrinking ranges.. Materials: ECS401slides4-if-for.pdf; ECS401slides5-array.pdf.
  6. Store and Process Bulk Data with ArraysYou will create, fill, traverse, summarise, and safely index fixed-size arrays using focused methods. Main objective: You will design array-processing code that distinguishes indexes from values, respects fixed bounds and partial occupancy, uses loops for bulk work, and decomposes input, output, searching, and aggregation into reusable methods.. Objectives: You will explain an array as fixed-length, same-type bulk storage indexed by integers from zero.; You will declare an array variable, allocate the required length, and use length without attempting the nonexistent index at that length.; You will state separately the index being accessed and the value stored there, preventing off-by-one and value-as-position errors.; You will initialise or transform every element with a for loop whose counter is the array index.; You will keep a separate count of meaningful entries when an allocated array is not yet full and stop processing at that count.; You will split array input, printing, totals, averages, and other transformations into small methods with array and size arguments.; You will choose arrays for uniform bulk data and records for a named mixture of fields, including arrays of records when both are needed.. Materials: ECS401slides5-array.pdf; ECS401slides6-accessor-while.pdf.
  7. Model Entities with Records and AccessorsYou will define compound record types and control their creation and field access through focused methods. Main objective: You will model a real entity as a record, create valid record values, store them in arrays when needed, and write creation, getter, setter, and search methods that isolate field access from the rest of the program.. Objectives: You will define a record class whose named fields have types that match the entity being represented.; You will allocate records with new and initialise every required field before use.; You will use a creation method so records cannot be accidentally left uninitialised or inconsistently constructed.; You will write one getter and setter for each field and use dot notation only inside these record operations.; You will store records in an array and search one identifying field to recover the position of the complete record.; You will keep record classes field-only and place every method in the single procedural program class.. Materials: ECS401slides3-if.pdf; ECS401slides6-accessor-while.pdf; style-guide_merged.pdf.
  8. Search and Repeat with While LoopsYou will implement linear-search variants and choose while loops for repetition whose length is decided as the program runs. Main objective: You will write and explain linear searches, sentinel and input-validation loops, and for-versus-while choices, while preventing non-termination and preserving clear loop invariants.. Objectives: You will scan an unordered array from the first element, return the first matching index, and return -1 only after every valid element has been checked.; You will adapt the element type, equality test, stopping rule, and returned result for first, last, all, count, or record-field searches.; You will initialise the controlling state before the loop, test it at the top, and update it on every path through the body.; You will keep asking until a value satisfies the required range or allowed-option condition, returning only valid data.; You will process an unknown sequence until a sentinel appears while maintaining totals, counts, or stored results.; You will explain that every counter-controlled for loop can be expressed as a while loop, while genuinely input-controlled repetition is not a pure counter-controlled loop.; You will reject while(true) as the normal design, identify missing updates or unreachable exit conditions, and localise failures with targeted tracing.. Materials: ECS401slides6-accessor-while.pdf; style-guide_merged.pdf.
  9. Design and Use Abstract Data TypesYou will turn records into behavioural data abstractions whose representation is hidden behind meaningful operations. Main objective: You will specify an ADT by its visible values and operations, implement it with a record and methods, preserve its invariants, and demonstrate that client code remains unchanged when the internal representation changes.. Objectives: You will describe what users can observe and do without exposing the record fields or implementation algorithm.; You will choose the smallest complete family of create, query, and update operations required by the client program.; You will include meaningful operations that enforce behaviour or invariants rather than presenting getters and setters as the whole ADT.; You will implement creation, insertion, removal, query, and empty/full checks without allowing invalid state.; You will explain how two different record representations can implement the same operations while the client program remains unchanged.; You will design operations such as set insertion so the representation can never contain a forbidden duplicate or invalid state.; You will compare records and ADTs integratively: both create compound types, but only the ADT defines and protects a behavioural interface.. Materials: ECS401slides8-ADT.pdf; 2026ppe1.pdf.
  10. Reason about References, Stack, and HeapYou will explain and trace how primitive and reference values are stored, assigned, compared, and passed to methods. Main objective: You will draw and explain stack–heap state for arrays, records, and Strings, predict aliasing and null behaviour, and use method calls to show exactly when copying a reference makes mutations visible to the caller.. Objectives: You will show that primitive assignment copies the value into an independent variable, while array or record assignment copies a reference that can alias the same heap object.; You will draw a stack variable holding a reference arrow to array or record data on the heap and update the correct location for variable versus element assignment.; You will explain why == checks reference identity for arrays, records, and Strings, while .equals is needed for String content.; You will place local variables and parameters on the stack, actual arrays and records on the heap, and references in the variables that point to them.; You will distinguish null from an empty String or zero-length array and predict the error caused by following a null reference.; You will show that a method receives a copied reference, so element or field mutations are visible through the caller’s original reference after return.; You will use the current seti method to explain valid indexing, visible mutation, boolean return values, and what would happen for a null array.. Materials: 2026ppe1.pdf; ECS401slides9-References.pdf.
  11. Dry Run Procedural Code ExactlyYou will trace mixed Java code in the required ECS401 table style and reproduce its output exactly. Main objective: You will construct complete dry-run tables for assignments, decisions, loops, arrays, records, methods, references, and recursion, recording only executed lines and carrying state and return values across calls without approximation.. Objectives: You will give every executed line one row, omit unexecuted lines, and update only the state changed by that execution.; You will give each decision or loop test a column containing current values, a question mark, and the resulting true or false value.; You will repeat line numbers for every iteration, include the final false test, and represent each array index as its own sub-column.; You will create a separately titled table for each method call, show actual argument values, pause the caller, and carry the returned result back to the calling row.; You will represent record fields as sub-columns and use explicit address labels or stack–heap diagrams when aliasing is central to the question.; You will open a new table for every recursive call and resume suspended callers only after the base-case result returns.; You will place the final output in a separate box containing exactly the printed characters, spaces, and line breaks and no explanatory text.; You will audit for missing call tables, copied array rows, omitted final tests, skipped branches, and output that is semantically right but not character-exact.. Materials: 2026ppe1.pdf; dry-run-guide.pdf; ECS401slidesWK10-RecursionDC2025.pdf; ECS401slides7-feedback.pdf.
  12. Solve with Recursion and Binary SearchYou will design terminating recursive methods and use divide and conquer to search sorted arrays efficiently. Main objective: You will express recursive problems with a base case and smaller step case, trace the call stack, implement binary search over a sorted range, and compare its work with linear search.. Objectives: You will repeatedly split a problem into a smaller instance of the same form and combine or return the smaller solution.; You will use the middle element as a signpost, discard the impossible half, and continue only within the remaining sorted range.; You will state a non-recursive base case and a recursive case whose argument is smaller in a measure that must eventually reach the base.; You will translate a mathematical recurrence into Java for tasks such as a sum, product, or range calculation.; You will prove that each recursive path reaches the base case and identify missing or unreachable get-out clauses.; You will trace the descent and return phases separately, showing each call’s parameters, suspended expression, and returned value.; You will compare prerequisites, discarded work, worst-case checks, and the sort-versus-search trade-off for linear and binary search.. Materials: ECS401slidesWK10-RecursionDC2025.pdf.
  13. Sort Arrays and Compare AlgorithmsYou will implement bubble sort and reason about divide-and-conquer sorts, invariants, and efficiency. Main objective: You will trace and write in-place bubble-sort variants, explain merge sort and quicksort as recursive divide-and-conquer strategies, and compare their assumptions, data movement, and growth in work.. Objectives: You will state the required order, whether the original array may be changed, and which data properties affect the algorithm choice.; You will swap adjacent out-of-order values and make enough shrinking passes to place each largest remaining value in its final position.; You will explain why a void swap method changes the caller’s array even though the reference itself is passed by value.; You will maintain a sorted flag correctly so the algorithm stops only after a complete pass makes no swaps.; You will split the array, recursively sort both halves, and merge two already-sorted sequences by repeatedly selecting the smaller front value.; You will explain pivot partitioning, recursive subarray sorting, and the data-order case in which quicksort performs badly.; You will compare the quadratic comparison growth of bubble sort with the layered n log n pattern of merge sort.. Materials: ECS401slidesWK11-12-sorting2025.pdf.
  14. Read, Write, and Copy FilesYou will use persistent storage by opening, processing, and closing text-file streams safely. Main objective: You will write procedural methods that create output streams, read input streams line by line, detect end of file with null, copy unknown-length files, close every stream, and explain how persistent storage differs from screen and keyboard I/O.. Objectives: You will explain that file data survives the running program and can be reopened after the computer or process stops.; You will create a PrintWriter over a FileWriter, send lines to it, and close the output stream after the final write.; You will create a BufferedReader over a FileReader, read known lines with readLine, process them, and close the input stream.; You will read the first line before the loop, continue while the line is not null, and read the next line at the end of each iteration.; You will combine an input stream and output stream to copy every line while preserving order and closing both resources.; You will isolate opening, reading, transforming, writing, and closing responsibilities and test empty, one-line, multi-line, and missing-data cases.. Materials: ECS401slidesWK11-file2025.pdf.
  15. Write High-Mark Explanations and ComparisonsYou will turn genuine conceptual understanding into clear, integrative, example-driven exam answers. Main objective: You will write explanation and compare-and-contrast answers in your own words, use required examples purposefully, move between terminology and concrete execution, and self-mark for depth, synthesis, completeness, and clarity.. Objectives: You will explain a concept so a novice could reconstruct its meaning rather than repeat a memorised definition.; You will move from correct technical language to a concrete example or everyday explanation and then explicitly link the example back to the concept.; You will organise comparisons as several explicit similarity and difference points, treating both concepts together in every developed paragraph.; You will select lines or behaviours from the question’s supplied code and explain how each one illustrates the point being made.; You will choose relevant points about structure, execution semantics, intended use, defensive programming, limitations, common errors, storage, and efficiency rather than listing surface syntax.; You will compare your answer with model answers and marking guidance, identify missing or weakly explained points, and rewrite from memory in a clearer structure.; You will complete the current references explanation, records-versus-ADTs comparison, and a for-versus-while comparison under their word limits.. Materials: ECS401slides7-feedback.pdf; Markscheme-guidance.txt; 2026ppe1.pdf; style-guide_merged.pdf; guidance.txt; endtermanswers.pdf; endterm2025.pdf.
  16. Design, Write, and Test Full ProgramsYou will convert a substantial specification into a complete, high-mark procedural Java program under assessment conditions. Main objective: You will analyse a full-program specification, design records and ADTs, decompose the algorithm into methods, implement loops, decisions, arrays, search, and validation, then test boundary cases and repair the first incorrect method without copying model code.. Objectives: You will translate prose into data, commands, validation rules, loop termination, update conditions, and boundary cases before writing code.; You will produce a method list in which each method performs one clear task and main reads as the high-level algorithm.; You will choose records for compound entities, arrays for bounded collections, and meaningful ADT operations that protect the program’s invariants.; You will write a top-tested command or game loop and complete if/else structures whose conditions directly express the specification.; You will read with nextLine, convert explicitly, and reprompt until commands, ranges, and options meet the specification.; You will keep methods in one class, record classes field-only, variables local, names meaningful, literals named with final, and method purpose comments concise.; You will dry test ordinary flows, invalid inputs, empty and full data, failed searches, overshoots, exact finishes, repeated commands, and termination.; You will compare only after completing the attempt, assign each failure to a precise requirement or method, and rewrite that method without viewing the correction.. Materials: 2026ppe1.pdf; endterm2025.pdf; style-guide_merged.pdf; ECS401slides7-feedback.pdf.
  17. Run Mixed Readiness Checks and RepairYou will complete authentic timed work, mark it to the module standard, and independently reconstruct every weak answer. Main objective: You will choose an authentic full or sectional paper, work without tutor assistance, mark explanations, dry runs, algorithms, and code against the supplied standards, then redo each failed part from a blank page and update a final risk-focused revision plan.. Objectives: You will be recommended the current full paper, the shorter end-term paper, or selected unseen sections according to remaining time and prior exposure, while retaining the final choice.; You will open only the question material, set the official timer, and work independently without hints, intermediate checking, or model answers.; You will assign every lost mark to a missing concept, weak comparison, incorrect dry-run row, output character, unmet requirement, logic branch, style rule, or untested boundary.; You will rewrite weak explanations in your own words with several developed points and purposeful use of the supplied example.; You will rebuild every incorrect table and final output from fresh code reading without looking at the correction during the redo.; You will rewrite failed methods or control-flow sections directly from the specification and rerun the exact boundary case that exposed each error.; You will update the two double-sided note pages with only reusable structures and personal traps, then either repeat a focused lesson or complete one fresh transfer task for each remaining weakness.. Materials: 2026ppe1.pdf; endterm2025.pdf; guidance.txt; Markscheme-guidance.txt; endtermanswers.pdf; dry-run-guide.pdf.
Procedural Programming

(Exam Speedrun) ECS401U Procedural Programming - 2026

Materials
endterm2025
endterm2025
ECS401slides4-if-for
ECS401slides4-if-for
style-guide_merged
style-guide_merged
+16 more

Diagnose and Choose Your Route

Write High-Mark Explanations

Dry Run Mixed Java Exactly

Plan a Distinction-Level Program

Write and Repair the 20-Mark Program

Run and Repair a Timed Paper

View (Exam Speedrun) ECS401U Procedural Programming - 2026

A focused learning path for fast, last-minute Procedural Programming revision, built considering the module’s lectures, labs, revision material and exam questions. Start with a diagnostic Session to identify your weak areas, then go directly to the lessons you need. Each lesson focuses on the kinds of tasks required in the exam—tracing code, predicting output, finding mistakes, completing programs and writing clear solutions—so you can revise efficiently without working through the entire module again.

Subject
Procedural Programming
Lessons
6
Materials
19

Materials

  • endterm2025.pdf
  • ECS401slides4-if-for.pdf
  • style-guide_merged.pdf
  • ECS401slides6-accessor-while.pdf
  • ECS401slidesWK11-12-sorting2025.pdf
  • ECS401slides1-2025.pdf
  • ECS401slides3-if.pdf
  • 2026ppe1.pdf
  • dry-run-guide.pdf
  • Markscheme-guidance.txt
  • guidance.txt
  • ECS401slides5-array.pdf
  • endtermanswers.pdf
  • ECS401slides2-assign.pdf
  • ECS401slides9-References.pdf
  • ECS401slides7-feedback.pdf
  • ECS401slidesWK10-RecursionDC2025.pdf
  • ECS401slides8-ADT.pdf
  • ECS401slidesWK11-file2025.pdf

Learning path

  1. Diagnose and Choose Your RouteA compact check across all four January exam question types shows which repair sessions deserve your remaining time. Main objective: You will attempt a short, closed-book sample from all four January 2026 question types, identify the exact form of any mark-losing gaps, and choose only the repair sessions you need before a timed paper.. Objectives: You will map the paper into four outputs: a references explanation, exact dry-run tables and output, a records-versus-ADT comparison, and a full procedural program.; You will spend about 35–45 minutes producing a brief plan or partial answer for each question type without opening model answers or receiving teaching.; You will classify each question type as ready, nearly ready, or repair needed and name the precise failure, such as missing concepts, weak example use, dry-run formatting, control-flow semantics, program logic, decomposition, validation, or ADT use.; You will be recommended the explanation, dry-run, program-design, or full-program repair sessions that match your gaps, with the double-mark programming question prioritised when several areas are weak.; You will begin two double-sided A4 pages containing only high-value answer structures, dry-run rules, program patterns, and personal error traps exposed by the diagnostic.. Materials: 2026ppe1.pdf; guidance.txt; Markscheme-guidance.txt.
  2. Write High-Mark ExplanationsCold attempts on the two current written questions are repaired into clear, example-driven answers that match the module’s marking standard. Main objective: You will write a strong 400-word explanation of references and an integrative 400-word comparison of records and ADTs, using the exact examples supplied in the January 2026 paper.. Objectives: You will begin by writing a timed outline or one complete paragraph for each current question; the tutor will then focus only on missing concepts, weak synthesis, or poor use of the supplied example.; You will organise each compare-and-contrast answer around several explicit similarities and differences, explain each point, and show how the supplied example demonstrates it.; You will explain how primitive values and reference values differ, showing that array or record variables hold an address on the stack while the actual data is stored on the heap.; You will use seti to explain why passing an array copies its reference, why changes to its entries remain visible after the method returns, and why following null causes an error.; You will explain that both records and ADTs create useful compound types, while an ADT adds a controlled family of operations that hides the record representation from the rest of the program.; You will use StringSet to show why ADT operations are not merely getters and setters: the add operation must preserve the no-duplicates rule, and the rest of the program must avoid direct field access.; You will mark both answers against the model answer and examiner feedback, then redraft any paragraph that merely describes code, separates the concepts instead of comparing them, or fails to link the example back to the point.. Materials: 2026ppe1.pdf; Markscheme-guidance.txt; ECS401slides9-References.pdf; ECS401slides8-ADT.pdf.
  3. Dry Run Mixed Java ExactlyA cold Question 2 attempt is repaired into precise tables for decisions, arrays, loops, and method calls, with exact final output. Main objective: You will complete all three January 2026 dry runs using the ECS401 table style and state the exact full output without losing marks to semantics or formatting.. Objectives: You will begin with one complete Question 2 part without help; the tutor will use the first wrong row, missing column, or incorrect output character to decide what needs repair.; You will give every executed line its own row, omit lines that are not executed, and update only the state changed on that line.; You will give each boolean test its own column and write the expression with current values substituted before the final true or false result.; You will show repeated loop checks including the final false check, represent each array index as a sub-column, and change only the element assigned on each row.; You will create a separate titled table for every method call, show actual argument values in the call, use formal parameters inside the called table, and carry the return value back to the caller.; You will write a separate final-output box containing exactly the characters printed, including spaces and line breaks but excluding quotation marks that the program does not print.; You will check your work specifically for skipped if branches, array updates copied across whole rows, missing final loop tests, incorrect String concatenation, and missing call tables.. Materials: 2026ppe1.pdf; dry-run-guide.pdf; endterm2025.pdf.
  4. Plan a Distinction-Level ProgramA cold design attempt turns the darts specification into a simple algorithm, ADT boundary, method map, validation plan, and test set before code is written. Main objective: You will produce an exam-ready design for the 20-mark darts program that is logically simple, procedural, well decomposed, validated, and built around useful records and ADT operations.. Objectives: You will first spend about 12–15 minutes producing the game invariant, loop condition, bust rule, records, and method list without reading the model answer; the tutor will repair only the first design weakness.; You will express the game as one clear loop: read a throw, calculate its value, test whether it is legal, deduct it only when legal, and otherwise keep the score unchanged and continue.; You will split the specification into small, named methods with clear arguments and return values, keeping the main loop as a readable sequence of question-specific tasks.; You will choose a small record representation for the dart and game state, then define only the create, query, and update operations the rest of the program genuinely needs.; You will plan repeated validation for s/d/t and 1–20, a while condition that states the real end condition, and a final catch-all branch for invalid options.; You will order the implementation so that the outer loop, question-specific logic, if statements, and validation are secured before optional polish or repetitive helper methods.. Materials: 2026ppe1.pdf; style-guide_merged.pdf; ECS401slides8-ADT.pdf; Markscheme-guidance.txt.
  5. Write and Repair the 20-Mark ProgramA full blank-page implementation is tested against the darts rules, marked against the examiner standard, and repaired without copying the model answer. Main objective: You will write the complete January 2026 darts program under timed conditions, then test and repair its logic, decomposition, validation, procedural style, records, array use, and ADT discipline.. Objectives: You will begin from a blank page with record definitions, the program class, main, and the outer score loop before filling in helper methods.; You will implement the question-specific legal-throw test directly and verify that overshoots or non-double finishes leave the score unchanged while the game continues.; You will access each record through the small ADT interface you designed and avoid dot notation outside those primitive operations.; You will repeatedly validate the modifier and board number, using nextLine-based input helpers and returning only values allowed by the specification.; You will use an array where it simplifies the allowed options and a bounded search or equivalent clear check without adding irrelevant data structures.; You will dry-test the finished program on normal, invalid, overshoot, non-double-zero, score-one, and valid-finish cases before opening the model implementation or feedback.; You will compare your program with the model and examiner feedback only after the attempt, identify the first logic or design divergence, and rewrite the affected method from a blank page.. Materials: 2026ppe1.pdf; style-guide_merged.pdf; ECS401slides8-ADT.pdf.
  6. Run and Repair a Timed PaperYou will choose a full January paper or shorter end-term paper, work without help, then mark and independently repair every lost-mark step. Main objective: You will complete either the full 2.5-hour January 2026 paper or the 1.5-hour 2025 end-term paper under exam conditions, then diagnose and repair every attempted error from a blank page.. Objectives: You will be recommended the full January paper when you need a complete rehearsal or the shorter 2025 end-term paper when time is limited or the January questions have already been practised; you will choose the attempt.; You will open only the question pages, set the official timer, and work independently on paper; during the attempt the tutor will not provide hints, check intermediate work, or expose model answers.; After the timer, you will compare explanations, dry runs, and code with the supplied model answers and marking guidance, assigning each lost mark to a precise missing concept, unsupported point, wrong row, output character, logic branch, or design flaw.; You will rewrite any weak explanation or comparison from a blank page using your own words, several developed points, and purposeful use of the question’s example.; You will reconstruct every incorrect dry-run part in a fresh table, including the exact final output, without looking at the correction while redoing it.; You will rewrite every failed program method or control-flow section from the specification, then rerun the relevant boundary tests instead of copying model code.; You will finish the two double-sided A4 pages with only the structures and personal traps revealed by the timed attempt, then state your five highest-risk exam-day mistakes.. Materials: 2026ppe1.pdf; endterm2025.pdf; endtermanswers.pdf; dry-run-guide.pdf; style-guide_merged.pdf; Markscheme-guidance.txt; guidance.txt.
Automata

ECS421U Automata & Formal Languages - 2026

Materials
lecture11
lecture11
Lecture8_2026
Lecture8_2026
lecture10
lecture10
+16 more

Read Formal Languages Precisely

Build and Read Finite-State Automata

Eliminate Epsilon and Determinise

Translate Regular Expressions and FSAs

Construct Regular-Language Operations

Minimise DFAs and Test Equivalence

Derive and Parse with CFGs

Design Context-Free Grammars

Prove Languages Are Not Regular

Transform Grammars to CNF

Decide CFG Membership with CYK

Read and Simulate Pushdown Automata

Design PDAs for Exam Languages

Convert Any CFG to a PDA

Know the Limits of Context-Free Languages

Read and Simulate Turing Machines

Build TMs for Linked Counts

Build TMs That Copy and Compare

Solve the Hard Turing-Machine Constructions

Complete the Resit Mock Confidently

View ECS421U Automata & Formal Languages - 2026

A structured learning path for Automata and Formal Languages, built considering the module’s lectures, labs, revision sheets and mock exams. Each lesson focuses on a specific skill required for the exam, tests your understanding and works through mistakes. It can be followed in order or used to revise particular topics before the exam. It is also useful more generally for anyone studying automata and formal languages who wants a structured way to work through the subject.

Subject
Automata
Lessons
20
Materials
19

Materials

  • lecture11.pdf
  • Lecture8_2026.pdf
  • lecture10.pdf
  • Mock Exam End Term.pdf
  • Lecture9.pdf
  • ecs421u_lecture_12_revision.pdf
  • mockexamandsolutions.pdf
  • week 12 revision exercises.pdf
  • lab8solutions.pdf
  • lab8.pdf
  • lab9.pdf
  • lecture2.pdf
  • lab9 (1).pdf
  • lab10-solutions-updated.pdf
  • Lecture 1 Full.pdf
  • lecture3.pdf
  • lecture5.pdf
  • lecture6.pdf
  • lecture4.pdf

Learning path

  1. Read Formal Languages PreciselyMake the notation, examples, and machine hierarchy usable before any construction work. Main objective: Translate precisely between alphabets, words, language set notation, and the regular/context-free/Turing-machine hierarchy, including producing and rejecting examples from quantified definitions.. Objectives: Interpret alphabets, ε, Σ*, word length, reversal, exponents, set-builder notation, tuples, and language operations without confusing symbols with sets of words.; Generate boundary examples and non-examples from quantified language definitions, always testing n = 0 and the empty word when allowed.; Classify a language as regular, context-free, or requiring a Turing machine based on the memory relationship the definition demands.; Recognise that the same language may be represented operationally, syntactically, or declaratively and keep the represented language separate from the notation used.. Materials: Lecture 1 Full.pdf; ecs421u_lecture_12_revision.pdf; lecture6.pdf; lecture11.pdf; lecture3.pdf; mockexamandsolutions.pdf.
  2. Build and Read Finite-State AutomataTurn finite-memory language descriptions into correct FSAs and explain exactly what their runs accept. Main objective: Construct, formalise, simulate, and describe finite-state automata for finite-memory language conditions.. Objectives: Convert between a transition graph and the formal 5-tuple, including the complete transition relation.; Trace all relevant paths for a word, distinguish acceptance from rejection, and infer the language recognised by a diagram.; Design states as finite memory for suffix, parity, bounded credit, exact-count, and other regular conditions.; Label each state with an invariant describing what has been remembered so the construction can be checked and defended.. Materials: Lecture 1 Full.pdf; lecture2.pdf; week 12 revision exercises.pdf; Mock Exam End Term.pdf.
  3. Eliminate Epsilon and DeterminiseMake any nondeterministic FSA executable as an equivalent DFA without losing or adding words. Main objective: Transform an FSA with nondeterminism and ε-transitions into an equivalent DFA and verify the equivalence on representative words.. Objectives: Explain why one accepting run is sufficient in an NFA and distinguish that from deterministic execution.; Compute ε-closures, add every ε* followed by one-letter transition, and update final states correctly.; Build only reachable subset states, compute their transitions, and mark a subset final exactly when it contains an original final state.; Check the transformed automaton against the original using empty-word, short-word, branch-sensitive, and near-miss cases.. Materials: lecture2.pdf; Mock Exam End Term.pdf.
  4. Translate Regular Expressions and FSAsUse regular expressions as exact language descriptions and convert them to and from automata. Main objective: Interpret, construct, simplify, and translate regular expressions and finite-state automata in both directions.. Objectives: Parse RE syntax with the correct precedence and determine membership by applying union, concatenation, and Kleene star semantics.; Write an RE for verbal constraints such as exact symbol counts, bounded length, prefixes, suffixes, and parity.; Build an ε-FSA compositionally for base expressions, union, concatenation, and star, then remove ε-transitions if required.; Convert an FSA to a generalised FSA and eliminate states using the r0 + r1r2*r3 update until one RE remains.; Decide whether syntactically different REs denote the same language and justify the answer semantically.. Materials: lecture3.pdf; week 12 revision exercises.pdf; Mock Exam End Term.pdf.
  5. Construct Regular-Language OperationsBuild automata for combinations and complements of regular languages with the right preconditions. Main objective: Construct automata for union, concatenation, star, intersection, and complement, and explain why each construction preserves regularity.. Objectives: Compose FSAs for union, concatenation, and Kleene star using ε-transitions and remove ε-transitions when the requested diagram forbids them.; Construct the product DFA for intersection with paired states, paired transitions, and accepting pairs.; Complete a DFA with a dummy state before flipping final and non-final states, and explain why this fails for an NFA or incomplete DFA.; Select and combine closure constructions to implement multi-part verbal conditions and concatenated language specifications.. Materials: lecture4.pdf; week 12 revision exercises.pdf; Mock Exam End Term.pdf.
  6. Minimise DFAs and Test EquivalenceReduce a DFA to its canonical smallest behaviour and use that result to compare automata. Main objective: Apply the full DFA minimisation procedure and use minimal DFAs to decide language equivalence.. Objectives: Identify and remove unreachable states and non-initial states that cannot reach a final state.; Build the pair table, initialise final/non-final pairs, and propagate marks through same-letter transitions.; Merge exactly the unmarked pairs, rebuild transitions and accepting states, and check that the result is deterministic and language-equivalent.; Determinise and minimise two FSAs, then compare the minimal DFAs up to state renaming.. Materials: lecture4.pdf; Mock Exam End Term.pdf.
  7. Derive and Parse with CFGsRead a grammar as a generative system and prove membership through derivations and parse trees. Main objective: Analyse a context-free grammar by producing valid derivations, parse trees, yields, membership decisions, and ambiguity explanations.. Objectives: Identify terminals, variables, start variable, and production rules, and explain what makes a grammar context-free.; Produce correct leftmost or rightmost derivations, including ε-productions and recursive nesting, without skipping rewrites.; Construct parse trees whose children exactly match rules and recover the yielded word left-to-right.; Translate between a derivation and its parse tree and distinguish leftmost from rightmost orderings.; Detect when a word has structurally different parse trees and explain why that grammatical ambiguity matters.. Materials: lecture5.pdf; mockexamandsolutions.pdf; Mock Exam End Term.pdf.
  8. Design Context-Free GrammarsTurn recursive language structure into CFG rules and connect regular and context-free representations. Main objective: Construct and validate CFGs for recursive language patterns, including deriving CFGs from finite automata and from recognised PDA language structure.. Objectives: Build base and recursive productions for matching counts, nesting, palindromes, centred separators, and repeated blocks.; Prove that a proposed grammar generates intended examples and excludes near-misses by tracing what each production preserves.; Assign a variable to every FSA state, translate transitions into productions, and add ε-productions for final states.; Infer the language of a structured PDA and write a CFG that reproduces its push/pop matching pattern.; Explain why every regular language is context-free while some context-free languages are not regular.. Materials: lecture5.pdf; lecture6.pdf; lab9 (1).pdf; week 12 revision exercises.pdf.
  9. Prove Languages Are Not RegularUse the Pumping Lemma as a quantifier-correct contradiction proof rather than a memorised template. Main objective: Construct rigorous Pumping Lemma proofs that unseen languages are not regular, including multi-case and unary-growth examples.. Objectives: State the lemma with the correct quantifier order and explain why a proof must defeat every legal decomposition of the chosen word.; Choose wbad as a function of p so the constrained pumped segment lies in a controlled region.; Select i = 0, 2, or a p-dependent value to break the defining equality or growth condition and state the contradiction precisely.; For languages defined by several alternative equalities, analyse all possible locations of v and ensure the pumped word violates every alternative.; Write a self-contained contradiction proof with assumption, pumping length, chosen word, arbitrary legal split, pumping choice, violation, and conclusion.. Materials: lecture6.pdf; mockexamandsolutions.pdf; Mock Exam End Term.pdf; week 12 revision exercises.pdf.
  10. Transform Grammars to CNFConvert arbitrary CFGs to Chomsky Normal Form without changing their language. Main objective: Diagnose every CNF violation and apply START, BIN, DEL, UNIT, and TERM to produce an equivalent CNF grammar.. Objectives: Identify start-variable, long-RHS, ε, unit, and mixed-terminal violations and give a specific reason a grammar is not in CNF.; Apply the five routines in the course order and keep a clean grammar after each stage.; Preserve ε exactly when it belongs to the language by transferring it to the new start variable during DEL.; Expand unit-rule closures and replace terminals appearing in binary rules with dedicated variables.; Check that every final rule has an allowed form, the new start symbol never appears on a RHS, and representative derivations are preserved.. Materials: Lecture8_2026.pdf; mockexamandsolutions.pdf; week 12 revision exercises.pdf; Mock Exam End Term.pdf.
  11. Decide CFG Membership with CYKUse the CYK dynamic-programming table to prove acceptance or rejection and recover a parse. Main objective: Apply CYK to a CNF grammar, filling every substring cell correctly, deciding membership, and backtracking a parse tree when accepted.. Objectives: Confirm or create CNF before applying CYK and handle ε separately.; Fill the base row with every variable that directly produces each terminal, including multiple producers.; For each longer substring, consider every split and add every parent variable whose binary rule matches a left/right variable pair.; Accept exactly when the start variable appears in the top cell and use an empty top cell or missing start variable as a proof of rejection.; Record contributing splits and rules so an accepted top-cell entry can be backtracked into a parse tree or derivation.. Materials: Lecture8_2026.pdf; mockexamandsolutions.pdf; Mock Exam End Term.pdf.
  12. Read and Simulate Pushdown AutomataUse stack configurations and correctly labelled runs to understand what a PDA accepts. Main objective: Formalise and simulate PDAs with correct input-versus-stack semantics, configurations, run labels, and language inference.. Objectives: Apply last-in-first-out stack discipline, including failed pops, bottom markers, and unbounded stack height.; Keep input symbols, ε-moves, and stack operations distinct when reading transitions and accepted words.; Write PDA configurations as state-stack pairs and label read transitions by input symbols but push/pop/do-nothing transitions by ε.; Construct accepting runs from the empty stack and distinguish final-state acceptance from any unnecessary assumption that the final stack must be empty.; Use several runs and the push/pop invariant to state the complete accepted language, not merely examples.. Materials: Lecture9.pdf; lab8.pdf; lab8solutions.pdf; ecs421u_lecture_12_revision.pdf; lecture10.pdf.
  13. Design PDAs for Exam LanguagesTurn one-stack memory into correct machines for counting, mirroring, and mixed finite-state constraints. Main objective: Construct PDAs for segmented count relationships, palindromes, and hybrid finite-state/stack conditions, and explain when one stack is insufficient.. Objectives: Choose what each pushed symbol records, identify the phase switch, and ensure every later symbol is matched by a valid pop.; Use nondeterminism to guess a midpoint, store the first half, and pop matching symbols in reverse for even and odd palindromes.; Allow surplus symbols or irrelevant segments in the correct phase while still enforcing the required equality or inequality.; Combine an FSA-style control invariant with a stack counter so one part of the word satisfies a regular language and a later block has a linked count.; Explain why a PDA cannot generally retain two independent unbounded equalities after consuming its stack, using a^i b^j c^k with i = j = k as the canonical failure.. Materials: Lecture9.pdf; lab8.pdf; lab8solutions.pdf; week 12 revision exercises.pdf; Mock Exam End Term.pdf.
  14. Convert Any CFG to a PDAApply the canonical stack simulation of leftmost derivations and trace why it accepts the same language. Main objective: Construct the standard PDA equivalent to a CFG, simplify the grammar when useful, and connect accepting PDA runs to leftmost derivations.. Objectives: Choose Σst = Σ ∪ V ∪ {$}, push S$ initially, and accept only after the simulated sentential form and bottom marker are processed.; For each production Y → w, pop Y and push w in the order that leaves the leftmost symbol on top; treat ε-productions as pushing nothing.; When a terminal is on top of the stack, pop it only while reading the same input symbol.; Trace a derivation and PDA run side-by-side, explaining how the stack stores exactly the unprocessed suffix of the leftmost sentential form.; Remove trivial terminal variables or compact pushes when this reduces diagram size without changing the grammar's language.. Materials: lecture10.pdf; mockexamandsolutions.pdf; lab9.pdf; lab9 (1).pdf; Mock Exam End Term.pdf; week 12 revision exercises.pdf.
  15. Know the Limits of Context-Free LanguagesClassify language power and prove the closure and non-closure facts that separate CFGs, PDAs, and Turing machines. Main objective: Use constructions and contradiction arguments to establish context-free closure properties, non-closure properties, and expressiveness boundaries.. Objectives: Construct a CFG for L1 ∪ L2 by introducing a fresh start variable that chooses either grammar, after renaming variables to avoid clashes.; Exhibit two context-free languages whose intersection is {0^n1^n0^n} and derive a contradiction from assuming intersection closure.; Use De Morgan's law with union closure and failure of intersection closure to prove context-free languages are not closed under complement.; Classify regular, context-free, and Turing-recognisable languages and justify why a language such as a^n b^n c^n has no PDA.; Distinguish deterministic PDAs from general PDAs and know that, unlike NFAs and DFAs, they are not equally expressive.. Materials: lecture10.pdf; lab9.pdf; lab9 (1).pdf; lab8.pdf; lab8solutions.pdf; ecs421u_lecture_12_revision.pdf; Mock Exam End Term.pdf; mockexamandsolutions.pdf.
  16. Read and Simulate Turing MachinesTreat a TM diagram as a tape-manipulating program and write its configurations and accepted language correctly. Main objective: Formalise, simulate, and explain Turing machines using tape contents, head position, read/write moves, run labels, and high-level invariants.. Objectives: Represent the infinite tape by its finite visited region, track the underlined head cell, and distinguish input from tape memory.; Execute read(x,d) and write(x,d) only when their preconditions hold and move the head Left, Right, or not at all.; Write configurations that include state, finite tape contents, and head position, and update them one transition at a time.; Label input-consuming transitions by input symbols and tape operations by ε, starting from a blank tape and accepting by final state.; Collapse long transition diagrams into phases and infer the language from what each phase writes, rewinds, compares, or consumes.. Materials: lecture11.pdf; lab10-solutions-updated.pdf; ecs421u_lecture_12_revision.pdf.
  17. Build TMs for Linked CountsUse the tape as reusable unbounded memory to enforce several linear count relationships across word segments. Main objective: Design Turing machines for ordered-block languages with fixed linear equalities and ratios, explaining the tape invariant and translating it into a transition diagram.. Objectives: Write one or more tape markers per symbol in an initial block so later phases can consume or traverse a durable count.; Rewind to a tape boundary and scan the same markers in different directions to match multiple later blocks.; Implement constants such as 3:2:1, 5:1, or 4i = 3j = 2k by allocating the correct number of read or write substeps per marker.; Reject malformed symbol order, too-short or too-long blocks, and accept ε only when n = 0 is permitted.; Convert a phase-level plan into states whose transitions make loop boundaries, rewinds, and final exhaustion checks explicit.. Materials: lecture11.pdf; lab10-solutions-updated.pdf; week 12 revision exercises.pdf.
  18. Build TMs That Copy and CompareUse copy, rewind, directional scans, and comparison phases for repeated, reversed, XOR, and successor structures. Main objective: Design Turing-machine algorithms that store a word or block structure on tape and later compare, reverse-check, transform, or validate it.. Objectives: Copy an input block to tape while moving right, then locate a blank boundary and rewind to the stored block's beginning.; Read stored tape symbols and input symbols in lockstep, rejecting mismatches and leftovers to recognise ww.; Choose scan direction so the stored first half is checked in reverse, yielding even palindromes wwR.; Separate three equal-length blocks, store enough information from the first two, and verify each symbol of the third against bitwise XOR.; Copy the first binary word, implement right-to-left carry propagation for +1, and compare the result with the second word, including all-ones and no-zero special cases.. Materials: lecture11.pdf; Mock Exam End Term.pdf; ecs421u_lecture_12_revision.pdf.
  19. Solve the Hard Turing-Machine ConstructionsBuild multi-pass tape algorithms for multiplication, squares, and the 2026 triplet language. Main objective: Design and defend Turing machines for nonlinear count relationships and the current mock's n, 2n, 3n triplet language.. Objectives: Parse the required form a^n b a^(2n) b a^(3n), use separators as phase boundaries, and handle n = 0 as bb.; For each a in the first block, create two obligations for the second block and three for the third, then discharge them without losing block boundaries.; Recognise j = i × i by performing one full j-side counting pass for each of i stored markers, with a reset between passes.; Recognise k = i × j by implementing nested scans: one multiplication pass for each marker from one factor across all markers of the other.; Include explicit malformed-order, missing-separator, undercount, overcount, and leftover-marker rejection paths, then explain the algorithm at a level that maps to states.. Materials: mockexamandsolutions.pdf; lab10-solutions-updated.pdf; lecture11.pdf; ecs421u_lecture_12_revision.pdf.
  20. Complete the Resit Mock ConfidentlyIntegrate every construction and proof under timed exam conditions and close the remaining gaps. Main objective: Complete the full 2026 mock and a broad selection from the older mock under realistic timing, then independently correct every lost mark.. Objectives: Complete derivations, parse trees, ε membership, CNF conversion, CYK, and CFG-to-PDA construction from the 2026 paper without notes beyond the permitted sheet.; Complete the triplet TM, context-free classification, triplet nonregularity proof, and unary power-of-two proof at full-mark depth.; Complete the older mock's FSA/RE/determinisation/minimisation/complement sequence, grammar/CNF/CYK block, hybrid PDA, and XOR TM.; Self-mark by checking invariants, legal rule forms, complete tables, correct run labels, and Pumping Lemma quantifiers before consulting solutions; then redo every failed part from a blank page.; Produce a double-sided A4 note sheet containing only high-leverage procedures, failure checks, and notation conventions, then complete a second timed attempt using it.. Materials: mockexamandsolutions.pdf; Mock Exam End Term.pdf; week 12 revision exercises.pdf; lab8solutions.pdf; lab9 (1).pdf; lab10-solutions-updated.pdf.
Automata

(Exam Speedrun) ECS421U Automata & Formal Languages - 2026

Materials
lecture11
lecture11
Lecture8_2026
Lecture8_2026
lecture10
lecture10
+16 more

Diagnose and Choose Your Route

Secure CFGs and CNF

Finish CYK and CFG-to-PDA

Build the Triplet Turing Machine

Write Both Pumping-Lemma Proofs

Run and Repair a Timed Mock

View (Exam Speedrun) ECS421U Automata & Formal Languages - 2026

A structured learning path for Automata and Formal Languages, built considering the module’s lectures, labs, revision sheets and mock exams. The goal of this space is to help you with efficient, fast, last-minute exam preparation. The first session focuses on finding your weak points so that you know which lessons to do, and each covers content from past paper exams.

Subject
Automata
Lessons
6
Materials
19

Materials

  • lecture11.pdf
  • Lecture8_2026.pdf
  • lecture10.pdf
  • Lecture9.pdf
  • ecs421u_lecture_12_revision.pdf
  • mockexamandsolutions.pdf
  • week 12 revision exercises.pdf
  • lab8solutions.pdf
  • lab8.pdf
  • lab9.pdf
  • lecture2.pdf
  • lab10-solutions-updated.pdf
  • Lecture 1 Full.pdf
  • lecture3.pdf
  • lecture5.pdf
  • lecture6.pdf
  • lecture4.pdf
  • Mock Exam End Term.pdf
  • lab9 (1).pdf

Learning path

  1. Diagnose and Choose Your RouteA short check across the four exam areas helps you decide whether to attempt a paper now or focus on selected repair sessions first. Main objective: You will try one representative task from each 2026 mock section, identify your strongest and weakest areas, and choose the most useful route for the time you have.. Objectives: You will first see how the paper divides into four main areas: CFG/CNF, CYK and CFG-to-PDA, Turing machines and context-free classification, and Pumping Lemma proofs.; You will spend about 20–25 minutes trying one exam-style task from each area without help. The tutor will wait until the diagnostic is complete before teaching or correcting anything.; You will rate each area green, amber, or red and identify the exact reason for any difficulty: missing recall, incorrect procedure order, notation, incomplete justification, or an execution slip. Worked material will be used only afterwards.; You will be recommended either the timed-paper session or only the repair sessions matching your amber and red areas. The recommendation will consider the marks at risk and the time you have, but you will choose the route.; You will begin a double-sided A4 sheet containing only useful procedures, invariants, and personal error traps revealed by the diagnostic.. Materials: mockexamandsolutions.pdf; ecs421u_lecture_12_revision.pdf; week 12 revision exercises.pdf; lab8solutions.pdf.
  2. Secure CFGs and CNFYou will start with an exam-style Question 1 attempt, then focus only on the derivation, parse-tree, epsilon, or CNF steps that need repair. Main objective: You will be able to complete every part of 2026 Mock Question 1 from a blank page: deriving words, drawing valid parse trees, deciding epsilon membership, identifying CNF violations, and producing an equivalent CNF grammar.. Objectives: You will begin with a closed-book attempt at substantial parts of 2026 Mock Question 1. The tutor will skip methods you can already use and focus on the first step where your answer breaks down before giving you a parallel problem.; You will write complete leftmost or rightmost derivations without skipping rewrites, ending only when the result contains terminals alone.; You will draw parse trees whose root, internal nodes, children, and left-to-right yield all match the grammar rules and requested word.; You will decide whether ε belongs to a grammar by giving an explicit derivation and preserve ε correctly when removing nullable rules during CNF conversion.; You will identify every relevant CNF violation before starting the transformation.; You will apply START, BIN, DEL, UNIT, and TERM in the course order while keeping the grammar readable and recording each new variable.; You will check the final grammar rule by rule and test representative derivations to confirm that the language has been preserved.. Materials: mockexamandsolutions.pdf; lecture5.pdf; Lecture8_2026.pdf; week 12 revision exercises.pdf.
  3. Finish CYK and CFG-to-PDAYou will start with an exam-style Question 2 attempt, then focus only on the CYK or CFG-to-PDA stages that need repair. Main objective: You will be able to complete 2026 Mock Question 2 by building and justifying a CYK table and constructing the standard PDA equivalent to the supplied CFG.. Objectives: You will begin with a closed-book CYK attempt and a CFG-to-PDA construction outline from 2026 Mock Question 2. The tutor will skip procedures you can already use and focus on the exact stages that failed.; You will confirm that the grammar is in CNF, then fill the base row with every variable that directly generates each terminal.; You will examine every split and every left/right variable pairing for each longer substring, rather than filling a cell from only one convenient decomposition.; You will decide membership from the top cell and keep enough working to trace an accepted entry back into a derivation or parse tree.; You will build the standard PDA frame, choose the combined terminal-variable stack alphabet, and reverse multi-symbol pushes so the leftmost symbol is processed first.; You will match a terminal only when the same terminal is on top of the stack and explain how the remaining stack represents a leftmost derivation.; After repairing the mock procedure, you will attempt Lab 9 Question 1(b)–(c) without the solutions. You will then compare your work with the solution copy, identify the first divergence, and redo the failed construction or run.; You will simplify the grammar or use compact pushes only when the language remains unchanged and the resulting PDA is easier to verify.. Materials: mockexamandsolutions.pdf; Lecture8_2026.pdf; lecture10.pdf; Lecture9.pdf; lab9.pdf; lab9 (1).pdf.
  4. Build the Triplet Turing MachineYou will start with an exam-style Question 3 plan, then focus only on the machine algorithm, diagram, rejection checks, or classification that need repair. Main objective: You will be able to construct and explain a Turing machine for the 2026 triplet language a^n b a^(2n) b a^(3n), including exact rejection checks and a justified conclusion about PDA existence and context-freeness.. Objectives: You will first sketch the phase-level Turing-machine algorithm and answer the PDA/context-free classification without help. The tutor will then focus only on the missing phase, invariant, rejection check, or justification.; You will read a Turing-machine diagram as an algorithm with clear write, rewind, compare, and exhaustion phases, each represented by a small group of states.; You will recognise the exact form a^n b a^(2n) b a^(3n), use both separators as phase boundaries, and correctly handle the n=0 word bb.; You will make each a in the first block account for two a symbols in the second block and three in the third, without reusing symbols that have already been matched.; You will use tape markers, rewinds, and repeated scans to store and reuse the first block’s count across the later blocks.; You will reject missing or extra separators, incorrect symbol order, undercounts, overcounts, and leftover unmarked symbols, accepting only when all three blocks are exhausted exactly.; You will use CFG–PDA equivalence and the three-linked-count boundary to explain why no single-stack PDA recognises the language and why it is not context-free.. Materials: mockexamandsolutions.pdf; lecture11.pdf; lecture10.pdf; lab10-solutions-updated.pdf; week 12 revision exercises.pdf; ecs421u_lecture_12_revision.pdf; lab8.pdf.
  5. Write Both Pumping-Lemma ProofsYou will start with one closed-book proof attempt, repair the first logical failure, and then test the second proof independently. Main objective: You will be able to write complete contradiction proofs for both 2026 Pumping Lemma questions, choosing words and pumping exponents that defeat every legal decomposition.. Objectives: You will begin with a closed-book proof plan or full proof for one current-mock language. The tutor will identify the first problem with the quantifiers, witness, decomposition argument, pumping exponent, or contradiction.; You will use the Pumping Lemma in the correct order: assume regularity, receive p, choose w, allow any legal split, and then choose i.; For the triplet language, you will choose the p-th triplet so that |uv|≤p keeps v inside the first a-block while the 2p and 3p blocks stay fixed.; You will choose a simple pumping exponent such as i=0 or i=2, state the new block lengths, and show that the required 1:2:3 relationship is broken.; For the unary language, you will use the supplied p-dependent word and pumping exponent, then show that the pumped length lies strictly between consecutive powers of two.; You will write each proof as a complete chain: assumption, p, chosen word, membership and length checks, arbitrary split, location of v, pumping choice, violation, contradiction, and conclusion.; Once both current-mock proofs are secure, you can attempt a harder language with several alternative equalities and show that the pumped word violates every branch.. Materials: mockexamandsolutions.pdf; lecture6.pdf; week 12 revision exercises.pdf; ecs421u_lecture_12_revision.pdf; Mock Exam End Term.pdf.
  6. Run and Repair a Timed MockYou will choose a full paper or timed question set, work independently, then mark, diagnose, and redo any mistakes in the same session. Main objective: You will complete either the full 2026 mock or a timed selection under exam conditions, then check your work, identify exactly where marks were lost, and independently repair every attempted error.. Objectives: You will be offered the full 2-hour-30-minute 2026 mock and a shorter timed selection. The tutor will recommend one based on your available time and weaker areas, but you will choose which to attempt.; You will open the mock full-screen or separately, set your chosen timer, and complete the selected work on paper. During the attempt, the tutor will not provide hints, reveal solutions, or check intermediate work.; After the timer, you can upload photos, type or describe your answers, or check them yourself against the supplied solutions. When self-checking, you will identify the first point where each incorrect answer diverged and the steps or marks lost.; The tutor will help you identify the exact missing method step, invariant, justification, diagram transition, or execution slip behind each lost mark.; You will redo every lost-mark subpart from a blank page without looking at the correction; recognising or copying an answer will not count as repairing it.; You will turn each repaired mistake into one compact procedure, invariant, or warning on your double-sided A4 sheet and finish with your three most likely exam-day traps.; If useful time remains, you may be recommended one older-mock or Lab 9 question targeting your weakest remaining method. You will choose whether to attempt it and will use the solution copy only afterwards to check your work.. Materials: mockexamandsolutions.pdf; week 12 revision exercises.pdf; lab8solutions.pdf; lab10-solutions-updated.pdf; Mock Exam End Term.pdf; lab9.pdf; lab9 (1).pdf.