0% found this document useful (0 votes)
2 views

Discrete 3a

The document explains De Morgan's Law in set theory, which states that the complement of the union of two sets equals the intersection of their complements, and vice versa for intersections. It also covers the definition and types of functions, including one-to-one, onto, and bijections, along with proof techniques such as direct proof and induction. Lastly, it introduces permutations and combinations, detailing their formulas and applications in real-life scenarios.

Uploaded by

Vanity538
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Discrete 3a

The document explains De Morgan's Law in set theory, which states that the complement of the union of two sets equals the intersection of their complements, and vice versa for intersections. It also covers the definition and types of functions, including one-to-one, onto, and bijections, along with proof techniques such as direct proof and induction. Lastly, it introduces permutations and combinations, detailing their formulas and applications in real-life scenarios.

Uploaded by

Vanity538
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

De Morgan's Law

Is a fundamental concept in set theory and logic.


1. (A ∪ B)' = A' ∩ B'
2. (A ∩ B)' = A' ∪ B'
De Morgan's Law states that:
• The negation (complement) of the union of two
sets is equal to the intersection of their
negations.
• The negation of the intersection of two sets is
equal to the union of their negations.
Examples

i. (A ∪ B)' = A' ∩ B'


Suppose we have:
A = {1, 2, 3}
B = {3, 4, 5}
U = {1, 2, 3, 4, 5, 6} (universal set)
A ∪ B = {1, 2, 3, 4, 5}
• (A ∪ B)' = {6} (complement of A ∪ B)
• A' = {4, 5, 6} (complement of A)
• B' = {1, 2, 6} (complement of B)
• A' ∩ B' = {6}
Therefore, (A ∪ B)' = A' ∩ B' = {6}.
ii. (A ∩ B)' = A' ∪ B'

A = {1, 2, 3}
B = {3, 4, 5}
U = {1, 2, 3, 4, 5, 6} (universal set)
A ∩ B = {3}
• (A ∩ B)' = {1, 2, 4, 5, 6} (complement of A ∩ B)
• A' = {4, 5, 6} (complement of A)
• B' = {1, 2, 6} (complement of B)
• A' ∪ B' = {1, 2, 4, 5, 6}
Therefore, (A ∩ B)' = A' ∪ B' = {1, 2, 4, 5, 6}.
Function
A function is a way to connect two sets, A and B.
It's like a rule that takes each element from A
and matches it with exactly one element from
B.
Points:
1. Domain: Set A (where we start)
2. Codomain: Set B (where we end)
3. Range: The actual elements from B that get
matched (subset of B)
Points
4. Types of Function :
• One-to-One (Injection): Each element in B comes from
only one element in A.
• Onto (Surjection): Every element in B gets matched
with at least one element from A.
• One-to-One Correspondence (Bijection): Both one-to-
one and onto.
5. Composition: Combining two functions to
create a new one.
Points Cont.
• 6. Identity Function: A function that leaves
elements unchanged.
• 7. Inverse Function: A function that reverses
another function (only works for bijections).
• Examples:
• 1. f(x) = x^2 (not one-to-one, but onto)
• 2. f(x) = x (one-to-one correspondence)
• 3. f(x) = 2x (one-to-one, but not onto)
Simple Analogies

• Think of it Like This: Imagine a function as a machine


that takes inputs from A and produces outputs in B.
Each input gets matched with exactly one output.
• Simple Analogies:
1. One-to-One: A personal phone number (each number
belongs to one person).
2. Onto: A phonebook (every person has a phone
number).
3. Bijection: A perfect matching of phone numbers to
people.
A concise definition of a quadratic function

f: ℝ → ℝ, f(x) = x^2
• Breakdown:
1. f: ℝ → ℝ
- f is a function
- Domain: ℝ (all real numbers)
- Codomain: ℝ (all real numbers)
2. f(x) = x^2
Rule: square the input x

1. f(x) = x^2 (Not One-to-One, but Onto)


Definition: f: ℝ → ℝ, f(x) = x^2

Explanation: This function squares every input x.


• Why Not One-to-One:
f(-2) = 4
f(2) = 4
Examples 1: To illustrate the properties of one-to-one, onto, and one-to-one correspondence for
each function

• f(-2) = 4
This equation states that:- f is a function (a
relation between inputs and outputs)
• -2 is the input (x-value)
• 4 is the output (y-value or f(x))
In other words: When you input -2 into the
function f, the output is 4.
Examples 1 cont.

Since f(-2) = f(2),


but -2 ≠ 2, the function is not one-to-one.
Explain 2. f(x) = x (One-to-One Correspondence) A
straightforward linear function

2. f(x) = x (One-to-One Correspondence)


Definition: f: ℝ → ℝ, f(x) = x
Explanation: This function returns the input x unchanged.
• Why One-to-One:
• If f(x) = f(y), then x = y
Why Onto:
• For every y ∈ ℝ, there exists x ∈ ℝ such that f(x) = y.
Example: y = 5, x = 5
• Range: ℝ (all real numbers)
Graph: A straight line through the origin, y = x
Proof Techniques:

• Proof techniques can either be direct, indirect


or by induction. The choice of a proof
technique depends on the problem or task at
hand. Therefore, it is important to realize that
there is no single method applicable to solving
all tasks. This implies that your level of
ingenuity, skills and implementation of
common sense must be applied to every task.
Direct Proof
To prove a statement using this method, we
need to show that, starting from a given
starting point (called the premise), we can
reach the ending point (called the conclusion).
For example, if we start with a fact X, how do
we show that Y is true? .
Direct Proof
In this type of proof, we start with X and by following
logical steps, we arrive directly at Y.
In short, we’re proving that if X is true, then Y must
also be true.
• To directly prove that X → Y is true, follow these two
steps:
• Start with the assumption that X is true.
• Show through logical steps that Y must follow from X.
• This confirms that if X is true, then Y will also be true.
Example1.

• Let n be an integer. If n is odd, then, n^2 is odd. If n is even, then,


n^2 is even.

• Solution
• Using direct proof: For an integer k;
• Let assume that n is even, then n = 2k and
n^2 = (2k) ^2 = 4k^2 = 2 (2k^2), which is even.
• Also, if we say n is odd, then n = 2k + 1 and
n^2 = (2k + 1) ^2 = 4k^2 + 4k + 1 = 2 (2k^2+ 2k) + 1, which is odd.
A fundamental property of integers.

Theorem: For any integer n:


1. If n is odd, then n^2 is odd.
2. If n is even, then n^2 is even.
Proof:
Case 1:
n is odd n = 2k + 1 (where k is an integer)
n^2 = (2k + 1)^2
= 4k^2 + 4k + 1
= 2(2k^2 + 2k) + 1
Since 2(2k^2 + 2k) is even, adding 1 makes n^2 odd.
• Case 2:
• n is even
• n = 2k (where k is an integer)
• n^2 = (2k)^2
= 4k^2
= 2(2k^2)
• Since 2(2k^2) is a multiple of 2, n^2 is even.
Insights

1. Squaring preserves parity (even/odd).


2. Odd × Odd = Odd, Even × Even = Even.
Odd:
n = 3, n^2 = 9 (odd)
n = 5, n^2 = 25 (odd)
Even:
n = 4, n^2 = 16 (even)
n = 6, n^2 = 36 (even)
Proofs by Induction :

• 1. Initial Step (Base Case): Prove the statement


is true for n = 1 (or n = a).
2. Inductive Step:
- Inductive Hypothesis: Assume the statement
is true for n = k.
- Prove it's true for n = k + 1.
Inductive Step Breakdown

• 1. Assumption: Write down the statement for n = k.

• 2. Next Case: Describe the statement for n = k + 1.

• 3. Proof: Use the assumption from Step 1 to prove the


statement in Step 2.

• Conclusion: If both steps are proven, the statement is true


for all n ≥ 1 (or n ≥ a).
Example 1.
For the first n positive integers, the sum is
1/2n(n + 1).
• Formula:1 + 2 + 3 + ... + n = 1/2n(n + 1)
Explanation:
This formula calculates the sum of the first n
positive integers.
Proof: Let's derive the formula using the
following steps:
Explanation:

1. Write the sum twice: 1 + 2 + 3 + ... + nn + (n-1)


+ (n-2) + ... + 1
2. Add the two equations: (1 + n) + (2 + n-1) + (3
+ n-2) + ... + (n + 1)= (n+1) + (n+1) + (n+1) + ...
+ (n+1) (n times)
1. Simplify: n(n+1)
2. Divide by 2: 1/2n(n+1)
Sum of first 5 positive integers:

Sum of first 5 positive integers:


1+2+3+4+5
Using the formula:
1/2n(n+1)
where n = 5:
1/2(5)(5+1)
= 1/2(5)(6)
= 1/2(30)= 15
Permutations and Combinations
Are concepts in mathematics that deal with
counting and arranging items. These concepts
are widely used in probability, statistics, and
various fields that involve counting and
arranging objects. permutations and
combinations are fundamental concepts in
computer science, with applications in various
areas, including algorithms, data structures,
networking, and artificial intelligence
Permutations and Combinations
Refer to the arrangement of items in a specific
order.
The order matters in permutations. Use
permutations when the arrangement of items
is important (like arranging books on a shelf),
and use
combinations when the selection of items is
important, but their arrangement is not (like
forming a committee).
Permutations Formula
P(n, r) = n! / (n-r)!.
Examples

• Example1: Arrange 3 people (A, B, C) in a line.

• Permutations:
• 1. A-B-C
• 2. A-C-B
• 3. B-A-C
• 4. B-C-A
• 5. C-A-B
• 6. C-B-A
• There are 6 ways to arrange 3 people.
Example 2. Find the number of ways to arrange 5 people in a
line.

• P(n, r) = n! / (n-r)!

• Here:
• n = 5 (total people)
• r = 5 (number of positions)

• Since r = n, we can simplify to:
• P(5, 5) = 5!

• Calculate 5!:
• 5! = 5 × 4 × 3 × 2 × 1 = 120
• Therefore, there are 120 ways to arrange 5 people in a line.
Application in real life :

• Phone numbers (order matters)


• Passwords (order matters)
• Travel itinerary (order matters)
Combination
Is a selection of items where the order does not
matter. In combinations, different
arrangements of the same items are
considered the same.

Combination

Formula: C(n, r) = n! / (r!(n-r)!).


Example 1: Choose 2 people from a group of 3 (A, B,
C)
Combinations:
1. A, B
2. A, C
3. B, C
There are 3 ways to choose 2 people.
example 2:
How many ways can 5 people be selected for a committee of 3.

Step 1: Calculate 5! (5 factorial)

5! = 5 × 4 × 3 × 2 × 1
= 120

Step 2: Calculate 3! (3 factorial)

3! = 3 × 2 × 1
=6

Step 3: Calculate (5-3)! (2 factorial)

(5-3)! = 2!
=2×1
=2

You might also like