## Tree pruning, accounting and mathematics

Well OK, I had a chance to look at a tape of Friday’s episode. There were several items that I’d like to comment on.

We look in on Charlie “pruning a tree.” What is that and what does it have to do with mathematics? A *tree* is a way of organizing data in the memory of a computer. Think of this memory as a bunch of mailboxes, each with an address. A mailbox contains data of some sort. This data can consist of various facts: name, age, social security number, preference in cars etc. for a person, or cash flow on a given date, debt, etc. for a company. A mailbox can also have a pointer — i.e. address — to one or more other mailboxes. For example, a mailbox could have the name, income and other information for the CEO of a company, and also pointers to the mailboxes of, say, the various vice-presidents reporting to the CEO. Each of these VP’s mailboxes could contain personal or financial information about them, together with the addresses (pointers) of the mailboxes for employees reporting to them etc. If the CEO’s mailbox is drawn at the top of a sheet of paper, and the arrows are drawn downward toward the VPs working under the CEO, and more arrows are drawn downward from each of them to the employees working for that VP, then you get a picture that looks a bit like a pine tree (you’ll have to imagine the arrows since they are too hard to type):

CEO

VP1 VP2 VP3 VP4

E1 E2 E3 E4 E5 E6 E7 E8 E9

etc.

There will be arrows from CEO to each of the 4 VPs. There will be arrows from each VP to some of the 9 employees. For example, VP1 may point to E1, E6 and E7, while VP2 may point to E1, E6 and E10. And so on.

This kind of tree is easily constructed in the memory of computer by programers who are trained in setting them up. In practice they can be very big and complicated, with many mailboxes (sometimes called nodes), each with many pointers and lots of data. There can be many more layers than the ones shown here. The “chains of command” can be followed by following the pointers downward.

So, a lot of interconnected data can be efficiently stored in this way, and accessed by following the arrows or pointers from node to node.

The same concept of a tree can be used to store many other kinds of things: relations among people (“family trees”), the relation of words or phrases in a sentence, and the interconnection of suspects in a criminal investigation.

Charlie has set up some sort of tree — we don’t know exactly what the links are — but it has gotten too complicated. There are pointers to nodes that are not really relevent. He is more interested in motives for murder in the corporation than in corporate chains of command. He is interested in financial links, not necessarily in corporate hierarchy. So, to deal with his tree more efficiently, he has to get rid of mailboxes containing irrelevent information. When a mailbox is removed, pointers (arrows) to it also have to be removed so that when the computer follows a path it doesn’t end up with a pointer to … nothing. The process of removing unnecessary nodes and the pointers to them is called “pruning”, for obvious reasons. Setting up, maintaining and analyzing trees is generally considered the work of computer scientists. However, like scientists in general, computer scientists study mathematics to help them analyze the patterns found in constructions like trees. This analysis can involve the creation of efficient algorithms for building and traversing (following the pointers of) trees or for estimating how long it will take to find certain kinds of data in a tree. Charlie is an expert in this kind of math, sometimes called *combinatorics*.

I don’t really know how Charlie’s tree was constructed. If it requires a supercomputer to analyze it, it must be very big, with many and complex paths. It is unlikely that Charlie could have typed this all in, even though we know he had been working on this case in the past — for the Securities and Exchange Commission (SEC).

Whatever Charlie is looking for, the computer must search all nodes by all paths to find it. For example, if each node has 10 pointers, then a 4 level tree of the type shown above could have as many as 1111 nodes: the top node pointing to 10 below it, with each of these pointing to 10 below it (10×10 = 100) and each of these pointing to 10 below it (10x10x10 = 1000). Of course, each level might not contain 10 *different* nodes, but to make up for it, there might be a more complex array of pointers.

This is beginning to get a bit fuzzy here. Why is a theoretical mathematician, who publishes research articles on pure and applied mathematics, doing the job of an accountant and a computer programmer? I know hundreds of professional mathematicians and none of them is involved in accounting (other than doing their taxes). It seems to me very unlikely that Charlie would be moonlighting analyzing financial data for the SEC — I’m sure he’s well-paid and busy in his job at Cal-Sci. But I could be wrong. Any mathematicians out there who do this kind of work?

Is an accountant a mathematician? Depends on what you mean by a mathematician. My dictionary says that mathematics is “the systematic treatment of magnitude, relationships between figures and forms, and relations between quantities expressed symbolically,” and a mathematician is someone who studies or practices mathematics. Simply “using numbers” is not really enough to qualify for being a mathematician: you have to be studying the theoretical patterns in these numbers and expressing them symbolically; or at least using general formulas and equations to solve problem. So, accountants use numbers, but even though the work they do is complicated and hard, it is not using general formulas and equations, so is not usually considered mathematics; thus, accountants are generally not classified as mathematicians.

On the other hand, the creation of modern notions of accounting and bookkeeping sometime in the early renaissance went hand in hand with the gradual acceptance of negative numbers, a concept resisted by even the most creative mathematicians of antiquity. This resistance eventually yielded to the very real (and painful) concept of a *loss*, or deficit, most conveniently represented by a negative entry. This was concealed at first by having a separate page in the “books” for amounts one owed; but, as early as the 12th century, the mathematician Fibonacci was using negative numbers to denote (financial) losses. It was Fibonacci who, among other things, introduced modern number notation — invented in India and used by the medieval Arabs — to Europe.

Well, it’s getting late. In another blog — maybe Wednesday — I’ll tell you about the “vector fields” that Larry uses to describe the water flow (leak) in Charlie’s office, and that seem to inspire Charlie to punningly analyze cash *flow*.

By for now.

No comments yet.

## Leave a Reply