Better HN
topnewbestaskshowjobs
Log inSign up

PhilipTai

25 karma · joined Jan 29, 2014 (12y ago) · 5 submissions

Submissions

comment 5y ago · link · parent

Right. Local storage is much more performant and cost effective than network storage. I tried to run some iops sensitive workload on cloud. It turns out I need to pay several thousands dollar per month for the performance I can get on a $100 nvme ssd.

comment 5y ago · link · parent

Seems like an accurate emulation of the real capitalism, as intended by the game creator.

comment 5y ago · link · parent

No. There is really no difference whether CEO is paid in cash or in stock, regarding the negative impact of the pay.

Scenario 1: CEO get paid $50 million in stock. Scenario 2: CEO get paid $50 million in cash. And then the company raise $50 million from stock market, so that it will have the same amount of cash as scenario 1.

They are the same.

comment 12y ago · link · parent

For Fibonacci sequence,

             x = 1x^1
      x * g(x) =        1x^2 + 1x^3 + 2x^4 + 3x^5 + 5x^6 + ...
  + x^2 * g(x) =               1x^3 + 1x^4 + 2x^5 + 3x^6 + ...
  ------------------------------------------------------------
  =       g(x) = 1x^1 + 1x^2 + 2x^3 + 3x^4 + 5x^5 + 8x^6 + ...
Hence,

     x = (1 - x - x^2) * g(x)
  g(x) = x / (1 - x - x^2)

comment 12y ago · link · parent

The techniques of constructing such sequences have been studied formally in combinatorics under the name "generating function".

http://en.wikipedia.org/wiki/Generating_function

In this case, the sequence 1, 2, 4, ..., 2^n has the generating function,

  g(z) = sum[i = 0 to inf] (2^i * z^i) 
       = 1 + 2z + 4z^2 + ... 
       = 1 / (1 - 2z)
Substituting a small number 10^-k, such as z = 0.0001 gives 10000/9998, and then right shifting by dividing 10000 leads to 1/9998.

What more interesting is that some other useful sequences can often be obtained from the function, by operations like differentiation and integration, or adding / multiplying with other functions.

For example:

  2z + (4*2)z^2 + (8*3)z^3 + (16*4)z^4 ...
  = d/dz(g(z))
  = d/dz(z * 1 / (1 - 2z))
  = 2 / (1 - 2z)^2
Put z = 1/10000 = 0.0001, this yields 50000000/24990001 = 2. 0008 0024 0064 0160 0384 ...