Functions together
Define three functions $f,h:\mathbb {N} \cup \{0\} \times \mathbb {N} \to \mathbb {N} \cup \{0\}$ and $g:\mathbb {N} \times \mathbb {N} \to \mathbb {N} \cup \{0\}$ as such-
for $m<n$ \[f(m,n) =0 \] otherwise \[f(m,n) = g(m,n) + f \left (m - 2^{h(m,n)}n, n \right ) \] for $m \geq 2n $ \[g(m,n) = 2g \left (\left \lfloor {\frac {m} {2}} \right \rfloor, n \right ) \] \[h(m,n) = 1+ h \left (\left \lfloor {\frac {m} {2}} \right \rfloor, n \right ) \] otherwise \[g(m,n) = 1 \] \[h(m,n) = 0 \]
Find the function $f(m,n)$
for $m<n$ \[f(m,n) =0 \] otherwise \[f(m,n) = g(m,n) + f \left (m - 2^{h(m,n)}n, n \right ) \] for $m \geq 2n $ \[g(m,n) = 2g \left (\left \lfloor {\frac {m} {2}} \right \rfloor, n \right ) \] \[h(m,n) = 1+ h \left (\left \lfloor {\frac {m} {2}} \right \rfloor, n \right ) \] otherwise \[g(m,n) = 1 \] \[h(m,n) = 0 \]
Find the function $f(m,n)$
"Je le vois, mais je ne le crois pas!" - Georg Ferdinand Ludwig Philipp Cantor
Re: Functions together
There's a problem in definition.
If, $m=n$, from the definition, we have, $f(m,m) = g(m,m) + f(0,m)$.
but $(0,m)$ not belongs to the domain of $f$.
If, $m=n$, from the definition, we have, $f(m,m) = g(m,m) + f(0,m)$.
but $(0,m)$ not belongs to the domain of $f$.
ধনঞ্জয় বিশ্বাস
Re: Functions together
Edited the problem
"Je le vois, mais je ne le crois pas!" - Georg Ferdinand Ludwig Philipp Cantor
Re: Functions together
There's still problem, it's easy to show that, $h(m,n) = \lfloor log_2 m\rfloor$,
So, $n > 1$ implies, $m < 2^{h(m,n)}n$
So, $n > 1$ implies, $m < 2^{h(m,n)}n$
ধনঞ্জয় বিশ্বাস
Re: Functions together
DJ, I think you got it wrong. I get $h(m,n) = \left \lfloor log_{2} \left ( \frac {m} {n} \right ) \right \rfloor $
"Je le vois, mais je ne le crois pas!" - Georg Ferdinand Ludwig Philipp Cantor
Re: Functions together
I get it, it still get inputs form non-domains.
Editing once more, this should fix it for once and all
Editing once more, this should fix it for once and all
"Je le vois, mais je ne le crois pas!" - Georg Ferdinand Ludwig Philipp Cantor
Re: Functions together
Nice and simple problem...especially the induction on $m$ in $g,h$ .
Please read Forum Guide and Rules before you post.
Use $L^AT_EX$, It makes our work a lot easier!
Nur Muhammad Shafiullah | Mahi
Use $L^AT_EX$, It makes our work a lot easier!
Nur Muhammad Shafiullah | Mahi
Re: Functions together
The problem is inspired from the algorithm of performing division by using the rotation operation. I had written a note in facebook describing that process.
"Je le vois, mais je ne le crois pas!" - Georg Ferdinand Ludwig Philipp Cantor