Search Header Logo

A Level CS Chapter 21 Maths for Regular Expressions (Kalpesh)

Authored by Kalpesh Sagar

Computers

12th Grade

Used 1+ times

A Level CS Chapter 21 Maths for Regular Expressions (Kalpesh)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is a set in mathematics?

An ordered list of values where repetition is allowed
A collection of unordered, non-repeated data items of the same type
A sequence of numbers arranged from smallest to largest
A table of key-value pairs

Answer explanation

A SET is a collection of UNORDERED, NON-REPEATED data items. Key properties: (1) UNORDERED — {1,2,3} and {3,1,2} are the same set; (2) NO DUPLICATES — {1,1,2} is not a valid set, it would just be {1,2}; (3) Same type — all elements belong to the same category. Sets are fundamental to mathematics and computer science and appear in most programming languages (Python's set, Java's HashSet, etc.).

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Which of the following correctly represents the set of natural numbers from 1 to 5?

[1, 2, 3, 4, 5]
(1, 2, 3, 4, 5)
{1, 2, 3, 4, 5}
<1, 2, 3, 4, 5>

Answer explanation

Sets are written using CURLY BRACES { }. So the set of natural numbers 1 to 5 is written {1, 2, 3, 4, 5}. Square brackets [ ] are used for lists/arrays (ordered, allows duplicates). Round brackets ( ) are used for tuples or coordinates. Angle brackets < > are used in BNF notation. Always use curly braces when writing sets in mathematics and computer science.

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What are 'natural numbers' in the context of sets?

All real numbers including decimals
All positive whole numbers (1, 2, 3, 4, 5, ...)
All integers including negatives
All numbers between 0 and 1

Answer explanation

NATURAL NUMBERS (ℕ) are positive whole numbers: 1, 2, 3, 4, 5, ... The symbol ℕ represents the set of all natural numbers. Note: some definitions include 0, but in the AQA textbook context natural numbers start at 1. Natural numbers are important because the set ℕ is a COUNTABLY INFINITE set — you can list them one by one, even though the list never ends.

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does the symbol ∈ mean in set notation?

Is not a member of
Is a subset of
Is a member of / belongs to
Is equal to

Answer explanation

The symbol ∈ means 'IS A MEMBER OF' or 'belongs to'. For example: 3 ∈ {1, 2, 3, 4, 5} means '3 is a member of this set' — TRUE. 6 ∈ {1, 2, 3, 4, 5} means '6 is a member of this set' — FALSE. The symbol ∉ means 'is NOT a member of'. A 'member' or 'element' describes a value or item that belongs to a set.

5.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

If A = {1, 2, 3, 4, 5}, which of the following statements are TRUE?

3 ∈ A
6 ∈ A
1 ∈ A
0 ∈ A

Answer explanation

3 ∈ A is TRUE — 3 is in the set {1,2,3,4,5}. 1 ∈ A is TRUE — 1 is in the set. 6 ∈ A is FALSE — 6 is not in the set. 0 ∈ A is FALSE — 0 is not in the set. The ∈ symbol is essential AQA set notation — expect to see questions asking you to evaluate whether elements belong to a given set.

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is set comprehension?

Reading and understanding a set definition
The process of building a set using an expression or rule, rather than listing every element
Combining two sets together
Checking whether an element belongs to a set

Answer explanation

SET COMPREHENSION is defining a set using a RULE or EXPRESSION rather than listing every element. This is essential for large or infinite sets. The format is: A = {x | condition on x} which reads 'the set of all x such that [condition]'. For example: {x | x ∈ ℕ, x > 3} = {4, 5, 6, 7, ...}. The | symbol here means 'such that'. Most programming languages support this — Python calls it a 'set comprehension': {x for x in range(10) if x % 2 == 0}.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the set A = {x | x ∈ ℕ, x ≤ 5} represent?

{0, 1, 2, 3, 4, 5}
{1, 2, 3, 4, 5}
{5, 6, 7, 8, ...}
All natural numbers

Answer explanation

Reading the comprehension: 'the set of all x where x is a natural number AND x is less than or equal to 5'. Natural numbers start at 1, so: {1, 2, 3, 4, 5}. If it included 0 (if zero were a natural number in this context), it would be {0,1,2,3,4,5}. Note: ℕ (natural numbers) are positive whole numbers starting from 1 in AQA's definition. ℤ (integers) would include negative numbers and zero.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?