Materials:

Recent questions tagged functions

0 0 votes
0 0 answers
192
192 views
Let $T(V, E)$ be an undirected tree with $n$ vertices, where $V=$ $\left\{v_{1}, v_{2}, \ldots, v_{n}\right\}$. Let $d(i)$ represent the degree of vertex $v_{i}$. Let $f$...
0 0 votes
0 0 answers
209
209 views
For two functions $f, g: \mathbb{N} \rightarrow \mathbb{N}$ we say $f=O(g)$ if there exists $n_{0} \in \mathbb{N}$ and $c \in \mathbb{R}^{+}$such that for all $n \geq n_{...
0 0 votes
1 1 answer
395
395 views
Let $T(V, E)$ be an undirected tree with $n$ vertices, where $V=$ $\left\{v_{1}, v_{2}, \ldots, v_{n}\right\}$. Let $d(i)$ represent the degree of vertex $v_{i}$. Let $f$...
0 0 votes
0 0 answers
316
316 views
In this question they have just said that f: A- B is a function , given nothing about it whether its one one or onto or both . In such a case what function example to con...
3 3 votes
1 1 answer
287
287 views
Let $f:[0,1] \rightarrow(0, \infty)$ be a continuous function. Define $g(x)=\int_{0}^{x} f(t) d t$ for $0 \leq x \leq 1$. If $g(1)=1$, the equation $g(x)=1 / 2$may not ha...
0 0 votes
2 2 answers
340
340 views
Consider the following pseudo-code.function $f(n, m)$if $m=0$ thenreturn 1if $m=1$ thenreturn $n$Return $f\left(n,\left\lfloor\frac{m}{2}\right\rfloor\right) \cdot f\left...
1 1 vote
1 1 answer
511
511 views
Consider the following function:int arc(int i, int j){if(i<2) return j+2;else if(j<2) return arc(i-1, 1);else return arc(i-1, arc(i, j-2));}The value returned by arc(2, 6...
0 0 votes
1 1 answer
438
438 views
Let $f : X \rightarrow Y$ and $g : Y \rightarrow Z$ be functions. We can define the composition of $f$ and $g$ to be the function $g \circ f : X \rightarrow Z$ for which ...
2 2 votes
1 1 answer
493
493 views
int bar(int val){int x=0;while(val 0){x=x+bar(val -1);}return val;}Q: For bar(3) this function is supposed to be stuck in an infinite loop but I do not know how please c...