Theory of Computation Flashcards
What is Abstraction?
Process of filtering out the details we don’t need in order to concentrate on those that we do – removing unnecessary details
Define Representational Abstraction.
Removing unnecessary details
What is abstraction by Generalisation?
Grouping by common characteristics to get a hierarchical relationship
What is information hiding?
The process of hiding all details of an object that do not contribute to its essential characteristics
What is procedural abstraction?
Breaking down a complex model into a series of reusable procedures; finds the generic method.
E.g.
(4*3) + 7 becomes
ab + c
What is functional abstraction?
Procedural abstraction results in a procedure. Abstracting further disregards the method of a procedure and results in just a function which takes inputs and produces a specific output.
What is Data Abstraction?
The reduction of a particular body of data to a simplified representation of the whole. For example, a stack could be implemented as an array and a pointer for the top of the stack.
What is Automation?
Process of putting abstractions of models into action to solve problems
What is Decomposition?
Process of breaking down a complex problem into parts that are easier to understand
What is Procedural Decomposition?
Breaking a problem down into smaller sub-problems
Each of which solves an identifiable task
Each of which might be further split up
What is Complexity of a linear search?
O(n)
As the size of the list increases, time taken increases at the same rate
‘n’ is worst case
What is the complexity of a binary search?
O(log n)
As time taken increases the size increase, but by less and less each time
Halves tree/graph each time
What is meant by the time complexity of an algorithm? ign
The number of clock cycles taken for the CPU to execute the algorithm
Expressed using ‘big O notation’
Describe the Halting Problem?
The unsolvable problem determining whether a program will halt, given a certain input, without running the given program.
What is a Tractable Problem?
Problem that can be solved in an acceptable amount of time [polynomial time]
What is an Intractable Problem?
Problem which cannot be resolved in polynomial time
What is meant by the term Heuristic?
A method for producing a ‘rule of thumb’ to produce an acceptable solution to intractable problems
Better than n factorial
E.g,. Store your shortest path that you have so far and check another. Making approximation for the shortest path
How to identify Polynomial?
Nested loops are always polynomial