Showing posts with label Pi. Show all posts
Showing posts with label Pi. Show all posts

Sunday, July 28, 2024

Bumping Masses Calculate Pi

(Image: Gemini generated)


Grant Sanderson's site, 3Blue1Brown, has an interesting video about colliding blocks generating the digits of Pi: 6Xh-jhDJ4 .

For an explanation of why this works, see: https://www.youtube.com/watch?v=jsYwFizhncE

He has another video showing another dynamic system using this principle of converting problems of dynamics to problems of geometry: https://www.youtube.com/watch?v=brU5yLm9DZM .

Grant Sanderson's videos are a favorite of this Blog: https://www.youtube.com/@3blue1brown


Thursday, March 14, 2024

Pi Day (3-14-2024): 12 Facts about Pi from Live Science


Live Science published an interesting list of 12 facts about Pi today (see link below): 

12 surprising facts about pi to chew on this Pi Day

 

Thursday, June 22, 2023

Pi Music

 

    
I recently listened to an episode of Numberphile which featured data visualization guru Martin Krzywinski and composer Gregory Coles who composed music based on the mathematical constant, pi. I highly recommend listening to this episode: (66) The First and Last Digits of Pi - Numberphile Podcast - YouTube.

Some readers may be confused about the title including "...last digits of Pi." As a clarification, these last digits are based on the latest computation of Pi at the time of the composition. This was the 62.8 trillion digit computation of Pi.

Sunday, March 5, 2023

Euler's Identity

 

Image source: File: Euler's formula.png - Wikimedia Commons

 

There is a single equation that connects five mathematical constants in a simple equality. The equation is known as Euler’s Identity (or Euler’s Equation):


The five constants include:

The base of the natural logarithm, e (2.718…), also know as Euler’s number

The square root of -1, i (the imaginary unit)

The ratio of a circle’s circumference to its diameter, p (3.141...)

The additive identity, 0, and

The multiplicative identity, 1.

 

The basis of Euler’s Identity, is the more general formula, Euler’s Formula, which is:

When x = p, then:


Since cos p = -1 and sin p = 0, the equation becomes:

Or 



Other blog posts and links about Euler:

Math Vacation: Euler Characteristic of Polyhedra (jamesmacmath.blogspot.com)

Math Vacation: Project Euler (jamesmacmath.blogspot.com)

Math Vacation: Using Random Numbers to Estimate Pi (jamesmacmath.blogspot.com)

Math Vacation: Perfect Number Generator (jamesmacmath.blogspot.com)

More on Euler’s Identity: Euler's identity - Wikipedia

More on Euler: Leonhard Euler - Wikipedia

 

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?


Thursday, October 22, 2020

Prime Number Spirals


 

I invite readers to review prior posts on prime numbers and Pi:

Ulam Spiral

Twin Prime Sandwich and a Prime Number Property Rediscovered

Estimation of Pi

I recently viewed a very graphic video by Grant Sanderson who ties the above ideas together with a prime number spiral (of course, I first thought it would be another take on the Ulam spiral but I was pleasantly surprised that there was another prime number spiral) that appears in polar coordinates. I can't simplify the video by Grant Sanderson (3Blue1Brown) any further but here is a link for your viewing: 

Why do prime numbers make these spirals?

My favorite part of the video is when Grant Sanderson reminds us math fans that the more we learn about various aspects of mathematics, the more we see the various connections (for instance the links between polar coordinates, pi and prime numbers).


Sunday, September 6, 2020

One-Time Pad Coding and a Proposal for Improvement

(Image: Iconfinder - Font Awesome on Iconfinder)


A one-time pad (OTP) is a coding system that cannot be cracked. The system uses a set of random characters (the OTP) to encode a message by a sender. The receiver, who also has the OTP, decodes the message. The rules for keeping the OTP secure are:

1. Only the sender and receiver have the OTP. That is, the key is truly secret.
2. The OTP is only used once.
3. The OTP must be at least the same length as the message. If it isn't, then part of the OTP would be used over and that would violate Rule 2 above.
4. The OTP must be truly random.

The term one-time pad is used because the original system used two identical pads of sheets containing random characters. The users would each use one sheet from their pads for a message then destroy the sheets used. 

It has been proven that the OTP provides perfect secrecy. This seems like a bold statement given the ever-increasing power of computers. One would think the code could be cracked by use of the brute force method - using a super-computer to try every possible key to decrypt the encoded message. While a super-computer could try every possible key, in doing so it would also produce every possible message of the given length of the OTP.

Here's an example, I used the Boxentriq Code-Breaking site to encode the ten-character message "KISS POTUS" using the OTP key of "JIHGFEDCBA" to produce the result "TQSRTRVVS". My key doesn't follow Rule 4 but it I'm using it just for demonstration purposes. The supercomputer would eventually get to the key "JIHGFEDCBA" and produce the result "KISS POTUS"; however, it would also produce every other possible ten-character combination, including "KICK POTUS", "I LIKE YOU", "GO HOME NOW" and millions of other possible messages and many more millions of just random, scrambled letters. While the supercomputer "cracked" the code, one would not know which of the millions of results was the intended message.

There are weaknesses of the OTP system. Keeping the key secret is a human weakness. Producing truly random characters is system weakness. 

A Proposal for Improvement
Instead of the sender and receiver having long, identical pads, they agree on the digits of a single irrational number to be used as the key for the OTP. Irrational numbers, such as the square root of 2, can be expressed succinctly (and have the advantage that their digital expansion continues infinitely without any recognizable pattern - square root of 2 = 1.414213562373095048801688724210...).

The users of the code would agree on what irrational number to be the key for their initial message. The sender would reserve the last few characters of the message to indicate the key for the next message - another irrational number. There is an unlimited supply of such numbers. One could also have a program to randomly produce each subsequent key to use. 

I'm new to this subject, so it is very possible someone has already suggested this method. 

A site with resources for many code systems: Boxentriq Code-Breaking 

Wikipedia entry: One-time pad

An example of a ten million digit pad based on the digits of pi. Digits of pi are discussed in these other posts.


8/6/2021 update: also review Vigenere cipher

6/21/2024 updated: I've made a Mathematica routine to encode and decode messages using the strategy noted in this blog post. Leave a comment with your email and I'll share with you.



Tuesday, May 26, 2020

Find Your Birthday or Phone Number in Pi

Princeton University has a site with the mathematical constant, pi, listed to 10 million digits. Readers are invited to search/find their phone number or other favorite numerical sequence in pi. I found my phone number - 7 digits, not 10-digit number, early in the the full sequence.

Tests of random numbers look for that n-digit length of numerical sequences are found with equal frequency in a sufficiently long sequence. I found my 7-digit phone number, but not unexpectedly, not my full 10-digit number, in the listing of pi. My 7-digit phone number represents one of 10 million listings so I wasn't surprised when my 7-digit number showed up. With a listing of pi's digits to more digits, I might find my full 10-digit phone number.

To try this exercise for yourself, go to the Princeton website linked above, and use your browser's "find on this page" tool to enter the numerical sequence of your choice. For my example, I used Microsoft Edge and the "find" tool is Control-F. Matching sequences on the page are highlighted.

Monday, May 25, 2020

Pi - How Many Digits are Really Needed?


A prior post showed how to estimate pi using random numbers. The spreadsheet linked to the post can estimate pi correctly to about 3 places; however, since each set of random numbers is different, the results will vary. Readers are encouraged to extend the spreadsheet beyond 1000 random numbers to improve the accuracy of the estimation. 

Pi taken out to 50 decimal places is:
3.14159265358979323846264338327950288419716939937510...

Princeton University has a post where the digits of pi are listed to 10 million places. Beyond 100 places does not provide much immediate value. Just using pi to the 50 places listed above, one could calculate the circumference of the observable university to an accuracy smaller than the diameter of a single hydrogen atom. Readers are challenged to verify given that the estimate of the diameter of the observable universe is 8.8 x 10^26 m and the size of a hydrogen atom is about 1 angstrom (1/10,000,000,000 m).

For simple estimations, consider the following approximations and their relative error:

Approximation     Relative Error
3                            .045
22/7                       .0004
355/113                 .00000008

Sunday, May 24, 2020

Using Random Numbers to Estimate Pi


A friend recently asked that I post something about the mathematical constant, pi. It is the ratio of a circle's circumference to it diameter. To fifty digits, pi is 

3.14159265358979323846264338327950288419716939937510...

There have been many methods established for calculating pi. One of the more interesting methods is derived from Euler's solution to the zeta function:

Euler showed that this function, in its limit, is:

This result has been used in number theory to establish the probability (P) of two random numbers being relatively prime (having no common factors greater than 1) is approximately:

Now, if we generate a large number of pairs of random numbers, we can count how many are relatively prime and then use the proportion to estimate pi using the formula:
I wrote a Google Sheet to make this approximation using 1000 pairs of random numbers. A link to this sheet is here and you can try for yourself. To refresh or change the 1000 pairs of numbers, simply update a blank cell in the sheet. In my first estimate, there were 612 of the 1000 pairs that were relatively prime yielding a proportion, P, of 0.612. This gave an approximation of pi of 3.13.



 

1679 - One important message sent from Earth 31 years ago

In 1974 an interstellar radio transmission was broadcast to the  globular cluster   Messier 13   from the Arecibo radio telescope in Puerto ...

Popular in last 30 days