ECE511 and ECE696 J (Computability, Complexity, and Algorithms) Spring 2024
Mon, Wed, 5:05 to 6:20 in MM 209

Examinations

Assignments

     1    Due: Sunday 28th January
                Solve the mystery fractal.     
2 Due: Sunday 18th February
Create some Turing machines.
3 Due: Saturday 30th March
Implement a lambda-expression reducer.
4 Due: Saturday 13th April
2-3-tree operations.
5 Due: Thursday 9th May
Two NP-complete problems.

PC log in - use Putty or your own preferred SSH app.
OR mac users: start the terminal app, windows users: start powershell, then type the command
ssh username@rabbit.eng.miami.edu and type your password when prompted.
Windows users beware: you can't use ctrl-V in pico, but page up and page down will do the job.

Class History

Class 1 - Wed 17-1-2024    Quick introductions.
A theory of everything,
Boolean Satisfiability,
Transforming (de Morgan, etc.).
An interesting fractal design.
Everything we did today.
Class 2 - Mon 22-1-2024 This is the little detail that I couldn't remember exactly on Wednesday.
Unending streams of zeros and ones.
Class 3 - Wed 24-1-2024 The Halting Problem, a well defined problem that can never be solved.
As a result, a lot of things about the future behaviour of a program are also unknowable:
    Will it ever print "hippopotamus"? Will it encounter a run-time error? All the same.
Turing couldn't make use of knowledge of programming, so his proof (which is also more formal) required a lot more.
To understand that we need to start with examining regular grammars and finite state machines.
Class 4 - Mon 29-1-2024 Determinism and Non-determinism,
FSMs for floating point numbers, deterministic, and non-deterministic.
Eliminating non-determinism.
Closure under composition, union, intersection, and complementation.
Lexical:Regular:FSM, Syntactic:Context Free:PDA, Sematic:(Context Sensitive:LBA | Unrestricted:TM)
Class 5 - Wed 31-1-2024 Grammars don't just recognise languages, they can be used to generate them too.
Demonstration of how a context free grammar can, unlike regular grammars, balance parentheses.
Why a context sensitive grammar can handle semantics by carrying information from one production to another.
The clever little context sensitive grammar that recognises any number of a's followed by the same number of b's followed by the same number of c's.
Complete description of how to do things with the Turing machine runner.
A few simple Turing machines.
Class 6 - Mon 5-2-2024 Dean's special event.
Two more Turing machine designs: adding 1 to a binary number, and is a unary number an exact power of two and if so, which one?
Trading states for symbols and vice versa in a Turing machine.
Minsky machines: INC, DEC-or-JUMP, and HALT. Example designs adding and multiplying two numbers and the power of two question again.
Class 7 - Wed 7-2-2024 The Jurassic Fractal.
Fast pattern matching.
Functional programming on the way to another more mysterious model for computability.
The day-of-week example.
Class 8 - Mon 12-2-2024 Pure functional programming: prime, sumbet, lists, sort, lazy, lpr, lpr1.
Class 9 - Wed 14-2-2024 picking up where we left off: sv, seq, tree, lgr, lgrb.
The Peano axioms, peano.
Class 10 - Mon 19-2-2024 Not quite done with Wednesday's last two links.
What is s really?
Denotational semantics attaches the axiomatic approach to reality.
Class 11 - Wed 21-2-2024 Denotational semantics tidied up and taken as far as we need it.
Class 12 - Mon 26-2-2024 The Lambda Calculus.
An explanatory similarity, I hope I remember this near the beginning.
(Just finished the two alternative forms of increment)
Class 13 - Wed 28-2-2024 More lambda calculus, got as far as subtraction and data structures.
Y combinator seen, but before its proper time. We need some more tools to be able to use it.
Class 14 - Mon 4-3-2024 Conditionals and related things in lambda calculus.
The expression that has the shape of a recursive factorial function but isn't.
How the Y combinator makes it work exactly like a recursive factorial function.
The two Church-Rosser theorems.
A first look at Ackermann's function (it is the function A in this program).
An orderly exploration and checking successive differences: one, two.
Class 15 - Wed 6-3-2024 Make a zoom recording.
More of Ackermann's: preparing to memoise, and memoised, faster but gets no further.
The Primitive Recursive Functions.
Break 11th to 15th
Class 16 - Mon 18-3-2024 Make a zoom recording.
The N queens problem, backtracking and non-determinism: A, B, C, D, E, F, G.
A reminder of the knapsack problem: generally O(2N) but in many cases with d.p. it is ~ O(N2).
Boolean satisfiability, two forms of question: Can the output ever be zero? or What inputs make the output true?
CNF-sat a sub-problem of Bool-sat. "ors of ands" trivial to solve.
DNF-sat also sub-prob of Bool-sat, "ands of ors" takes exponential time.
But de-Morgan's laws let us transform DNF circuits into CNF circuits.
But that particular transformation takes exponential time, so it doesn't really help.
The yes/no "oracle" form of Bool-sat solves the which values version one variable at a time.
But the oracle form is also exponential in time, so again doesn't really help.
Any knapsack problem can be transformed into an equivalent Bool-sat problem quickly.
So if a fast solution for Bool-sat is ever discovered it will also be a fast solution for knapsack.
Knapsack is reducible to Bool-sat; Bool-sat solves knapsack; but not necessarily the other way round.
Class 17 - Wed 20-3-2024 Make a zoom recording.
Boolean satisfiability by non-magic oracle, and the program.
Oracle form of knapsack also solves the more useful "which values?" form.
2CNF can be transformed into an easy graph problem: problem, and solution.
Bool-SAT solves 3CNF, and 3CNF solves Bool-SAT.
Knapsack solves 3CNF.
Class 18 - Mon 25-3-2024 The Clique problem solves 3CNF.
Clique and Vertex Cover solve each other.
AVL trees.
Class 19 - Wed 27-3-2024 Being a grown-up programmer, Using the emacs editor.
AVL trees in full, insertion and deletion.
Class 20 - Mon 1-4-2024 (backspace and delete now work with emacs)
Class exercise: delete from a 23tree.
Class 21 - Wed 3-4-2024 Missiles: 1, 2, 3, 4.
Largest empty square.
Class 22 - Mon 8-4-2024 Brute force biggest-empty-square time calculated.
Experiments to get some insight into matrix multiplication order. Matrix multiplication order becomes easy if you work out which groups are going to have to be multiplied together.
Why working backwards really does make sense, it isn't just a rule of thumb.
The gold miner, good for practice in bypassing the overlapping recursive way.
Rod cutting, very common introduction but not as obvious as many others.
Started longest common sub-sequence.
Class 23 - Wed 10-4-2024 Finished longest common subsequence - hand make table, notice where changes are.
Unbounded knapsack.
Vertex cover for a tree.
Class 24 - Mon 15-4-2024 Largest empty rectangle.
Bell numbers.
Class 25 - Wed 17-4-2024 Bell numbers (done properly).
A pig's ear.
Typesetting - even line breaks.
Partition a string into palindromes.
Class 26 - Mon 22-4-2024 NlogN really is the fastest possible time for a sort, no exceptions.
Binomial heaps.
Class 27 - Wed 24-4-2024 Transitive closure, Warshall's algorithm.
Strongly connected components.
First and follow sets for LL1 parsing.
Class 28 - Mon 29-4-2024 LR0 and LALR1 automata.