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

Monday, November 3, 2025

Brilliant Tutorials in Mathematics and Computer Programming

The name is the attractor. I certainly want to be brilliant, if only in my own estimation though not the world’s. About 272 days ago, we both signed up and paid $161.88 each. She is still mad at me because she paid for something that does not work. I pointed out that they say that they are hiring and proofreading high school math is exactly her kind of job. So, that ball is in her court. I still work the problems, even when the problems have problems. 

I usually work at night and sometimes I have to skip one (even two) sessions, but I earn battery charges that carry me over. 


So far, I have completed series in elementary algebra, geometry, and calculus in addition to Probability & Chance, Functions, and Vectors, and large sections of logic, data analysis, and some others. A few, I began and chose not to pursue. The lessons on Digital Circuits and Circuits are waiting for me to make time to haul out the breadboarding kits. (I want to see their answers.) 


The reviews are nice exercises at bedtime. I do most of the work in my head. Some got complicated and required pen and paper and some of those are long tutorials, which, if I quit, I lose my place and have to start over. (About the third pass, I have memorized the first several answers.) It’s bedtime reading. I do enjoy the learning.


Find sin(a+b). 




I worked this through over three nights and was able to conceptually integrate the lesson and the proof of the formula. 


The Pythagorean Theorem has over 300 published proofs (one of the them by Pres. James Garfield). The proof in Euclid’s Elements is one of the most complex and demanding and least intuitively obvious presentations of this well known truth. So, too, with this demonstration of the measure of the sines of two adjacent angles. Nonetheless, after several repetitions, I found it elegant.


But not everything works that well. I ran into bugs in their tutorials for polar coordinates and for modulo arithmetic. As I told Laurel when she discovered other errors, all that is required is to document everything with screenshots, write out a descriptive narrative to show your work, and send it to them. 


51 mod 3 = 0 and also 51 mod 17 = 0.
And 51 mod 2 = 1.
But not here.



The Polar Coordinates maths are inverted.

The iPhone can be a barrier. I stopped working in Python, computer science, and AI because it is easier on the keyboard and I seldom sit here before going to sleep. So, I do what I can in bed and let the rest slide until I can have some daytime hours free for fun and games. I did finish the packet on Algorithmic Thinking. 


For another overview, see Wikipedia here https://en.wikipedia.org/wiki/Brilliant_(website)

More pros and cons on Quora here https://www.quora.com/What-is-your-review-of-Brilliant-org


PREVIOUSLY ON NECESSARY FACTS


Elisha S. Loomis and the Pythagorean Proposition 

How the Martians Discovered Algebra 

The Man Who Loved Only Numbers 

G. H. Hardy’s ‘Apology’ 

Birth of a Theorem by Cédric Villani 

A Simple Truth 

Grigory Perelman’s Perfect Rigor by by Masha Gessen 



Tuesday, March 25, 2025

Check the Math

I took Sociology 304 Research Methods in the spring of 2007. The professor was Young S. Kim. We were assigned to review two research papers each week. In the first class meeting, Dr. Kim said that these were not to be summaries but must be criticisms. After class, I approached his desk and asked if undergraduates could competently criticize a peer-reviewed publication. He replied, “Check the math.”

 

I do not know that I found any mathematical errors because I only archived three of my assignments from that class and none of those identified any such problems. However, a few months ago, researching an article for the American Astronomical Society, I found this from 1948: 

  • “Evolution of the Universe” by Ralph A. Alpher and Robert Herman, Nature, No. 4124 ,Vol. 162, November 13, 1948 identified errors in 
  • “The Evolution of the Universe” by George Gamow, Nature, No. 4122, Vol. 162, October 30, 1948. 

(At that time, Alpher and Herman were doctoral candidates and Gamow was their advisor. Earlier that year, Physical Review published "The Origin of Chemical Elements" by Ralph Alpher, Hans Bethe, and George Gamow. Although he checked their math on a computer at the National Bureau of Standards, Robert Herman declined to belisted as "Delter." (Wikipedia citing Gamow here:  https://en.wikipedia.org/wiki/Alpher%E2%80%93Bethe%E2%80%93Gamow_paper )


 “The condensation-mass obtained from this corrected density comes out not much different from Gamow's original estimate. However, the intersectionpoint rmat. = rrad. occurs at t=8·6 x 1017 sec.  3 x 1010 years (that is, about ten times the present age of the universe). This indicates that, in findingthe intersection, one should not neglect the curvature term in the general equation of the expanding universe. In other words, the formation ofcondensations must have taken place when the expansion was becoming linear with time.”  

 


Interesting as that was to read, I was more impressed with the discovery that cosmologists in 1948 accepted an estimated age of the Universe at 3 billion (3*109) years. The simple truth is that estimates of the size and age of the universe have been expanding. 

It is also interesting that their work required the radius of the known universe to be proportional to  [the square root of (minus one)] light years. Imagine that!

 

For more on Young S. Kim see:

Kim, Y. S., Barak, G., & Shelton, D. E. (2009). Examining the “CSI-effect” in the cases of circumstantial evidence and eyewitness testimony: Multivariate and path analyses. Journal of Criminal Justice, 37(5), 452–460. https://doi.org/10.1016/j.jcrimjus.2009.07.005

https://psycnet.apa.org/record/2009-15801-001

  

Previously on NecessaryFacts

 

Imaginary Numbers are Real; Pegasus is Not 

Two Books on Fermat’s Last Theorem 

Pi in the Sky over Austin

Elisha Loomis and the Pythagorean Proposition

 

Monday, June 10, 2024

Jim Simons and the Quants

Being centered on mathematicians, this book was not exciting, but it was interesting. James Harris “Jim” Simons (1938-2024) earned his doctorate at Berkeley, and worked for the NSA and the Institute for Defense Analysis, before teaching at Harvard and MIT. (Wikipedia: https://en.wikipedia.org/wiki/Jim_Simons). And that is in this story, of course. The focus, however, is on Renaissance Technologies and their hedge funds (Medallion and others), the most successful trading firm in history. Simons’s background in language recognition—pattern recognition; pattern prediction—allowed him the insight to expect that correlations must exist across markets, even if causal factors ultimately remain hidden. Therefore, it should be possible to profit from trading on trends that are unexpected and unperceived by everyone else. He was right.

The Man Who Solved the Market:
How Jim Simons Launched
the Quant Revolution
 
by Gregory Zuckerman
(Penguin RandomHouse, 2019
)

The method was easy to explain: mine the data. Look at all the numbers from all the markets and seek out trends and patterns and correlations. Some turned out to be causative. Regression to the mean predicts that after some market has a remarkably bad day, prices will rebound. The prediction applies to hugely profitable days: the market reverts toward its previous level. That much is easy to understand. The rest never gets explained. 

 

For one thing, no one associated with Renaissance Technologies was willing to talk to Gregory Zuckerman because they were bound by deep long-term non-disclosure agreements. Aside from that, the powerhouse of the company was driven by its staff of Ph.D. mathematicians. It would have to be understood at their level before it could be explained to the rest of us. 

 

What can be understood is that on average, employees who invested with the firm earned about $50 million each. “Since 1988, Renaissance's flagship Medallion hedge fund has generated average annual returns of 66 percent, racking up trading profits of more than $100 billion…” (Introduction). With that money came power, of course. Robert Mercer put his ideology to work when he found Steve Bannon for the Donald Trump presidential campaign in 2016. However, Jim Simons was a Democrat. And he was not alone in that. Many of the academics in the firm were liberals and they contributed to political campaigns, naturally, and also to special foundations (some of their own creation) supporting education, medical research, and other social initiatives.

 

Jim Simons’s methodology was a long time coming. Computers were rare and costly. Ten years later, they acquired the first desktop computers, which were woefully underppowered by today's standards. Although he launched the firm specifically to mine data so that profits could be harvested from trends, Renaissance Technologies also employed traditional traders. The two teams often collided, with Jim Simons himself significantly abandoning the algorithms for what would be too easily called “gut instinct.” Sometimes, we just know.  Also, with that mountain of cash, and with their frequent intra-day trades, they did not need to be often right. At the peak, in Jim Simons’s last decade, with the models and algorithms and supercomputers all generating money, Renaissance Technologies was right only 51% of the time.

 


One aspect of the story which I believe explains as much of their success as their mathematical models, is that Renaissance Technologies adhered to the ideal academic organizational culture. Workspaces were open. Visiting around the office was common. Sharing ideas was habitual. Discussion and disagreement were encouraged. (Pages 199-203). (See also "Team of Teams" on this blog.) It was not always easy and some people never forgave others for their complete lack of social grace. Neither time nor money heals all wounds.


But we all enjoy the profits. Zuckerman presents this as a zero-sum game. For Renaissance Technologies to have profited, many other brokerages, whose clients were stereotypically “dentists” (and other middle class professionals), had to lose. It is true that every trading position requires two people with opposite expectations. Ultimately, conservation of energy (charge; spin) means that everything must be accounted for with nothing magically lost or gained. And yet here we are: 10 billion people, 50% of us in cities of over 1 million; flying around 10 kilometers above the ground or cruising on the ground at 100 kph. We could not have hunted and gathered enough to make this possible. If not for Jim Simons and Renaissance Technologies, we would each of us be poorer by unperceived small fractions that did not become the comforts we enjoy.


PREVIOUSLY ON NECESSARY FACTS

Two Books About Fermat’s Last Theorem 

The Remarkable Story of Risk 

Happy Pi Day of the Century 

Coins Without Realms (Digital Currency) 


Saturday, October 22, 2022

Footnotes on Number Theory

I love to watch the odometer. It is not always convenient to stop and take a picture. 

186285 miles were 1 Light Second

Kaprekar’s Constant

There’s a lot of these out there on YouTube. It is very popular in India, of course. 

Numberphile has it. I was disappointed that Mathologer did not. 


Take any four digits, as long as all four are not the same.


Order them highest to lowest and then lowest to highest. Subtract the smaller from the larger. Do it again. Soon, it reduces to 6174. Every time. I wonder how it works in different bases. 

Hidden Circle in Pi?

That is also a challenge that I have never pursued from Carl Sagan’s Contact.  He posits that if you extend pi out far enough-as I recall, in Base 11—you get a string of 1s and 0s that can be arrayed to display a circle. There’s always something else to do… but a computer program seems easy enough and it can run all night and probably not much longer with today’s MacBook, Dell, etc. 

Kaprekar's Constant from Numberphile


10 REM MIKE MAROTTA. FEB 5, 1987. NEWTON'S ALGORITHM FOR SQUARE ROOTS

19 LIMIT= .0001

20 PRINT "ENTER A NUMBER"

21 INPUT X

56 XN = X/2

60 R1 = (XN + X/XN)/2

70 IF ABS(XN-R1) < LIMIT THEN GOTO 80

75 XN = R1

76 GOTO 60

80 PRINT "THE SQUARE ROOT OF ";X;" = ";R1

 

Fast Square Root.
(She only does it for Primes.)
I first wrote this in the winter of 1976-1977, cadging time at the Michigan State University computer center when I was between terms at Lansing Community College. I used it again when I was employed (briefly) at the MSU campus bookstore. They had a Data General Nova for which the vendor delivered a “Business Basic” without algebraic functions. (“You don’t need them for business.”) I wanted to project economic order quantities, which does require finding a square root. I also wrote numerical expansions for natural and common logarithms and made the set into a library of callable functions.

Square Roots

YouTube has a ton of videos on calculating square roots by hand. In this day of cellphones, it is seldom necessary. But I found this video interesting and wrote a sticky note to hang on a monitor for a while. 

 

Another trick I use is based the binary search. Two or three iterations are usually enough. 

Sqrt(97) < 10. Guess 9.3. Square 9.3. Guess again. Richard P. Feynman has a story about beating a Japanese  abacus salesman in a bar in Brazil figuring like that in his head. “More digits! … More digits!”

 

PREVIOUSLY ON NECESSARY FACTS

 

Number Theory as an Adventure 

Nerd Nation: Natalie Portman, Danica McKellar, and Felicia Day 

The Man Who Loved Only Numbers 

Contradictions in the Patentability of Numbers 


Sunday, September 27, 2020

Celestial Mechanics

I first got interested in celestial mechanics in 1978. I enrolled in three independent study classes at two schools, New Mexico State University, then at Lansing Community College (1981, 1982). In 1981, I met an astronomer from Michigan State University who encouraged me to get this book on algorithms for calculators. He wanted it for himself and I was working for a publisher. So I ordered two. I used the routines as outlines for some BASIC programs but never went much further with it. 

[An earlier version of this essay was posted to The Sky Searchers discussion board in the Astrophysics forum.] 

Book cover Mathematical Astronomy with a Pocket Calculator by Aubrey Jones
John Wiley and Sons.
(c) Aubrey Jones 1978

My wife and daughter bought me a telescope for my birthday in 2014. In the past six years, I have enjoyed going out in the backyard (often) and to star parties (a few times) and verifying for myself that the universe is pretty much as described in the books. But what’s next?

I am not facile with mechanical tasks. Things come apart a lot easier than they go back together. That can be useful for documenting physical systems, but it suggests that photography and spectroscopy are not likely to be rewarding as hobbies complementing observational astronomy.  
 

On the one hand, in order to pursue celestial mechanics you really need to love mathematics. As much as I enjoy it, I took Calculus-1 twice to get a C+. I learned integration (usually Calculus-2) by taking a computer programming class and coding up the Midpoint Rule, Simpson’s Rule, and the Trapezoid Rule. The advantage to me is that it is easier to erase a mistake than it is to drive to Home Depot to buy another part (which I have to do to finish work on the backyard gate). 


McCuskey, Addison-Wesley, 1963
In the 18th and early 19th centuries, orbit plotting was the focus of astronomy. Following Sir Isaac Newton’s 
Principia, and the parallel work of Gottfried Wilhelm Leibniz, Pierre-Simon Laplace developed what we recognize today as the calculus of celestial mechanics. It allowed astronomers to establish the orbits of the planets and their newly discovered moons and the two new planets, Uranus and Neptune, and their moons. It also allowed astronomers to determine the physical arrangements of binary stars. With the advent of photography and spectroscopy, orbit plotting fell out of favor with researchers as those tools revealed deep and starling new truths. However, even as radio astronomy came to the fore in the 1950s, celestial mechanics regained some importance with the space age. 

 

But if you are not the person launching a satellite to Saturn, why grind through transcendental equations? My reply is the same as for any amateur pursuit, any hobby, or sport: You do it for yourself because it is at once rewarding and edifying. And unlike most other hobbies, astronomy is a study where amateurs and professionals collaborate. 

 

How fast does the Moon go around the Earth?

How fast does the Sun go around the Earth?

How fast do the stars go around the Earth?

And when will that comet come back?

 

If you have lived any arbitrarily long time, you know that our easy estimates – the Moon travelling through 360 degrees in 28 days; the Sun circling the Earth 360 days each year (plus 5 days for a long holiday "off the books"); the fixed stars moving westward one degree per night through the year -- have errors that accumulate. Can I make more accurate predictions?

 

Not only has the hard mathematics been done already, reducing the problems to the application of formulae, but I now have a computer and a spreadsheet. All I have to do is take the measurements and reduce the data.

 

(More later.)

 

PREVIOUSLY ON NECESSARY FACTS

Newton and Leibniz

Astrophotography is a Lot like Love 

Measuring Your Universe: Alan Hirshfeld’s Activity and Laboratory Manual

In Support of the Entry-Level Telescope 

John Kemeny Knew: We Shall Have Computed 

 

 

Sunday, June 30, 2019

Birth of a Theorem by Cédric Villani

I gave up after 30 pages. The difficult mathematics was the largest but not the only barrier. 
 
Birth of a Theorem:
A Mathematical Adventure

by Cédric Villani, 
translated by
Malcom DeBevoise,

Farrar, Straus and Giroux,
2011. 
The story follows the “Save the Cat” format. As the author says in the Preface: 
“This book tells the story of a mathematical journey, a quest, from the moment when the decision is made to venture forth into the unknown until the moment when the article announcing a new result—a new theorem—is accepted for publication in an international journal.
“Far from moving swiftly between these two points, in a straight line, the mathematician moves forward haltingly, along a long and winding road. He meets with obstacles, suffers setbacks, sometimes loses his way. As we all do from time to time.”


But if you do not know what a “cat” is (or the nuance in "save"), then saving him lacks context. 

"Ah! The Boltzmann, the most beautiful equation in the world, as
I once described it to a journalist." (page 4)
For his work, Villani was recognized with a Fermat Prize, the Henri Poincaré Prize, and, ultimately, on August 19, 2010, a Fields Medal. At the ceremony he heard the announcer: “A Fields Medal is awarded to Cédric Villani for his proofs of nonlinear Landau damping and convergence to equilibrium for the Boltzmann equation.” (Page 231) One thing I will give Villani is that he was clearly focused on winning the Fields medal (pages 61-62).

 I once read that publishers feel that every equation costs 100,000 readers. If that is so, then this book was read by one person. Pages 144-155 consist entirely of a section of a paper from Acta Mathematica. 

The same truth can be spoken in different words.
Well, OK, you speak French, but how is your Italian? I mean, they are close right? Read one, read the other? I ask because pages 129-130 consist of an email with passages of HTML code to display mathematics in the presentation layer. Villani writes: ">>therefore you are left with
\int_0 ^t \int_ v F[h^(n+1)] \cdot < ( (\nabla_v f^n) \circ \Omega^n > (x-v(t-\tau),v) \ d\tau \, dv "

Those are not just two egregious examples. The whole book is like that. 

It is not just the equations. The vocabulary is highly technical. "Yes, a Moser-style scheme. The key is that the Boltzmann operator... true, the operator is bilinear, it's not local, but even so, it's basically in divergence form--that's what makes the Moser scheme work. You make a non-linear function change, you raise the power...You need a little more than temperature, of course, there's a matrix of moments of order 2 that have to be controlled. But the positivity is the main thing." [ellipses in the original] 

You know all the words. What you do not know is their mathematical meaning. The "Boltzmann operator" is the collision operator. I had to look that up and read three links to get the meaning. But I already knew that Boltzmann's work was a statement of thermodynamics.  "Divergence" has a common meaning close the mathematical use of the Nabla operator. The Nabla is the upside down Delta. It is used to express changes in vectors. (Look for Div-Grad-Curl).  "... a matrix of moments..." is not a grid of small times. In common engineering, a moment measures force times distance to express rotation. A moment is like a lever arm, why on a teeter-totter or see-saw, 40-lb child six feet from the center can lift a 160-lb man only one foot from the fulcum. In statistics, the first, second, third, and fourth moments express mean, variance, skewness, and kurtosis. So, now, it is somewhat clearer why the matrix of second moments is related to the divergence. But not knowing the language, I have stop to look up every word.

By comparison, like any American boy, I know “something” about cars and have worked on my own over the years. I was employed by Kawasaki. I have been on projects at GM, Ford, and Honda. So, when I read that in 1998 Honda developed an experimental Formula One car, the RA099 3-liter V-10, I can say “That’s nice.” The stuff that excites motorheads is beyond me. And, so, too, here, were the plot turns lost in the dense shoptalk among specialists. 

The detours were also problematic. The author loves Manga. It is his escape from mathematics. I know the genre a little bit. Long ago, I even read some in Japanese. But rather than an inclusion, it was an exclusion. An editor warned me about that: when you write for two different audiences, you do not get the union of the sets, you get the intersection. Here, the audience is the set of mathematicians whose published works bring them to the attention of prize judges.
  
Previously on Necessary Facts


Thursday, June 27, 2019

A Simple Truth

A picture is worth a thousand words, so I will not say much. I just thought that it is interesting that when something is true, it can be demonstrated by many methods.





































PREVIOUSLY ON NECESSARY FACTS

From Texas to the Moon with John Leonard Riddell
Nerd Nation: 4.5
Integrating Criminologies
Why a Level Playing Field?

Monday, June 24, 2019

Number Theory as an Adventure

Number theory can be taught to children. It all begins with integers. First year algebra (at least) is required to prove these conjectures. But the facts can be presented and tested by a nine-year old who is comfortable with long division. Even a first grader can understand, appreciate, and test many of them. 

Multiplying odds and evens always yields: odd X odd = odd; even X even = even; odd X even = even. A child learning arithmetic can test examples until she is tired and at least get a lot of practice. It is not a proof, of course, but it can remain a challenge for a child who wants to learn algebra. The algebra is easy to show. 
 
An Adventurer's Guide to Number Theory
by Richard Friedberg, Dover, 1968, 1994
(This Dover edition contains corrections
and appendices not in the McGraw-Hill
printing of 1968.)
A child who is comfortable with first year algebra can get lost in the Pythagorean theorem and many of the truths that can be derived from it. Among the Pythagorean Triples are some such as 3-4-5 and 5-12-13 and 15-112-113 for which the hypotenuse is one unit longer than the longer of the two other sides. And there is an easy formula for generating them. It can be coded up as a computer program or a spreadsheet. 

This second edition was released soon after Andrew Wiles announced his proof of Fermat’s Last Theorem. Richard Friedberg cautions that the proof was not yet accepted. It was not. A second proof was. Friedberg discusses Fermat’s Last Theorem as an extension of other explorations, principally the Pythagorean Theorem. That venerable truth is the crux of this work though Friedberg brings the reader into many other fields: infinite descent, perfect numbers, modulo arithmetic, and prime numbers. Along the way, he cites the discoveries made by Fermat, Euler, Lagrange, Gauss, and, of course, Diophantus, among others. 

PREVIOUSLY ON NECESSARY FACTS