ABSTRACTION AND AUTOMATION.
Problem solving is the process of finding a solution to a difficult or
complex issue.
An algorithm is a sequence of steps that can be followed to complete a
task. An algorithm always terminates rather than in a loop.
Pseudocode: used to plan programming, it is a way of describing
instructions that is independent of any programming language. This allows
it to be understood by many.
Assignment: ARROWS <-
Selection: IF, ELSE, END IF
Iteration: FOR, END FOR, WHILE, END WHILE
Abstraction is omitting unnecessary details from a problem to simplify
therefore you can find a solution easier.
Representational: A representation of a problem arrived at by
removing unnecessary details from the problem.
Abstraction by generalisation / categorisation: A grouping by
common characteristics to arrive at a hierarchical relationship of the
“is a kind of” type.
Information hiding hides all details of an object that do not
contribute to its essential characteristics.
Procedural abstraction involves breaking down a complex model into
a series of reusable procedures. The actual values used in a
computation are abstracted away and a computational method is
achieved. Such as multiplication rather than addition.
Functional abstraction: Procedural abstraction results in a procedure.
Abstracting further disregards the method of a procedure and
results in just a function.
In data abstraction, specific details of how data is represented are
abstracted away, allowing new kinds of data structures to be
created from previously defined data structures. Data abstraction
forms the basis of abstract data types.
In problem abstraction/ reduction details are removed from a
problem until it is represented in a way that is solvable. This works
, because a simplified problem is often like a problem that has
already been solved, meaning that a solution for the problem can be
found.
Decomposition divides a problem into a series of smaller sub-problems.
These smaller problems can be solved individually or further divided until
all parts of the original problem have been solved.
Composition can be used to combine procedures to form a larger system.
Composition is used in abstract data types, where a complex abstract
data type is formed for smaller and simpler data types.
Automation is the process of putting abstractions of real-world
phenomena into action to solve problems. Automation is achieved by
creating algorithms which are later implemented in code, implementing
models in data structures and finally executing the code on the data
structures.
FINITE STATE MACHINES.
Basic finite machines^ second is with inputs.
Third is with outputs. An example input might
be 1000101. Completed ends up ABBABA.
Sets
A set is an abstract data type which contains unordered values; many
languages support this. Sets can contain other sets. E.g F: {“Pig”, “Goat”,
“Cow”, “Sheep”}.
Set comprehension is a different way of creating this; rather than
specifying all the items individually, we can select what we want from a
more general set.