Automata Class Tasks
Automata Class Tasks
Be in groups of five. Go through all the tasks provided and, with the aid of the notes, document your
work in a Word document. Each group is expected to:
1. Complete all Week 2 tasks based on the instructions given in the course notes below.
2. Document the findings for each task in 500-750 words, ensuring to include a diagram(s) to
support the explanations.
The group leader is responsible for compiling the document and ensuring it is emailed to
[email protected], with all other team members copied in the email. The document must be
shared by the end of the lesson today.
In simple terms, set theory is about grouping things together into a collection called a set. These
"things" can be numbers, letters, objects, or even other sets. The key is that a set contains distinct
elements, meaning no repetition.
• Set Definition: A set is a collection of distinct elements, and it is usually written by listing the
elements inside curly brackets {}.
• Set Notation:
o Element of a set: If something belongs to a set, we use the symbol ∈\in∈ (meaning "is
in") to show this. If it does not belong, we use ∉\notin∈/ (meaning "is not in").
▪ Example: 2∈A2 \in A2∈A (2 is in set A), but 4∉A4 \notin A4∈/A (4 is not in set
A).
o Subset: If all the elements of set AAA are also in set BBB, we say AAA is a subset of BBB,
written as A⊆BA \subseteq BA⊆B.
You can combine sets in different ways to form new sets. Here are some important operations:
• Union (∪\cup∪): Combines all the elements from two sets. If an element is in either set or both,
it is included.
o Example: If A={1,2}A = \{1, 2\}A={1,2} and B={2,3}B = \{2, 3\}B={2,3}, then A∪B={1,2,3}A
\cup B = \{1, 2, 3\}A∪B={1,2,3}.
o Explanation: The union takes all unique elements from both sets.
• Intersection (∩\cap∩): The intersection gives the elements that are common to both sets.
o Example: A={1,2}A = \{1, 2\}A={1,2} and B={2,3}B = \{2, 3\}B={2,3}, so A∩B={2}A \cap B =
\{2\}A∩B={2}.
o Explanation: The intersection only includes elements that appear in both sets.
• Difference (A−BA - BA−B): The difference shows what is left in set AAA when you remove
elements that are also in set BBB.
o Example: If A={1,2}A = \{1, 2\}A={1,2} and B={2,3}B = \{2, 3\}B={2,3}, then A−B={1}A - B =
\{1\}A−B={1}.
o Explanation: You take away elements from AAA that also appear in BBB.
• Imagine two overlapping circles: one for set AAA and one for set BBB.
o The union (A∪BA \cup BA∪B) covers both circles, including the overlapping part.
o The difference (A−BA - BA−B) is the part of AAA that doesn’t touch BBB.
A function is a rule that assigns each input (from a starting set, called the domain) to exactly one output
(from another set, called the codomain). Think of it as a machine: you put something in (input), and it
gives you something out (output).
• Function Definition: A function fff from set AAA to set BBB (written as f:A→Bf: A \to Bf:A→B)
assigns every element in AAA one element in BBB.
o Example: Let’s say f(x)=x2f(x) = x^2f(x)=x2, this means for each input number xxx, the
output is xxx squared. If A={1,2,3}A = \{1, 2, 3\}A={1,2,3}, then f(1)=12=1f(1) = 1^2 =
1f(1)=12=1, f(2)=4f(2) = 4f(2)=4, and f(3)=9f(3) = 9f(3)=9.
Properties of Functions:
• Injective (One-to-one): A function is injective if each element of the domain maps to a unique
element in the codomain. No two inputs share the same output.
• Surjective (Onto): A function is surjective if every element in the codomain is hit by at least one
element in the domain. This means all possible outputs are covered.
• Bijective: A function is bijective if it is both injective (one-to-one) and surjective (onto). In simple
terms, this means each input has a unique output, and every possible output is covered.
• Injective: Imagine 3 boxes (inputs) connected to 3 different lights (outputs), no two boxes light
up the same bulb.
• Surjective: Every light is on, but some boxes might share the same light.
• Bijective: Each box has its own unique light, and every light is on.
• Set Theory:
o Database Systems: Think of a database storing student records. Each student (element)
could belong to different groups (sets), such as students taking Math or English.
Operations like union or intersection help figure out which students are in both groups.
o Programming: Sets are used in coding. For example, when checking if two data lists
share common items, you use set operations.
• Functions:
o Computer Science: In coding, functions are essential. When you write a program to
calculate a total score based on different factors, that’s a function taking inputs and
producing an output.
o Objective: Use real-world examples like students enrolled in two courses (set A for
Math, set B for Science). Perform set operations: union (all students), intersection
(students taking both), and difference (students in Math but not Science).
o Expected Outcome: Submit a Venn diagram and a written explanation showing the
result of the operations.
o Objective: Imagine mapping students to their grades. Create a function fff that takes a
student's name as input and returns their grade. Discuss if the function is injective (do
two students share the same grade?) or surjective (do all grades have a student?).
o Expected Outcome: Each group should present a function, explain its properties
(injective, surjective, or bijective), and provide a real-world example of how this type of
function is useful.
• f:A→Bf: A \to Bf:A→B: A function fff that maps elements of AAA (the domain) to BBB (the
codomain).
Task 2: Takeaway task to be checked in the next class.
Objective: Practice direct and contradiction proofs by solving the following problems. Use notes below.
1. Direct Proof:
Prove that the product of any two odd numbers is odd.
Hint: Use the definition of an odd number as 2m+12m + 12m+1 where mmm is an integer.
2. Proof by Contradiction:
Prove that there is no smallest positive rational number.
Hint: Assume that there is a smallest positive rational number, say ab\frac{a}{b}ba, and show
that this assumption leads to a contradiction by finding a smaller rational number.
Instructions:
• For the contradiction proof, clearly state the assumption and explain where the contradiction
arises.
• Submit your written answers in foolscaps next class, including the necessary explanations.
Mathematical induction is a proof technique used to show that a statement holds true for all natural
numbers (or sometimes a certain range of them). It’s a bit like a domino effect: if you can prove that the
first statement is true, and that each subsequent statement follows from the previous one, then you can
prove that all statements are true.
• Base Case: Prove that the statement is true for the first value of nnn, usually n=1n = 1n=1.
• Inductive Step: Assume the statement is true for some arbitrary n=kn = kn=k, and then prove
that it is true for n=k+1n = k + 1n=k+1.
Once both steps are proven, you can conclude that the statement is true for all natural numbers starting
from the base case.
We want to prove that the sum of the first nnn positive integers is n(n+1)2\frac{n(n + 1)}{2}2n(n+1). In
other words, we want to prove:
S(n)=1+2+3+⋯+n=n(n+1)2S(n) = 1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}S(n)=1+2+3+⋯+n=2n(n+1)
S(k)=k(k+1)2S(k) = \frac{k(k+1)}{2}S(k)=2k(k+1)
We need to show:
Since both the base case and inductive step are proven, by mathematical induction, the formula is true
for all n≥1n \geq 1n≥1.
• Imagine each domino represents a number. When the first domino falls (base case), each
successive domino (inductive step) falls, proving the statement for all nnn.
Proof techniques help verify mathematical statements are true in a logical, step-by-step manner. Here
are some commonly used methods:
Direct Proof
In a direct proof, you start with what is known (the hypothesis) and use logical steps to arrive at the
conclusion.
• Example: Prove that the sum of two even numbers is always even.
Start by assuming the two numbers are even: a=2ma = 2ma=2m and b=2nb = 2nb=2n (where mmm and
nnn are integers). Now, add them:
a+b=2m+2n=2(m+n)a + b = 2m + 2n = 2(m + n)a+b=2m+2n=2(m+n)
Contradiction Proof
In a proof by contradiction, you assume the opposite (negation) of what you want to prove, and then
show that this leads to a contradiction.
Assume the opposite: suppose 2\sqrt{2}2 is rational. This means it can be written as ab\frac{a}{b}ba,
where aaa and bbb are integers with no common factors.
This means a2a^2a2 is even, so aaa must be even (since the square of an odd number is odd). Let a=2ka
= 2ka=2k, then:
This means b2b^2b2 is even, so bbb must also be even. But if both aaa and bbb are even, then they have
a common factor of 2, contradicting our original assumption that aaa and bbb have no common factors.
Therefore, 2\sqrt{2}2 is irrational.
• The assumption leads to a contradiction, which shows the original statement must be true.
Applications of Proofs:
1. Computer Science: Proof techniques are used in algorithms to ensure that certain procedures
always work correctly (e.g., sorting algorithms).
2. Engineering: Induction helps prove formulas related to circuits and design (e.g., the behavior of
systems over time).
3. Mathematics: Proof techniques are crucial for building upon established theorems and
developing new mathematical tools.
1. Base Case: The starting point of a proof using induction, usually showing the statement is true
for n=1n = 1n=1.
2. Inductive Step: A step where you assume a statement is true for n=kn = kn=k and then prove it
for n=k+1n = k+1n=k+1.
3. Inductive Hypothesis: The assumption that the statement holds for n=kn = kn=k during the
inductive step.
4. Rational Number: A number that can be expressed as ab\frac{a}{b}ba, where aaa and bbb are
integers.
Symbols:
• ⇒\Rightarrow⇒: Implies; shows that one step logically follows from the previous one.
Summary:
Mathematical induction and proof techniques are powerful tools for proving mathematical statements.
Induction works like a domino effect: if the first case is true and each following case is proven based on
the previous one, then all cases are true. Proofs can also use direct logic or contradictions to validate
statements, with applications in fields like computer science and engineering.
Objective: Use mathematical induction to prove the following statement is true for all n≥1n \geq 1n≥1.
Statement:
Prove that the sum of the first nnn odd numbers is equal to n2n^2n2.
In other words:
Instructions:
1. Base Case: Verify that the statement is true for n=1n = 1n=1.
2. Inductive Step: Assume the statement is true for n=kn = kn=k (i.e., 1+3+⋯+(2k−1)=k21 + 3 +
\dots + (2k-1) = k^21+3+⋯+(2k−1)=k2).
3. Prove for n=k+1n = k + 1n=k+1: Using the inductive hypothesis, show that the statement holds
for n=k+1n = k + 1n=k+1 (i.e., 1+3+⋯+(2(k+1)−1)=(k+1)21 + 3 + \dots + (2(k+1) - 1) =
(k+1)^21+3+⋯+(2(k+1)−1)=(k+1)2).
4. Submit a written proof showing both the base case and the inductive step.