Definitions - Algorithms and Programming

0.0(0)
studied byStudied by 6 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/56

flashcard set

Earn XP

Description and Tags

Completed

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

57 Terms

1
New cards

Abstraction

simplifying a problem by only taking the necessary details into consideration required to obtain a solution

2
New cards

Data abstraction

The storage and representation of data in a computer system along with its logical description and interaction with operators

3
New cards

Graph theory

A branch of mathematics that can be used to abstractly represent problems using a collection of nodes connected by edges

4
New cards
Procedural abstraction
Acheiving a task by relying on a procedure of sequential steps
5
New cards
Components of a problem
The smaller, simpler series of tasks and sub-procedures that a problem can be broken down into to be completed modularly
6
New cards
Concurrent processing
Processing where the system appears to perform multiple tasks simulataneously
7
New cards
Branching
A programming control structure where the code selects one or more alternative paths depending on the evaluation of a boolean expression
8
New cards
Functions
A subroutine that can be called to perform a task or calculation and always return a value. They can be called in expression, or be assigned to a variable
9
New cards
Global variables
A variable declared in the main program which exists outside any of the subroutines, but can be used anywhere in the program
10
New cards

Integrated Development Environment (IDE)

A software package that allow a user to develop and implement code more easily, with features for editing, debugging, version control, testing, and compilation

11
New cards

Iterations

A programming control structure where a set of statements is repeated either a fixed number of times or until a condition is met

12
New cards
Local variables
A variable declared within a subroutine of a program, which only exists and can be used within that subroutine
13
New cards
Modularity
The technique of breaking down a complex problem into simpler, self-contained componnents called modules, where each module is an implementation of a specific subtask required to solve a problem
14
New cards
Object oriented programming
A programming paradigm where the system is viewed as a set of objects, each with their own data and procedures, that can interact with each other. All processing is done by objects
15
New cards
Parameter passing by reference
Passing the adress or pointer of the required value into a procedure
16
New cards
Parameter passing by value
Creating a temporary local copy of the actual value of a variable and pasing it into the procedure
17
New cards
Parameter
The data structures requried to be passed into a subroutine
18
New cards

Procedures

A subroutine that is called by simply writing its name in the code. Procedures do not have to return a value in the program

19
New cards
Recursion
A programming subroutine where a section of code calls itself until a base case is met. The base case must be chosen to avoid any possibility of an infinite loop
20
New cards
Sequences
A programming control structure in which statements are executed one after another as they appear in the script
21
New cards
Subroutines
A uniquely named section of code that is written to perform a specific task within a program
22
New cards
Backtracking
An algorithm that incrementally finds a solution by methodically trying different sequences and abandoning a path when it knows it cannot lead to a valid solution
23
New cards

Computable problems

A problem for which every instance can be solved in a finite number of steps by means of algorithm

24
New cards
Computational methods
A method of solving a problem which by some form of computation in devising and implementing an algorithm
25
New cards
Data mining
An algorithm that finds a solution by analysing a large data sets to uncover trends and relationships between variables
26
New cards

Divide and conquer

An algorithm design technique to decompose and solve problems by reducing the problem size with each iteration, until the sub problem becomes solvable

27
New cards
Heuristics
A rule of thumb algorithm which can produce a valid albeit sub-optimal solution for a hard problem as an approximation
28
New cards

Performance modelling

The process of simulating the behavior of a model under different virtual user and system loads by mathematical approximation

29
New cards
Pipelining
The process of splitting a task into parts and then searching for subtasks that can be processed simultaneously to overlap the processing of each part
30
New cards
Problem decomposition
The process of splitting a given problem into smaller, solvable sub-problems that are easier to conceive, understand, maintain and program
31
New cards
Problem recognition
The ability to recognise the most effective strategy to solve a problem
32
New cards
Visualisation
The use of a visual representation of an algorithm or data structure to translate a problem an its solution to a more human readble form
33
New cards
A\* algorithm
A generalisation of Dijkstra’s algorithm that approximately finds the shortest path between two nodes by keeping track of the distance travelled from the source to the current node and the approximate distance from the next node to the destination
34
New cards
Big O notation
A way of classifying algorithms based on their complexity by setting an upper bound for the worst case space or time complexity as a mathematical function of input size
35
New cards
Binary search
A O(logn) algorithm to search a sorted list for a particular item by repeatedly halving the sublist which could contain them
36
New cards
Breadth-first traversal
A method of traversing a graph by using a queue to visit all the neighbours of the current node before doing the same to each of the neighbours until the entire graph has been explored
37
New cards
Bubble sort
A O(n^2) sorting algorithm that iterates through a list, comparing each element to its sucessor and swapping elements if the sucessor is greater than the current element. This is repeated until no more swaps can be made
38
New cards
Depth-first traversal
A method of traversing a graph by using a stack to travel as far along one route as possible and then backtracking and doing the same for the remaing routes until the entire graph has been explored
39
New cards
Dijkstra’s shortest path algortithm
An algorithm to find the shortest path between two nodes on a graph by using a priority queue to keep track of the shortest distance to each node from the starting node until the destination node is found
40
New cards
Insertion sort
A O(n^2) sorting algorithm that divides a list into sorted and unsorted section. Elements from the unsorted section are compared with and placed in the right position in the sorted section one by one until the sorted section spans the entire list
41
New cards
Linear search
A O(n) algorithm to search a list for a particular item by iterating through the list and checking each element until the required item is located, or the end of the list is reached
42
New cards

Merge sort

A O(logn) divide-and-conquer sorting algorithm that recursively halves the list into sublists until all sublists are of length 1. The sublists are then merged back together in such a way that they are always sorted, until the full single list is obtained

43
New cards
O(1) Constant time/space
An algorithm that always takes a constant amount of time or memory space to execute, regardless of the input size
44
New cards

O(2^n) Exponential time/space

An algorithm whose execution time or required memory space grows exponetially with input size (higher complexity than polynomial)

45
New cards

O(logn) Logarithmic time/space

An algorithm whose execution time or required memory space grows logarithmically with input size (lower complexity than polynomial)

46
New cards
O(n) Linear time/space
An algorithm whose execution time or required memory space is directly proportional to the size of its input
47
New cards
O(n^k) Polynomial time/space
An algorithm whose execution time or required memory space is proportional to the input size raised to the power of a constant
48
New cards

Quick sort

A O(n logn) sorting algorithm similar to merge sort, but relies on choosing a pivot element whenever the list is split. Elements greater than the pivot go into one sub list, while the rest go into the other. All sublists of length 1 will be in a sorted order

49
New cards
Space complexity
A measure of the amount of memory space needed by an algorithm to solve a particular problem of a given input size
50
New cards
Time complexity
A measure of the amount of time needed by an algorithm to solve a particular problem of a given input size
51
New cards

Caching

The temporary storage of data by the system in cache or memory for the benefit of faster retrieval if it is needed again in future

52
New cards

Inputs

Any information relevant to the problem that is required by the system for process according to an algorithm

53
New cards

Outputs

The result returned by a system for a given input after running the entire process or part of a process

54
New cards

Preconditions

A prerequisite or state of a system and its surroundings required to run a use case return a valid solution

55
New cards

Reuseable Program components

Components that have already been written, debugged and tested that can be transplanted into new systems to save development time in project completion

56
New cards

Flowcharts

The diagrammatic representation of the flow of a program that includes all the points where a desicion needs to be taken in order to obtain a solution

57
New cards

Logical conditions

Conditions which may depend on one or more variables used to determine the next step whenever a system has to make a decision. They are typically implemented using control structures such as sequences, selections and iterations