Paper 2 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Abstraction

A

: Simplifying a problem by only taking into consideration the necessary details required to obtain a solution, leaving a representation without any unnecessary details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Graph Theory:

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data abstraction

A

The storage and representation of data in a computer system along with its logical description and interaction with operators. E.g. Stacks, queues, integers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Low-level languages

A

Low-level languages such as assembly code and machine code directly
interact with computer systems but are more difficult to write. Programming using machine code requires having an understanding of the functions specific binary codes perform and although assembly code is easier to memorise, it still requires programmers to know the mnemonics associated with the instruction set specific to the processor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

High-level languages

A

High-level languages provide an abstraction for the machine code that is in fact executed when a program is run. This makes the process of developing programs easier, as syntax in high-level languages parallels natural language and is considerably easier to learn and use compared to low-level languages. This has also made coding accessible to non-specialists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The TCP/IP model abstraction

A

The TCP/IP model is an abstraction for how networks function, separated into four layers of abstraction: application, transport, internet and link. Each layer deals with a different part of the
communication process, and separating these stages out makes them simpler to understand. Each layer does not need to know how other layers work. Outgoing communication is visualised as going down these layers, while incoming information can be imagined as going up these layers. However, it is also important to ensure compatibility between these layers so standards must be agreed in advance. The TCP/IP model uses a set of protocols which means that each layer can be dealt with individually, with details about other layers being hidden. is an abstraction for how networks function, separated into four layers of abstraction: application, transport, internet and link. Each layer deals with a different part of the communication process, and separating these stages out makes them simpler to understand. Each layer does not need to know how other layers work. Outgoing communication is visualised as going down these layers, while incoming information can be imagined as going up these layers. However, it is also important to ensure compatibility between these layers so standards must be agreed in advance. The TCP/IP model uses a set of protocols which
means that each layer can be dealt with individually, with details about other layers being hidden.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Thinking ahead

A

Designing a solution entails thinking ahead about the different components of a problem and how they will be handled in the best way possible. Thinking ahead allows developers to consider problems or difficulties that may arise when the software is used. Taking these factors into account at an early stage, developers can design strategies to make programs easy and intuitive to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Inputs/Outputs

A

At their core, all computational problems consist of inputs which are processed to produce an output. Inputs include any data that is required to solve the problem, entered into the system by the user. Often, the order in which data is input and the method of input must also be taken into consideration. Outputs are the results that are passed back once the inputs have been processed and the problem solved. Designers must decide on a suitable data type, structure and method to use in order to present the solution, given the scenario.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Preconditions

A

Preconditions are requirements which must be met before a program can be executed. If the preconditions are not met, the program will fail to execute or return an invalid answer. Specifying preconditions means that a subroutine can safely expect the arguments passed to it to meet certain criteria, as defined by the preconditions. Preconditions can be tested for within the code but are more often included in the documentation accompanying a particular subroutine, library or program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Caching

A

Caching is the process of storing instructions or values in cache memory after they have been used, as they may be used again. This saves time which would have been needed to store and retrieve the instructions from secondary storage again. Caching is very common in the storage of web pages. The web pages that a user frequently accesses are cached, so the next time one of these pages is accessed, content can be loaded without any delay. This also means images and text do not have to be downloaded again multiple times, freeing up bandwidth for other tasks on a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Reusable Program Components:

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Thinking procedurally

A

In computer science, thinking procedurally makes the task of writing a program a lot simpler by breaking a problem down into smaller parts which are easier to understand and consequently, easier to design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Decision

A

A decision is a result reached after some consideration.
When solving problems and designing programs, many
decisions have to be made. One of the first and biggest
decisions that is made is choosing the approach or paradigm
used when developing a piece of software. Another example
of decision making within software development is deciding
how different pieces of information are collected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Concurrent thinking

A

Concurrent thinking is built upon the idea of concurrent processing. It is the process of completing more than one task at any given time. This doesn’t necessarily mean that you have to be working on multiple tasks at once, which is the technique used by multicore processors. Concurrent processing means different tasks are given slices of processor time, to give the illusion that tasks are being performed simultaneously, and concurrent thinking is the mindset that allows you to spot patterns and parts of problems where concurrency can be applied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Benefits of concurrent processing

A

● The number of tasks completed in a given time is increased.
● Less time is wasted waiting for an input or user interaction, as 8other tasks can be completed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Drawbacks of concurrent processing

A

● Concurrent processing can take longer to complete when large numbers of users or tasks are involved as processes cannot be completed at once.
● There is an overhead in coordinating and switching between processes, which reduces program throughput.
● Just as with parallel processing, not all tasks are suited to being broken up and performed concurrently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Concurrent Processing:

A

Processing where the system appears to perform multiple tasks simultaneously

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Branching:

A

A programming control structure where the code selects one or more alternative paths depending on the evaluation of a Boolean expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Functions:

A

A subroutine that can be called to perform a task or calculation and always return a value. Functions can be called in an expression, or be assigned to a variable.

20
Q

Global Variables:

A

A variable declared in the main program which exists outside any of the
subroutines, but can be used anywhere in the program.

21
Q

Integrated Development Environment (IDE):

A

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

22
Q

Iterations:

A

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

23
Q

Modularity:

A

The technique of breaking down a complex problem into simpler, self-contained
components called modules, where each module is an implementation of a specific subtask required to solve a problem.

24
Q

Parameter passing by reference:

A

Passing the address or pointer of the required value into
a procedure.

25
Q

Parameter passing by value:

A

Creating a temporary local copy of the actual value of a variable and passing it into the procedure.

26
Q

Parameters:

A

The data structures required to be passed into a subroutine.

27
Q

Procedures:

A

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

28
Q

Recursion:

A

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.

29
Q

Backtracking

A

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.

30
Q

Computational Methods:

A

A method of solving a problem which by some form of computation in devising and implementing an algorithm.

31
Q

Data Mining:

A

An algorithm that finds a solution by analysing a large data sets to uncover
trends and relationships between variables.

32
Q

Divide and Conquer:

A

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

33
Q

Heuristics:

A

A ‘rule of thumb’ algorithm which can produce a valid albeit sub-optimal solution
for a hard (intractable) problem as an approximation.

34
Q

Pipelining:

A

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.

35
Q

Visualisation:

A

The use of a visual representation of an algorithm or data structure to translate a problem and it’s solution to a more human readable form.

36
Q

The advantage of using recursion

A

The advantage of using recursion for certain problems is that they can be represented in ​fewer lines of code​, which makes them less prone to errors. However it is essential that recursive subroutines are clearly defined so as to reach a stopping condition after a ​finite number of function calls​.

37
Q

There are some disadvantages to recursion

A

There are some disadvantages to recursion, the biggest being its ​inefficient use of memory​. If the subroutine calls itself too many times, there is a danger of a ​stack overflow​, which is when the ​call stack runs out of memory​. This would cause the program to crash. Tail recursion ​is a form of recursion which is implemented in a more efficient way in which less stack space is required. Another problem with recursion is that it is ​difficult to trace​, especially with more and more function calls.

38
Q

The biggest advantage of using divide and conquer

A

The biggest advantage of using divide and conquer to solve problems is that the size of the problem is halved with each iteration which greatly​ simplifies very complex problems​. This means that as the size of a problem grows, the time taken to solve it will not grow as significantly. The number of recursive calls made by a function that halves with each iteration is ​log​2(​ n)​. Therefore, the time complexity of algorithms that use divide and conquer is of the order O(logn)​. As divide and conquer mostly makes use of recursion, it faces the same problems that all recursive functions face: ​stack overflow​ will cause the program to crash and large programs are very​ difficult to trace​.

39
Q

Time of Complexity

A

The time complexity of an algorithm is how much time it requires to solve a particular problem. The time complexity is measured using a notation called big-o notation, which shows the effectiveness of the algorithm. It shows an upper limit for the amount of time taken relative to the number of data elements given as an input. This is good because it allows you to predict the amount of time it takes for an algorithm to finish given the number of data elements.

40
Q

Constant time complexity

A

O(1)
The amount of time taken to complete an algorithm is independent from the number of elements inputted.

41
Q

Linear time complexity

A

O(n)
The amount of time taken to complete an algorithm is directly proportional to the number of elements inputted.

42
Q

Polynomial time complexity

A

O(n(2))
The amount of time taken to complete an algorithm is directly proportional to the square of the elements inputted.

43
Q

Polynomial time complexity

A

O(n(n))
The amount of time taken to complete an algorithm is directly proportional to the elements inputted to the power of n

44
Q

Exponential time complexity

A

O(2(n))
The amount of time taken to complete an algorithm will double with every additional item.

45
Q

Logarithmic time complexity

A

O(log n)
The time taken to complete an algorithm will increase at a smaller rate as the number of elements inputted.