Further Decision - Key Terms Flashcards
Algorithm (C1)
Finite sequence of step-by-step instructions carried out to solve a problem.
Trace Table (C1)
Used to record values of each variable as the algorithm
Instruction| n | A | B | C | Print
Step
Flow Chart Symbols (C1)
Stretched Circle - Start/End
Rectangle - Instruction
Rhombus - Decision (question)
Full-bin packing (C1)
Select ANY items to fill bins as much as possible.
Lower bound (C1)
Sum of values / bin size
Allows you to determine what the minimum no. of bins needed and thus whether your answer is optimal.
Optimal Solution (C1)
Solution that cannot be improved upon.
(e.g. Bin Packing = Smallest no. of bins)
Order (C1)
‘A function of its size.’ If order = f(n), then increasing size of the problem from n to m will increase the run time by a factor of f(m)/f(n).
Identifies how changes in the size of a problem affects the approximate run time of the algorithm.
Linear = n (e.g. Bubble sort
Quadratic = n^2 = Quadratic)
Cubic = n^3
Order (continued) (C1)
Increasing size of problem by factor k means:
- Linear alg. = k times longer
- Quadratic alg. = k^2 times longer
- Cubic alg. = k^3 times longer
Graph (C2)
Vertices/nodes connected by edges/arcs.
Weighted Graph (C2)
(Network)
Each edge has a ‘weight’ - number associated with it.
Vertex (C2)
(a.k.a node)
A point on a graph connected by edges.
Vertex/Edge Set (C2)
List of vertices/edges.
Edge (C2)
(a.k.a arc)
A line segment connecting vertices.
Subgraph (C2)
A graph of which the vertices belong to another bigger graph.
Degree (C2)
(Valency/Order)
The number of edges connecting to a vertex.
Walk (C2)
A route through a graph along edges going from one vertex to the next.
Path (C2)
A WALK in which no vertex is visited more than once.
Trail (C2)
A WALK in which no edge is visited more than once.
Cycle (C2)
A PATH in which the end vertex is the same as the start vertex.
Hamiltonian Cycle (C2)
A CYCLE including every vertex within it.
Eulerian Circuit (C2)
A TRAIL which traverses every arc and starts and ends at the same vertex.
Connected Graph (C2)
All vertices are connected to at least one other vertex.
Loop (C2)
An edge/arc that starts and finishes at the same vertex.
Simple Graph (C2)
A GRAPH with no loops & at most one edge is connecting to any pair of vertices.