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

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