wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

7517 04 Section Assessment

Total questions: 60

Worksheet time: 3600secs

Name
Class
Date
1.

Which of the following is not an example of abstraction?

a)

Identifying essential details

b)

Disregarding non-essential information

c)

Breaking the problem down into smaller tasks

2.

Which of the following is not a feature of decomposition?

a)

Looking into a system in terms of procedures or subroutines

b)

Disregarding non-essential information

c)

Breaking a problem down into smaller tasks

3.

In abstraction by categorisation, aspects of a problem are placed in broader categories to create a hierarchical representation

a)

True

b)

False

4.

Abstraction and Decomposition are examples of...

a)

Computational Thinking

b)

Algorithmic Thinking

c)

Computer Science

d)

Logical Reasoning

5.

Why do we decompose a complex problem?

a)

To make it easier to solve

b)

To make its solution more cyclical

c)

To change the problem we have

6.

What is automation?

a)

Modelling of real-world problems

b)

Breaking a problem down in to smaller chunks

c)

removing unnecessary detail

d)

Information hiding

7.

what is composition?

a)

Linking procedures to form a compound procedure

b)

Breaking a problem down in to smaller chunks

c)

Modelling of real-world problems

d)

Information hiding

8.

What is an algorithm?

a)

A sequence of instructions on how to solve a problem.

b)

The breaking down of a problem into smaller parts.

c)

Focusing on important parts and ignoring the irrelevant details

d)

The easiest route through a coding problem

9.

In this finite state machine how many states are there

a)

1

b)

2

c)

3

d)

4

10.

What do the arrows represent

a)

States

b)

Transformations

c)

Inputs

d)

Transitions

11.

In this FSM how many inputs are there?

a)

4

b)

2

c)

1

d)

3

12.

In this FSM which is the Accepting State

a)

S1

b)

S2

c)

0

d)

1

13.

When in State S2, if the input is 1...

a)

The machine will remain in state S2

b)

The machine will change state to S1

c)

The Machine will return to the Start State

d)

The machine will return the value of 0

14.

When the state is S2, if the input is 0...

a)

The machine will remain in the state S2

b)

The machine will malfunction

c)

0 is not a valid input

d)

The machine will change state to S1

15.

Starting at state S1 what state would input 'acd' change to

a)

S1

b)

S3

c)

S4

d)

S2

16.

Starting at state S1, an input of 'ab' would result in state

a)

S1

b)

S2

c)

S3

d)

S4

17.

For a Turing machine, the initial state is called a Start State, and a state that has no outgoing transitions is called a Halting State

a)

True

b)

False

18.

The set of symbols used for a Turing Machine is called an

a)

Alphabet

b)

Symbols Collection

c)

Dictionary

d)

Functional Set

19.

Which of these explains a Turing machine ?

a)

Demonstrates the ability of humans to build computers

b)

Provides a definition of what is computable

c)

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

d)

Allows for the completion of complex mathematical calculations

20.

A "intractable" problem is one which...

a)

can theoretically be solved, but not within polynomial time

b)

cannot theoretically be solved, unless within polynomial time

21.

What would this notation mean?

δ (S1, A) = (S1, B, →)

a)

IF in state 1, and read an "A" Stay in state 1, Write a B and move right

b)

IF in state 1, and read an "B" Stay in state 1, Write an A and move right

c)

IF in state 1, and read an "A" Change to state 2, Write a B and move right

d)

IF in state 1, and read an "B" Change to state 2, Write an A and move left

22.

Which of the following operation can be applied on regular expressions?

a)

Union

b)

Intersection

c)

Difference

d)

All of these

23.

The set of all strings over ∑ = {0,1} in which all strings that begin and end with 0 is

a)

0(0+1)0

b)

00

c)

00(0+1)0

d)

All of these

24.

The set of all strings over ∑ = {a,b} in which all strings having bbbb as substring is

a)

(a+b)* bbbb (a+b)*

b)

(a+b)* bb (a+b)*bb

c)

bbbb (a+b)*

d)

bb (a+b)*

25.

The set of all strings over ∑ ={a,b} in which single a is followed by any number of b’s, or single b followed by any number of a’s is:

a)

ab* + ba*

b)

ab*ba*

c)

a*b + b*a

d)

None

26.

The set of all strings over ∑ = {a,b} in which all strings of a’s and b’s ending in bb is

a)

ab

b)

a*bbb

c)

(a+b)* bb

d)

All of these

27.

Which of the following statements is true?

a)

Every language that is defined by regular expressions can also be defined by Finite state Machines

b)

Every language defined by Finite State Machines can also be defined by regular expressions

c)

We can convert regular expressions into Finite State Machines

d)

All of these

28.

Which of the following BNF rules uses recursion?

a)

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

b)

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

c)

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

d)

<Name> ::= <Name>

29.

Select the 2 strings that are matched by the regular expression:

a(bc)*d

a)

abcbcbcbcd

b)

acd

c)

ad

d)

acccd

30.

Select the 2 strings that are matched by the regular expression:

a(b|c)?d

a)

abcbcbcbcd

b)

acd

c)

ad

d)

acccd

31.

Regular expressions are used to...

a)

match patterns in text

b)

draw FSMs

c)

define programming language

d)

correct spellings

32.

Which regular expression matches the FSM?

a)

ab|cb+

b)

(a|b)+cb*

c)

(a|cb+)+

d)

a?c|b*

33.

Symbol used to represent zero or one of the preceding tokens

a)

?

b)

*

c)

^

d)

+

34.

What is the correct syntax for a line of Python code which imports the re module?

a)

Import re

b)

import RE

c)

import re

d)

Import RE

35.

If A = {1,2,3}, B = {3,4,5}, C = {5,6,7}, find A U B U C.

a)

{1,2,3,4,5,6,7}

b)

{1,2,3,4,5,6,7,8}

c)

{1,2,3,3,4,5,5,6,7}

d)

{3,4,5}

36.

List the elements of A

a)

{2,3}

b)

{2,3,5,9}

c)

{1,2,3,4,5}

d)

{5,9}

37.

List the elements of A Ո B

a)

{5,9}

b)

{2,3,7,6,8}

c)

{2,3,5,9,7,6,8}

d)

{1,4}

38.

List the elements of B

a)

{4,5,6,7,8,9,10,11}

b)

{4,6,7,8}

c)

{9,5,10,11}

d)

{4,5,6,7,8,9,10}

39.

List the elements of A △ B'

a)

{2,3}

b)

{5,9}

c)

{2,3,6,7,8}

d)

{1,2,3,4,5,6,7,8}

40.

The Venn diagram for  A\cup B  is represented in green as

a)
b)
c)
d)
41.
The image represents which of the following?
a)
intersection, "and"
b)
union, "or"
c)
intersection, "or"
d)
union, "and"
42.
The image represents which of the following?
a)
intersection, "and"
b)
intersection, "or"
c)
union, "and"
d)
union, "or"
43.

Which of the following operations on sets describe the given Venn Diagram?

a)

(A B)\left(A\ \cap\ B\right)'

b)

(AB)\left(A-B\right)'

c)

(A B)\left(A\cup\ B\right)'

d)

A BA'\ \cup\ B

44.

Which of the following operations on sets describe the given Venn diagram?

a)


A BA\ -\ B

b)

B AB\ -\ A

c)

A BA'\ -\ B'

d)

B AB'\ -\ A'

45.

Indicate constant time complexity in terms of Big-O notation

a)

O(N)

b)

O(1)

c)

O(log N)

d)

O (N^2)

46.

Indicate exponential time complexity in terms of Big-O notation

a)

O (N)

b)

O (N^2)

c)

O (2^N)

d)

O (log N)

47.

Find the slowest time complexity

a)

O (N)

b)

O (N^2)

c)

O (N!)

d)

O (2^N)

48.

Which notation is consistent for every execution?

a)

O (N)

b)

O (N^2)

c)

O (1)

d)

O (2^N)

49.

Indicate polynomial time complexity in terms of Big-O notation

a)

O (N!)

b)

O (1)

c)

O (N^2)

d)

O (log N)

50.

The graphs shows

a)

O(N^2)

b)

O(N)

c)

O(log N)

d)

O(1)

e)

O(N log N)

51.

The graphs shows

a)

O(N^2)

b)

O(N)

c)

O(log N)

d)

O(1)

e)

O(2^N)

52.

The graphs shows

a)

O(N^2)

b)

O(N)

c)

O(log N)

d)

O(1)

e)

O(2^N)

53.

The graphs shows

a)

O(N^2)

b)

O(N)

c)

O(log N)

d)

O(2^N)

e)

O(1)

54.

The graph shows

a)

O(1)

b)

O(2^N)

c)

O(n^2)

d)

O(log N)

e)

O(N)

55.

O(n) is ...

a)

Quadratic

b)

Linear

c)

Logarithmic

d)

Constant

e)

Linearithmic

56.

O(log n) is ...

a)

Quadratic

b)

Linear

c)

Logarithmic

d)

Exponential

e)

Linearithmic

57.

O(2^n) is ...

a)

Quadratic

b)

Linear

c)

Logarithmic

d)

Exponential

e)

Linearithmic

58.

Name the function that can be denoted by n!, where it is the product of all positive integers less than or equal to n; e.g. 3! is 3 x 2 x 1

a)

Equicomplex

b)

Factorial

c)

Linear

d)

Polylinial

e)

Dimensional

59.

The set of values that could possibly come out of a function is called the (a)   ?

60.

__________ __________ is the process of providing a definition or interface of a system or object, whilst keeping the inner workings hidden.

(a)