Fundamentals of Computational Thinking Flashcards
Decomposition
Breaking down a large task into a series of subtasks.
http://slideplayer.com/slide/9296226/28/images/29/Decomposition+/+Composition.jpg
Composition
Building up a whole system from smaller units. This is the opposite of decomposition.
Finite State Machine (FSM)
Any device that stores its current status and whose status can change as a result of an input. Mainly used as a conceptual model for designing and describing systems.
Finite - countable
State Transition Diagram - A visual representation of a FSM using circles and arrows.
Accepting State - The state that identifies whether an input has been accepted.
State Transition Table
A tabular representation of an FSM showing inputs, current state and next state.
http://image.ibb.co/dsVUYJ/AFB6_B8_F0_9_E9_F_4409_9_A5_C_C1_F7_BC5_B8_E9_B.jpg
Mealy Machine
A type of finite state machine with outputs
http://slideplayer.com/slide/8108911/25/images/11/Mealy+machine+0%C2%A2+Reset.+5%C2%A2+N/0.+N+++D/1.+10%C2%A2+D/0.+15%C2%A2+D/1.+symbolic+state+table..jpg
Cipher
An algorithm that encrypts and decrypts data, also known as code.
Shift Cipher
A simple substitution cipher where the letters are coded by moving a certain amount forwards or backwards in the alphabet.
Turing Machine
A theoretical model of computation
Alphabet - the acceptable symbols (characters, numbers) for a given Turing Machine
Read/Write Head - the theoretical device that writes or reads from the current call of a tape in a Turing machine.
Halting State - Stops the Turing machine
Start State - The initial state of a Turing Machine
Instruction Table - A method of describing a Turing machine in tabular form.
https://www.youtube.com/watch?v=Ty57TncUSno
Transition function/rule
A method of notating how a Turing machine moves from one state to another and how the data on the tape changes.
Universal Machine
A machine that can simulate a Turing machine by reading a description of the machine along with the input of its own tape. This can solve the limitation of the Turing machine of requiring that every process will need to have its own Turing machine to do it.
Regular Language
Any language that can be described using regular expressions.
Regular Expression
Notation that contains strings of characters that can be matched to the contents of a set.
Example:
a|b|c is a regular expression, which means that the set will contain either an ‘a’ or a ‘b’ or a ‘c’. A set is a collection of data that is unordered and contains each item at most once. It is written as follows showing the name of the set and the contents within brackets:
alphabet = {a, b, c, d, e, f, g, …}
integers = {0, 1, 2, 3, 4, 5, 6, 7, …}
Common Regular Expressions
a|b|c means ‘a’ or ‘b’ or ‘c’
abc means ‘a’ and ‘b’ and ‘c’
a*bc means zero or more ‘a’ followed by ‘b’ and ‘c’
(a|b)c means ‘a’ or ‘b’ and ‘c’
a+bc means One or more ‘a’ and ‘b’ and ‘c’
ab?c means ‘a’ and either zero or one ‘b’ and ‘c’
Context-free Language
An unambiguous way of describing the syntax of a language useful where the language is complex.
Backus-Naur Form (BNF)
A form of notation for describing the syntax used by a programming language
https://www.youtube.com/watch?v=x1gGInKNCRw
Terminal - In BNF, it is the final element that required no further rules.