MD lab
Everything on the site to practice MD with nothing to install: the Python playground where the «Check it with Python» blocks of the topics open and the simulators for the theory, in syllabus order.
sergio@learns:~/lab/md$ ls --by-topic
Checking with Pythonthe whole syllabus
- PyodidePythonSeveral files, autocomplete and the error marked on its line
- Topic
- Truth tables, sets, combinations, graphs and automata
- Helps you see
- Opening the «Check it with Python» blocks of the topics with «Open in the playground»: counting with itertools, walking a graph or testing strings on an automaton, with nothing to install.
$ python3 main.py - Python · itertools.productTruth tableType a formula and get its truth table column by column: tautology, contradiction or contingency, equivalences side by side and their normal forms
- Topic
- Logic and proofs
- Helps you see
- Type a formula and get its truth table column by column: whether it is a tautology, a contradiction or a contingency, whether two formulas are equivalent and their normal forms.
$ truth-table --alarm (p∨q)∧r - Python · heapqShortest paths and spanning treesDijkstra step by step with the exam table («cost,vertex», «-» and «*»), your own table checked cell by cell, and Kruskal and Prim for the minimum spanning tree
- Topic
- Graph theory and trees
- Helps you see
- Dijkstra step by step with the exam table («cost,vertex», «-» and «*»), your own table checked cell by cell, and Kruskal and Prim for the minimum spanning tree.
$ shortest-paths --buses escaleritas-tafira - Python · AFD/AFNDAutomataA finite automaton reads a string symbol by symbol: the active state of a DFA, the set of active states of an NFA with its λ-closure, the subset construction and from a regular expression to its automaton
- Topic
- Finite automata and regular expressions
- Helps you see
- A DFA or an NFA reading a string step by step, with its λ-closure, the subset construction and from a regular expression to its automaton.
$ automaton --string 101 - Python · HuffmanTreesA tree vertex by vertex: preorder, inorder and postorder traversals, the binary search tree, the tree of an expression with its Polish notation and the Huffman code step by step
- Topic
- Trees
- Helps you see
- Preorder, inorder and postorder traversals vertex by vertex, the binary search tree, the Polish notation of an expression with its stack and the Huffman code step by step.
$ tree --traversal preorder
