throwaway183839
throwaway183839 on Hacker News
A good example is finding arithmetic sequences of length K in the prime numbers (for example, the sequence 3, 5, 7 is an arithmetic sequence of length 3, as is 17, 23, 29). It can be shown that random sets that have a density similar to the primes (i.e. the chance that N is in the set is proportional to 1 / log(N)) have arbitrarily long arithmetic sequences - as, in fact, do the prime numbers.
I was in the US (NYC) last year and went to a music event at a bar. My girlfriend and I were there an hour early, so we grabbed a table of four near the front (we were meeting two other friends). When our friends arrived and sat down, we noticed that someone had left a jacket on one of the chairs at our table while we were sitting there (it wasn't there when we took the table).
We were a little confused but our friends sat down anyway. Right as the show was starting, an older guy came up and said that we were in "his" seat, as it had his jacket on it. He was pretty angry that we'd taken "his" seat, and we didn't feel like an argument, so we let him drag the chair off somewhere else, but it felt like he was being a bit of an asshole.
Is this a social thing in the US that I just don't get (I'm British) or was the guy just being an asshole?
This is annoying, but possibly not as annoying as listening to someone who starts half their sentences with the same word.
--
Thinking about it a little more, this habit is not specific to the computer / programming geek communities. I noticed others doing it around 2009-10, when I did almost no programming and didn't hang around with programmers. I mostly hung around with math and physics grad students. I suspect it is more generally a geek phenomenon, not specifically computer / programming geeks. Or possibly it's an even wider phenomenon than that - hard to say, since most of my friends are geeks of one sort or another.
It would be interesting to see if male and female geeks do it with similar frequencies. My guess would be that male geeks do it more often (based on the interpretation that starting a sentence with "So..." is a way of saying "I have given this topic serious thought" and the assumption that this is more likely something that a male geek will want to indicate than a female geek).
So yes, diversification (plus leverage) absolutely increases expected value, if you hold risk a constant.
In this case the error is a little perplexing since the OP's name is "Lexi" which is almost never used as a male name!
After a while spent programming in Haskell you would probably develop your own mini-library of functions that make your life easier. Another one I often find useful is
(.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(.:) f g = \x y -> f (g x y)
which e.g. allows you to define the absolute distance function dist :: (Num a) => a -> a -> a
dist = abs .: (-)
A fun challenge is figuring out why the definition of (.:) is equivalent to (.:) = fmap . fmap
!A reasonably clean way would be to define
data Color = Red | Green | Blue | Yellow | Orange | Purple
deriving (Enum, Bounded, Show)
and then (e.g. in ghci) you can do >> [minBound .. maxBound] :: [Color]
[Red,Green,Blue,Yellow,Orange,Purple]
I often define the useful function enumerate :: (Enum a, Bounded a) => [a]
enumerate = [minBound .. maxBound]
for exactly this purpose.It is completely different to computational complexity[1] which is what is being discussed in Aaronson's article.
[0] http://en.wikipedia.org/wiki/Complex_system
[1] http://en.wikipedia.org/wiki/Computational_complexity_theory
Most high frequency traders are trying to make money by providing liquidity, i.e. offering to buy and sell at a better price than the rest of the market. This benefits both the HFT (because they make money) and other market participants (because they can trade at lower spreads).
What these guys were doing was entering orders that they actively didn't want to trade, so that they could push around the price of the stock and repeatedly scalp a small profit. They had no intention of improving the quality of the market (either by narrowing spreads or improving price discovery). In fact they were actively making the market work less well, by impeding the process of price discovery with their "bluff" orders.
The whole point of a market is to be an efficient mechanism for matching buyers and sellers at a fair price. If someone is deliberately trying to distort the fair price, they are undermining the value of the market (and other market participants, not only HFTs, will suffer because their trades will no longer take place at the 'fair' price, but instead at the 'fair' price plus whatever direction the scalpers happen to be pushing it in at the moment).
People who enter many quotes that they never trade on would be punished by this system (human traders and "flickering" high frequency traders alike) whereas people providing genuine liquidity, in the form of long-lasting quotes at a good price that they intend to trade, will benefit.
After an order is matched, you can't cancel it except in exceptional circumstances (for example, you mistakenly entered an order very far from the bbo - in that case, with the cooperation of your broker and the counterparty to your trade, you may be able to unwind it).
However before the order is matched you are free to cancel it if you decide you no longer want to trade at that price (for example, you see some change in the fundamentals of the stock that causes you to no longer want to buy, or simply that the price moves in such a way that a buy/sell at your original price no longer looks like good value).
Proof: Any rectangle made of Tetris pieces must have an even number of squares (in fact, a multiple of 4) and hence the same number of black/white squares. Every Tetris piece except the T has the same number of black/white squares, hence the T cannot be used in any arrangement of a subset of Tetris pieces into a rectangle.
exp(-r * T)
and a stream of payments C1, C2, ... CN at times T1, T2, ... TN is worth C1 * exp(-r * T1) + C2 * exp(-r * T2) + ... + CN * exp(-r * TN)
In particular, N can be infinite, so that the value of a never-ending stream of payments is C1 * exp(-r * T1) + C2 * exp(-r * T2) + ...
which can sum to a finite value. For example, if all the C's are constant, and T1 = 1 year, T2 = 2 years etc, then the present value is C * exp(-r) + C * exp(-2r) + C * exp(-3r) + ...
= C * (exp(-r) + exp(-2r) + exp(-3r) + ...)
= C * exp(-r) / (1 - exp(-r))
so, for example, if C = $1,000 and r = 4%, then the value of this infinite stream of payments is about $24,500 - so if you had to lend more than $24,500 for a 4% consol paying $1,000 you would be getting a bad deal.This is before taking account of the possibility of default, which means that what you thought was an infinite payment stream turns out to be quite finite.
Right now, when interest rates are low, a 4% consol looks like a great deal. But you obviously can't buy a 4% consol at the moment. Maybe you could buy a 1.5% consol, if you're lucky.
However, it is all a bit immaterial. If the debt was denominated in pounds sterling, then it will be repaid in pounds sterling. If it was in guilders, then it will be repaid in guilders (or in sterling, at whatever the current nominal sterling/guilder exchange rate is).
log(a + b) = log(a) log(b)
is a rule I'm familiar with!