codeismightier
Joined 18 years ago
Karma
318
Submissions
62
Member since
Oct 20
Joined 18 years ago
https://documentation.tradier.com/brokerage-api/trading/plac...
If less people worked, the economy would produce less and we would be worse off.
Money is just an abstraction for real goods and services produced by the economy. Presumably we need people to live in Philly since that's where our industry is. If people moved away to some remote place, wouldn't our economy take a hit? Not to mention the transportation costs of servicing a more remote, less dense area.
Sketch of the argument:
First, an arithmetic coder maps strings to non-overlapping subintervals of [0, 1) that respect lexicographic order.
Second, the process of emitting the final encoding preserves this. If enc(s) ∈ I(s), enc(t) ∈ I(t), and I(s) <= I(t), then enc(s) <= enc(t).
Finally, binary fractions compared left-to-right bitwise yield the same order as their numerical values — this is just memcmp.
Thus, we have a proof of your claim that arithmetic coding preserves lexicographic order! Nice result!
My mistake was in thinking that leading zeros are discarded -- it is tailing zeros that are discarded!