Functions
GATE CSE & IT · Discrete Mathematics - Set Theory and Functions · 1987-2026
Study anchor
Source-book anchor pending for this concept.
Practice action
Start latest PYQPYQs in this concept
All concepts →Consider the function $f: \mathbb{R} \rightarrow \mathbb{R}$ defined as follows: $$ f(x)=\left\{\begin{array}{cc} c_1 e^x-c_2 \log _e\left(\frac{1}{x}\right), & \text { if } x>0 \\...
g(.) is a function from A to B, f(.) is a function from B to C, and their composition defined as f(g(.)) is a mapping from A to C. If f(.) and f(g(.)) are onto (surjective) functio...
Consider the given function $f(x)$. $f(x) = \begin{cases} ax + b & \text{for } x < 1 \\ x^3 + x^2 + 1 & \text{for } x \ge 1 \end{cases}$ If the function is differentiable everywher...
Let F be the set of all functions from {1,..., n} to {0,1}. Define the binary relation ≤ on F as follows: ∀f,g∈F, f≤ g if and only if ∀x ∈ {1, ..., n}, f(x) ≤ g(x), where 0 ≤ 1. Wh...
A = {0, 1, 2, 3, ...} is the set of non-negative integers. Let F be the set of functions from A to itself. For any two functions, f1, f2 ∈ F, we define (f1⨀f2)(n) = f1(n) + f2(n) f...
$A=\{0,1,2,3, \ldots\}$ is the set of non-negative integers. Let $F$ be the set of functions from $A$ to itself. For any two functions, $f_1, f_2 \in \mathrm{~F}$ we define $$\left...
#include void foo(int *p, int x) { *p = x; } int main( ) { int *z; int a = 20, b=25; z = &a; foo(z, b); printf("%d", a); return 0; } The output of the given C program is _________....
$g(.)$ is a function from A to B, $f(.)$ is a function from B to C, and their composition defined as $f(g(.))$ is a mapping from A to C. If $f(.)$ and $f(g(.))$ are onto (surjectiv...
Consider the following C program : #include <stdio.h> int g(int n) { return (n+10); } int f(int n) { return g(n*2); } int main() { int sum, n; sum=0; for (n=1; n The output of the...
Let $F$ be the set of all functions from $\{1, \ldots, n\}$ to $\{0,1\}$. Define the binary relation $\preccurlyeq$ on $F$ as follows: $\forall f . g \in F, f \preccurlyeq g$ if an...
Let A and B be non-empty finite sets such that there exist one-to-one and onto functions (i) from A to B and (ii) from A × A to A U B. The number of possible values of |A| is _____...
Let $A$ and $B$ be non-empty finite sets such that there exist one-to-one and onto functions (i) from $A$ to $B$ and (ii) from $A \times A$ to $A \cup B$. The number of possible va...
Consider two functions of time (t), $$f(t)=0.01\,t^2$$ $$g(t)=4\,t$$ where $$0 Now consider the following two statements : (i) For some $$t > 0,g(t) > f(t)$$. (ii) There exists a $...
$$f(x)$$ and $$g(y)$$ are functions of x and y, respectively, and $$f(x)=g(y)$$ for all real values of x and y. Which one of the following options is necessarily TRUE for al x and...
Let $$f:A \to B$$ be an onto (or surjective) function, where A and B are nonempty sets. Define an equivalence relation $$\sim$$ on the set A as $${a_1} \sim {a_2}$$ if $$f({a_1}) =...
Consider the following sets, where n > 2: S 1 : Set of all n x n matrices with entries from the set {a, b, c} S 2 : Set of all functions from the set {0,1, 2, ..., n 2 — 1} to the...
Consider the following C program: #include < stdio.h > int jumble (int x, int y) { x = 2 * x + y ; return x ; } int main ( ) { int x=2, y=5 ; y = jumble (y, x) ; x = jumble (y, x)...
Let N be the set of natural numbers. Consider the following sets. $$\,\,\,\,\,\,\,\,$$ $$P:$$ Set of Rational numbers (positive and negative) $$\,\,\,\,\,\,\,\,$$ $$Q:$$ Set of fun...
Consider the following C program: #include< stdio.h > void fun1(char *s1, char *s2){ char *tmp; tmp = s1; s1 = s2; s2 = tmp; } void fun2(char **s1, char **s2){ char *tmp; tmp = *s1...
If $$g(x)=1-x$$ & $$h\left( x \right) = {x \over {x - 1}}\,\,$$ then $$\,\,{{g\left( {h\left( x \right)} \right)} \over {h\left( {g\left( x \right)} \right)}}\,\,\,$$ is
The number of onto functions (subjective functions) from set $$X = \left\{ {1,2,3,4} \right\}$$ to set $$Y = \left\{ {a,b,c} \right\}$$ is __________________.
Let $$X$$ and $$Y$$ denote the sets containing $$2$$ and $$20$$ distinct objects respectively and $$𝐹$$ denote the set of all possible functions defined from $$X$$ to $$Y$$. Let $...
Consider the set of all functions $$f:\left\{ {0,\,1,.....,2014} \right\} \to \left\{ {0,\,1,.....,2014} \right\}$$ such that $$f\left( {f\left( i \right)} \right) = i,\,\,\,$$ for...
Let $$X$$ and $$Y$$ be finite sets and $$f:X \to Y$$ be a function. Which one of the following statements is TRUE?
What does the following program print? #include < stdio.h > void f (int *p, int *q) { p = q; *p = 2; } int i = 0, j = 1; int main ( ){ f(&i, &j); printf ("%d %d \ n", i, j); return...
Let $$X,. Y, Z$$ be sets of sizes $$x, y$$ and $$z$$ respectively. Let $$W = X x Y$$ and $$E$$ be the set of all subjects of $$W$$. The number of functions from $$Z$$ to $$E$$ is
Let $$f$$ be a function from a set $$A$$ to a set $$B$$, $$g$$ a function from $$B$$ to $$C$$, and $$h$$ a function from $$A$$ to $$C$$, such that $$h\left( a \right) = g\left( {f\...
Let f: $$\,B \to \,C$$ and g: $$\,A \to \,B$$ be two functions and let h = fog. Given that h is an onto function which one of the following is TRUE?
Consider the following C function: void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables x and y.
Let $$A$$ be a set of $$n\left( { > 0} \right)$$ elements. Let $${N_r}$$ be the number of binary relations on $$A$$ and Let $${N_r}$$ be the number of functions from $$A$$ to $$A$$...
Let $$f:\,A\, \to B$$ be a function, and let E and F be subsets of A. Consider the following statements about images. $$S1:\,f\,\left( {E\, \cup \,F} \right)\, = \,f\left( E \right...
The number of functions from an $$m$$ element set to an $$n$$ element set is
Suppose $$X$$ and $$Y$$ are sets and $$\left| X \right|$$ and $$\left| Y \right|$$ are their respective cardinalities. It is given that there are exactly 97 functions from $$X$$ to...
(a) How many binary relations are there on a set A with n elements? (b) How many one - to - one functions are there from a set A with n elements onto itself