Discrete Structure · Unit 4
Functions and Mappings
Exam-focused notes for Functions and Mappings (Discrete Structure, BIT152): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.
What this unit covers
- Function definition and notation
- One-to-one and onto functions
- Identity function
- One-to-one correspondence
- Boolean functions
- Exponential functions
- Ceiling and floor functions
- Function plotting
Boolean functions
Define Boolean and exponential function. Discuss about partial ordering. [2+3]
--- A Boolean function is a function of the form: $$f: \{0, 1\}^n \rightarrow \{0, 1\}$$ It takes $n$ binary inputs (each either 0 or 1) and produces a single binary output (0 or 1). Boolean functions are expressed using Boolean operations: AND, OR, and NOT...
Full solved answer →Define Boolean function, exponential function and partial ordering. List the computer representations for following set over universal set $U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}$: (a) Set that contains even number (b) Set that contains multiple of 5 (c) Set that contains number greater than 7 (d) Set that contains prime number. [6+4]
--- - Universal set: $U = \{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$ (10 elements) - Required definitions: Boolean function, exponential function, partial ordering. - Sets to represent as bit strings over $U$: - (a) even numbers - (b) multiples of 5 - (c) numbers gr...
Full solved answer →Ceiling and floor functions
State ceiling function and floor function with examples. How mathematical induction can be used to prove the correctness of recursive algorithm? Illustrate with an example.[5]
--- Definition: The floor function of a real number $x$, denoted $\lfloor x \rfloor$, is the greatest integer less than or equal to $x$. $$\lfloor x \rfloor = \max\{n \in \mathbb{Z} \mid n \leq x\}$$ Examples: - $\lfloor 4.7 \rfloor = 4$ - $\lfloor 3 \rfloo...
Full solved answer →Define celling and floor function. Explain Boolean function with example. [5]
--- The floor function of a real number x, denoted ⌊x⌋, is defined as the greatest integer less than or equal to x. $$\lfloor x \rfloor = \text{largest integer } n \text{ such that } n \leq x$$ Examples: - ⌊3.7⌋ = 3 - ⌊5⌋ = 5 - ⌊-2.3⌋ = -3 --- The ceiling f...
Full solved answer →One-to-one and onto functions
Explain one-to-one and onto function with example. What is identity function? [5]
A function f: A → B is called one-to-one (injective) if every element of the domain maps to a distinct element in the codomain. Formal Definition: f is one-to-one if f(x₁) = f(x₂) implies x₁ = x₂, for all x₁, x₂ ∈ A. In other words, no two different inputs ...
Full solved answer →One-to-one correspondence
Explain one-to-one correspondence with example. What is identity function? [5]
A function f: A → B is called a one-to-one correspondence (also called a bijection) if it is both one-to-one (injective) and onto (surjective). That means: - Injective: Every distinct element in A maps to a distinct element in B. - Formally: if f(x₁) = f(x₂...
Full solved answer →Function plotting
How do you plot graph for function $f(x) = x + 1$? Define ceiling, floor and exponential function. [5]
- Function to plot: $f(x) = x + 1$ - Terms to define: ceiling function, floor function, exponential function --- This is a linear function of the form $f(x) = mx + c$ with slope $m = 1$ and y-intercept $c = 1$. Steps to plot: 1. Identify the form. Since it ...
Full solved answer →Make Unit 4 stick
Practice BIT152 with flashcards & quizzes