4.4 - Theory of computation Flashcards
What is information hiding?
Information hiding is part of abstraction, it involves removing unnecessary information which isn’t relevant to the current problem.
What is procedural abstraction?
A type of abstraction applied in programming where you take a procedure and remove parts of it so that the procedure is more generalized, it can then be used in multiple scenarios instead of just one.
What is functional abstraction?
A type of abstraction applied in programming in which functions are separated from the main working program, meaning you don’t need to know how a function works to be able to use it, you give the function the required inputs and it returns the outputs.
What is problem/representational abstraction?
Problem abstraction is applied by breaking down a problem and using information hiding and decomposition to remove unnecessary data from the problem which makes it easier to solve.
Examples of problem abstraction?
For example finding the shortest path for a data packet, you won’t need to know the type of cable, if the cable is in the sea or land…
What is decomposition?
Decomposition is the first step of problem abstraction, taking a problem and breaking it down into smaller parts to allow you to solve each part individually or decide if it is necessary to solve.
What is composition?
This is the process of building the solution from the individually solved parts to create a full solution to a certain problem.
Example of a problem where abstraction can be applied?
What is automation?
The process of modelling a problem to predict future changes.
Example of automation?
You can create a model to predict climate change by modelling the rate of C02 increase in the atmosphere.
What are the metacharacters in regular expression and what do they mean?
- (0 or more repetitions)
+ (1 or more repetitions)
? (0 or 1 repetitions)
| (or)
( ) to group regular expressions
How is regular expression and FSM related?
Regular expressions and FSMs are equivalent ways of defining a regular language.
How is Backus-Naur form represented?
<digit> -> 0|1|2|3|4|5|6|7|8|9
<natural> -> <digit>|<digit><natural>
This represents any natural number, where a digit is defined by the numbers 0-9 and it uses recursion to represent any length of these digits.
</natural></digit></digit></natural></digit>
What is a tractable problem?
Problems that have a polynomial (or less) time solution.
What is an intractable problem?
Problems that do not have a polynomial (or less) time solution. Heuristic techniques are used to solve these problems.