4.4 Theory of computation Flashcards

1
Q

What is representational abstraction?

A

Removing uneccesary details from a problem

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

What is abstraction by generalisation?

A

Grouping things in terms of common characteristics

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

What is Data abstraction?

A

Seperating the way a compound data structure is used to how it is constructed

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

What is problem reduction?

A

Reducing a problem into one that has already been solved

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

What does the metacharcter ‘?’ denote in a regular expression

A

one or none

A?B = {AB, B}

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

What does the metacharcter ‘*’ denote in a regular expression

A

Zero or more

A* = { ,A,AA,AAA,AAAA….}

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

What does the metacharcter ‘+’ denote in a regular expression

A

One or more

A+ = {A,AA,AAA,AAAA…}

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

What do parenthases ( ) denote in a regular expression

A

A group

(AB)?A = {A,AB}

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

What does the metacharcter ‘|’ denote in a regular expression

A

OR
(Everything on the left, OR everything on the right)

A|B = {A,B}

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

Exam style question

Describe the set of strings matched by the regular expression:
a?(a|b)*aba+a

A

zero or one instances of ‘a’
zero or more instances of either ‘a’ or ‘b’
‘a’ followed by ‘b’
one or more instances of ‘a’
a single character ‘a’

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