Ahead of our time
This had been foreseen. That’s the trouble with being a visionary: you can’t cash in if you are too far ahead of your time.
Algorithmic trading, also known as high frequency trading (HFT), is rapidly replacing human decision making, according to a UK government panel which warned that the right regulations need to be introduced to protect stock markets. Around one third of share trading in the UK is conducted by computers fulfilling commands based on complex algorithms, said the Foresight panel in a working paper published yesterday. Nevertheless, this proportion is significantly lower than in the U.S., where three-quarters of equity dealing is computer generated. The Foresight panel, led by Dame Clara Furse, the former chief executive of the London Stock Exchange, argued that there are both benefits and severe risks to algorithmic trading. There was ‘no direct evidence’ that the computer trading in itself increased volatility, it said, but in specific circumstances it was possible for a series of events with ‘undesired interactions and outcomes’ to occur and cause massive damage.”
Absolute versus comparative advantage
Ricardo’s concept of comparative advantage was forged in a world where labor and capital were essentially fixed. England could weave cloth more efficiently than Spain, but Spain could make wine more efficiently than England. Therefore, they would both benefit from trade given that each of these countries had a comparative benefit or efficiency to offer. The assumption under comparative advantage is, while the composition of employment would change under trade (more weavers employed in England and more wine makers in Spain), the level of employment would stay virtually the same. Meanwhile the citizens of England would get cheaper wine and the Spanish cheaper cloth.
In today’s world, labor and capital are not fixed. Capital flows wherever the input costs are the cheapest, such as labor and materials. Companies can set up operations in many places around the world. For instance, an American multinational no longer has to produce in the country where it sells, given existing trade treaties that lower tariffs. They can shift production to China or Mexico where the labor costs are a fraction of what it is in the U.S. and not be penalized by tariffs or quotas. In effect workers get fired in the U.S.; this leads to a loss of income for the working and middle classes. The workers in Mexico and China benefit because they have jobs, albeit at low wage rates and substandard conditions in many cases. Contrary to received wisdom, prices for some products might be lower, but not significantly so. The difference in wages (from those in the developed world versus the developing world) goes to investors, or more accurately these days, management. This is trade by absolute advantage, not comparative advantage.
For a while GDP growth seems to be fine. But with production set up abroad, the U.S. runs trade deficits and Americans by definition incur more debt to buy these goods. NAFTA encourages this. As a member of the WTO, China benefits from this trade agreement in that its goods are levied with lower tariffs than would otherwise be the case. Moreover, China manipulates its currency to keep it artificially low. Under a reciprocal trade regimen, the currency of a country that exports more than it imports should rise. A rising currency would act as a braking system to bring trade flows back into equilibrium. But the U.S. and China do not want that. China needs to keep selling goods to the world to continue growing fast enough to generate enough jobs. Despite its protests from time to time, the U.S. government does not
want this because it is captured by the multinationals, which make much more money not employing Americans (or Europeans for that matter). So when media pundits and approved economists say they are puzzled by the lack of employment growth, it is theatre, a necessary piece of kabuki to keep their jobs as propagandists.
Free trade under a truly Ricardian model of comparative advantage is theoretically beneficial to the world because at its heart lies the assumption of full employment. Instead what is touted as free trade is not Ricardian; it is a model of absolute advantage that ensures that the wages of labor are depressed, thereby enabling the rise in income for the top 1%.
The problem for the elites is that these are not sustainable political or economic policies because eventually unemployment will reach unacceptable levels and the right leader will come along and tell the real story to the American people.
****
As long as the political power of the middle and working classes has been undermined and blunted, U.S. multinationals will not hire Americans if they can offshore production. Therefore, people need to be organized to buy goods and services from small businesses whose interests are more aligned with that of the nation. Also, Wall Street should be boycotted. Do not do business with big banks. (I belong to a credit union.) Invest in regional financial institutions. Wall Street, because of its power over Washington, has been able to push through unfair trade bills in exchange for the right to set up shop in those foreign countries that benefit from access to American markets. But it is a one-sided deal in practice. U.S. access to foreign markets translates to this: multinationals offshore production and export to the U.S. at low or nonexistent tariffs.
If you want access to Chinese markets you must manufacture and hire people in China. Also, you must share your intellectual property with local firms. Multinationals accept this as the cost of doing business in China, although the real cost is being borne by the working and middle classes in this country.
Unless there is a substantial reversal in these policies, expect many years of sub par economic growth and high unemployment in the U.S. So why should anyone be surprised when the U.S. GDP growth rate for the second quarter is dismal? Unless of course, they are paid to be surprised.
Chomping at the bits in clojure
This clojure function counts the number of bits in the base 2 representation of a nonnegative integer.
(defn bit-count [n] (loop [i 0 n n] (if (zero? n) i (recur (inc i) (bit-and n (dec n)))))
Here’s a suggestion from the Clojure group to use reduce instead of loop and recur in the calculation of the order of a permutation. The reduce form saves a variable at the expense of some time. The function (cycle-leader? perm i) returns true if and only if i is the least element of the unique cycle containing i in perm. The predicate form improves readability at the expense of introducing a test.
(ns knuth
(:require [clojure.contrib.math :as math]))
(defn random-perm [n] (shuffle (range n)))
(defn cycle-leader? [perm i]
(loop [j (nth perm i)]
(cond (< j i) false
(= j i) true
:else (recur (nth perm j)))))
(defn cycle-length [perm i]
(loop [cycle 1 j (nth perm i)]
(if (= i j)
cycle
(recur (inc cycle) (nth perm j)))))
(defn order-perm [perm]
(reduce
(fn [order i] (if (cycle-leader? perm i)
(math/lcm (cycle-length perm i) order)
order))
1 perm))
A further reduction with reduce is possible by combining the test for a cycle leader with the cycle count.
(defn cycle-leader-length [perm i]
(loop [cycle 1 j (nth perm i)]
(cond (< j i) 1
(= j i) cycle
:else (recur (inc cycle) (nth perm j)))))
(defn order-perm [perm]
(reduce (fn [order i] (math/lcm (cycle-leader-length perm i) order)) 1 perm))
This is the most compact so far, but the original code with fewer tests and cycle length computations is faster.
Kabuki
The headline ”Unemployment creeps up to 9.2%” reverberated through the Internet on Friday when the Bureau of Labor Statistics reported that the U.S. economy produced 18,000 jobs in June–fewer than the 25,000 jobs the previous month. In its article on the Labor Department report, “Job Growth Falters Badly, Clouding Hope for Recovery“, a startled New York Times wrote, “Economists were stunned. They had been expecting job growth to strengthen in June as oil prices eased and supply disruptions caused by the Japanese tsunami and earthquakes receded… .”
Either the economists are not very good at their job or they are reading from the same official script. The script being this: say anything as long as the real ills of the economy are not diagnosed properly. The media-designated experts chatter away but say nothing. It is all theatre.
The U.S. economy will not create enough jobs if
- So-called free trade agreements are not revised to have real reciprocity;
- Tax breaks continue to go to multinationals that ship jobs overseas;
- Tariffs are not imposed on countries with which the U.S. has substantial trade deficits through currency manipulation, tax subsidies and other mercantilist policies;
- People continue to do business with or buy products from large multinationals instead of small businesses;
- A steeply progressive tax system is not enacted;
- Antitrust prosecutions are not instituted against banking, insurance, pharmaceutical, agricultural, and media conglomerates; and
- The social contract is not rewritten to provide for decent wages and medical care for all workers.
The list can go on.
A co-topological category
This post describes a nearly useless category that reminds me of the topologies associated with categories of coalgebras for a set endofunctor.
Let be topological spaces. A not-necessarily continuous map
is open if for every open set
,
is open in
. The category
of topological spaces and open maps has the same isomorphism types as the category
of topological spaces and continuous maps.
Proof: A map is an isomorphism in if and only if it is a homeomorphism in
.
Coproducts exist in . In general, products do not exist in
. However, something analogous to powers of a single space exist.
For a topological space ,
(“the square of
“) denotes the topological space with underlying set
and topology generated by the basis
where is the diagonal. This topology is the smallest topology on
making the diagonal map open (and continuous).
The construction defines an endofunctor
on
together with a natural transformation
(the same underlying map as
) from the identity functor
to
. There is a one-to-one correspondence between maps
and maps
such that
for
, where
is the projection (projections are open).
Proof: Given a open map , the open map
satisfies
. Conversely, a map
with
for
, defines
. Then
Ham Radio expeditions with two goats
WG0AT, the goat man of ham radio, has produced a series of videos that go well beyond logs of Field Day and Summits On The Air expeditions. The videos convey the addictive allure of QRP (low-power) DX (distance) ionospheric propagation; the older-male demographic of amateur radio and the relative absence of women; the rarefied club of CW (morse code) operators; the association of ham radio with the military and civil defense; and off-the-grid consumerism, which combines American rugged individualism with an inextricable dependence on miniaturized high-tech electronics, geo-positioning satellites, chemical engineering, and cellular telephony. WG0AT has a knack for translating into English the Capridese irony of his two rescued goats Rooster and Peanut, who provide running commentary and comic relief.
Equations before rhetoric
I have foregone virtually everything–family, fortune, friends–for the freedom to spend vast uninterrupted expanses of time attempting to understand some mathematics and perhaps some physics, chemistry and computer science. I struggle without insight, with little hope of original accomplishment, with inadequate short-term and long-term memory, mediocre problem-solving ability and limited powers of abstraction and generalization. But this is all I know.
Yotta yocto = Zetta zepto = Exa atto = Peta fempto = Terra pico = Giga nano = Mega μ = kilo milli = hecto centi = 1.
The tyranny of the majority function
The majority function of three variables is
The majority function of five variables is definable in terms of
:
In two variables, the only functions derivable in the term algebra generated by are the projections. We clearly have
; the rest is an induction. It follows that neither
nor
is definable in the term algebra of
over two variables. Likewise for negation.
The following function is the majority function for four voters , where the first will break a tie.
Some facts. The -fold cartesian product
of
is a poset with
iff
for
. For a term
in the term algebra of
over the variables
, we borrow a notation from type theory and write
to assert that term
evaluates to
on argument
. We have the following properties.
If and
then
.
If and
then
.
We’ll prove the first by induction. This is true for a variable. If is
and
, then there exist
such that
and
. By induction,
and
. Hence
.
Once consequence of this that negation cannot be represented in the term algebra generated by .
The median algebra
I wimped out and checked the Wikipedia, according to which the majority function is a median algebra; i.e., a set with a ternary function
satisfying the following four axioms.
Equations before rhetoric
The conventions of tensor notation state that free upper (lower) indices must occur once on each side of an equation in the same position, upper or lower. Bound (or dummy) indices must occur in the upper and lower indices of a term; the terms are summed according to the Einstein summation convention. Tensor notation barely distinguishes vectors from covectors: vector coordinates have upper indices; covector coordinates have lower indices. In a doubly indexed array the first index
is the row number and the second index
is the column number; in a doubly indexed array with an upper and lower index, we would write
: the Row index is the uppeR index and the Lower index is the coLumn index (I need mnemonics: uppeR Row, Lower coL).
Consider two bases (the “old” basis) and
(the “new” basis). A vector v in the old and new coordinates is
. The transition matrix from the old basis to the new basis is given by
by the conventions of tensor notation. The inverse transition matrix is
, where
. But then,
. Equating coordinates, we have that
.
This says that the coordinates of a vector in the new basis transform from the coordinates in the old basis under the inverse of the transition matrix from the old basis to the new basis. Well, it beats writing .
Covariant vectors (covectors) have lower-indexed coordinates, which transform under rules dual to those for (contravariant) vectors, i.e., and
, where
defines the transition matrix from the old basis, and where
is the inverse. We have assumed that covectors can be defined with respect to the basis for which we defined vectors under a one-to-one correspondence that respects linear operations. Note that the direction of coordinate dependence has reversed: the coordinates of a covector in the new (corresponding dual) basis transform from the coordinates in the old (corresponding dual) basis under the transition matrix from the old basis to the new basis.
The transformation rules defined show :
.
My relationships are none of my business
My uncle and I drove past the elevated train. He pointed to the grizzled bums on the street. “They’ve given up.” One of them came over, and leaned into the windshield. His teeth were missing. “What are you going to do when your looks fade?” my uncle said. The bum backed away.
The Jiaozhou Bay Bridge
The one billion dollar Jiaozhou Bay Bridge opened today.
A few years ago a Nobel laureate in physics was visiting the state-of-the-art $1.5 billion dollar facilities at the Hong Kong Science Park, itself one of two facilities and three industrial estates comprising the vast Hong Kong Science and Technology Parks Corporation. “We’re finished,” he said. “There is no way we could match this level of investment in Europe.”
Take the virtual tour of the HK STP.
Dream 6/28/11
I dreamed last night that I had a baby boy who had been living a drawer of my dresser for several years. I was astonished that I hadn’t noticed in all this time–how could I have been so self-absorbed and unobservant? But there he was, in the second drawer from the top on the left, wrapped in a blue blanket. I took him out, and he aged instantly. He became nine years old, and had developed an independent history, a distinctive personality, and friends who were waiting to play with him outside.
He asked me who I was. “I’m your father,” I said. He seemed to accept this without comment. His nose was unusually prominent and hawklike, with numerous protruding red nodules and a network of veins and arteries connecting them. I cursed my genetics: why couldn’t I have a normal boy instead of a mutant? Was his condition operable?
“I have hundreds of books on mathematics and physics here–do you like mathematics?” I asked. He might already have gone through my library. He used a word I didn’t recognize–his vocabulary was more developed than mine. “I’m going to have to look up the meaning of that word,” I said. There was a fleeting suggestion of disappointment on his face.
My apartment became a house. My son’s friends outside were affable, older, undemonstrative and capable of violence–they had guns. He left to join them. I decided to drive the house out of range of the guns, onto the highway.
Why Weiner should pull out
Weiner should resign for one reason: his district deserves a representative with a larger Weiner, since Weiner’s dimensions have now become the standard by which inCUMbency can be judged. If Weiner tries to stay in, he opens himself to challenges by candidates better equipped to service his constituents. He should pull out before getting sucked deeper into the situation.
I. Wankeroff
Brooklyn
Comment from Reddit:
[–] In_transition2 1 point 6 hours ago
Thank you for putting the size of this dilemma in perspective, it’s an enormous slap in the face of the American people and not the money shot that we deserve.


