Friday, December 31, 2021

Book Review - The Moon Is a Harsh Mistress

 


Most book reviews on this blog are math books, but the Robert Heinlein classic is included because his 1966 classic touches math-related topics. Whether I'm reading science fiction or futurists, I look for how predictions match reality, fall short of reality, or over-predict mankind's advancement.

His book is place in the late 21st century, when colonists of the moon rebel against Earth. 

Over-predicting our future - the novel is about second- and third-generation colonists of the moon. While we are currently just a few years from returning to the moon, we are still a full generation from having a habitable colony on the moon.

Under-predicting the future - the novel has a computer character of advanced artificial intelligence that can read publications and books by scanning the printed material. This prediction misses how all printed material can currently be converted to electronic records and can be easily accessed.

Closely predicting the future - the book writes about the use of catapulting material from the moon to the Earth. Just recently, there is a firm working on using a centrifugal sling to place objects into orbit - Slingatron.  

Close to predicting the future - one of the characters of the novel is "Mike" who is a moon-based computer that becomes sentient and assists the lunar colonists on their quest for impendence from Earth rule. We haven't quite reached the artificial intelligence singularity, but it is quite possible we will reach that point by 2076.

Saturday, December 25, 2021

Two Ways for Savers to Beat Low Interest Rates

 

Savers are currently earning dismal interest rates on their money accounts and CDs. There are two options to get annual yields of over 3.5% for 20 years and over 9% for at least six months. 

Series EE Savings Bonds offer by Treasury Direct are currently yielding only 0.10%. However, what is not commonly known is that the Treasury promises that your bond will be worth twice what you paid for it if it is held for twenty years.

To estimate what interest rate this doubling over twenty years is equivalent to, one can use the Rule of 72. Divide 72 by 20 yields an approximate interest rate of 3.6%. A great improvement for patient investors willing to hold on to their bonds for twenty years.

The exact interest rate is given by 

2 = (1+i)20

Solving for i, 

i = 21/20 – 1 = 0.0353 or 3.53%

In this example, the Rule of 72, provides a good approximation.

The other good offer from the US Treasury is the purchase of I bonds. These bonds have an interest rate that is inflation adjusted every six months. Since the United States has recently experienced a period of higher-than-normal inflation, the interest rate being offered through April 2022 is 7.12%. Next spring, the rate will be adjusted again. I know of no other low-risk investments with 7%+ returns. Investors can buy $10,000 per calendar year. 


Update 5/2/2022 - The treasury announced the I bond rate for the next six months will be 9.62%: Individual - Buying Series I Savings Bonds (treasurydirect.gov)

For information on the rates, Go to: https://www.treasurydirect.gov/indiv/research/indepth/ibonds/res_ibonds.htm#irate

The interest rate was recently adjusted earlier this week and is adjusted, based on inflation, every 6 months (each May and November).

Each person can buy up to $15,000 each year:
Electronic: $10,000, total, each calendar year
Paper: $5,000, total, each calendar year

If you don't have an account already, set one up here: https://www.treasurydirect.gov/RS/UN-AccountCreate.do

Once you have account, you can buy the I-bonds online from Treasury Direct. Next year, you can also buy a paper I bond using your tax refund.

I bonds earn interest for 30 years unless you cash them first. You can cash them after one year. But if you cash them before five years, you lose the previous three months of interest. (For example, if you cash an I bond after 18 months, you get the first 15 months of interest.)

Additional Thoughts on the Goldbach Conjecture

The Goldbach Conjecture states that all even numbers greater than 2 can be expressed as the sum of two primes. With modern computers, no counterexamples have been found for numbers as high as 4x1018 (Goldbach's conjecture - Wikipedia). The lack of finding a counterexample is not a proof; however, it is an indication the conjecture is true.

The table shown below gives the sums of numbers 1 through 40. Highlighted rows in blue and columns in green are the prime numbers. Wherever these colored rows and columns intersect would give a number that is the sum of two primes. 


Casually walk through this table from the upper left corner down toward the lower right corner and look for even numbers greater than 2 that occur at the intersections of the green columns and blue rows (primes). No counterexamples can be found in this small sample. Another way to review is to observe that each even number can be found along multiple cells lying along diagonals (two such diagonals are highlighted in yellow for 34 and 58). To find a counterexample, one would have to find a diagonal that traverses through the table without landing on an intersection of a green column and blue row. In the crowded table above, it seems this would be a difficult task.

Now, we know the density of primes drop as numbers get higher. Look at a continuation of this table - just showing the portion 1000 - 1020 - where the density of primes is much lower.


Two diagonals are highlighted for the even numbers 2022 and 2030. Within the range of the table, 2022 crosses through some intersections meaning it is a sum of two primes. The diagonal for 2030 doesn't cross through any such intersections. This limited snapshot is not actually finding a counterexample because the rows 1-999 and columns 1-999 are excluded and it is within these excluded zones where the diagonal for 2030 crosses through intersections of prime numbers. My purpose in showing this portion of the table at higher numbers is to show that these diagonals can pass through portions of the table without coming across intersections of primes. A proof of the Goldbach conjecture would arise if one could prove that the diagonals of even numbers must cross the intersections of primes.








Friday, December 24, 2021

Optimization Solutions Using Microsoft Excel – Solver

 

There is a useful optimization tool available with Microsoft Excel. Many users are not aware of the existence or of the utility of this Excel Add-in feature, Solver (tips for setting up Solver are given at the end of this post).

Here is an example of a typical optimization problem. A financial advisor uses a questionnaire to determine the appropriate risk level for a client. Based on the client’s answers, age, and other factors, a risk level of 1 to 10 is assigned to the client. Each investment offered by the advisor has a potential rate of return and is assigned a risk score based on its volatility. The advisor’s firm may also have various rules such as: no more than 10% of the portfolio may be in one investment; no more than 30% of the portfolio may be in one sector, etc.

Now the question becomes what is the best mix of investments to maximize the potential return while meeting not exceeding the risk tolerance of the client and meeting the other investment guidelines of the advisor’s firm?

Maximizing the potential return is called the objective function of the problem. The total investment amount, the risk tolerance, and the investment guidelines are called the constraints of the problem. The amounts to place in each investment are called the decision variables. It is these decision variables that we are trying to determine to reach the optimal solution to the problem.

Without good analytical tools, a solution could be found by trial-and-error (not very efficient) or by setting up a matrix of linear equations and solving for an optimal solution (tedious and difficult). However, using Excel, one just needs to be able to express objective function and constraints as functions of the decision variables.

Here is a specific example:

Total amount to invest: $1,000,000
Client’s Risk Tolerance: 5

Available Investment Choices (with potential return and risk scores)

Investment   Symbol Potential Return             Risk Score

Cash                   C               1%                                    1
MuniBond        M              3%                                    2
TechStock1       TS1           10%                                  9
TechStock2       TS2           7%                                   8
Utility1               U1             5%                                   4
Utility2              U2             5%                                   6

(Realistically, there would be many more investment choices. However, the same method works for any number of choices.)

The objective function becomes:
Maximize Return = .01C + .03M + .10TS1 + .07TS2 + .05U1 + .05U2

The Total Investment Constraint is:

1C + 1M + 1TS1 + 1TS2 + 1U1 + 1U2 = 1,000,000

The Risk Constraint is:
1C + 2M + 9TS1 + 8TS2 + 4U1 + 6U1 <= 5,000,000 (the limit is the client’s risk tolerance x total inv)

The constraints for the maximum allowed in each investment are (we only have a choice of 6 investments, so use a max of 30% for any one investment – this is higher than normal investment advice, but that is when you have a much larger selection of possible investments).

C <= 300,000 (30% of 1,000,000)
M<= 300,000
TS1 <= 300,000
TS2 <= 300,000
U1 <= 300,000
U2 <= 300,000

The constraints for the maximum invested in each sector are (this example uses 50%. Again, this is higher than normal conventions, but we only have four sectors in our example – cash, bonds, tech, utilities).

C <= 500,000 (50% of 1,000,000)
M <= 500,000
TS1+TS2 < 500,000
U1 + U2 < 500,000

The complete formulation of the problem now has one objective function, six decision variables, and twelve constraints.

In Excel, the problem is set up as shown below:


To complete the solution of the problem, pull up the Solver dialogue box. The Total Potential Return in cell H13 is the objective function. The functions for the constraints are given in column G and the limits of the constraints are given in column H. Each constraint uses the sumproduct(array1,array2) function, where array 1 is the group of cells A10:F10 (the decision variables) and array 2 is group of constraint coefficients in the rows 18 through 32. The completed dialogue box for Solver is:



Clicking the Solve box and the spreadsheet is updated with the optimal solution:


The Solver solution says to invest $42,587 in Cash, $300,000 in Muni Bond, $300,00 in Tech Stock 1, $57,143 in Tech Stock 2, $300,000 in Utility 1 and $0 in Utility 2. The potential annual return is projected to be $58,429.

Viewing column G, we see all the constraints are met.

Once a user has completed a modest size problem as the above, it is just a matter of adding additional decision variables (columns) and constraints (rows) to solve much larger problems.  

Solver Set-up:
In Excel, from the top ribbon click on Data then look for Solver. If it is not there, go to File and click on Options. Select Add-ins then click on Go. In the dialogue box, click Solver then OK. Now, when you return to Data on the ribbon, Solver should be there. For your version of Excel, the steps may be different, so review this link from Frontline for your version of Excel: Search | solver.


Saturday, December 11, 2021

An Abbreviated Timeline of Artificial Intelligence

 


Chronology of Artificial Intelligence Milestones
This chronologically is abbreviated as it is limited by topics discussed elsewhere in this blog. For a more complete history, see History of artificial intelligence - Wikipedia

1949: Arthur Lee Samuel of IBM conceives a computer that was considered the first self-learning program. Limited by available memory, it could not play at a championship level but improved as increased memory became available. Computer Pioneers - Arthur Lee Samuel

1950: Alan Turing publishes a paper in which he proposes the Turing Test to determine if a computer program is intelligent. Computing Machinery and Intelligence - Wikipedia

1952: Cambridge University develops computer that plays tic-tac-toe. In 1952, OXO (or Noughts and Crosses), developed by British computer scientist Sandy Douglas for the EDSAC computer at the University of Cambridge, became one of the first known video games. The computer player could play perfect games of tic-tac-toe against a human opponent.

1990: The program Chinook, developed by the University of Alberta, becomes the first computer program to beat a world checkers champion. Chinook (computer program) - Wikipedia

1997: University of Illinois mathematicians Ken Appel and Wolfgang Haken use a computer to complete a proof of the Four-Color Map Theorem. Math Vacation: Four Color Map (jamesmacmath.blogspot.com)

1997: IBM’s Deep Blue chess program defeats world champion Garry Kasparov Deep Blue versus Garry Kasparov - Wikipedia

2017: DeepMind’s AlphaGo defeats the world’s highest rank Go player The latest AI can work things out without being taught | The Economist

2021: The Ramanujan Machine - Technion - Israel Institute of Technology

2021: DeepMind says it can predict the shape of every protein in the human body | Live Science

2021: Advancing mathematics by guiding human intuition with AI | Nature


 

DeepMind Artificial Intelligence

 

With the recent advances in artificial intelligence, we will see more assistance from computers helping prove theorems and suggesting new conjectures to explore. In the very near future, we will see many headlines about artificial intelligence helping us solve very complex problems. Recently, an article in Nature described the advances of DeepMind Technologies.

DeepMind Technologies is a British artificial intelligence subsidiary of Alphabet Inc. and research laboratory founded in September 2010. DeepMind was acquired by Google in 2014.

A link to the Nature article is given here: https://rdcu.be/cC1lb

The Nature article prompted response by the press:

DeepMind was able to make progress on proving a decades-old conjecture about multidimensional graphs and suggested an additional conjecture in the subject area of topology. Both of these conjectures are reminiscent of my prior blog posts - the University of Illinois mathematicians who used a computer to complete a proof of the four-color map conjecture and the team from Technion-Israeli Institute of Technology who used A.I. to automatically generate mathematical conjectures that appear in the form of formulas for mathematical constants - The Ramanujan Machine. 

For those readers more curious about practical mathematical applications, DeepMind says it can predict the shape of every protein in the human body. Understanding how proteins fold is a very complex task and is critical to further advancing biology and medicine.

DeepMind says it can predict the shape of every protein in the human body | Live Science

12/11/2021 Update - just after I posted this original blog, I came across another use of DeepMind - a machine-learning model that suggests a molecule’s characteristics by predicting the distribution of electrons within it. 

12/12/2021 Update - Further DeepMind Articles
DeepMind can play poker chess and more
DeepMind has the reading comprehension of a high-schooler

12/18/2021 Update - 
MIT Researchers Just Discovered an AI Mimicking the Brain on Its Own

12/20/2021 Update - What Does It Mean for AI to Understand? Quantamagazine

Wednesday, September 29, 2021

Atomic interstitial sizes in higher dimensions

As a student years ago in Materials Science and Engineering, I learned how to calculate the size of the largest interstitial atom that could fit within the various cubic and close packed structures of metals. This is important for understanding alloy design and hardening mechanisms in metals. An interstitial atom is one that fits between the gaps of the host atoms. This is in contrast to a substitutional atom which simply replaces one of the host atoms in the atomic arrangement. A substitutional atom typically has a size very similar to the host atom. In the case of an interstitial atom, it is usually much smaller as it has to fit within the gaps of the host structure. However, is this always the case?

The simplest example starts with a two-dimensional array of atoms in a cubic structure.  


If one is trying to determine the diameter of the largest possible interstitial atom, consider the tan colored atom in the middle of the four blue host atoms. We calculate the length of the diagonal line from the center of one blue atom, through the tan atom, and to the center of the other blue atom. The length of this line is D + d, where D is the diameter of the blue atoms and d is the diameter of the interstitial. In this cubic arrangement, the length of this line can also be calculated from the Pythagorean Theorem and is the square-root of (D2 + D2). Setting the two forms of the length of the diagonal to be:

Numerically, d is approximately 0.414 D,

Next, consider the three-dimensional arrangement of atoms in a simple cubic arrangement. The same type of calculation can be made but with a great diagonal running from one corner atom to the opposite corner.



Again, the length of the diagonal is D + d. The Pythagorean Theorem can also be applied in three dimensions and so the diagonal also equals the square-root of (D2 + D+ D2). Setting the two terms for the diagonal to be equal gives the largest d, that can fit within the atoms of diameter D:

Numerically, this is approximately 0.732 D. This is known as Kepler's conjecture - described in the book: Math Vacation: Book Review – Instant Mathematics by Paul Parsons and Gail Dixon (jamesmacmath.blogspot.com).

While we don't have examples of four-dimensional arrangements of atoms, something interesting happens. The size of the largest interstitial atom that can fit within the host atoms is the same size of the host atom.

Following the examples for the two- and three-dimensional interstitial atoms, the size d is:

There is no reason to stop there. In five dimensions, the size of the interstitial space is larger than the host atom itself:


Update 9/25/2022: The Ukranian mathematician, Maryna Sergiivna Viazovska (Марина Сергіївна Вязовська), won the Fields Medal this year on sphere packing in higher dimensions.

Friday, September 3, 2021

Book Review: It's a Numberful World: How Math Is Hiding Everywhere

 


I was recently asked why I read so many books about math. People say "haven't you already learned those concepts" or "what are you finding that is new." I keep reading more math books by different authors because I do find new ideas. Sure, it may be some concept that was taught to me years ago or that I read by another author, but I continue to learn from others who explain concepts a little differently than other teachers and authors. As a part-time educator, I'm appreciate new or different ways to explain mathematical concepts to students. 

Eddie Woo's book is packed with 26 bite-size chapters explaining concepts from number theory, knot theory, magic tricks, ciphers, mathematical proofs, and more. Each chapter has practical applications, explanations, and refreshingly good graphics (compliments to Alissa Dinallo). I highly recommend this book for parents or teachers of middle-school to high-school students and to others, like me, looking for a good read.


Abraham Lincoln - A President Trained by Euclid





In studying law, Abraham Lincoln (16th United States of America President) came across the word demonstrate frequently. He searched for further meaning. Consulting Websters, he found “certain proof” and “proof beyond the possibility of doubt.” 

So, what did Lincoln do? He studied the works of Euclid – six volumes of geometric proofs and he mastered all of them. Proofs where a proposition is demonstrated beyond doubt based on a foundation of facts and logic. We don’t know Lincoln as a mathematician, but we do know him as a famous debater and orator.

Geometry in high school is the point at which students either really start to understand the mathematical process or really despise math.

It’s in geometry where we learn how to set-up a proof. We start with given axioms and step, by step, we establish a proof. At the end of the proof, it is the practice to write “Q.E.D.” Which is the Latin acronym for Q.E.D.Quod erat demonstrandum -

– That which is to be demonstrated.

 Some of this chain of logic is seen in the 1st paragraph of the Gettysburg Address (note the term proposition):

             "Four score and seven years ago our fathers brought forth upon this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal."

Another example is from AL’s private notes in 1854 (perhaps formulating an opposing viewpoint to those who tried to justify slavery):

“If A can prove, however conclusively, that he may, of right, enslave B – why may not B snatch the same argument, and prove equally, that he may enslave A.” Source: Abraham Lincoln: A Life by Michael Burlingame, Johns Hopkins University Press, 2013.

Also, in the ending paragraph of AL 1st inaugural address (more of a music analogy but linked by chords and harmony to math):

The mystic chords which, proceeding from so many battlefields and so many patriot graves, pass through all the hearts and all hearths in this broad continent of ours, will yet again harmonize in their ancient music when breathed upon by the guardian angel of the nation.

So, Lincoln learned from the discipline of geometry how to make a solid, logical argument and how make a proof.

1.   Carpenter, F.B. The Inner Life of Abraham Lincoln: Six Months at the White House Hurd & Houghton, New York, NY (1874).

Article: From Euclid to Abraham Lincoln, Logical Minds Think Alike (nautil.us)


Sunday, August 22, 2021

Book Review: A Mathematician's Apology

 

Godfrey Harold Hardy was a prominent 20th century mathematician. He was most known for his long-time collaboration with John Edensor Littlewood and for his mentorship of the Indian mathematical prodigy, Srinivasa Ramanujan.

The forward to the book was written by his friend from Cambridge, C. P. Snow. It may be one of the longest book forwards I have read - 58 pages. However, Snow's forward also serves as a brief biography of Hardy, so it is worth reading.

Hardy was in his early sixties when he wrote the Apology. It is his acknowledgement that most great mathematical works are produced by much younger mathematicians. I enjoyed Hardy description of how mathematics differs from science and his observations of what people's talent. He does include two brief descriptions of mathematical proofs for the purpose explaining how such proofs work. The two are Euclid's proof of the existence of an infinite number of prime numbers and Pythagoras's proof of irrationality of the square root of 2.


Friday, August 13, 2021

Clever Hans, the mathematical horse

In 1907 William von Osten toured around Germany with a horse, Clever Hans, that he claimed could perform various math problems. His story is found here: Clever Hans. While the feats of Clever Hans were debunked as an elaborate palor trick, scientists have found that many animals do have a sense for numbers. More recently, an article in Quantamagazine, highlights many true animal feats in recognizing different number of objects and even having a sense for zero.

Friday, July 23, 2021

Magic Trick with Dice



Set-up:

Give your friend three dice. Turn your back and ask your friend to roll the dice. Without seeing the result, ask your friend to sum the total of the three dice. 

Next - again, you are not looking - ask that one of the three dice are turned upside down. Ask that your friend add that result to the prior sum. For example, if the outcome of the first roll was one, two, three, the sum would be six. Your friend chooses the die showing one and flips it over to expose a six and adds this to the sum so now the sum is twelve.

Next, ask your friend to roll the chosen die again and add that result to the sum. For example, if the re-rolled die results in a three, the new sum is fifteen. 

Now, have your friend show you the three dice in their present condition (three dice showing two, three, and three). You don't know which die was re-rolled but you quickly announce the final sum is fifteen.

Your instructions:

When your friend shows you the final outcome of the three dice, add those three dice results together and simply add seven. In the example given, the final result was two-three-three which totals eight; add seven, the total is fifteen. 

How does this work?

Opposite sides of a six-faced die always add up to seven. The one and six are on opposite sides, as are the two and five, and the three and four.

While you don't know which die was re-rolled, you know that the die had two sides added to the running sum that add up to seven. The other two dice were not changed so their numbers are shown to you at the end. The re-rolled die, even though you don't know which one it was, is shown to you in the final result. The only result missing is the original result of the chosen die and the it's opposite side. But since these two numbers always add up to seven, you can assume that seven has to be added to the result of the sum of the three dice shown to you to know your friend's final running total.

A visual demonstration of this trick is presented by Numberphile: Three Dice Trick - Numberphile - Bing video



Saturday, March 20, 2021

Math Without Numbers - a book review

In preparing and studying for this blog, I read as many math books as possible. I haven't posted book reviews in this blog before, but Math Without Numbers by Milo Beckman and illustrated by M Erazo deserves a very positive review. Beckman truly succeeds in walking the reader through many mathematical topics without using numbers. To do so, many real life examples are given to go with the concepts.

Several mathematical proofs are presented in a refreshing format- sometimes with easy-to-follow illustrations but never with numbers or formulas. 

One of my favorite sections gave a good introduction to topology. Another presents the incompleteness theorem of Gödel in a dialog format. A surprisingly clear analogy is offered on how the law of gravity is comparable to estimating the trade between two countries. As a fan of automata, I enjoyed an example demonstrating how the traffic phenomena of gapers' block can be modeled with simple rules. To cap off the tour through many subjects, Beckman delivers an understandable explanation of the Standard Model of particle physics.

milobeckman.com


Twitter milobela

See prior post for other math book and website recommendations.

Sunday, March 14, 2021

Pi Day 3-14-2021



This blog has several posts about pi, including one that used random numbers to estimate pi.

Matt Parker and Steve Mould posted a YouTube video demonstrating how to estimate pi using Avogadro's number (Avogadro's number is used in chemistry and is the number of particles in one mole of a substance).

Matt Parker and Steve Mould use Avogadro's Number to Estimate Pi

For pi day, WIRED posted this video about pi and keeping trains on the track:

https://www.wired.com/story/how-pi-keeps-train-wheels-on-track/

Other pi-related posts in this blog include:

Prime Number Spirals

One-Time Pad Coding

Find Your Birthday in the Digits of Pi

Pi - How Many Digits are Really Needed?


Friday, March 12, 2021

Additional Thoughts on the Pythagorean Triple Generator



A prior post list a formula for producing PythagoreanTriples. A Pythagorean Triple is a set of three integers (a, b, c) that will form a right angle triangle. The formula is:

Let n and m be any positive integers where n>m. The Pythagorean Triple generated is formed by the numbers:
2nm
n
2 - m2
n
2 +m2

This prior post did not state way this formula works. We can show why in just a few steps. The two requirements for a Pythagorean Triple (a, b, c) are that a, b, and c are integers and that a2 + b2 = c2.

For the first requirement, we need to show that 2nm,  n2 - m2 , and  n2 +m2 are all integers. It is given that n and m are integers, Since both n and m are integers, a product of two integers is an integer and 2 times an integer is an integer, so 2nm is an integer. Likewise, for n2 - m2
and n
2 +m2, we are only dealing with squares of integers, their sums and their differences. All these operations will produce only integers, therefore n2 - m2 and n2 +m2 are also integers.

For the second requirement, we need to show that (2nm)2 + (n2 - m2)2 = (n2 +m2)2

Expanding the left-hand side,

 (2nm)2 + (n2 - m2)2 = 4n2m2 + n4 – 2n2m2 + m4

Simplifying and reordering,       

                              = n4 + 2n2m2 + m4

Compare this result to squaring the original right-hand side, we see the Pythagorean Triple generator formula will produce triples that meet the requirements of being proper Pythagorean Triples.

(n2 +m2)2 = n4 + 2n2m2 + m4

Update 9/24/2022: A spreadsheet has been created to produce these triples.

Women in Mathematics

(Image: Hypatia by  Jules Maurice Gaspard , public domain) I recently re-read Instant Mathematics (see prior post:   https://jamesmacmath.bl...

Popular in last 30 days