theory of computation (FSMs and problem solving) Flashcards

(problem solving and finite state machines) (15 cards)

1
Q

What is an algorithm?

A
  • A sequence of steps that can be followed to complete a task
  • always terminate rather than looping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Pseudo code selection

A

IF name = ‘Emma’ THEN
—- OUTPUT ‘Hello Emma’

key points:
* single equals
* most functions are in caps

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

Iteration in pseudo code

A

FOR number ← 6 to 12
———OUTPUT number / 2
END FOR

WHILE number < 18
———-Number ← number + (number / 4)
END WHILE

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

What is abstraction?

A
  • Getting rid of unnecessary detail from a problem, making it easier to solve

represental abstraction:
removing unneccesary details
generalisation/categorisation:
grouping by common characteristics

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

Information hiding

A
  • Hiding all details of an object that do not form its main features
  • simplifies a problem without changing the essence of it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Functional abstraction

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

Procedural abstraction

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

Data abstraction

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

Problem abstraction/ reduction

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

Decomposition

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

Composition

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

Automation

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

Finite state machines: what are they, rules they follow

A
  • Always in a fixed state
  • Have a finite number of states
  • Can only ever be in one state
  • State changes based on current state and input data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

State transition diagrams: what are, rules they follow

A
  • Visual representation of a finite state machine
  • Have states (circles) joined by transitions (arrows)
  • Have a start state (indicated w leading arrow)
  • Have an accepting state (double circle)
  • Transition functions shown as an arrow between states
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

State transition tables

A

Columns usually hold current state, input and next state

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