4.4 Theory of Computation AQA A-Level Computer Science

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/49

Last updated 7:14 PM on 2/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

50 Terms

1
New cards

Computational thinking

A method of problem-solving that helps computer scientists prepare problems for digital solutions, the ability to think logically about a problem and apply techniques for solving it

2
New cards

Decomposition

Breaking down a problem into sub-problems, which are more manageable. We can then solve each sub-problem individually.

3
New cards

Abstraction

Reducing information and detail to focus on essential characteristics, removing unneccessary detail, e.g. London Underground Map.

4
New cards

Pattern recognition

The process of identifying patterns in a data set, e.g. in driving, to respond to traffic patterns, e.g. we might recognise that an upcoming traffic light is yellow, so we will recognise that it will turn red next and prepare to stop. We can apply this pattern every time we come up to a traffic light. In medicine, symptoms are compared to existing patterns to determine which illness the patient may have.

5
New cards

Simulation

The process of designing a model of a real system in order to understand the behaviour of the system, and to evaluate various strategies for its operation.

6
New cards

Applications of simulation

Financial risk analysis

Amusement park rides

Population prediction

Managing inventory problems

Queueing problems

7
New cards

Enumeration

A listing of all of the elements of a set. Can be used in brute force attacks to go through all the possible options for a password, or in something like an anagram solver. It can take a very long time to go through all the possibilities.

8
New cards

Trial and error

A problem-solving strategy that involves attempting different solutions and eliminating those that do not work.

9
New cards

Theoretical approach

Using mathematical and logical methods to solve a problem or calculate possible outcomes.

10
New cards

Creative solution

Finding a creative and previously unknown solution.

11
New cards

Decrease and conquer

- Reduce the problem instance to a smaller instance of the same problem

- solve the smaller instance

- extend the solution of the smaller instance to obtain a solution to the original instance

12
New cards

Algorithm

A sequence of steps that can be followed to complete a task and always terminates.

13
New cards

Sequence

One or more statements following one after the other. The statements are executed in order.

14
New cards

Selection

A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.

15
New cards

Iteration

Repetition; a set of steps is carried out again and again, either a fixed number of times or based on a condition.

16
New cards

WHILE statement

An indefinite loop, which runs the internal code as long as the condition is true. The condition is tested before entering the loop.

17
New cards

FOR statement

A loop that directs program flow through a group of statements a fixed number of times.

18
New cards

REPEAT...UNTIL statement

Used to repetitively execute a subject statement until a condition is true. The condition is checked after the subject statement is executed. Therefore, the subject statement is always executed at least once.

19
New cards

Structured programming

A method of programming which follows rules about selection, sequence, and iteration control structures. The programmer uses top down analysis for problem-solving, modularization for program structure and organisation, and structured code for the individual modules.

20
New cards

Hierarchy chart

A diagram that illustrates modules' relationships to each other, starting with the whole program, then breaking it down into smaller sub-problems until each box is a singular task.

<p>A diagram that illustrates modules' relationships to each other, starting with the whole program, then breaking it down into smaller sub-problems until each box is a singular task.</p>
21
New cards

Benefits of structured programming

Programs are more easily and quickly written - large problems are broken down into smaller modules that are easier to program and manage.

Modules can be reused - in the same program, or saved to a library and used in other programs.

Programs are more reliable and have fewer errors - it's easier to find errors in self-contained modules.

Programs take less time to test and debug - each module can be tested individually.

New features can be added by adding more modules.

22
New cards

Good programming practice

Use meaningful names for variables and subroutines.

Add lots of comments to explain each module.

Each module should perform a singular task.

Selection and iteration structures should have single entry and exit points.

Keep each module self-contained by passing parameters and using local variables in subroutines

23
New cards

High level language structures

Structured programming is only possible because the structures are built into programming languages like Python, Java, VB, and C#.

Early programming languages have no iterative statements.

An iteration statement could only be written like this:

IF (condition) GO TO label

This lead to spaghetti programs which were very difficult to follow.

24
New cards

Examples of problems solved by algorithms

Routing problems:

- Routing packets of data around the Internet by the shortest route

- Finding the shortest route for a salesman to cover his territory

Timetabling commercial aircraft crews so that they don't exceed their permitted flight hours

Searching information on the internet or from a database

Encrypting communications so that they cannot be hacked

Sorting large amounts of data

Writing a compiler program to translate a high-level language to machine code

25
New cards

Properties of a good algorithm

Has clear and precisely stated steps that produce the correct output for any set of valid inputs

Should allow for invalid inputs - exception handling

Must always terminate at some point

Should be efficient and execute in as little steps as possible

Should be designed in such a way that other people will be able to understand it and modify it if necessary

26
New cards

Flowchart

A diagram that represents an algorithm, work flow, or process, and uses geometric symbols connected by arrows to show the direction of the flow of action.

<p>A diagram that represents an algorithm, work flow, or process, and uses geometric symbols connected by arrows to show the direction of the flow of action.</p>
27
New cards

Pseudocode

A non-language-specific way of writing code. Can be used to write out how an algorithm will work without having to worry about specific rules or syntax.

<p>A non-language-specific way of writing code. Can be used to write out how an algorithm will work without having to worry about specific rules or syntax.</p>
28
New cards

Testing

Used to ensure that the program runs and that it functions without errors. Finding errors is common, e.g. syntax errors, logic errors.

29
New cards

Syntax error

An error that results when an instruction does not follow the syntax rules or grammar of the programming language.

30
New cards

Logic error

An error in a program that makes it do something other than what the programmer intended.

31
New cards

Runtime error

An error that will make the program crash as it is running (e.g. dividing by 0).

32
New cards

Module testing

Making sure each subroutine works correctly

33
New cards

Program testing

Making sure each program in the system works correctly

34
New cards

System testing

Testing the entire system as one entity to ensure that it is working properly

35
New cards

Normal data

Entering data that should be acceptable to the solution.

36
New cards

Boundary data

Data either side of the range extremes. For example in a range of 1 to 10 boundary data will include 0, 1, 10 and 11

37
New cards

Erroneous data

Inputs that the program should not accept.

38
New cards

Hand tracing algorithms

Running through a program manually, as if you were the computer, taking each line at a time and writing down any changes in the values of the variables. A trace table can be used.

39
New cards

Representational abstraction

The process of removing unnecessary details so that only information that is required to solve the problem remains. This uses infomation hiding. e.g. the London Underground Map

40
New cards

Abstraction by generalisation

Grouping by common characteristics to arrive at some kind of hierarchy. Common characteristics are identified.

41
New cards

Problem abstraction

Removing details until the problem is represented in a way that it is possible to solve because it reduces to one which has already been solved.

42
New cards

Automation

Building models of real world objects or phenomena in order to solve a problem.

Computer scientists have to decide what details are relevant to the problem and discard anything else.

Algorithms and data structures can then be designed to solve the problem.

The algorithms is then implemented in program code and executed.

43
New cards

Composition

Combining procedures to form a compound procedure. Combining data to form compound data objects such as a tree or a stack.

44
New cards

Procedural abstraction

Used to keep the actual values used in a computation separate from the overall design.

In simple terms, this involves writing procedures and passing parameters.

45
New cards

Functional abstraction

Abstraction to what a section of code will do rather that the details of how it does it. A function definition allows for abstracting the contained code to a function call.

46
New cards

Data abstraction

Managing complexity in programs by giving a collection of data a name without referencing the specific details of the representation.

47
New cards

Finite state machine

A sequential logic function consisting of a set of inputs and outputs, a next-state function that maps the current state and the inputs to a new state, and an output function that maps the current state and possibly the inputs to a set of asserted outputs.

<p>A sequential logic function consisting of a set of inputs and outputs, a next-state function that maps the current state and the inputs to a new state, and an output function that maps the current state and possibly the inputs to a set of asserted outputs.</p>
48
New cards

Uses of finite state machines

Robotics

Video games industry

Design of digital hardware systems

Design of compilers and network protocols

Definition of languages, and to decide whether a particular word is allowed in a language

49
New cards

Finite state automation

A finite state machine that produces no output whilst processing. It responds YES or NO when processing of the input data has finished.

50
New cards

State transition tables

A tabular representation of a FSM that contains the current state, inputs and their consequent successor state.

Explore top notes

note
Nutrition
Updated 1188d ago
0.0(0)
note
Social Studies Vocabulary
Updated 532d ago
0.0(0)
note
B3
Updated 1239d ago
0.0(0)
note
Chapter 15: Potential Therapies
Updated 1324d ago
0.0(0)
note
CUSTOMER SERVICE
Updated 1354d ago
0.0(0)
note
social studies chapter 7!
Updated 883d ago
0.0(0)
note
Nutrition
Updated 1188d ago
0.0(0)
note
Social Studies Vocabulary
Updated 532d ago
0.0(0)
note
B3
Updated 1239d ago
0.0(0)
note
Chapter 15: Potential Therapies
Updated 1324d ago
0.0(0)
note
CUSTOMER SERVICE
Updated 1354d ago
0.0(0)
note
social studies chapter 7!
Updated 883d ago
0.0(0)

Explore top flashcards

flashcards
Memory 2
45
Updated 833d ago
0.0(0)
flashcards
science 8 finals :scream:
105
Updated 995d ago
0.0(0)
flashcards
Evolution Exam 1
86
Updated 1256d ago
0.0(0)
flashcards
Nervous System Knowt
35
Updated 1010d ago
0.0(0)
flashcards
Macbeth Act 2 Lit Devices
50
Updated 1041d ago
0.0(0)
flashcards
History Final Notes
78
Updated 289d ago
0.0(0)
flashcards
TWA Unit 6.2
23
Updated 82d ago
0.0(0)
flashcards
Memory 2
45
Updated 833d ago
0.0(0)
flashcards
science 8 finals :scream:
105
Updated 995d ago
0.0(0)
flashcards
Evolution Exam 1
86
Updated 1256d ago
0.0(0)
flashcards
Nervous System Knowt
35
Updated 1010d ago
0.0(0)
flashcards
Macbeth Act 2 Lit Devices
50
Updated 1041d ago
0.0(0)
flashcards
History Final Notes
78
Updated 289d ago
0.0(0)
flashcards
TWA Unit 6.2
23
Updated 82d ago
0.0(0)