Topic 4 - Theory of computation - Complete Flashcards
Define top-down design? (Stepwise refinement)
Is used to plan a solution based on a top-down strategy.
Breaking down the problem into smaller steps.
4 advantages of top-down design?
- Breaking problem into parts helps clarify what needs to be achieved.
- Each stage creates smaller sub-problems, so easier to solve.
- Some functions or parts of the solution might be reusable.
- Breaking a design into parts allows more than one person to work on the solution.
Define an algorithm?
Is a step-by-step approach to solving a problem.
Written in pseudocode.
Define abstraction?
Is the process of including only the important features when solving a problem.
This reduces the complexity of the system by removing unnecessary details.
Define representational abstraction?
Is where all unnecessary details are removed, leaving only the information required to solve the problem.
Define generalisation abstraction?
Is where a problem is simplified by grouping similar parts into a hierarchal structure.
Define information hiding?
Is the principle that the details of the implementation of a class or software component are hidden or not accessible by the user.
Define procedural abstraction?
Are large programs are written by breaking them into smaller subprograms, this approach applies to all languages.
Define functional abstraction?
The exact computational method used is hidden, unlike procedural abstraction, the use of built-in or library functions is an example of functional abstraction.
Define data abstraction?
Is where the details of how a compound data object is constructed are isolated from how the data object is used.
Therefore, the primitive data objects that make up a user-defined data structure are hidden from the user.
Define problem abstraction?
Is where the details of the problem are successively removed or reduced until the problem is represented in a way that is straightforward to solve.
Once the unnecessary details are removed, the problem can be more clearly identified.
Define procedural decomposition?
is the process of breaking down a problem into a series of sub-problems, where each sub-problem archives an identifiable task.
Define composition?
Is the process of creating a system by combining the tasks identified in the decomposition abstraction.
Is the opposite of decomposition
3 step process of composition?
- Writing procedures for each of the tasks and sub-tasks identified in the decomposition.
- Linking these procedures to create compound procedures.
- Creating the necessary data structures to support the compound procedures.
Define composition abstraction?
Compound procedures can be created by combining other procedures to be built.
Compound data objects can be created by combining data primitive objects of programming language to build a data abstraction.
State the processes of automation?
- Creation of algorithms
- Implementing the algorithms in program code
- Implementing the models in data structures
- Executing the code
Define finite state machine (FSM)?
Is an abstract machine that can be in any one of a finite number of states. FSM’s can only be in one state at a time and a transition to a new state is triggered by an event.
Define state transition diagrams?
Are used to describe an FSM in a graphical format, where each state is shown as a circle and each transition is connected to a circle by an arrowed line with a description of the input that causes the transition.
Define state transition tables?
Are a method used to record all the sates and transition possible from finite state machine.
Define decision ables?
Can be used to model logic sequences in a compact way.
Define Mealy machine?
Is a finite state machine with outputs.
The output from a mealy machine is determined by its present state as well as its present input.
Define a set?
A collection of elements - such as objects or numbers, each element is unique within the set.