Section 2 - Problem solving and theory of computation Flashcards

1
Q

Examples of high-level procedural languages?

A

Python

C#

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

In high-level procedural languages we can use algorithms to implement…

A

Sequence
Selection
Iteration

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

What is a sequence?

A

one or more statements following one after the other

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

How do we implement selection in a program?

A

Implemented using an IF…THEN…ELSE statements

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

Define iteration

A

Iteration means repeated execution of a set of statements

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

Most high-level languages have three main iterative structures, can you name these?

A

WHILE, FOR, REPEAT

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

What are the 2 types of strategies when problem solving?

A

Exhaustive search

divide and conquer

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

What is the general ‘rule’ when looking at logic problems.

A

All problems can be solved with an algorithm

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

Define an exhaustive search, when problem solving

A

Trying every combination possible to gain an end result.
Requires little knowledge, essentially trial and error.
Can take a lot of time

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

Define ‘divide-and-conquer’ when problem solving

A

Use of binary search, split things in half.

Search one half then repeat.

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

Define abstraction.

A

The removal of information, in turn making data easier to understand by the user.
Aims to remove complexity

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

Representational abstraction?

A

The removal of unnecessary information.

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

What are finite state machines?

A

A model of computation used to design computer programs and sequential logic circuits.
Not an actual machine. An abstract model of how a machine would react to an external event.
The machine can be in one of a finite number of states and changes from one state to the next when triggered by some condition or input

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

When are FSM’s often used?

A

The modeling of hardware, compilers and network protocols.

e.g. vending machines, traffic lights, lifts, combination locks, communication protectors

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