MCS-212 · Block 2 Unit 1

Sets, Relations and Functions

Section 1 of 9

Block 2 · Unit 1Sets, Relations and Functions7 min · Section 1 of 9

1.1Sets and how to describe them

Covers IGNOU MCS-212 §1.2 (first part), E1–E3

Almost every object in mathematics and programming is built from sets: the set of valid user IDs, the set of nodes in a network, the set of solutions of an equation. Before we can combine sets we need a clear meaning of the word and standard ways to write sets down.

“The students enrolled in IGNOU MCA” is a set: the university’s records decide membership. “The good students in the class” is not a set, because “good” has no exact meaning.

Two ways to write a set

FormHow it worksExample
Roster (tabular, listing) formlist the elements inside { }\{\,\}, separated by commasV={a,e,i,o,u}V = \{a, e, i, o, u\}
Set-builder (property) formdescribe the property p(x)p(x) of the elements: {x∣p(x)}\{x \mid p(x)\} or {x:p(x)}\{x : p(x)\}{x∣x∈N, 2<x<11}\{x \mid x \in \mathbb{N},\ 2 < x < 11\}

In roster form the order does not matter and repeated elements count once: {4,2,8,2,6}={2,4,6,8}\{4, 2, 8, 2, 6\} = \{2, 4, 6, 8\}. A third way, the Venn diagram, is a picture; it appears in the next section.

Special sets

SetSymbolFinite?
natural numbers 1,2,3,…1, 2, 3, \dotsN\mathbb{N}infinite
integersZ\mathbb{Z}infinite
rational numbersQ\mathbb{Q}infinite
real numbersR\mathbb{R}infinite
days of the week—finite, 7 elements
integers between 13 and 17 divisible by 6∅\emptysetfinite, 0 elements

Key takeaways

  • A set is a well-defined collection of distinct objects.
  • Roster form lists elements; set-builder form states a property.
  • Order and repetition do not matter in a set.
  • ∅\emptyset has no elements; ∣A∣|A| is the number of elements of a finite set AA.

Practice questions

Answer on paper first, then check. The explanation matters more than the letter you chose.

Question 1 · multiple choice

Which of the following is a set?

Show answer

Answer: C. The prime numbers less than 20

“Prime numbers less than 20” has an exact test for membership. The other options depend on opinions (“intelligent”, “beautiful”, “difficult”), so they are not well-defined.

Question 2 · multiple choice

What is ∣{3,5,3,7,5}∣|\{3, 5, 3, 7, 5\}|?

Show answer

Answer: B. 3

As a set it is {3,5,7}\{3, 5, 7\}, which has 3 elements. Option 1 counts the repeated elements again.

Question 3 · multiple choice

Which is the set-builder form of {1,4,9,16,25}\{1, 4, 9, 16, 25\}?

Show answer

Answer: D. {x2∣x∈N, x≤5}\{x^2 \mid x \in \mathbb{N},\ x \leq 5\}

The elements are the squares of 1,…,51, \dots, 5. Option 1 contains all natural numbers up to 25, i.e. 25 elements.

Question 4 · multiple choice

Which set is empty?

Show answer

Answer: A. {x∣x∈Z, 13<x<17, 6 divides x}\{x \mid x \in \mathbb{Z},\ 13 < x < 17,\ 6 \text{ divides } x\}

The integers 14, 15, 16 are not multiples of 6, so no element qualifies. Option 3 is tempting, but {∅}\{\emptyset\} has one element, the empty set.

Question 5 · multiple choice

Which set is infinite?

Show answer

Answer: C. The set of points on a line segment of length 1 cm

Between any two points of a segment there is another point, so there are infinitely many. Option 2 has 199 elements, which is finite even though the numbers are large.

Question 6 · short answer

Write the set of vowels in the word “EDUCATION” in roster form and in set-builder form, and give its cardinality.

Show worked answer

The vowels in E-D-U-C-A-T-I-O-N are E, U, A, I, O. Roster form: {a,e,i,o,u}\{a, e, i, o, u\} (order does not matter). Set-builder form: {x∣x is a vowel occurring in the word EDUCATION}\{x \mid x \text{ is a vowel occurring in the word EDUCATION}\}. Cardinality: 5.

↑ ↓ move↵ openTab switch type