A-level Computing/AQA/Paper 1/Theory of computation/Compact set notation





Compact set notation is a useful tool to describe the properties of each element of a set, rather than writing out all elements of a set.

The table below lists all of the necessary symbols for compact set notation.

Example 1:

We might want to describe a set A, which contains all natural numbers greater than 10.

This means that we are interested in a subset of &#8469;, such that each of its elements is greater than the value 10.

Using set notation this set can be described as:

A = {x|x ∈ &#8469; ∧ x> 10}

Example 2:

This time set A is described as natural numbers, which are multiples of 10. This can be notated as:

A = {10x|x ∈ &#8469;}

Example 3:

The elements of set A are all even numbers, up to including 12. Set notation allows us to write this set as {0,2,4,6,8,10,12}, which in this example is feasible.

However, this would be very impractical, if A is described as all even numbers, up to including 1,000,000!

A = {2x &#x7C; x ∈ N &and 2x ≦ 1,000,000}

The table below explains how each expression is linked to the English description of the elements of the set A.

Example 4:

Set A is described as all the natural multiples of 3, below 5,000.

A = {3x &#x7C; x ∈ N ∧ 3x < 5,000}

The table below explains how each expression is linked to the English description of the elements of the set A.

Using set notation, define the set A as all the numbers divisible by 4. Which of the following terms are applicable to A: countable, uncountable, finite, infinite.

A = {4x | x ∈ N } Set A is a countably infinite set.

Programming
Not every programming language offers the ability to perform set theory calculations out of the box. In Visual Basic it has only been available since VB.NET 2008, using the LINQ libraries that you have to import to get it working: