Showing posts with label mathematics. Show all posts
Showing posts with label mathematics. Show all posts

Saturday, November 16, 2024

Mathematics and wokeness don't mix

 kw: book reviews, nonfiction, mathematics, education, polemics

When education becomes indoctrination, genuine learning vanishes. I had high hopes for this book when I saw it: Is Math Real? How Simple Questions Lead Us to Mathematics' Deepest Truths by Eugenia Cheng. As I read, I soon found my thinking sidetracked by hints of lunacy. Then on page 33 the text swerved into a sudden diatribe against white supremacy. Barely a dozen pages later the author, writing of logical reasoning and logical arguments, takes on the "straw man fallacy" (which she retitles the "straw person fallacy") by decrying sundry arguments against the notion of "white privilege". Hmm.

I looked at the profile photo and thought a while. Dr. Cheng is a British-born Chinese, rather young-looking (she's not yet 50, so a generation younger than I am). I lived Jim Crow before she was born; I know genuine white supremacy and white privilege. They hardly exist any more. The constant barrage of accusations regarding these things began during the Obama Presidential campaign in 2007, and continues to this day (it continues despite the fact that this Black activist was elected twice to the Presidency…or maybe because it's him behind the scenes egging it on). Then, along with many other false allegations, they were braided together into "wokeness", which is a slew of anti-white, anti-tradition, anti-family, anti-liberty trends that culminated in "cancel culture."

Muffling my discomfort, I continued reading. In the next chapter a similar tirade erupted, and I had had enough, not even a quarter of the way though the book. Either this math wizard is utterly suborned by leftism, or she's afraid if she doesn't kowtow to woke dictates she'll also get canceled. Either way, she fits the prompt that generated this image: "Defeated female wizard"

Here is my definition of WOKE: Wicked, Obfuscating, Kleptocratic Extortioners. And while we are at it, two of the left's favorite acronyms also belong on the chopping block: DEI = Devilish, Elitist Inversion of truth; and ESG is a total inversion, Environmental mismanagement + Social repression + utter misGovernance.

To be quite clear: Every element of wokeness is evil. The recent election is in part a mandate by a clear majority of the electorate to de-wokify America. Let's laugh the Leftocrats off the stage!!

When I decide not to finish reading a book it is my usual practice to not mention it; just to set it aside and read the next book and review it here. This time I have to pan it. The writing is mediocre but tolerable, the puppyish enthusiasm for topics hardly anyone has heard of is cute but distracting, and while the author's wish to calm the fears of mathophobes is laudable, her methods are off-putting. Far too many times, on rather simple subjects, she urges us to "think really hard about" something or other. Talks about tone deaf! There are many better books about math for those who fear math. This book is most likely to turn math-fearing folks into math-haters.

Thursday, June 13, 2024

We all do it but we think we are bad at it

 kw: book reviews, nonfiction, mathematics, geometry

The book is Shape: The Hidden Geometry of Information, Biology, Strategy, Democracy, and Everything Else, by Jordan Ellenberg, a professor of mathematics who happens to write very well, who has also advised in the production of several films. Thinking about what kind of image to use to illustrate this review, I tried a few prompts with DALL-E3, and settled on this one:

The old geometer in his workroom, surrounded by the tools of his craft, clip art

After several trials, this image in dark sepia appealed to me the most.

The term Geometry means "measuring the Earth", but in practical terms it means to measure earthly things. That's something we all do frequently. For example, my wife and I are in the process of getting a bathroom remodeled, because ancient pipes have given out and the walls and floor need to be destroyed to get at them. We need to buy tile and supplies for the new floor, and a different kind of tile (or other covering) for the walls. What do we do? We take measurements and calculate areas. That's a geometrical task.

When we were in seventh and eighth grade, most of us had Geometry one year and Algebra the next. However, I suspect few of us had an Algebra teacher who showed us that geometry and algebra tackle the same problems from different directions; they are equivalent. What made geometry class so hard for me was the proofs. The Proofs! One needs a certain kind of mind to formulate a Proof. I don't have it. With a lot of painful study, I can figure out all the steps in a proof I have been shown, but I could never have produced it myself, and I soon forget it.

This book is not about proofs (but a few simple ones are shown, perhaps as a kind of inoculation: "See, that isn't so bad, is it?" To which I answer, "Yup, it's bad."). No, it is about geometrical thinking. For example, about trees. Biologically, a tree is a branching structure with a root, trunk, branches, twigs, and leaves. Conceptually, a biological tree is a metaphor for a way of arranging information, such as a family tree, a categorization of machine tools, or the districts and blocks and buildings in a neighborhood. A tree has one specific, critical characteristic: branches don't join back to branches. Otherwise, you have a network.

In a chapter on genealogy (#8, You are your own negative-first cousin, and other maps) the author states that your parents "don't share a known ancestor (unless you are from a truly aristocratic clan)." Not so fast, Dr. Ellenberg. Generally, we consider that a "family tree" is a genuine tree. With you as the root, your parents as the first two branches, your grandparents as the next, and so forth, the tree branches and branches but branches don't re-combine. However, sooner or later, they have to, as author notes in passing. If we look deeper into the situation we can go one better than that. 

In most jurisdictions, it is legal for first cousins to marry. In some, only certain first cousins can marry: they can have a common grandparent as long as the siblings in their parents' generation are of opposite sex. Thus, my mother had a sister and a brother. It would not be legal to marry the daughter of my mother's sister, but is quite legal to marry the daughter of my mother's brother. Such "available" cousins are called "kissing cousins".

Among my ancestors is a certain Joseph Macy, born on Nantucket Island in 1765, son of Joseph Macy and Mary Starbuck. Among his great-great grandparents—there are 16 of them—the surname Coffin appears three times and the name Starbuck appears twice. So he was his own third cousin three different ways. There were ten families that settled Nantucket in the 1600's. Within just a couple of generations, marriages between second or third cousins became necessary, and marriages between first cousins were getting common. So the genealogy of the Nantucket settlers is a bit of a treelike network. There are other interesting cross-links elsewhere in my family "tree", but I'll leave them for a later discussion. I'll just leave you with this thought. Joseph Macy was descended from Charlemagne; and so, of course, am I. The relationship is distant: 39 generations. That many generations ago, I had, formally speaking, 549,755,813,764 ancestors. It's about 550 billion. That implies a lot of cross-linkages in everyone's family tree, once you get back one or two dozen generations. As it happens, according to the data I have at present, I have five ancestors descended from Charlemagne.

Dr. Ellenberg likes long chapter titles. One of the shorter titles is "His style was invincibility" (Ch 5), in which we are introduced to an unbeatable Checkers player named Marion Franklin Tinsley. His story is the backdrop to investigating combinatorial math, using games. Tic Tac Toe is a simple game with a simple strategy, and is a "known game" because of its simplicity. There are 765 possible positions (the "state space"), and about 27,000 possible games, or ways to pass through a series of states in the state space. If two players play perfectly, every game is a draw. What about Checkers? The state space of Checkers is about 500 billion billion, or a 5 followed by 20 other digits. With a state space this large, nobody can learn the whole of it, and neither can any computer so far produced. Just for the record, the state space of the positions in Chess is a 2 followed by 46 other digits. This means that it is possible for a human player to still win either Chess or Checkers against a computer program, but it is very hard, because there are various heuristics (rules of thumb based on experience) that measure the strength of one position relative to another, and a machine can check millions of possibilities while a human player is thinking over five or ten. Then there is Go, for which the number of legal board positions is a number with more than 170 digits; this is an estimate! Considering that the number of atoms in the Universe is a 100-digit number, you would need billions of billions of billions (string out four more "billions") of Universes to contain a computer memory big enough to encompass the state space of Go.

But the process of analyzing any of these games is to build a tree! The starting position of the game is the root of the tree. In a game of Checkers, the number of possible starting moves by the first player is 14. Similarly for the initial moves of the second player, so the two-move state space is 14x14 = 196. These moves vary in how "strong" they are, how likely to lead to a Win. If you have a way to evaluate the strength of each move, you can label the nodes in the tree accordingly.

With each move the state space for that move is another factor that's usually between 12 and 16, until pieces start getting captured (which reduces the branching), and it can exceed 16 when some pieces get longer multi-jump options. It doesn't take long for the number of twigs on this tree to become millions, billions, etc.

The last chapter has the title "How math broke democracy (and might still save it)". It is about Gerrymandering, the practice of setting up voting districts in a state or county so as to favor one political party. This graphic from Statista shows examples from 2020. Redistricting, and thus Gerrymandering, follows each census; it's in the Constitution (the redistricting part!). 

There are many definitions of "fair", and none of them is "fair enough" to satisfy everyone involved. There are many proposals for rules or laws to produce a more "fair" outcome, but again, every such proposal generates lots of heat but hardly any light. 

In 2019 the Supreme Court punted on a possible method to ameliorate the problem. The author was involved, as a co-creator of an Amicus brief. Gerrymandering cannot be eliminated, not so long as people have emotions and a lust for power. The chapter does not end with a conclusion, but with a few tantalizing possibilities. None of them is likely to receive the support of a large enough majority to become embalmed in law. It is clear from the passionate tone of the chapter that this matter is of great importance to the author. Here, Geometry is Power.

Geometry is all around us. We all do it. We all think we are bad at it. It takes a peculiar kind of mind to revel in the proofing process, but just as very few people design the cars that millions of us drive, or the phones we consult so compulsively, we know what we need to know, and as this book shows, we know more than we think we do.

Monday, April 08, 2024

Numbers that forced us off the number line

 kw: book reviews, nonfiction, mathematics, complex numbers, introduction

It is rare for me to post the cover of a book I am reviewing. In this case, when I saw in the subtitle "square root of minus fifteen", I just had to show it. The picture made me think, "What is the beeth root of a yellow tulip?" That's a lot harder to imagine than any even root of a minus number!

I found Imagining Numbers: (particularly the square root of minus fifteen) by Barry Mazur to be a very thorough leading-by-the-hand-gently introduction to "imaginary" numbers (those based on the square root of minus one), and the "complex numbers" that derive from them, . A Complex Number is a two-part quantity; one part is "real" and the other part is a real number times the square root of minus one, called i or j. Thus 1+j and 3-2.4j are complex numbers.

I was introduced to the concept of a number named i (for imaginary) in a high school math class, but in college I primarily studied engineering, where I learned that engineers prefer it to be named j, to get away from the notion of "imaginary." However, for the graphical expression of complex numbers, the horizontal axis is equated to the number line, and is called the R or Real axis, and the vertical axis is called the I or Imaginary axis; there's no getting away from it. One may call the R part the "scalar" part of a complex number, but the other part just doesn't have a good alternative to "imaginary". This paragraph touches on concepts that occupy 2/3 of this book. The latter third focuses on graphical representation.

I was introduced to the graphical expression of complex numbers this way: First it was emphasized that 1 has two square roots, 1 and -1. Then, by analogy, we learned that -1 also has two square roots, j and -j (which is -1×j). Before going further, we got to experiment with multiplying various quantities with j. Then we were asked to imagine how j or -j could be "halfway" between 1 and -1, without being equal to zero. Finally, someone asked, "Then where does that go on the number line?" At that point we were shown that a second number line crosses the usual number line at right angles, forming a Cartesian coordinate system in which the x-direction was the R part and the y-direction was the I part of a complex number. Furthermore, going from 1 to j to -1 to -j and back to 1 again was seen to be a rotation. Doing some multiplication and addition of various elementary complex numbers with one another showed us how they had graphical analogues. Complex numbers are an alternative notation for a polar coordinate system, one based on distance-plus-angle rather than horizontal-plus-vertical. This fixed the concept in our minds. Understanding this was essential to getting the hang of engineering calculus.

Dr. Mazur's genius is in understanding that anyone who can do basic algebra can learn to understand complex numbers. This book takes elementary, easy steps, first through the history of how i was very gradually understood to be something very useful, and not at all "imaginary," and then through the way graphical representation that helps us get the concept and fix it in our minds. Complex numbers and complex analysis are essential for engineering, particularly when cyclical processes are being designed or analyzed.

I must admit to a bit of ennui at times. The author tells us several times that the book is really written for those who don't already understand complex numbers. Anyone who has not delved for decades into engineering math, as I have, will probably find the book a bit challenging, but not boring, and it will draw one along to take in concept after concept.

I must admit, I never did find out why the square root of minus fifteen is emphasized in the subtitle…

Wednesday, April 26, 2023

Mathematical models, useful and otherwise

 kw: book reviews, nonfiction, mathematics, modeling, simulation, cautions, analysis

For a significant part of my career I worked with a group of talented computer programmers in a "skunk works" at an oil company. A colleague and I made up the Modeling and Simulation sub-group among the 20 members of the group. He and I developed software that simulated the production of crude oil and natural gas from kerogen, their migration upward through rock layers, and their accumulation against a trapping layer. No model is useful until it is checked against the real world, what we called "getting ground truth". I visited several exploration offices to show off the software and to use it with data those offices had on hand.

One memorable day in Louisiana, an explorer showed me the 3D seismic survey of one area. He pointed out the most likely source rock and explained the character of other layers, so we entered the appropriate setup parameters, "pointed" the software at the survey data, and let 'er rip. It showed progress over time, of the filling of trapped pools, as growing green blobs on a series of maps. He said, "OK, that blob is 'X' field, that one is 'Y' field,…but what is that?", pointing to a third blob between the other two. I answered, "I don't know, but I suspect it represents a lot of money." As it happened, the company had leases that covered most of the "what is that" area, but a deal had already been made to sell the leases to another company. That company made the money!

I had less exciting encounters with exploration geologists in Europe. The result was the validation of a useful model. Getting "ground truth" turned a simulation program into a tool the geologists could use to rank prospects.

Let me say right now that this tool is a million times less complex than the "general circulation models" (GCMs) used to forecast weather. Crude oil is gummy and moves slowly; air masses in the atmosphere, which are the elements of weather, move rapidly and swirl around on all scales. Oil forecasting is hard, but not as incredibly difficult as weather forecasting. So I was never faced with an irate caller complaining about "shoveling a foot of 'partly cloudy' from [his] @#&% driveway!"

Furthermore, I had the great good fortune to decide early in my career to "let the singers sing and the dancers dance": to turn over to the computer those tasks that are hardest for humans, while retaining tasks for the humans that we do better than computers. This led to very productive synergies. Far too many programmers spend years beating their heads against the wall trying to replace the human element. Futility personified.

I was delighted to read Escape From Model Land: How Mathematical Models Can Lead Us Astray and What We Can Do About It by Erica Thompson. She sets the tone early on by quoting statistician George Box: "All models are wrong, but some are useful." Those who forget to think this way, or never heard this aphorism, get stuck in Model Land.

The author continues with the observation by President Dwight Eisenhower, that "Plans are useless, but planning is indispensable." The thinking behind the model, or the plan, is the great value of the exercise. I also recall what Sun Tzu wrote in The Art of War, "No battle plan survives contact with the enemy." In more peaceable pursuits, contact with "ground truth" exposes the errors of every model. It is our task to determine the tolerable level of error, for we must typically carry on anyway.

A model is a tool. It can help us understand a process, and perhaps inform the solution to a problem. BUT no model solves any problem all by itself. Even better than one model, a suite of models, built with various assumptions and focusing on different sets of driving parameters, can help us set boundaries on the range of outcomes.

It doesn't seem so long ago that the fastest supercomputer needed to run for half a day to produce a 2- or 3-day forecast for a continent-sized area. Now numerous GCMs exist, and the weather forecasters collect the output from all of them. One result is a spaghetti plots of hurricane tracks. In this image, the letter codes such as COTC represent the names of the models used. The characteristics of a spaghetti plot are used to produce the "cone of likelihood" that is often shown.

The situation with climate modeling is far different. Escape focuses on two areas, because of current events. One is climate "change" (spoiler: it is always changing, but on a slow time scale) which is all based on modeling because we can't perform physical experiments. The second is the epidemiology of COVID-19, modeled numerous ways, and almost never properly! The disease fooled the "experts" almost daily, and the societal flailing around that resulted seems to have caused more harm than doing nothing. I called the CDC the "strategy of the week club."

Both phenomena became so intensely politicized that no actual science has been possible. A certain spokesman whose name I hate to utter said, "I am the science." Tantamount to blasphemy. Another group of mostly pundits and a few scientists bludgeoned the public with the notion of "settled science." There is no such thing, except perhaps certain portions of mathematical physics. Neither climate and weather, nor epidemiology, are amenable to mathematico-physics treatment.

I am an educated layman. I went to school in an era in which we were taught critical thinking, and learned to identify bias. Putting on those hats, I can say the following, first about climate, and then about the pandemic.

1) I learned to apply the mathematics used by Arrhenius to study the Greenhouse Effect before I was in high school. The simplest model of the atmospheric response to sunlight with respect to CO2 has four spectral regions:

  1. The Ultraviolet-Visible-Near Infrared region: wavelengths that are not affected by CO2.
  2. Three narrow bands of Medium Infrared in the range 2.5µ-4.5µ, one of which is fully lapped over by an absorption band of water vapor. These have little warming effect, but they are well positioned for optical CO2 detectors.
  3. A moderately wide band of Longwave Infrared centered on about 14µ, of absorption by CO2; the amount of absorption depends on the concentration. This is the "thermal IR" band of interest.
  4. The rest of the Infrared spectrum, Far-Infrared and so on; it is not affected by CO2.

Within region #3 there is a variable level of absorptivity, but once the concentration of CO2 reaches 0.2% (2,000 ppm, comparable to the level during the age of the dinosaurs), the "carbon dioxide window" is effectively "closed". At that point, within that wavelength region, about half of the infrared radiation from the warm ground is absorbed by the atmosphere and is reradiated, half to outer space, and half back down. At a specific temperature a balance is achieved. That temperature is 4°C warmer than the average global temperature in the year 1900. Today, with 400 ppm, we're at 2°C, and it will take much more than another 400 ppm to push into that +4°C region. The relationship is not linear.

What detailed computer modeling can do is to show where the warming is greater, and where it is less. We've been hearing for years that the warming is greater in the polar regions and less in the tropics. The general picture is 6°-7°C warming around the poles and less than 3°C warming in the tropics, when CO2 concentration exceeds 1,000 ppm. At this point the "window" is mostly closed already; extra warming greater than 1°C is unlikely.

The above discussion means that warnings about deadly heat waves in the tropics are overblown. On the other hand, we can expect some frozen polar areas to thaw. One effect I haven't heard the slightest discussion about is that Siberia, northern Canada, and the southern part of South America could be the next breadbaskets. Will the Sahara and Mojave/Sonoran deserts, in Africa and North America, respectively, get even drier and hotter? The computer models are inconsistent. Fretful silence on these questions reflects the uncertainty.

2) The situation of the COVID-19 pandemic, and the incredible array of opinion/ideology presented as "science" is a stunning spectacle. Roughly half the adults in the U.S. think that the crisis was exploited to the hilt for political purposes, partly to remove Donald Trump from office and even more to increase the scope of totalitarian control on the part of the Left. Meanwhile, the other half are thrilled that Trump is out of office, but ambivalent about J.R. Biden's performance.

If there has been any serious modeling of the epidemiology of the C19 virus, I haven't seen it. I've seen numerous toy models presented, followed by lots of screaming to "follow the science". When it became evident that actual science contradicts what the screamers are saying, they took up new mantras about "protecting Democracy" (which really means protecting political power for Democrats). Sadly, I still see people walking alone in near-isolation, wearing a bandanna or cheap mask or, if they have an actual N95 or KN95 mask, wearing it below the nose. Firstly, they are insane to wear the mask at all, and secondly, the "face covering" they are using is not effective. Close to 0%. Nearly everyone who caught C19 after mid-2020 was wearing a mask when they caught it.

There is one and only one valid reason to wear a mask outside, anywhere there is no crowd: To keep the sun off one's face. My wife does this. She wears a mask to keep her cheeks from getting burnt when doing yard work. Never any other time!

There are three simple models that can be used to understand the risks of contracting the COVID-19 virus, SARS-COV2, when outside, with or without a mask. Firstly, except in very humid weather, the virus aerosolizes rapidly. The tiny droplets that a mask would stop evaporate completely in just a few minutes. You can look up the formula (the first "model") to calculate how long a droplet of size 1µ or 5µ will evaporate, at different levels of humidity. That means that the virus particles, which have a diameter of about 120nm (0.12µ), are what your mask has to stop. This introduces the second model.

A N-95 mask is called that because it catches 95% of particles (virus or otherwise) in the size range near 300nm, where the mask is least effective. It is very nearly 100% effective for larger particles (which are caught mechanically) and smaller particles (which are caught electrostatically). Particles in the 120nm range are caught electrostatically with an efficiency near 97%. Think a moment. If there are few viruses about, only 3% of them will get through the mask, if you wear it correctly. But suppose you enter a very crowded area that includes perhaps half a dozen folks who are coughing out C19 particles. Then, 3% of that viral load may well be enough for you to be infected. It is a numbers game.

Thirdly, during the daytime the C19 virus is about twice as susceptible to being disabled by solar ultraviolet as the Ebola virus. I worked out the numbers: Between 10 AM and 2 PM solar time, 90% of virus particles exposed to sunlight are inactivated within about 45 minutes. During the next 3/4 hour, 90% of whatever is left is inactivated, and so forth. It's a statistical function, now long it takes before a UV photon strikes a particular virus particle in a vulnerable spot.

Now we can pull back from my cogitations and look at the book's conclusions. The main problem with any model is the person who uses it. A model will give definite results, but it is easy to forget that those results pertain to the model, not to the system being modeled. They may be close, or they may not. But properly used, a model helps you think about a system of interest. It can't decide for you! Letting models do the deciding is always, always, a travesty.

What does the author suggest? How can we escape from Model Land? Five points form the meat of the last chapter:

  1. Define the purpose. That purpose better not be "decide for me." The purpose has to include capturing the relationship between all the relevant parameters and the results. All...but learn what to neglect.
  2. Don't say, "I don't know". Ask, "What do I know now that I didn't know before?"
  3. Make value judgments. Every model reflects someone's values. Make sure the values behind the structure of a model are the right ones. Remember: genuine science is value-free. YOU supply the values.
  4. Write about the real world. Bring the model's conclusions into the real world, by getting "ground truth", for example.
  5. Use many models. Consider the spaghetti plot of the hurricane, shown above. If the system is "too simple" for multiple models to be generated, perhaps it is simple enough to comprehend without mathematical modeling.

It takes work just to understand this list. It is worth it! It takes much more work to carry out a modeling exercise that doesn't trap you in Model Land without an exit. I used a Jumping Ship metaphor at the start of this piece to show that sometimes we need to get far away, to seek a really different perspective. This is an extension of Principle #5 above.

Finally, consider this: You have two eyes for a reason. It is not just for parallax, to find out the 3D aspect of the situation. It is for completeness. Except in very simple views, your right eye will see something your left eye cannot, and vice versa. Even more, if you have someone standing near you, each of you will see things the other does not, particularly if you're looking in different directions. Using a numerical or mathematical model in too simple a manner, and yielding too much authority to it, is like viewing a complex scene using one eye from one viewpoint. I leave you with this proverb: "If two people have exactly the same opinion about everything, one of them is redundant."

This book is a great read!

Monday, April 24, 2023

BARD figures it out

 kw: analysis, artificial intelligence, experimental linguistics, mathematics, computer science

Continuing my exploration of the capabilities of BARD, I asked it about some computational and mathematical matters, starting with one that was relevant to recent work I have been doing. I'll comment along with each interaction this time.

P07: Two angles are related by the function A = arctan(sec B * tan B). Given A, what is B?

Bard: The given function is not invertible, so there is no unique value of B that corresponds to a given value of A. This is because the tangent function is periodic, with a period of 180°. This means that for any value of A, there are infinitely many values of B that will satisfy the given function.

For example, if A=45∘, then B could be any value in the range (−45∘, 45∘). Or, if A=90°, then B could be any value in the range (−90°, 90°).

In order to find a specific value of B that corresponds to a given value of A, you would need to specify additional information about the problem. For example, you might know that B is an acute angle, or that B is a right angle.

P07: In the above problem, both A and B are in the range 0° to 90°.

Bard: In that case, there are two possible values of B for any given value of A. For example, if A=45°, then the two possible values of B are 45° and 135°. This is because the tangent function is positive in the first and third quadrants, so the two possible values of B are the two angles in the first and third quadrants that have a tangent of 1.

In general, the two possible values of B can be found by solving the equation

[recast by P07]                  tan B = ± tan A / sec B

For example, if A=45°, then this equation becomes

[recast by P07]                  tan B = ±tan 45° / sec B = ±1 / √2

Solving this equation, we find that the two possible values of B are 45° and 135°.

The original statement is correct, though not only for the reason BARD presented. This is an example of a Trapdoor Function. If angle A is known, it is straightforward to calculate angle B. But if only B is known, finding A requires an iteration, such as successive applications of Newton's Approximation.

BARD treated this like a Diophantine problem, and ignored the restriction of B to (0°, 90°). Further, the answer is incorrect. Tan 45° = 1, sec 45° ≈ 1.414, so 1 is being equated to √2.

P07: Are you able to chart a function?

Bard: Yes, I can chart a function. I can use the following steps to chart a function:

1.       Identify the domain and range of the function.

2.       Choose a few values of x and calculate the corresponding values of y.

3.       Plot the points (x,y) on a graph.

4.       Connect the points with a smooth curve.

For example, let's chart the function y=x2. The domain of this function is all real numbers, and the range is all non-negative real numbers. We can choose a few values of x, such as x=0,1,2,3, and calculate the corresponding values of y, such as y=0,1,4,9. We can then plot the points (0,0), (1,1), (2,4), (3,9) on a graph and connect them with a smooth curve. The resulting graph is a parabola that opens upwards.

P07: Can you draw the chart?

Bard: I can't draw a chart for you here, but I can give you a description of the chart of y=x2.  The chart is a parabola that opens upwards. The vertex of the parabola is at (0,0). The x-axis is the line of symmetry of the parabola. The parabola approaches the x-axis asymptotically as x approaches ±∞.

This is just as I expected; BARD is linguistic in nature, and has no graphical capabilities...yet!

P07: What is the integral of Sqrt(sec(x)*tan(x))?

Bard: 



The line above needed to be a picture.

To solve this, we can use the following steps:

  1. Let u = sec x. Then du = sec x tan x dx.
  2. Substituting gives us:

Code snippet

∫√sec(x)tan(x)dx = ∫√u du = 2√u + C = 2√sec(x) + C

where C is an arbitrary constant of integration.

P07: Can a computer store the exact value of an irrational number?

Bard: No, a computer cannot store the exact value of an irrational number. This is because computers store numbers in binary, which is a finite representation of numbers. Irrational numbers are infinite, so they cannot be represented exactly in binary.

For example, the number π is irrational. It is a non-repeating, non-terminating decimal number. This means that there is no finite sequence of digits that can represent π exactly. If we try to store π in binary, we will only be able to store an approximation of it.

The same is true for all other irrational numbers. They cannot be stored exactly in binary, so they can only be approximated.

However, this does not mean that computers cannot use irrational numbers. They can still perform calculations with irrational numbers, as long as they are aware that the numbers are being approximated.

The only quibble I have with this answer is the word "they" in the last sentence. Computers aren't aware of anything. It should read, "…as long as those using the program are aware…"

P07: What is Green’s Theorem?

Bard: Green's theorem is a theorem in vector calculus that relates a line integral around a simple closed curve C to a double integral over the plane region D bounded by C. It is the two-dimensional special case of Stokes' theorem.

In mathematical terms, Green's theorem states that

Code snippet

∫CF⋅ds=∬D(curl F)⋅k dA

Use code with caution. Learn more [link to https://bard.google.com/faq#coding]

where

  •         F is a vector field defined on a two-dimensional domain D
  •         C is a simple closed curve in D
  •         ds is the line element along C
  •         dA is the area element in D
  •         curl F is the curl of F, which is a vector field that measures the circulation of F around a point
  •         k is the unit vector in the z-direction 

Green's theorem can be used to solve a variety of problems in physics, engineering, and mathematics. For example, it can be used to 

  •         Calculate the flow of a fluid through a region
  •          Determine the area of a plane figure
  •          Find the centroid of a plane figure
  •          Solve boundary value problems

 Green's theorem is a powerful tool that can be used to simplify and solve a wide variety of problems in vector calculus.

BARD then referred to the Wikipedia article on Green’s Theorem, and suggested three Google searches on the topic. I then asked about one term used in the description.

P07: What is the curl of a function?

Bard: In vector calculus, the curl is a vector operator that describes the infinitesimal circulation of a vector field in three-dimensional Euclidean space. The curl at a point in the field is represented by a vector whose length and direction denote the magnitude and axis of the maximum circulation. The curl of a field is formally defined as the circulation density at each point of the field.

In other words, the curl of a vector field is a vector that measures the rotation of the field around a point. The curl is zero at points where the field does not rotate, and it is nonzero at points where the field does rotate. The direction of the curl vector indicates the direction of the axis of rotation, and the magnitude of the curl vector indicates the magnitude of the rotation.

The curl of a vector field can be calculated using the cross product. The cross product is a mathematical operation that takes two vectors and produces a third vector that is perpendicular to both of the original vectors. The direction of the cross product vector is determined by the right-hand rule.

The curl of a vector field can also be calculated using the curl operator. The curl operator is a mathematical symbol that represents the curl of a vector field. The curl operator is written as a counterclockwise cross product, and it is applied to the vector field.

The curl of a vector field has many applications in physics and engineering. For example, the curl of the velocity field of a fluid is used to calculate the vorticity of the fluid. The vorticity of a fluid is a measure of the rotation of the fluid. The curl of the electric field is used to calculate the magnetic field. The magnetic field is a vector field that describes the direction and magnitude of the magnetic force.

The curl is a powerful tool for analyzing the behavior of vector fields. It can be used to calculate the rotation of a vector field, the vorticity of a fluid, and the magnetic field. The curl is an important tool in physics, engineering, and other fields.

BARD referenced a Wikipedia article on the subject. In an alternate draft BARD added:

The curl of a vector field F is denoted by ∇ × F. In three dimensions, the curl can be computed using the following formula:

Where F1, F2, and F3 are the components of function F.

Not being a vector calculus expert, I had to ask for the definition of the inverted delta.

The symbol ∇ is called the nabla symbol. It is a triangular symbol resembling an inverted Greek delta: \nabla or ∇. The name comes, by reason of the symbol's shape, from the Hellenistic Greek word νάβλα for a Phoenician harp, and was suggested by the encyclopedist William Robertson Smith to Peter Guthrie Tait in correspondence.

In mathematics, the nabla symbol is used to represent the gradient operator in calculus. The gradient is a vector that points in the direction of the greatest rate of change of a function, and its magnitude is equal to the magnitude of the rate of change.

The nabla symbol can also be used to represent other vector operators, such as the divergence and the curl. The divergence is a vector operator that measures the outward flux of a vector field from a surface, and the curl is a vector operator that measures the circulation of a vector field around a point.

The nabla symbol is a powerful tool that can be used to represent a variety of vector operators in mathematics. It is an important symbol in vector calculus and has many applications in physics, engineering, and other fields.

Sources:

  1. brainly.in/question/12687051 
  2. en.wikipedia.org/wiki/Nabla_symbol 
  3. mathoverflow.net/questions/289607/mathematical-objects-whose-name-is-a-single-letter  

BARD did what I would have done, look these things up in Wikipedia and math sources such as those it listed following its response. Green's Theorem was the bugaboo of a Senior-level course in Physics I took many, many years ago.

Here we see BARD doing less linguistic generation and more copying of sources.




Friday, January 06, 2023

Numbers too dangerous to imagine

 kw: book reviews, nonfiction, mathematics, number theory

For us ordinary folk, and for most scientists, the numbers on the balance are the limits of practical need. On the right: Avogadro's number, the quantity of protons in one gram of hydrogen. On the left, the long number with lots of leading zeroes is the weight of a proton in grams. Note the little "1/" above it: that makes the quantities balance. I left neutrons out of the discussion because the mass of a neutron is 0.14% greater than that of a proton.

For our more day-to-day experience, we've become accustomed to hearing "trillion" (a million millions) in news about government spending (but I remember a time that the entire Federal budget was much less than one trillion dollars), but few of us ever handle amounts larger than a few hundred thousand dollars, such as writing the check (heavily underwritten by our bank loan) for a house. And we may be familiar with numbers like milligrams or even micrograms (the weight of an average sand grain). That's about it.

Antonio Padilla would like to expand our horizons. A lot. A whole universe/multiverse of a lot. He begins his book Fantastic Numbers and Where to Find Them: A Cosmic Quest From Zero to Infinity by promising to describe a number so compendious that, if it were possible to memorize it in total, the mass of the information would collapse our brain into a black hole. Yes, information has mass. One "bit" of information stored in a computer memory chip has a tiny mass, much less than that of a proton. So does the same information held in our memory. However, the number of neurons available to hold memories (most are used for various thinking tasks), may be a few billion, although the "bits" of memory may be in synapses, at the rate of a few thousand per neuron. So perhaps we have the equivalent of several trillion bits of memory. Some think it is more like a quadrillion (1,000 trillion). Regardless, the mass of our memories is less than the mass of one proton. How many digits must be in a number that "weighs" 67,331,765,482,045,288,639,033,395 kilograms? (I got this number from the Schwarzschild Radius Calculator, using 10 cm for the radius of the "brain".)

Time for a sidebar about scientific notation. We don't readily comprehend numbers written out in full when they have more than 4-6 digits. Zeroing out most of the digits above, we can write that number as 6.733x1025 kg. The exponent 25 tells us how many digits are after the decimal point. Similarly, the number on the left of the scale above is easier to comprehend as 1.672623x10-24, the mass in grams of a proton. The exponent -24 tells us how many digits, including the leading "1", follow a decimal point far to the left. Its companion on the right is 6.022x1023.

The "black-hole-in-a-brain" number has so many digits that the exponent has more digits than there are protons in the observable universe. It is called Graham's Number, and is so far the largest number used in a mathematical proof.

Before he gets to Graham's Number, though, Dr. Padilla takes us through some "easy" steps. His first chapter deals with the number 1.000 000 000 000 000 858. There are 15 zeroes in there. Scientific notation doesn't help here! This is the amount of time dilation experienced by Usain Bolt at his peak running speed of just under 30 mph (13.4 m/s). In sub-chapters, we read of various phenomena besides relative velocity that affect the flow of time, such as changing gravitational force on mountain tops or in ocean deeps. Chapters for Googol and Googolplex follow. A Googol is a one followed by 100 zeroes, or 1.0x10100. A Googolplex has a Googol of zeroes: 1.0x10Googol or (I have to use a graphic):

Think about that repeated exponent for a moment. It gets one somewhat ready to think about Graham's Number. Using a somewhat different notation, there are 64 levels…or perhaps 64 groups of levels of increasing size. I wasn't too clear, but, I don't want to be swallowed up by a black hole anyway. Graham's Number represents the extreme limit of the number of steps that may be needed to solve a particular problem. Needless to say, no physical computer system will even be able to count the steps, let alone perform them. Perhaps God's computer could do so, but I can't imagine Him being willing to devote the resources to perform the task.

The second section of the book starts with Zero, "a most beautiful number", and goes on to a few special numbers that are very, very close, but not quite there. One is "the most embarrassing number", 1x10-120 (it has 119 zeroes before the "1"). That is the ratio between the amount of "vacuum energy" we can measure using the Casimir Effect, and a calculation of what the energy ought to be, using quantum theory.

It's the biggest blunder in physics! If quantum theory is true, right down to the smallest scales, no universe larger than a golf ball could exist without immediately collapsing back into a "big crunch". Clearly, we are missing something. Even if we limit the reach of quantum theory to the scale of a proton, no universe larger than the size of Manhattan is possible. The author and others think string theory will rescue the situation. I doubt it; not anytime soon. The last I learned, the number of possible variations of "string theory" is about 10500. That's a Googol to the fifth power (Googol5). It isn't even possible to make a list of string theory candidates so they can be compared.

So what could come next? Infinity of course! The famous sideways-eight (∞). One chapter is plenty, even though, as we come to find out, there is more than one kind of infinity. Rather than try to explain the difference between Georg Cantor's Aleph-null and Aleph-one infinity—and we don't know if there isn't a "real" Aleph-one, or more, in between!—I'll leave it to you to read this enjoyable, idea-packed book.

-----------

Now I must touch on less pleasant matters. I wish Dr. Padilla had employed a copy editor; if he had one, that person needs a new day job.

  1. While discussing time dilation (Usain Bolt's running speed), he dwells on a solar sail that might reach 1/5th the speed of light. Then he goes on to say that time dilation would mean a bacterial stowaway (or an onboard clock) would experience time slowed such that the 20-year journey to Alpha Centauri (4.37 light-years away) would seem to take less than nine years. He slipped a decimal somewhere. The time dilation factor is the square root of [1 - v²/c²], which I calculate to be √[1-0.04] = 0.9798. Now, 4.37x5 = 21.85 years (classical), which time dilation reduces, for shipboard bacteria and clocks, to 21.4 years. To reduce the time to nine years requires about 90% the speed of light, not 20%.
  2. Two places I find the phrase, "The precise value of..." something, and a number with two or three digits of precision. The number "precise" should have been left out, or even it should have been stated that "The value of [whatever] is about..." The numbers in question are known to a precision of nine digits. This I attribute to the author.
  3. This is a little less consequential: "100 billion neurons in the human brain." An up to date number is 86 billion, plus or minus a couple of billion. Also, 80% of our neurons are in the cerebellum, where they regulate our bodily functions and communicate with the 16 billion (more or less) neurons of our cortex, which is where thinking happens, and where all memories seem to be stored. Our vaunted intelligence primarily resides in those 16 billion.
  4. This is a biggie, but it comes down to a simple copy/paste error. On page 190 we find "A quick reference guide to all the particles you'll encounter in this chapter", along with a chart of the Standard Model of particle physics. However, the Lepton portion of the chart is a copy of the Quark portion. The Lepton portion should show the electron, the muon and the tau, and their associated neutrinos. Big oops! I can't believe all the folks who wrote glowing blurbs praising the book (for its back cover) didn't see that. I suspect none of them read the book in full.
  5. In the chapter on 10-120 I find the phrase "external to spacetime", about an "external mechanism". As I understand cosmology, there is nothing external to spacetime. This is nonsense.
  6. Finally, a simple typo. At the bottom of a table on page 282, "…infinities of site [Aleph-1]" should read "…infinities of size [Aleph-1]".
This is what I noticed without "looking for trouble." I have edited for others. In "editor mode" I might have found 2-3x as many items needing attention. Now, for those who've read this part, please don't hold it too much against the author. The book is full of wonderful ideas. I still mightily enjoyed the book.

Friday, June 03, 2022

A shortcut is not cutting corners

 kw: book reviews, nonfiction, mathematics, science, sociology, efficiency

"Work smarter and not harder," was a proverb of a good friend. He supervised a group of 21 superprogrammers, myself included, in a skunk works inside Conoco's research department. Contrary to a stereotype that hyper-fast coders are less creative, the group produced an incredibly creative array of tools for the oil exploration community. One of our secrets was access to a huge library of well-written subroutines and functions, including one called IMSL ("SL" means "software library"; I don't know what "IM" means). Our group motto was, "Don't write what you can appropriate." That last could be the motto of the mathematical establishment, beginning at least with Isaac Newton, who claimed that the source of his productivity was "standing on the shoulders of giants."

I was delighted to see the title: Thinking Better: The Art of the Shortcut in Math and in Life, by Marcus du Sautoy. I was even more delighted as I read his accounts of shortcuts, mathematical and otherwise, that have simplified processes of all kinds. Finding a way to do something better can often be arduous and time-consuming, but it makes things ever so much better in the long run. Dr. du Sautoy likens it to making a tunnel through a ridge or mountain; for example, the Gotthard Base Tunnel that traverses 57 km beneath the Alps took 17 years to dig, but now trains traverse it in 17 minutes. There is a road over an Alpen pass which takes you from one end of the tunnel to the other, if you want to drive about an hour on frequently scary mountain roads.

The development of numbers—from notches cut in a stick, to systems such as the Mayan (1-2-3-4 dots, then a bar), and onward to the positional notation we call "Arabic numerals"—is a series of shortcuts in the technology of counting. The Romans took a side step, similar to the Mayan system, but less flexible in their handling of numbers greater than 10. Anyone care to use the Roman system to convert my height in inches (LXXII) to centimeters (CLXXXIII), with the conversion "factor" being to multiply first by 254 (CCLIV) and then divide by 100 (C)? And while we're at it, look at the Babylonian numbers shown at the right. They counted to 60, not 10, and they used positional notation (extra big spaces between symbols) for counting beyond 59.

The first shortcut, the one that begins the book, is finding patterns. Agricultural seasons are a pattern that repeats yearly. Other patterns overlie it; El Niño and its opposite La Niña comprise a multiyear climate pattern that was recognized by the Incas, centuries before we had satellite sensing to discern the ocean-wide pattern that drives it.

Each chapter has appended to it a "Pit Stop"; the first, is Music. Music appeals to us not only because of the pleasing sounds of tones and chords, but also the patterns. We can often recognize a song just from the drum beat. Poetry of the traditional type, with rhyme and rhythm, is music without the harmony. The patterns in the lyrics or poems help our memories retain songs and poems. Song must have preceded language, because aphasics (those with a damaged left temporal lobe who cannot speak) can still sing. As infants we are comforted by the rhythm of our mother's heartbeat.

Jumping to Chapter 5 (because I want to keep this review shorter than the book) we find Diagrams. We all know, "A picture is worth a thousand words," and a well-designed diagram or chart or graph is frequently worth 10,000 words. For example, this chart of the Federal Reserve's M2 Money Supply over the past decade shows how the recent jump in inflation, which began in early 2020, is directly a consequence of the various "stimulus" packages and other Federal spending programs; thus the historical truism, "Increased inflation derives from too much money chasing too few goods." The gradual slope prior to 2020 shows total inflation of about 6% yearly (one must subtract out the population increase of about 2% yearly, leaving the 4% increase that the Consumer Price Index reports). For the past two years, divide 21,800 by 15,500 to get 1.406, and take the square root to get an average of 1.186, or 18.6% for each of the past two years. Then subtract population growth (2% each year), for 16.6%, which is the real figure (a closer look shows it was worse in 2020 and a little better in 2021).

I picked an economic example because the Pit Stop for this chapter is Economics. There the author discusses the "doughnut economic diagram" that Kate Raworth discovered (and wrote about in Doughnut Economics, a book I think I'll track down). Outside the doughnut (du Sautoy is British; here we spell it "donut") we find nine external influences on the economy, such as pollution and groundwater withdrawal, and in the donut hole we find twelve internal influences, such as housing, networks and food. An increase in the external matters can overstretch an economy and put it in danger; a shortfall in the internal matters puts it in danger from the opposite direction. The donut is the "safe economic space". It's a powerful image.

One other I'll mention, Chapter 8, Probability. Here we find a great discussion of the way statistical tools can be used to take the measure of something large, such as the net worth of 150 million households, by sampling in an appropriate way. In the statistics courses I took, the "appropriate way" was a huge subject, because there are so many ways to get it wrong, whether from malice or incompetence. Sampling biases are the basis of the statement, "Figures don't lie, but liars figure." Polls from Pew Trust or Gallup are based on sampling, hopefully appropriately, to get the mood of the population on something. Some polls are renowned, others reviled. 

The chapter also touches on the Bayesian method. This is a way of making an estimate based on what we know, and updating that estimate as we learn more. Numerically, Bayesian Statistics are a little bit tricky to learn, but the principle is actually something we all do. For example, from our upbringing (and perhaps some genetics) we have a default level of trust that we confer on others. When we meet someone new, we may trust that person to a certain extent. Over time, we observe how that person performs, and if that one is very trustworthy all the time, our trust will grow; otherwise, we will withhold trust more and more.

Interestingly, the Pit Stop for this chapter is Finance. I am not sure how that morphed into a discussion of ways to profit from the stock market, based on the work of Ed Thorp (who wrote both Beat the Dealer about blackjack and Beat the Markets about stocks and warrant hedging). But the discussion morphs again to the value of having multiple viewpoints, such as that of the historian he interviewed about her success as an investor! It reminds me of the bibliography of my Thesis, in which are found references to an article by Leonhard Euler 250 years ago and a work on civil engineering by Werner Romberg in 1955: I was simulating heat flow and fluid flow under the primeval Black Hills… It took my committee members a while to get used to the very diverse viewpoints I drew together.

The last chapter draws attention to some things for which no shortcut exists. In mathematics, and life in general, operations that are easy when there are a few things to deal with get harder when more things are added. Some tasks get harder so rapidly that dealing with more than a handful of items is practically impossible. An example is the Traveling Salesman problem. Given a list of a dozen stops, and the need to return to the starting point (the sales office, perhaps), how should the salesperson order the stops? Even with just twelve stops, the number of possible routes is called "twelve factorial", with 12! as the symbol. 12! equals almost half a billion. Of course, we can quickly shorten the list "by eye", but there may be ten or more possible routes that all look similar. Then we just have to try them all, perhaps by adding up the miles for each. 

Interestingly, there is a shortcut that is not mathematical (the book doesn't mention this). It's not hard to determine that certain ways to go don't make sense, by looking at a hand drawn map where the roads that exist are shown by scaled lines between the points. For the roads you want to use, cut pieces of string that match the length of the roads, and attach them, possibly by gluing to colored beads. Now, hold the mass of string by the bead for the home office, and observe which bead is at the bottom. The strings that are straight show you the shortest route to the farthest point. Note these roads down on the map you started with. Then cut all those strings. Now, hang the remaining mass of string by that farthest point. There may be a single "tightest" route back to the home office, or there may be another "next farthest" point. If the latter, repeat the above process. Otherwise, if all the beads are attached to a tight string, you have your return route. There may be one or two that are off to the side. Just add the road to and from them as needed. This may sound a bit tedious, but it is much faster than having your computer run half a billion tests. Wayfinding is similar, without the need to return home. In this case, you have a single destination in mind. Make the string model for all the routes that possibly make sense (there will usually be just a few). Hold "home" up and see which set of strings is straight. That's your shortest route. In a GPS navigator, the wayfinding program factors in speed limits, and makes estimates of how many seconds or minutes delay one may encounter on a street with stop signs or stop lights, and uses travel time on each street instead of pure length. 

In the concluding chapter the author gets a bit philosophical. Sometimes, taking the fastest way (a helicopter ride to a mountaintop, for example) is not the way you really want. The experience of the climb is more important than taking the shortest amount of time. Sometimes it is good to take the "scenic route" (I do this a lot). And I like his concluding paragraph:

"A shortcut is not a fast way to finish your journey, but rather a stepping-stone to beginning a new one. It is a pathway cleared, a tunnel dug, a bridge constructed to allow others to quickly reach the frontiers of knowledge so they can make their own journey into the darkness. Equipped with the tools that Gauss and his fellow mathematicians [pick your own heroes of efficiency!] through the ages have honed, stretch out your arms for the next great conquest." [the bracketed sentence is not part of the quote, it's my suggestion]

I hate it when a book I like so much has an error. On page 52, in an explanation of the Mayan number system, based on 20 rather than 10, we read, "111 in Mayan represents 1x20² + 20 + 1 = 4041." Oops! 20² = 400, so the result should be 421, and for clarity the expression should be 1x20² + 1x20 + 1 = 421. 

Tuesday, December 07, 2021

Mathematics – behind the scenes of everything

 kw: book reviews, nonfiction, mathematics, applications

After a forty-year career as a scientific programmer, AKA "coder", I can look back to see that I was primarily a working mathematician. The scientists whose methods I embodied in computer code were, of course, having the computer "do the math", but I frequently had to correct their math. They were all brilliant, but one cannot always expect someone whose life has been devoted to chemical engineering or mineralogy or seismic analysis to have kept up their math skills over the prior couple of decades. On the other hand, I greatly enjoyed calculus and other "mid level" math operations, so I was "up" on what they needed and could make sure they used the math properly. I don't claim to understand perhaps 90% of the higher level math in the current literature. But I understand enough that I could make a career of it. 

In all that time, I developed only a few new methods, and published only a single peer-reviewed article, to be found at Science Direct. The abstract is open. Sadly, the article is behind Elsevier's paywall. But the key takeaway is this: I had to develop new methods to numerically solve the very stiff differential equations used by physical chemists studying the conversion of organic grunge (they call it kerogen) into crude oil. Relevant to the current book, I used methods called "convergence acceleration", which were developed before crude oil was a thing. In particular, one method was first used to study stresses in earthen dams, and another was used by Leonard Euler in the mid-1700's, for a project I don't now recall. I borrowed a couple of related methods from a theoretical dissertation by a colleague at my graduate school.

What's the Use?: How Mathematics Shapes Everyday Life, by Ian Stewart, a retired Professor of Mathematics who has at least five times my expertise, is based on a notion first expressed by Eugene Wigner in a 1960 article titled The Unreasonable Effectiveness of Mathematics in the Natural Sciences.

Wigner was not remarking on math's broad effectiveness. That isn't hard to understand. Rather, mathematicians and others who use lots of math find that methods, perhaps derived for specific problems, or perhaps for their theoretical beauty, are found to be useful in realms so remote that it seems miraculous. As the author points out, some say, "The Universe must be made of mathematics!"

The book starts off with a brief historical survey, reaching back far beyond Leonard Euler. However, Euler is responsible for a breakthrough in complex analysis that led to a formula, called Euler's Identity, which displays the essential unity of all mathematics:

The five symbols, here related by two operators (the "+" and the "="), are combined into an astonishing expression. Let's unpack them, from right to left:

  • 0, zero: Before the year 1200AD, the zero as a placeholder had been in use for about 500 years, but was not yet accepted as a number, outside of India and China. Only in the 1700's (in Europe) were zero and the negative numbers accepted as numbers, making subtraction, for example, immensely more useful.
  • 1, one: The first of the "natural numbers" or "counting numbers" is the original number.
  • π, pi (pronounced "pee" in Greek, but most of us say "pie"): This is the ancient symbol for the ratio of the circumference of a circle to its diameter. Millennia of effort to "square the circle" were based on the belief that π is a rational number (one that can be expressed as the ratio of two natural numbers; 335/113 is a useful approximation, but is not exact). Only in the 1700's was it proven that π is an irrational number, which is expressed by a string of digits that never ends and never repeats. Being related to the circle means it is the basis of trigonometry, but that is only the beginning!
  • i, the "imaginary" number: This is the square root of minus one. It has no place in any of the hierarchy of "number line" numbers: natural numbers, integers, rational numbers, and irrational numbers, which together constitute the "real" numbers. The combination of a real number and some real-number multiple of i is a complex number. Complex numbers became useful when it was realized that they represent coordinates in the plane.
  • e, Euler's number: This was originally the base of natural logarithms, which show up in the solutions to many calculus problems. It is named for Euler, but was actually assigned by John Napier a century earlier, when he developed natural logarithms. Its value is approximately 2.7182818285… e and π are the first two irrational numbers to be proven to be transcendental, which has an esoteric meaning related to polynomial derivations. Many (infinitely many) irrational numbers are the solutions to polynomial equations, but most (more infinitely many!) are not. However, they are hard to find. Natural logarithms and their inverse, exponential expressions, are found everywhere in both calculus and complex analysis.

The hard part, which seems magical to many, is to evaluate eix, where x is some real number, and then to show that when x = π, the expression's value is -1. Endnote 50 in What's the Use? is a very short proof that exponentiation with i becomes a rotation, meaning a trigonometric combination: eix = Cos(x) - i*Sin(x). When x = π, the Sin part equals 0 and the Cos part = -1. This is the connection to π.

Why is this important? Much trigonometric algebra is much easier to carry out in this form. The operations automatically keep track of all the Sin and Cos functions that are embedded in the exponential expressions. Electrical engineering, frequency analysis, and a host of other disciplines would be either impossible or a great deal more difficult without complex analysis using exponential expressions.

What does this have to do with everyday life? Cell phone communications use digital decomposition and reconstruction of audio signals. Getting the digital signals transmitted efficiently requires some high-powered math. Turning a song into an MP3 file, so it takes up 1/10th or 1/20th the space on your hard drive (or phone memory) is a several-step mathematical exercise. Doing the same with a visual image to produce a JPG file is similar, and the five steps, drawn from five quite diverse realms of mathematics, are described—in brief!—in Chapter 10, "Smile, Please!".

Before getting to that point, however, the author discusses efforts to allot voting districts "fairly", describing several definitions of "fair", along with at least some hints of a proof that no matter what you may call "fair", it can't be done perfectly. He discusses the relationship between a problem involving seven bridges and two islands, that is actually insoluble, but is related to equitable ways to allocate kidneys for transplants, which is soluble. The way encryption works in your web browser (and email, I hope!) and your phone is based on "trap door functions" which are, of course, mathematical in nature. He also shows ways being developed to make much stronger trap doors to cope with the immense computing power that quantum computing just might deliver. Then, we have Einstein's theories of relativity (there are two, Special and General): both are needed to get GPS to function accurately, in addition to several other realms of mathematical operations.

There are 13 chapters showing that math is hidden behind a great deal of what goes on in the world. Civilization is impossible without it. In case this fills you with dread, remember that you don't have to be an automotive engineer to drive a car, but we do need some automotive engineers to have cars to drive. Thus, not all of us have to understand higher math to use our GPS, cell phone, or microwave cooker, but there need to be some pretty bright mathematicians out there to make these things work.

Don't shy away from this book because it is about mathematics. The author's writing is very readable, and he does his best to help us glimpse the way some of these things work. One book won't make much of a dent in your struggles with algebra, or calculus, or whatever. But it will yield an appreciation for the unreasonably diverse ways almost any mathematical development could be used for practical things later on.

Sunday, October 31, 2021

We all say we hate it but we all do it

 kw: book reviews, nonfiction, science, mathematics, geometry

…No, my subject is not Sin (but that would be equally true), but Geometry. But before we go on, let me tell a story.

My brother and two close friends took several courses in college together, including a math class that emphasized proofs. I'll conceal identities here, and just represent my brother as Art, and his friends as Bob and Cal. They all did pretty well in their "math proofs" class. Art studied diligently and did well, while Bob struggled mightily to keep a "B" grade, but Cal did the best with the least work. Another fellow student told them one day, "Bob walked into a room and saw a big machine with a large gear on one end. He was told he had to make it run. He looked it over, then put his shoulder against the gear and heaved a great heave, making the gear turn. Art came in next. He nosed around and found a crank that fitted into the gear's shaft. He put it in, and turned the gear. Then Cal came in. He found a cord with a plug, plugged it in, pushed a button, and the machine began to run." When it comes to mathematics courses that require proofs (algebra) or demonstrations (geometry), I am definitely in Bob's league, at best.

Now, when I see a clear geometric demonstration, I can often comprehend it almost instantly. But I could never have produced that demonstration.

These two fellows (one an Arab, one a European), shown in a 15th Century drawing, are having a go at some demonstrations. The Westerner is trying his hand at squaring the circle (which is known to be impossible), while the Arab is, more practically, extending a demonstration of the Pythagorean Theorem.

In a memoir, we read that Abraham Lincoln said of himself that he "nearly mastered the six books of Euclid." In Shape, The Hidden Geometry of Information, Biology, Strategy, Democracy, and Everything Else, by Jordan Ellenberg, we find that Honest Abe struggled for months to square a circle. Of course, he failed, and apparently he never came across a proof or demonstration that doing so is impossible.

All the demonstrations and constructions in Euclid's work must be done with compass and straightedge. The ancient compass was so constructed that once you set the two points you could scribe a circle about one of them, but the two legs collapsed when lifted from the paper; you cannot "set" that kind of compass. Further, the straightedge must have no markings on it; its only use is to draw straight lines through points already marked on the page. It so happens that if you are allowed to make a single mark on the straight edge, effectively turning it into a ruler, you can construct an extended radius, such as what we see in "b" in the illustration above, that has the required length of one side of the square. Otherwise, "No markee, no squaree." This point is not mentioned in Shape, but I suspect that Dr. Ellenberg knows it.

If Euclid were to drop into the office of any modern professor of geometry, he would recognize nearly nothing, except the (probably translated) books on a shelf, nearly out of sight, that he wrote about 2,300 years ago. Much of the "geometry" carried on these days is topology, which isn't about circles, squares or triangles, but about holes. Yes, holes. To a topologist, anything with no holes but with a defined edge is a "circle", including things we'd call squares or triangles. But if you punch a hole in it it's now something else. Most topological work is done in three (or more) dimensions. You may be familiar with the statement, "A topologist has trouble telling the difference between his cup of coffee and the donut he wants to dip into it." Both a cup with a handle, and a donut, are solid shapes with a single hole.

A fun discussion in Chapter 2 involves the title, "How Many Holes Does a Straw Have?" I asked my wife. She said, "One." That is a proper topological answer. If you shorten the straw, and make its wall thicker, it becomes a donut. Distort it some more, also pressing out a cavity (but not a hole!) in one section, and you get a coffee cup. This is easier to do with clay than with paper! But just for fun, the author shows how people defend the answer "Two", because many people would say, "It has a hole in each end"; and even the answer "None", because some would say you started with a flat sheet of paper and rolled it up.

I have to say, I was puzzled that the word "cavity" never appeared in that chapter. Topologically, a cave (source of the word "cavity") has no holes if it has no "other end". In topology, you only have a hole if you can go into one side (or end) and come out the other. So the animal known as Hydra has a cavity, but no holes, while most animals have a single hole called the Alimentary Canal, with a mouth at one end and an anus at the other. So we are donuts. Very lengthy donuts.

Well, that's not where this book is ultimately going. The earlier chapters help us get used to some geometrical ideas, and we soon get to maps. Here are two maps, and they are related:

These maps are the same (but for drawing idiosyncrasies) as on p. 394 of the book. The author calls the second (green) one a "chart", but it is also a map. It is the "first inversion" of the blue map; the green lines represent the relationships between the blue-outlined areas.

Have you ever played Nim? You begin by stacking an arbitrary number of coins in two or more piles. In one version, each player can take either one, two, or three coins, all from one pile. Other versions exist with different "taking" rules. Players alternate taking coins until one coin is left. The player who must then take that last coin loses. The author shows a simple proof that the first player will always lose if the other player makes no mistakes.

These two maps (or "map" and "chart") illustrate something about electoral districts in a state. One method for detecting Gerrymandering (where it isn't obvious, and I'll explain more anon) involves playing Nim with the line segments in the green map until a player can't remove any segment without breaking the map into two pieces. One such game ends after four moves, to look like this:

The green map from before is now a Tree, a connected map with branching but no loops and no holes.

I won't take this further here, except to say this Nim game brings about several possible ways to break up a district made of smaller units into two districts. It is one step in the process of making an electoral map having districts that are "more fair", but then we get into a discussion of what "fair" means.

For example, "proportional representation" is often talked about. To get away from R vs D or L vs R (or X vs Y, which could be sexist), I'll refer to the two "interested" parties as H and O (Lionel fans, take note). Consider a state that has ten districts, and having 60% H voters and 40% O voters. Assume they are all pretty evenly spread throughout the state. How would you draw district boundaries to "ensure" that 6 H and 4 O district representatives will be elected? If you could, would that be "fair"? That would simply guarantee that the H's in the legislature would always win every vote, unless the O's could sometimes convince a couple of H's to vote their way. So, effectively, the O citizens in the state would be without representation.

Gerrymandering, so-called because a proposed district map drawn by one Eldridge Gerry included a district shaped like a lizard, is thought of as unfair mapmaking designed to ensure that a certain party will always win. When you know where the voters live, and voter registration is how you know, you can wiggle the boundaries around to get most opponents into the smallest number of districts, and create many more districts that will just barely elect your own members. The illustration below was cropped from an article titled "The most Gerrymandered districts in America":

Even though the author's passion clearly lies in "dealing with Gerrymandering", he acknowledges that while it is often visible, it is dramatically hard to quantify. The more so because we cannot yet clearly define what "fair" means.

I have an idea: a Federal law that requires one election in four to be automatically reversed the day after the poll results are revealed. To reduce the amount of "gaming the system" that would be indulged in, a pair of fair coins would be flipped on the day in question. This ceremony would be conducted in public, with much publicity. If both coins come up Heads, all elections are reversed. Otherwise, their results stand. Of course, that means that sometimes two Reversal Years might occur in a row, and perhaps even three. It would also happen that five, ten, or more years may pass with no Reversal Years. That's OK. The added uncertainty might not make for better legislating, but it would definitely make it more interesting! I have about as much confidence that such a procedure could become law as I have of the Sun setting in the East tomorrow evening.

Now I want to back up to the idea of the Tree. The author has an interesting statement about trees and related graphs in a footnote on p. 106: "…there's a more general notion than a tree, called a directed acyclic graph…a DAG is like a tree where some branches are allowed to fuse together… Think of a particularly aristocratic family where your parents may share a great-grandparent or two." This isn't as rare as he thinks. Inbreeding happens whenever the "breeding pool" gets too small. 

For example, I have an ancestor, a Quaker, whose parents left Nantucket in the fifth generation after its settlement by ten families. Four generations back, her father could have been descended from eight of the ten families if no marriages between cousins or second cousins occurred, as could her mother. However, her father is descended from only seven, and her mother is descended from six. Between the two, going back to the settlers' generation, the Starbuck couple appears three times, the Coffin couple appears three times, and the Garner couple appears twice. And the couple themselves were second cousins (or a little closer than that, considering). First-cousin marriage is legal in seven U.S. states, and second-cousin marriage is legal in all. First-cousin-once-removed marriage is legal in 42 states. Thus, many family "trees" are really "family directed acyclic graphs". Fortunately the software at sites such as Ancestry.com is written to accommodate relationships of all kinds, perhaps even including the one described in the song "I'm My Own Grandpa."

Also, realistically speaking, when you go back more than a dozen generations or so, you'll find all kinds of links between relatives. Anyone living today who is descended from Charlemagne (crowned in the year 800), is a 38th or 39th or 40th generation descendant. Take a "tree" back 38 generations, and there are theoretically almost 275 billion ancestors. But the population of Europe in 800 AD was around 25-30 million. Think that over…

When I started the book, I had no idea it would go in these directions. It is too much fun to think about all these things. This is an author I'll keep in a tickler file.