0% found this document useful (0 votes)
12 views5 pages

Discrete Mathematics Functions Tutorial

The document contains a tutorial sheet for a Discrete Mathematics course, focusing on functions, sets, and their properties. It includes a series of questions that require students to analyze functions, determine their characteristics, and perform calculations related to various mathematical concepts. Topics covered include Hamming distance, encoding and decoding functions, and the properties of different types of functions such as one-to-one and onto.
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)
12 views5 pages

Discrete Mathematics Functions Tutorial

The document contains a tutorial sheet for a Discrete Mathematics course, focusing on functions, sets, and their properties. It includes a series of questions that require students to analyze functions, determine their characteristics, and perform calculations related to various mathematical concepts. Topics covered include Hamming distance, encoding and decoding functions, and the properties of different types of functions such as one-to-one and onto.
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

 

  Discrete Mathematics   
Tutorial sheet  Funtions 

Question 1.
Let A and B be two sets with A = {x, y, z} and B = {1, 2, 3, 4}. Which of
the following arrow diagrams define functions from A to B?

Question 2.
Let A and B be two sets with A = {x, y, z} and B = {1, 2, 3, 4}. Let f from
A to B defined by the following arrow diagram:

1. Write the domain, the co-domain and the range of f .

2. Find f (x) and f (y) .

3. Write down the set of pre-images of 3 and the set of pre-images of 1 .

4. represent f as a set of ordered pairs.

Question 3.

The Hamming distance function is very important in coding theory. It gives


a measure of the difference between two strings of 0’s and 1’s that have the
same length. Let Sn be the set of all strings of 0’s and 1’s of length n. The
Humming function H is defined as follows:

1
H : Sn × Sn → N ∪ {0}
(s, t) → H(s, t) = The number of positions in which s and t have different values.
For n = 5, Find H(11111, 00000), H(11000, 00000) , H(00101, 01110) and
H(10001, 01111) .
Question 4.

Digital messages consist of a finite sequence of 0’s and 1’s. When they are
communicated across a transmission channel, they are frequently coded in
special ways to reduce the chance that they will be garbled by interfering
noise in the transmission lines. A simple way to encode a message of 0’s and
1’s is to write each bit three times, for example: the message 0010111 would
be encoded as 000 000 111 000 111 111 111.
Let A be the set of all strings of 0’s and 1’s and let E and D be the encoding
and the decoding function on the set A defined for each string, s, in A as
follows:
E(s) = The string obtained from s by replacing each bit of s with the same
bit written three times.
D(s) = The string obtained from s by replacing each consecutive triple of
three identical bits of s by a single copy of that bit.
Find E(0110), E(0101), D(000111000111000111111) and
D(111111000111000111000000)
Question 5.

Let A = {1, 2, 3, 4, 5, 6}, B = {a, b, c, d} and C = {w, x, y, z} be three sets.


Let f and g be two functions defined as follows:
f : A → B is defined by the following table.
x 1 2 3 4 5 6
f (x) a b a c d d
g : B → C is defined by the following table.
x a b c d
g(x) w x y z

1. Draw arrow diagrams to represent the function f and g.


2. List the domain; the co-domain and the range of f and g.
3. Find f (1), the ancestor (pre-image) of d. and (g o f)(3)
4. Show that f is not a one to one function.
5. Show that f is an onto function.

2
6. Show that g is both one to one and onto.

Question 6.
Suppose you read that a function f : Z × Z+ → Q is defined by the formula
f (m, n) = m
n
for all (m, n) ∈ Z × Z+ .

1. Is f a one to one function?

2. Is f an onto function?

Question 7.

Given a function f definted by f (x) = bxc. where f : R → Z,

1. Plot the graph of the function f(x) for x ∈ [−3, 3].

2. Use this graph to find bπc , b−2.5c , b−1c.

3. Use the graph in (1) to show that f is not a one to one (not injective)
function.

4. Is f onto (surjective)? Justify your answer.

Question 8.
Let S denote the set of all 3 bit binary strings and B = (0, 1, 2, 3). The
function f : S → B is defined by the rule

f(x)= the number of zeros in x for each x ∈ S.

Find the following.

1. The domain of f .

2. f (001) and f (101).

3. The set of ancestors of 2.

4. The range of f .

5. Say whether or not f is one to one, giving a reason for your answer.

6. Say whether or not f is onto, giving a reason for your answer.

Question 9.
Let f (x) = x mod 3, where f (x) is the remainder when x is divided by 3,
and f : Z+ → {0, 1, 2}.

3
1. Find f (7) and f (12).

2. Find the ancestors of 2.

3. Say whether or not f (x) is one to one, justifying your answer.

4. Say whether or not f (x) is onto, justifying your answer.

Question 10.

Given the following function f : R → R with f (x) = 4x − 1, for any real


number x.
1. Is f a one to one function? Prove or give a counter-example.

2. Is f an onto function? Prove or give a counter-example.

3. Is f invertible? and why? if the answer yes define f −1 .


Question 11.
Given the following function f : Z → Z with g(x) = 4x − 1, for any real
number x.
1. Is g a one to one function? Prove or give a counterexample.

2. Is g an onto function? Prove or give a counterexample.

3. Is g invertible? and why? if the answer yes define g −1 .


Question 12.

Given the following function h : R → R with h(x) = x2 − 1, for any real


number x.
1. What is co-domain and the range of h

2. Is h a one to one function? Prove or give a counterexample.

3. Is h an onto function? Prove or give a counterexample.

4. Is h invertible? and why? if the answer yes define h−1 .


Question 13.
Given the following function h : [0, +∞[→ [−1, +∞[with h(x) = x2 − 1, for
any real number x.
1. What is co-domain and the range of h

4
2. Is h a one to one function? Prove or give a counterexample.
3. Is h an onto function? Prove or give a counterexample.
4. Is h invertible? and why? if the answer yes define h−1 .
5. On the same graph, plot the curve of h and that of h−1 if it exists.
Question 14.
Consider the following function f : R → R+ with f (x) = 2x+3 .
1. Show that f is a bijective function.
2. Find the inverse function f −1 .
3. Plot the both curves of f and of f −1 on the same graph.
Question 15.
2x
Consider the following function f : R − {−1} → R with f (x) = x+1
.
1. Show that f is a one to one function.
2. Show that f is not an onto funcion.
Question 16.

Find the inverse of the following functions:


2 −5
1. f (x) = ex
2. g(x) = ex + 5
Question 17.
Find the inverse of the following functions:
1. f (x) = ln(x + 2) + 2
2. g(x) = log2 (x − 5) + 3
Question 18.
Let A, B and C be three sets/and f : A → B and g : B → C be two
functions. Prove that if gof is an onto function then g must be onto.
Question 19.
Let A, B and C be three sets and f : A → B and g : B → C be two functions.
Prove that if gøf is a one to one function then f must be one to one.
Question 20. √
Let f : Q × Q → R with f (x, y) = x + 2y for all x, y ∈ Q
Is f a one to one function? Prove or give a counter-example.
End of questions

Common questions

Powered by AI

The function f(x) = x^2 − 1 is not one-to-one because different inputs, such as x = -1 and x = 1, can produce the same output, namely 0, due to the squaring operation. It is not onto when mapping R to R because not all real numbers can be achieved as outputs; for instance, negative numbers less than -1 are impossible with the given quadratic expression. Consequently, the function is not invertible over R since only bijective functions have inverses. Without bijectivity, there is no unique mapping back from outputs to inputs .

The function f(x) = ⌊x⌋ maps real numbers to integers by taking the greatest integer less than or equal to x. This results in multiple real numbers having the same floor value, such as f(2.3) and f(2.8) both equaling 2, illustrating non-injectivity. In real-world applications, this can be used to group values into discrete categories or thresholds, such as rounding down monetary values in finance or categorizing continuous data into discrete bins .

Non-bijective functions lack injectivity or surjectivity, affecting their invertibility. If a function like f(x) = x^2 is not one-to-one, multiple inputs map to a single output, preventing an inverse mapping for every result. Similarly, if a function is not onto, like g: Z → Z with g(x) = 4x - 1, some outputs have no pre-image, precluding an inverse for all inputs. In real-world scenarios, non-bijective functions may model processes where unique reversal isn't possible, like squaring time in physics (time squared loses direction) or mapping limited resources to excess demand (some demands remain unmet).

Graphically, the floor function f(x) = ⌊x⌋ is represented by a series of horizontal steps or "jumps," indicating that any input x within an integer interval is mapped to the same integer. This visual representation shows the function is not injective, as multiple real number inputs (all those within a given integer interval) map to the same integer output. This insight demonstrates the function's many-to-one nature across its domain and elucidates why it cannot uniquely reverse its mappings .

The expression g(x) = 4x - 1 represents a linear transformation due to its form y = mx + b, often used in real analysis to explore mappings between sets. For g(x), the transformation scales x by 4 and shifts it, affecting its one-to-one and onto properties. This scaling ensures any two different x values map to different y, making g(x) one-to-one (bijective over reals). Also, the range of g covers all real numbers, ensuring onto property. This linear nature means real-world applications, like signal processing, rely on such transformations for predictable, reversible effects .

The Hamming distance function measures the difference between two strings of 0's and 1's of the same length by counting the number of positions at which the corresponding bits differ. In coding theory, it is used to detect and correct errors in data transmission. For example, the Hamming distance between the strings '11111' and '00000' is 5, which indicates maximum difference. This function is crucial in designing and analyzing codes that can rectify errors by distinguishing between different possible received messages .

The described encoding method involves repeating each bit three times, transforming a message such as '0010' into '000000111111000'. This redundancy is advantageous for error correction as it allows the receiving end to use majority voting to correct errors. If a bit gets altered during transmission due to noise, the repeated bits can collectively agree on the original bit, provided errors affect only one-third of the repetitions. This method enhances the reliability of digital communications by improving the likelihood of accurate message reconstruction even in noisy conditions .

Encoding functions transform a message by repeating each bit a set number of times to protect against transmission errors. For instance, encoding the message '0110' results in '000111111000'. Decoding reverses this process by converting sequences of repeated bits back to single bits, thus restoring the original message as long as errors don't occur in more than one-third of the encoded bits in any segment. These functions work symbiotically to ensure data integrity by allowing error detection and correction .

When the composition gof is known to be one-to-one, it implies that the first function, f, must also be one-to-one. This is because any failure in f to map unique elements of A to unique elements of B would result in overlapping mappings in the composition, violating the one-to-one nature. Similarly, if gof is onto, then g must be onto, because every element of C must be hit by the combination, necessitating g to cover all outputs in C for elements from B. These deductions ensure individual function properties align with the overall composition properties .

Proving or providing counterexamples is crucial in verifying function properties such as one-to-one and onto. To prove a function is one-to-one, it must be shown that different inputs result in different outputs. Conversely, demonstrating a counterexample where two distinct inputs yield the same output disproves one-to-oneness. For onto functions, one must prove every element in the co-domain has a pre-image in the domain. A counterexample here would show there exists an output with no corresponding input, negating the onto property. These logical processes ensure mathematical rigor in function analysis .

You might also like