Monday, October 6, 2014

Retrenchment under Limits

The graphs in my previous post looked a bit off: the long-term balance could grow without limit. Once the long-term balance grows large enough that the interest earned at each step exceeds the penalty for transfers to the short-term balance, then collapse becomes impossible.

The long-term balance corresponds roughly to altitude in the flight power curve model, while the short-term balance corresponds roughly to speed. One good flight strategy is to stay at a high enough altitude that recovery is possible from a stall. More altitude makes it possible to recover even from a series of stalls. But ultimately altitude is limited by the reduced air pressure. In a real economic situation there is a similar problem. The more one invests, the more one is pushed out on the risk-return frontier. The easy pickings are exhausted.

To model such limits, I tweaked the structure of my simple model. When the long-term balance is low, it earns a reliable 5 percent. But as the balance grows, there is an increasing probability of a smaller return, to the point where it becomes possible to lose up to 15 percent of the balance in a single step. So the average return gradually declines, as the long-term balance increases, from 5 percent to -5 percent.

Here are four different runs, all with the same threshold. Most likely there are smarter strategies that can outperform this simple threshold strategy. But this new model does seem to be more realistic.

Saturday, October 4, 2014

Retrenchment

Jane Austen’s Persuasion begins with retrenchment. Our heroine’s family needs to cut expenses to avoid bankruptcy. But how drastic a cut is really required? How drastic a cut can really be tolerated? Do we need to reduce fossil fuel consumption in order to avoid a climate catastrophe? These are instances of a fascinating class of problems. The power curve in airplane flight is another nice instance. I first learned about this from Ran Prieur’s blog.

I find simple mathematical models helpful in understanding these sorts of puzzles. Here is a first attempt to capture the core structure.

In this retrenchment model, the state of affairs is a pair of numbers that I call a long-term balance and a short-term balance. The long–term balance earns steady interest while the short-term balance earns no interest. Money can be moved back and forth between the accounts. Moving money from the short-term balance to the long-term balance is free, but a penalty is incurred when moving money from the long-term balance to the short-term balance.

The evolution of the system consists of a series of alternating moves. First the world makes a move: interest is earned on the long-term balance, but also a random transfer occurs on the short-term balance. This random transfer might be positive or negative. Then the account holder makes a move: funds can be moved between the balances. After this, both balances must be positive or the sequence ends.

The core problem is to devise a strategy to keep the sequence going. Keeping funds in the long-term balance is good because interest is earned there. But funds must also be kept in the short-term balance in order to cover random negative transfers. The penalty incurred in moving funds from long-term to short-term make it prohibitively expensive to move as frequently as a small short-term balance would require.

The effectiveness of any such strategy depends on the details of the random transfers, for example whether the transfer at one time is correlated with the transfers in the recent past. In a realistic scenario the nature of this random sequence will not be known. The best a strategy can do is to look at the past and infer that the future won’t look too much different.

I coded a simple little simulation. Here the transfers are drawn from a Gaussian distribution and are not correlated across time. The strategy was very simple: when the transfer pulls the short-term balance below zero, move enough funds from the long-term balance to bring the short-term balance up to a fixed threshold. When the short-term balance rises above this threshold, move the excess funds to the long-term balance. As long as the short-term balance is between zero and the threshold, no funds are moved to or from the long-term balance.

Here is one sequence that emerges from this interplay:

Here are two runs where the sequence of transfers is exactly the same, but the threshold differs by less than 1%. The slightly higher threshold maintains a slightly higher short-term balance, thereby incurring fewer penalties for the movement of funds from the long-term balance.

Wednesday, October 1, 2014

Needs and Wants

We all, humans and other living things, go to considerable effort to acquire food and whatever else we need or want to be able to live and to live well, or at least better. Our complex biological and social structures seem primarily to have taken form, by whatever means, in order to enable us more effectively to fulfill those needs and wants. We have hands in order to grasp.

The natural distinctions seems to be that needs are fundamental requirements and not legitimately subject to question, while wants are optional, negotiable. Perhaps we could extend this ranking by putting luxuries at another step past wants.

This notion, of need and want as differing in degree, misses important logical structure: a want is an end; a need is a means. Curiously, this makes wants more fundamental than needs. A need is a means to fulfill a want. I want to stay alive, therefore I need food. Some wants seem essential; what we need to fulfill those essential wants become the unquestionable needs. Inessential wants then become the conventionally questionable wants or luxuries, and whatever is needed to fulfill those wants, those needs are barely worth discussing.

These core wants and their ancillary nonnegotiable needs, though, are not fixed truths. Indeed, they arise interdependently with the biological and social structures that fulfill them. In a stable world, these structures do seem like fixed truths. But no world is stable across all time and space. The structures that define and fulfill wants and needs vary from place to place and from time to time. Understanding this variation can help one respond to such changes. One can imagine even managing such processes of change, pioneering new social or biological structures to facilitate new patterns of wanting and needing. For example, Shakyamuni Buddha’s creation of the Buddhist monastic order can be understood from this perspective.

For most of us most of the time, though, there is sufficient challenge just in responding effectively to the structural changes that we encounter. A general sort of wisdom involves recognizing that things that appear fixed are instead impermanent, arising and dissolving in dependence on a variety of connected factors. For example, consider how essential it has become to have internet access, when the internet hardly existed thirty years ago. As pay phones have disappeared, cell phones too have become essential.

I am not merely a biological being, I am a social being. I identify with my role in society. The things I need in order to maintain my social role thereby become essential needs. Occasionally one hears in the news about some enormously wealthy person whose needs have somehow become subject to public judgment, usually in some case of family law. It boggles the mind how a court can determine that a person actually needs $10,000 a month or whatever absurd figure. But to understand that a person’s identity is wrapped up in their social role, that understanding starts to make clearer how such needs could be considered legitimate.

Here is definitely a place where each of us has remarkable power to steer change. I can change my social role; I can become a different person. Of course this is never easy. On the other hand, sooner or later each of us will face such a change at the profoundest level as we undergo the process of dying. Given that we can’t hold on forever anyway, maybe a bit of letting go along the way shouldn’t be so unacceptable!

Society provides the stage upon which each of us plays our individual role, but the fabric of society is spun and woven from that very role playing. Of course these structures are all entangled in a boundless web that encompasses the diverse human cultures around the world together with biological, geological, and even astrophysical processes. If we can understand how our most essential wants and needs are in fact evolving parts of this vibrant network, perhaps we will be able to dance more freely with the changes we experience.

Saturday, September 6, 2014

Writing on a Turing Tape

In an earlier post here, Computing with Graphs, I proposed a class of graphs and a few simple rewrite rules that could provide a way to store computational data. These graphs could provide a more realistic memory model than either Turing tapes or random access memories. In that post I sketched a proof that the rewrite rules were complete, i.e. they provide a path from any graph in the proposed class to any other graph in the class.

Now I would like to provide the basis for a proof of Turing completeness. If a Turing machine simulator can be built using this class of graphs, then the memory model is at at least minimally adequate as a computational storage medium. I will just outline one way to use the graphs to represent simple Turing tapes.

The tape itself is a sequence of graph nodes connected by directed arrows. The tape is always finite in length but can grow indefinitely in either direction, so it can simulate an infinite tape. Each node connects via an undirected edge to the data for that node. The data contained on a cell of a Turing tape is a symbol drawn from some finite set. Using the graphs, each symbol is represented by a subgraph of some unique shape, restricted only in having a single outgoing undirected edge by which is is connected to the cell's tape node. One special subgraph represents the end of the tape. Whenever the head bumps up against that special marker, the tape can be extended by adding another blank symbol.

So here is a graph representing a Turing tape with three cells. The fourth tape node is the one that contains the tape end marker:

I will show the steps involved in extended the tape with a new blank symbol. First, an expansion rewrite operation is performed on the undirected edge that connects the tape end symbol to its tape node:

I have added some location marks to facilitate the identification of edges. Next, the outgoing edges of the undirected edge A2-B2 are swapped:

Then an undirected edge swap is performed on the directed edge A2-B1:

An outgoing edge swap on undirected edge B1-B2:

An undirected edge swap on directed edge B2-A1:

At this point it seems that a new operation is required, where the incoming directed edges of an undirected edge are swapped. The proof sketch of my earlier post would seem to imply that this operation is unnecessary. In any case it seems very natural and convenient at this point.

So, then, an incoming edge swap on undirected edge A1-B1:

An expansion on undirected edge A2:B2:

An outgoing edge swap on undirected edge A2-B2:

An undirected edge swap on directed edge E2-B2:

An outgoing edge swap on undirected edge A2-E2:

An outgoing edge swap on undirected edge B2-D2:

An undirected edge swap on directed edge A2-B2:

An outgoing edge swap on undirected edge A2-D2:

An undirected edge swap on directed edge D2-B2:

An outgoing edge swap on undirected edge A2-B2:

One approach to a representing a finite set of symbols of arbitrary size is just to create strings of loops of arbitrary height. The steps above first created an extra end-of-tape symbol and then expanded it to a blank symbol. The steps that expanded the end-of-tape to the blank could be repeated on the blank to create the first non-blank symbol, and from there repeated as many times as necessary to create whatever symbol is required out of the finite set of symbols. These operations can be performed in reverse, so the replacement of one symbol by another is straightforward.

Saturday, August 30, 2014

The Religion of Ignorance

I have never heard Ray Kurzweil speak nor read any of his books, but he is certainly a major figure in the world of technology, the world in which I live and work. So he is a very familiar character. In his brilliant passion he reminds me of Edward Teller, whom I did get to hear talk a couple of times. Do I remember right, that Edward Teller was the model for Stanley Kubrick’s Dr. Strangelove? Anyway that shoe would have fit well enough.

I have to admit that I find this sort of brilliant passion more on the pathological side of normal than on the wise side. But these crazy visions somehow have become enormously powerful. Who knows, maybe the hydrogen bomb really did make the world more peaceful. Who knows, maybe computers will become more intelligent than we are, maybe computers will become conscious, maybe we will become able to transfer our consciousness into a computer.

What is quite interesting about these speculations is that their terms are quite slippery. Terms, of course, are always slippery: how many whiskers does it take to make a beard, etc. Sometimes the slipperiness doesn’t make a significant difference – but sometimes it does!

What would it mean for a computer to become conscious, to have a mind? What is mind? Need such a question have an answer? How can a meaningful question fail to have an answer? Or, what constitutes an answer, what function does an answer serve?

Alongside the question, what is mind, consider another question, what is the American Dream? An answer to this question is a political platform, a position that claims power. There is a kind of terrifyingly stupid brutality in refusal to grant others the space to hold different dreams. And, whether we call it consciousness or mind or soul, to carve out an answer and enforce adherence to one answer, that idolatry is the totalitarian killing of the soul. Soul is the ever deepening exploration and appreciation of the boundlessness of experience, of life. But, sadly, the totalitarian killing of the soul is what we must confront every day.

Computer technology certainly gets more powerful and more sophisticated at a stunning pace. What are the implications of that progress? To say that technology is one thing and what people do with it is another, that doesn’t quite make sense. Technology is something that people do. In our massively scaled society, the connections between the different facets of a technology become hidden and disguised and so appear separate. Gun manufacturers don’t kill; gun company stockholders don’t kill; gun sales people don’t kill; gun advocates don’t kill: it is gun users who kill.

Limitation of liability is fundamental to the corporate institution, so it’s not quite right to discount conspiracy theory in this pattern. There is certainly value in trying to understand how we got here. But the value is primarily in helping us understand whither we are headed, and more importantly, what opportunities are available for steering toward the happier among whatever paths are open before us.

This notion of transferring our mind into a computer: what does that idea do? Why might that idea be attractive? Of course we are each mortal, and so any sort of survival of mind beyond the body, that is attractive. Clearly we are toying with religion here, with worship of the computer. A computer is a kind of stunning crack in reality, an actual presence of perfection in our otherwise imperfect world. Religion is not altogether a bad thing: the devil is in the details! How might the religion of the computer work out?

Computers are the ultimate in clarity, the opposite of mystery. Computers are mechanical models of dualistic grasping. A final answer is the end of investigation, of looking, of awareness. To worship computers is to worship ignorance. The 1980s brought us the freedom to think that greed is good. The worship of ignorance is not likely to move us in a better direction.

How might this play out in practice? The worship of greed imploded in the marketplace. The worship of ignorance, unawareness, death, this worship seems likely to implode on the battlefield.

Computer technology already plays a huge role on the battlefield. The fighting gets more and more abstract, at least to those who specify the targets. The battlefield itself becomes abstract. The internet becomes a field of potential targets, friends and foes. I saw a video recently… one video gamer called in a SWAT raid on another video gamer. The SWAT team, with all their guns and armor, were the robots in this farce. A name and address popped out of a computer, and they performed their function as they had been trained, in total ignorance of the broader situation.

We already live in a world that is deeply structured by algorithms… for another example, look at the sort of statistical politics practiced by Karl Rove. Our government is run by statistical analysis of polling data! Our legislators have become robots!

The notion that computers might take over the world, that is quite absurd. Each individual sentient being is in inseparable possession of unbounded power. But that power can be buried and denied in countless ways. The worship of ignorance through the glorification of mechanical dualism, that is one way we can hide from our own power. How deeply can we entangle ourselves in this confusion? That is the nature of our unbounded power: it enables unbounded confusion.

Don’t worry about computers! If we can each acknowledge our own power and responsibility, and cultivate the awareness, curiosity, and wisdom, to turn over the rocks of easy answers to discover the vibrant puzzling life hidden beneath… we might even become capable of making good use of that amazing microelectronic technology!

Saturday, August 9, 2014

Portfolio Management

All too often life is a struggle just to get through the day, to dodge bullets or find food or gather fuel for the warmth to survive. But then, too, it can happen often that we find some options and opportunities for acting with an eye toward the future. What can we do now to make a brighter future?

For an action in the present to bear fruit in the future requires some sort of persistent change in the situation to carry that connection. The resources that we bring to a situation can be viewed as a portfolio. Our actions add and remove assets and liabilities from our portfolio, changing the position from which we will encounter future situations. How can we improve our future position?

Exchangeable Goods

The marketplace is home to many situations that help to brighten our day, providing food or clothing, etc. A marketplace is a place of exchange. Money provides a common medium for exchange; exchange can take place both to and from money. We might bring in a pile of books which we exchange for money at the book dealer, then take our money to the fruit seller to return home with a bag full of peaches. For happy outcomes in a marketplace situation, we need to bring something with exchange value. So, one core component of a portfolio will be a store of exchangeable goods.

Of course, exchangeable goods come in a very wide variety. Financial institutions continue to extend this variety at a bewildering pace. The exchange value of a good depends on market conditions which are always changing. Many financial instruments generate interest or dividends alongside their resale value.

The great virtue of exchangeable goods is their flexibility. It’s hard to know exactly what I might need in the future, but whatever exchangeable goods I might have, as long as they have sufficient total value, can readily be exchanged in the future for whatever it turns out I come to need. That very flexibility has a disadvantage too, as the exchange value of goods fluctuates unpredictably.

An exchangeable good has substance beyond its mere exchange value. Gold coins leave scarred earth and poisoned water in their wake. A deposit account at a bank is not merely a number in a file: the deposit account enables the bank to lend money, facilitating further economic activity whose ripples will radiate along untraceable paths. Stock purchases support the activity of corporations.

Accounting can be a useful tool but, like any tool, it has real limits. . There is a sense in which each of us must tend our own garden, but ultimately the actual situation we face is not limited by the boundaries of my garden versus your garden. Accounting can help broaden our view of a situation by keeping track of the many details. The challenge is to avoid getting lost in the details and thereby narrowing our view of the situation and becoming blind to crucial elements and connections.

Useful Goods

There are many goods that we can store for the future, not to take to exchange at the marketplace, but instead to use ourselves somehow. We can store food to eat in the future. We can store clothing to wear in the future. We can store fuel to burn in the future to stay warm. We can store tools to use in the future, for chopping wood or sewing clothes or growing food.

Useful goods have a stability of value that exchange value cannot provide. The nutritional content of a can of beans is not subject to monetary inflation. On the other hand, the can might rust and lose its integrity so the beans spoil. That’s a large part of what makes gold so useful as money: it doesn’t corrode.

Skills

Skills can be divided into two types: those whose value is principally in exchange, and those that are directly useful. If I know how to grow my own food, that is a skill that I can use directly to create happier experiences in the future. Knowing how to operate some large piece of industrial equipment is a skill that I might be able to use in exchange for money with which I can then buy food etc.

Skills can provide a sort of security that no store of goods can match. A farmer or engineer or artist might become a refugee and forced to leave behind all their gold coins and all their cans of beans. But their skills can be very valuable in their new location and enable them again to survive and thrive. The value of those skills does depend on the situation though. An expert coffee farmer’s knowledge won’t go so far in Canada, for example.

Health

Physical health gives a person the capability of responding to situations effectively. A healthy person can apply the skills they have, can adapt them, and can learn new skills. A healthy person needs fewer resources to engage with situations comfortably and happily. This creates a self-amplifying feedback loop: a healthier person becomes more able to produce a surplus that can be dedicated to further good health; a less healthy person cannot so easily produce a surplus and may even find themselves trapped in a deficit situation when can then have a further negative impact on their health.

Community

Friends and family, people who will help you when you can’t help yourself, are valuable beyond any price. It is our place in our community that gives our lives meaning. Community is the vehicle for giving as much as for receiving. Community is the stage on which our lives unfold. Community is the context in which our identity is situated.

In our modern world there is an institutional dimension to identity and community. For example, our credit record is an aspect of our identity. One can move to a new town on the other side of the country and use bank references etc. as a starting point.

An older sort of community connection is based on religion or ethnicity. A style of dress, knowledge of particular songs or myths, everyday ritual habits such as a prayer before meals, these can provide entry into community.

Spirit

The world is a notoriously unreliable place. Whatever beautiful castles one manages to construct, at some point they are sure to tumble down. And yet, somehow, underlying the turbulent waves of experience, there is some kind of truth, some essence, something really beyond our capacity to grasp or beyond any possible grasping. If we can let go of the constant chase after the ephemeral and deepen our experience to live in a way more consonant with that underlying ungraspable reality, there can be an unshakable undertone of happiness that can continue despite the inevitable unending stream of alternating successes and failures. This consonance can grow with cultivation and become the most profound wealth.

Friday, August 8, 2014

A Better Widget

Suppose we have a widget factory. We want a really good widget factory. We want to make better widgets. How can we make better widgets? What does it even mean for a widget to be a better widget?

One standard answer to this question is that a better widget is a widget that conforms more closely to the specification for widgets. The specification defines an ideal widget. If we can make our actual widget to be a very close reflection of that ideal, then we have a better widget.

The usual first step in this improvement process is to quantify the various facets of widget specification so we can measure how close the actual widget is to the ideal. If we adjust the operation of our widget factory, we can then compare the new widgets with the old widgets. If the new widgets give measurements that show less deviation from the ideal, then we have produced better widgets. And of course there are statistics involved. The actual widgets we produce are not all quite the same: some are very close to ideal, some are further off. The whole process of improvement can get quite complex, but it can be driven by statistical measurement and managed quite effectively.

Another sort of better widget is a redesigned widget. We can change the specification. What does it mean for one specification to be better than another?

One way to think about this is to notice that widgets serve some purpose, have some use. Very commonly, widget A is used in the process of manufacturing widget B. Our process for manufacturing widget B is a better process if the resulting actual widget B conforms more closely to its specification. So a better widget A is one that produces a better widget B.

In judging the specification for widget A, we would like to know how well an perfect widget A would function. Some actual widget A might produce a poor quality widget B, but just because widget A itself is of poor quality, i.e. does not conform well to its own specification. The fault is not in the specification.

So we have two notions of quality or of improvement: design and manufacturing. An improved manufacturing process will produce actual widgets that conform more closely to their specification. An improved design will specify widgets that can improve the manufacturing processes in which they are used.

This framework brings up many further questions. The network of widgets, where widget A is used to make widget B, is quite vast. Are there widgets that are actually useless, whose value cannot be measured by their effectiveness in some application? What happens when there are loops in the network, so that the notions of better and worse become (indirectly) self-referential and therefore potentially unstable, ambiguous, etc.?

Another problem occurs because a widget might have multiple uses. A new specification might be better for one use but worse for some other use. Perhaps we really need two different types of widget… but then we lose the savings from economies of scale.

At the limit, in a custom construction situation, the processes of design and manufacturing processes are not clearly distinguished. Widget B is designed and manufactured for just a single use. We may be able to measure the quality of widget B through its effectiveness in its application. But we cannot clearly distinguish the quality of the specification of widget B from the quality of the manufacturing process that produced widget B. So, for example, if we used widget A to produce widget B, measuring the quality of widget A becomes problematic.