wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Theory of Computation 2 (inc. BNF)

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.

In computational thinking, representational abstraction is the process of

a)

removing unnecessary detail

b)

providing additional information

c)

enhancing and amending detail

d)

embellish the current detail

2.

Data abstraction is similar in concept to functional abstraction, where ...

a)

the details of how the data is represented in the computer are hidden

b)

each piece of data is broken down into its binary equivalent

c)

all the bytes of data are placed in an abstract tree structure for easy retrieval

d)

the concept of how data is contained is philosophically approached

3.

Composition is the opposite of decomposition, where decomposition is

a)

the breaking down a problem into smaller parts (sub-problems), each of which perform a specific task

b)

the construction of an overall blueprint of the program, including methods and functions

c)

the creation of the layout of pseudocode that can be converted to a composition diagram

d)

the adjustment of the code to enable parallel processing of what might be sequential programming statements

4.

Problem abstraction involves removing details to represent the problem in a way it can be solved, by

a)

reducing down to problems that have been solved

b)

removing the more challenging aspects of the problem

c)

recalculating the more challenging algorithms until the problem does not exist

d)

re-calibrating the key criteria of the issue until the symptomatic criteria have been neutralised

5.

finite state machines are useful for

a)

modelling and design of computer programs as well as digital hardware systems

b)

showing notation for context-free grammars, describing the syntax of languages

c)

providing tools to facilitate communication, measurement, commerce and manufacturing

d)

knowing the framework around technology integration

6.

There are various symbols used in representing a Finite State Machine. They are named ...

a)

State, Start state, Accept state and transition

b)

State, Slow state, Fast state and Progression

c)

Start, Go state, Stop state and Halt

d)

Begin state, Engage state, Process and Halt

7.

A FSM (Finite State Machine) with outputs is called a

a)

Mealy Machine

b)

Finite State Machine with Output

c)

Mechanical Machine

d)

Making Machine

8.

Which of the following is an example of a BNF production rule?

a)

<digit> ::= 0|1|2|3|4|5|6|7|8|9

b)

R → (B → 5)

c)

x + y2 → 17

d)

x2 + 3y

9.

What type of object is enclosed in angle brackets in Backus-Naur form?

a)

Definitive

b)

Terminal

c)

Non-terminal

d)

Special

10.

What name is given to an object in Backus-Naur form that cannot be broken down further?

a)

Definitive

b)

Terminal

c)

Non-terminal

d)

Special

11.

Which of the following examples is in valid Backus-Naur form for storing a multi- part name?

a)

< Name> ::= < Name >

b)

<Name> =:: <Forename> | <Surname>

c)

<Name> ::= <Forename> <Surname>

d)

<Name> ::= <Forename Surname>

12.

Why is it that Backus-Naur form is capable of representing some languages that cannot be represented by regular expressions?

a)

Backus-Naur form supports definitions

b)

Backus-Naur form supports Recursion

c)

Backus-Naur form supports Selection

d)

Backus-Naur form supports Loops

13.

Which of the following examples uses valid recursion?

a)

<Number> ::= <Digit> | <Digit><Number>

b)

<Name> ::= <Forename><Surname>

c)

<Age> ::= <Digit>|<Digit><Digit>

d)

<Name> ::= <Name>

14.

What is the purpose of using Backus-Naur Form (BNF) in language syntax?

a)

To create complex mathematical equations

b)

To check language syntax and formulate simple production rules

c)

To design user interfaces

d)

To compile programming languages

15.

What is Backus-Naur form used for?

a)

Notating context-free languages.

b)

Notating context-sensitive languages.

c)

Notating regular languages.

d)

Notating linear languages.

16.

What does the pipe symbol (|) represent in Backus-Naur form?

a)

The OR operator.

b)

The AND operator.

c)

The NOT operator.

d)

The XOR operator.

17.

What is recursion in Backus-Naur form used for?

a)

To simplify expressions

b)

To form more complex definitions

c)

To eliminate non-terminals

d)

To avoid using regular expressions

18.

In Backus-Naur form, how is an integer defined?

a)

As a digit or a digit followed by a letter

b)

As a digit or a digit followed by an integer

c)

As a letter or a letter followed by a digit

d)

As a letter or a letter followed by an integer

19.

What is a syntax diagram?

a)

A visual representation of a regular language

b)

A textual representation of a regular language

c)

A visual representation of a programming language

d)

A textual representation of a programming language

20.

Which of the following can be used to simulate any turing machine?

a)

Finite State Automaton

b)

Counter machines

c)

Universal Turing Machine

d)

All of the above

21.

Which of these explain the importance of Turing machines ?

a)

Demonstrate the ability of humans to build computers

b)

Provide a definition of what is computable

c)

Used to prove that there are problems which cannot be solved by computers

d)

Allow for the completion of complex mathematical calculations

22.

Transition Function definition would be in the form of

a)

δ(current state, write) = (new state, read, move)

b)

δ(current state, read) = (new state, write, move)

c)

δ(new state, read) = (current state, write, move)

d)

δ(current state, read, new state,) = ( write, move)

23.

A "Tractable" problem is on which ...

a)

have a polynomial (or less) time solution

b)

have no polynomial (or less) time solution

24.

The Current State is S1 and Input is 1

What is the OUTPUT and Direction

a)

1, L

b)

1, R

c)

0, L

d)

0, R