0% found this document useful (0 votes)
29 views8 pages

Automata Class Tasks

Elements of automate theory

Uploaded by

hazmonkinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views8 pages

Automata Class Tasks

Elements of automate theory

Uploaded by

hazmonkinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Task 1: Group Work

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.

3. Prepare a Word document with a cover page that includes:

o The name of the tasks.

o The names of all group members and their admission numbers.

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.

Week 2: Set Theory and Functions (Expanded)

1. Basics of Set Theory

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 {}.

o Example: Set A={1,2,3}A = \{1, 2, 3\}A={1,2,3} contains the numbers 1, 2, and 3.

• 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.

▪ Example: A={1,2}A = \{1, 2\}A={1,2}, B={1,2,3}B = \{1, 2, 3\}B={1,2,3}, so A⊆BA


\subseteq BA⊆B (A is a subset of B).
o Empty Set: The set with no elements is called the empty set, written as ∅\emptyset∅ or
simply {}\{\}{}.

Key Set Operations:

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.

Diagram: Basic Set Operations

• 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 intersection (A∩BA \cap BA∩B) is just the overlapping part.

o The difference (A−BA - BA−B) is the part of AAA that doesn’t touch BBB.

2. Functions and Their Properties

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.

o Example: f(x)=2xf(x) = 2xf(x)=2x is injective because different inputs like 1, 2, 3 give


different outputs like 2, 4, 6.

• 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.

o Example: f(x)=x3f(x) = x^3f(x)=x3, where f:R→Rf: \mathbb{R} \to \mathbb{R}f:R→R


(from real numbers to real numbers), is surjective because every real number can be
expressed as the cube of some number.

• 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.

o Example: f(x)=x+1f(x) = x + 1f(x)=x+1, where f:R→Rf: \mathbb{R} \to \mathbb{R}f:R→R,


is bijective because each input xxx gives a different result, and all possible numbers are
included in the codomain.

Diagram: Types of Functions

• 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.

Examples and Applications:

• 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 Real-World Modeling: Functions help model relationships like population growth


(exponential functions), where each year the population grows by a certain percentage.

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.

Group Tasks for Evaluation:


1. Task 1: Set Operations Activity

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.

2. Task 2: Function Mapping Exercise

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.

Key to Symbols and Formulas:

• ∈\in∈: Means "is an element of".

o Example: 2∈{1,2,3}2 \in \{1, 2, 3\}2∈{1,2,3} (2 is in the set).

• ⊆\subseteq⊆: Means "is a subset of".

o Example: A⊆BA \subseteq BA⊆B (A is a subset of B).

• ∅\emptyset∅: The empty set (a set with no elements).

o Example: ∅={}\emptyset = \{\}∅={}.

• ∪\cup∪: Union (elements in either or both sets).

o Example: A∪BA \cup BA∪B.

• ∩\cap∩: Intersection (elements in both sets).

o Example: A∩BA \cap BA∩B.

• A−BA - BA−B: Difference (elements in A that are not in B).

o Example: A−BA - BA−B.

• 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.

Group discussion(Same groups of 5 as above): Direct Proof and Proof by Contradiction

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:

• Write clear step-by-step solutions for both problems.

• 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.

Week 3: Mathematical Induction and Methods of Proof

1. Introduction to Mathematical Induction

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.

Steps of Mathematical Induction:

There are two main steps in a mathematical induction proof:

• 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.

Example of Mathematical Induction:

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)

Step 1: Base Case


Check if the statement is true for n=1n = 1n=1.

For n=1n = 1n=1:

S(1)=1=1(1+1)2=1S(1) = 1 = \frac{1(1+1)}{2} = 1S(1)=1=21(1+1)=1

So, the base case is true.

Step 2: Inductive Step


Assume the statement is true for n=kn = kn=k (this is called the inductive hypothesis):

S(k)=k(k+1)2S(k) = \frac{k(k+1)}{2}S(k)=2k(k+1)

Now, prove it is true for n=k+1n = k + 1n=k+1.

We need to show:

S(k+1)=1+2+3+⋯+k+(k+1)S(k+1) = 1 + 2 + 3 + \dots + k + (k+1)S(k+1)=1+2+3+⋯+k+(k+1)

Using the inductive hypothesis, we know:

S(k+1)=k(k+1)2+(k+1)S(k+1) = \frac{k(k+1)}{2} + (k+1)S(k+1)=2k(k+1)+(k+1)

Factor the right-hand side:

S(k+1)=k(k+1)+2(k+1)2=(k+1)(k+2)2S(k+1) = \frac{k(k+1) + 2(k+1)}{2} =


\frac{(k+1)(k+2)}{2}S(k+1)=2k(k+1)+2(k+1)=2(k+1)(k+2)

Thus, the formula holds for n=k+1n = k+1n=k+1.

Since both the base case and inductive step are proven, by mathematical induction, the formula is true
for all n≥1n \geq 1n≥1.

Diagram: The Domino Effect of Induction

• 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.

2. Proof Techniques and Their Applications

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)

Since 2(m+n)2(m + n)2(m+n) is divisible by 2, the sum is even.

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.

• Example: Prove that 2\sqrt{2}2 is irrational.

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.

2=ab⇒2=a2b2⇒a2=2b2\sqrt{2} = \frac{a}{b} \quad \Rightarrow \quad 2 = \frac{a^2}{b^2} \quad


\Rightarrow \quad a^2 = 2b^22=ba⇒2=b2a2⇒a2=2b2

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:

(2k)2=4k2=2b2⇒b2=2k2(2k)^2 = 4k^2 = 2b^2 \quad \Rightarrow \quad b^2 =


2k^2(2k)2=4k2=2b2⇒b2=2k2

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.

Diagram: Proof by Contradiction Flow

• 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.

Key Terminologies, Symbols, and Formulas:

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.

5. Irrational Number: A number that cannot be expressed as ab\frac{a}{b}ba, such as 2\sqrt{2}2.

Symbols:

• nnn: A variable representing a natural number.

• ⇒\Rightarrow⇒: Implies; shows that one step logically follows from the previous one.

• ∀n≥1\forall n \geq 1∀n≥1: For all nnn greater than or equal to 1.

• a∈Za \in \mathbb{Z}a∈Z: aaa is an integer (a whole number).

• 2\sqrt{2}2: The square root of 2.

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.

Task 1: Proof by Mathematical Induction

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:

1+3+5+⋯+(2n−1)=n21 + 3 + 5 + \dots + (2n-1) = n^21+3+5+⋯+(2n−1)=n2

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.

Take time to read and understand first.

You might also like