1
$\begingroup$

Consider the next hashing definishion of $f(x)$

$$f(1) = 100$$ $$f(x) = \operatorname{SHA-256}(f(x-1))$$

Where $x$ is a positive integer and SHA-256 is the hash algorithm. You can think of SHA-256 as pseudorandom number generator, it will take an integer input and output with a random number between $0$ to $2^{256}$.

And $g(x)$ that just counting down $f(2)$

$$g(x)= f(2) - x$$

And now let's create $k(n)$ as the $min(x)$ value that satisfy $g(n) < f(x)$ where $n$ is a positive integer greater then $1$. Just to be clear let me try another way to define $k(n)$. For each value of $n$ find the minimum value of $x$ in $f(x)$ that will satisfy $g(n) < f(x)$. So $k(n)$ is equal to that value.

I hope that my above explanation makes sense. Now my question is: How does the graph of $k(n)$ looks like, is it linear or some thing else?

$\endgroup$
  • $\begingroup$ You're on a math site here... So providing a bit of contextual data would be great. What are the domains of your functions? The codomains? What is SHA... $\endgroup$ – mathcounterexamples.net Jan 19 '18 at 20:33
  • $\begingroup$ @mathcounterexamples.net I am not sure how to do that. I am developing new crypto coin those days, and I am trying to build a good algorithm for adjusting the difficulty. So I am interested to see if linear growth in computation power should be adjusted with a linear increase of the difficulty. I want to know what is the difficulty graph looks like when comparing difficulty with the probability of mining a block. $\endgroup$ – Ilya Gazman Jan 19 '18 at 20:38
  • $\begingroup$ Understood... but I least on my side I don't know cryptography algorithms. So if you want to get some math help, you need to explain the math background of what you do! $\endgroup$ – mathcounterexamples.net Jan 19 '18 at 20:46
  • $\begingroup$ @mathcounterexamples.net Got you! Please tell me if it's clear to you now $\endgroup$ – Ilya Gazman Jan 19 '18 at 20:58
  • $\begingroup$ I've made a small change to how SHA-256 is written to avoid overloading the minus sign...not sure if this is the best solution $\endgroup$ – Calvin Khor Jan 19 '18 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.