Professional Documents
Culture Documents
Written Homework PDF
Written Homework PDF
Let S= {1,2}
2. Let A = { 1, 2}
B = { 2, 1 }
It is to prove that A = B
hence,
ɸ has zero elements in it
{ ɸ } has only one element.
So,
ɸ and { ɸ } are not the same set.
{x|2<x≤3}
The set of real numbers is represented by this set between 2 and 3 including 3.
Hence,
The bracket ( in the set used to exclude boundary whereas [ includes boundary.
= ( -∞, + ∞ ) – (2, 5)
= ( - ∞, 2] ∪ [ 5, ∞ )
( - ∞, 2 ] ∪ [ 5, ∞ )
It is supposed that x1 , x2 ∈ [ 0, 2 ]
f(x1) = f(x2)
⟹ x12 = x22
⟹ ( x12 – x22 ) = 0
⟹ ( x1 + x2 )( x1 - x2 ) = 0
⟹ x1 + x2 = 0 or x1 – x2 = 0
Here x1 + x2 = 0 is not possible
As x1 = - x2 is not possible
x1 , x2 ∈ [ 0,2 ] ⟹ x1 ≥ 0, x2 ≥ 0
hence,
x 1 = x2
⟹ f is injective.
9. It can be written that f(0,0) = (0, 0XOR0) = (0,0), f(0,1) = (0, 0XOR1) = (0, 1)
Also,
f(1,0) = (1, 1XOR0) = (1,1), f(1,1) = (1, 1XOR1) = (1,0)
hence,
from the above calculation f is one as each element of { 0, 1}2 has a unique preimage.
Each element of {0,1}2 has a preimage implying f is onto.
f is bijective.
Now, g(0,0) = (0, 0AND0) = (0,0) and g(0,1) = (0, 0AND1) = (0,0)
Thus, g is not one one and hence not bijective.
Now, h(1,0) = (1, 1OR0) = (1,1) and h(1,1) = (1, 1OR1) = (1,1)
( )
⟹S=
⟹ S = 335923
Hence 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 = 335923
a11 - a3 = 87 – 5
⟹ ( a1 + 10d ) – ( a1 +2d) = 82
⟹ 8d = 82
⟹d=
⟹ d = 10.25
999
38 32
−1
211 23
⟹S=
Hence,
( )
∑ =( ) −1
14. The given problem provides information about a set S = {0, 1, 2, ..., 20} and a
function f: S → S defined by two tables. The function maps each element x in the set
to another element f(x) in the set. The tables show that the function is bijective,
meaning that every element in the set S is paired with exactly one element in S, and
each element in S is the image of exactly one element in S under the function f.
The first table shows the mapping for the first half of the set:
f(0) = 1
f(1) = 2
f(2) = 3
f(3) = 4
f(4) = 5
f(5) = 0
f(6) = 7
f(7) = 8
f(8) = 9
f(9) = 10
f(10) = 11
The second table shows the mapping for the second half of the set:
f(11) = 12
f(12) = 6
f(13) = 14
f(14) = 15
f(15) = 16
f(16) = 17
f(17) = 18
f(18) = 19
f(19) = 20
f(20) = 13
The problem then states that since f is bijective, all of its powers fn, where n is a positive
integer and fn means the n-fold composition of f (that is, f composed with itself n times),
are also bijective functions from S to S. The task is to write a Python program to find the
number of distinct functions fn and to show the code and the program output.
def f(x):
return [1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 6, 14, 15, 16, 17, 18, 19, 20, 13][x]
def fn(n):
result = lambda x: x
for _ in range(n):
result = compose(f, result)
return result
S = set(range(21))
distinct_functions = {}
distinct_functions[mappings] = n
When you run this program, it will calculate the distinct fn functions (where n ranges
from 1 to 21) and print the number of distinct functions found. Y