math task 3
TRANSCRIPT
Computer Representation of Sets
There are two methods to represent sets using a computer :
•Unordered fashion.•Arbitrary ordering.
a. Store the elements of the set in an unordered fashion: -Computing operation are union, intersection and differ entence of two set. -Each operation require large amount of searching elements.
b. Store the elements using an arbitrary ordering of the elements of the universal set.
• Easy to make compute set.
1. Let's assume that set U is a finite and of reasonable size.
2. First, we'll specify an arbitrary ordering of elements of U, for instance a1, a2,
a3, ..., an. 3.Then, we'll represent a subset A of U with the
bit string of length n, where the i th bit in this string is: if ai ∈ A,
and 0, if ai ∉ A.
A. Store the elements of the set in an unordered fashion:
-Computing operation are union, intersection and differ entence of
two set. -Each operation require large
amount of searching elements.
Example 1: Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, and the ordering of elements of U has the elements in
increasing order; that is, ai = i . What bit strings represent the subset of all odd integers in U, the subset of all even integers in U, and the subset of integers not exceeding 5 in U?
Solution: The bit string that represents the set of odd integers in U, namely, {1, 3, 5, 7, 9}, has a one
bit in the first, third, fifth, seventh, and ninth positions, and a zero elsewhere. It is
10 1010 1010. Similarly, we represent the subset of all even integers in U, namely, {2, 4, 6, 8, 10}, by the
string 01 0101 0101.
The set of all integers in U that do not exceed 5, namely, {1, 2, 3, 4, 5}, is represented by
the string 11 1110 0000.
1) Ā (Complement)Solution:
Bit string for A: 0101 0111,Then Ā = 1010 1000
(Therefore, Ā = {0,1,2,4})
2) A ∩ B (Intersection)Solution:
Bit string for A: 0101 0111 Bit string for B: 1111 1100
Then A ∩ B =0101 0111 ˄ 1111 1100 = 0101 0100
(A ∩ B = {1,3,5} )
3) A U B (Union)Solution:
Bit string for A: 0101 0111 Bit string for B: 1111 1100
Then A U B = 0101 0111 ˅ 1111 1100 = 1111 1111
(A U B = U = {0,1,2,3,4,5,6,7})
Relation between Two Sets
• A relation is a set of ordered pairs(x,y) , -the first component are the input values(Domain).- second component are the output values(Range).
• A relation R defined by ( , {(x,y):x }), is the set of ordered pairs of all Input Values (x) and all Output Values(y) such that each element x is related to the corresponding element y.
• Here, x=Domain of the Relation y=Range of the Relation x & y no values, it will repeated
x is called Independent variable and y is called Dependent variable because its value depends on the x-value chosen.
DEFINITION OR CONCEPT OF FUNTION ON GENERAL SETS
Function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output.
As an example:-
The function f maps to A to B
INJUCTIve
•f (a) = f (b) implies that
a = b for all a and b in the domain of f.
•Involves one to one function
17
BOOLEAN FUNCTION§ A Boolean function describes the ways to gain the value of
boolean output via logical calculation from Boolean inputs. The functions play a basic role in questions of complexity theory
also the design of circuits and chips for digital computers.
The properties of Boolean functions play a critical role in cryptography, particularly in the design of symmetric key
algorithms Boolean functions are often represented by sentences in
propositional logic, and sometimes as multivariate(involving 2 or more variables)
A literal is a Boolean variable or its complement. A minterm of the Boolean variables x1,x2,...,xn is a Boolean product y1y2 ···yn,
where yi = xi or yi = xi. Hence, a minterm is a product of n literals, with one literal for each variable.
19
Solution: We will find the sum-of-products expansion of F (x, y, z) in two ways.
First, we will use Boolean identities to expand the product and simplify. We find that
F (x, y, z) = (x + y)z =xz+yz=x1z+1yz =x(y+y)z+(x+x)yz =xyz+xyz+xyz+xyz
=xyz+xyz+xyz.
Distributive law Identity law Unit property Distributive law Idempotent law
Second, we can construct the sum-of-products expansion by determining the values of F for all possible values of the variables x, y, and z. These values are found in Table 2. The sum-of- products expansion of F is the Boolean sum of three minterms corresponding to the three rows of this table that give the value 1 for the function. This gives
F (x, y, z) = xyz + xy z + xyz.
20
It is also possible to find a Boolean expression that represents a Boolean function by taking a Boolean product of Boolean sums. The resulting expansion is called the conjunctive normal form or product-of-sums expansion of the function. These expansions can be found from sum-of-products expansions by taking duals.
INJUCTIve
•f (a) = f (b) implies that
a = b for all a and b in the domain of f.
•Involves one to one function
Inverse FunctionDefinition
Let f be the bijection from set A to the set B The inverse function of f is the function that
assigns to an element b belonging to B the unique element a in A such that f (a) = b
The inverse function of f is denoted by fˉˡ Hence fˉ (b) = a ˡ when f(a) = b
Example let f : R R be the bijection given by the
formula: f(x)= 4x + 1 Write f(x) = y ,that is 4x + 1 = y Then solve for x 4x = y + 1 x = y – 1 4Answer: fˉˡ (y)= = y – 1 4
Definition of Composition of Functions
Process to combine two functions . One function is to be done first then its
result is substitute in place of each x to another function.
notation for a composite function : ( ƒº g) (x)= ƒ( g(x))
Example
Given that ƒ (x) =5x and g (x) =x²+2.
Find ( ƒºg )(x) and (gºƒ)(x)
Solution 1: (ƒºg)(x) Solution 2: -ƒ( g (x)) - g(ƒ(x)) ƒ (x²+2) - g(5x) 5( x²+2) -(5x)²+2 = 5x²+10 -5x²+2