Wednesday, April 3, 2024

Are Prime Numbers Predictable?


A recent paper by Han-Linn Li, Shu-Cherng Fang, and Way Kuo of the Department of Computer Science, City University of Hong Kong, suggests that there are cyclic effects among the composites, spawning primes distributed periodically. A link to their paper is given here:  The Periodic Table of Primes.

I'm still reading it now, so I will post more later. Meanwhile, I wanted to share it immediately.

Update: The idea proposed by the paper is that the authors identify 48 integers as "roots." These integers are between 11 and 211, and are either prime or not divisible by 2, 3, 5 or 7. The periodic cycle claimed is 210 which is the product of 2, 3, 5 and 7. 

I recently came across a criticism of the paper which I'm linking here: A New Study About Prime Numbers Is Stirring Up a Mess of Controversy.

Saturday, March 30, 2024

Optimal Stopping Strategy in Dating

An important question in life is how many people to date before deciding on a spouse. I’m the first to admit that matchmaking is much more nuanced than what can be broken down to a formula. 

The dating question is known as an optimal stopping problem. It occurs in many decision-making situations. Here are some other situations where people are faced with the optimal stopping problem:

·       Consider a very tight rental market where you are looking for an apartment. In this “tight” market, one must decide on taking a lease on an apartment immediately upon visiting an available unit. If you go on and continue to shop, the unit will not be available later. So, in this situation, you can’t visit several and come back to pick the best fit for you. Is it better to just take the very first unit seen, or do you check out several units to see what is available and then pick the next unit that suits you?

·       In another situation, consider you are selling property in a buyer’s market. Each week that passes with you not accepting an offer, adds to your expenses (advertising, taxes, mortgage etc.). Do you accept the very first offer, or do you wait for a better offer?

·       Like the dating problem, is the “hiring problem” is  a labor market where workers are scarce. In this situation, you must make an offer to a candidate immediately after the interview. That is, you can’t interview several people and choose the best because the candidates interviewed early in the process will have moved on to take other positions.

·       The “parking problem” is where you are going to event. You can pay for expensive parking at the event, or you can try to find a free parking spot on the street along the way. Time constraints prevent you from exploring the neighborhood and returning to an available spot. Do you take the first available spot or do you chance driving closer?

So, in all these situations, we recognize that we will not always be able to choose the best of the available options. However, we would like to have a strategy that maximizes our probability of choosing the best option.

The approach used to maximize the probability of choosing the best option is to use a stopping rule. In the hiring problem, let n be the number of candidates and r as the stopping point. This means one automatically rejects the first r-1 candidates and then chooses the next candidate who is better than all the prior candidates. There are two suboptimal outcomes using this strategy. The first is when the best candidate is among the early group (r-1) who are automatically rejected. One would interview all the remaining candidates in this case, and none would be better than the best of rejected candidates. Next is when best candidate is late in the series and is not chosen because an earlier candidate met the criterion of being better than the r-1 group.

For a small number of candidates, we can directly determine the best r to maximize our chance of choosing the best candidate. We’ll rate the potential candidates from best to worst as: 1, 2,...n.

With 2 candidates, there are just two ways the candidates can be presented:

1-2 or 2-1

If r=1 or r=2, we have a 50% probability of picking the best candidate.

With 3 candidates, it becomes more interesting. Here are the six possible permutations:

123
132
213
231
312
321

Next, we can see how often we choose the best candidate using different values of r. For r=1. We reject the first r-1 candidates and pick the first that is better than those rejected. For r=1, therefore, we pick the first candidate. Therefore, only in the first two permutations, 123 and 132, we would have chosen the best candidate (33%).

Next, let’s try r=2. So, we reject the first candidate and choose the next candidate who was better the first. Here how each permutation comes out.

123     suboptimal (best candidate rejected)
132     suboptimal (best candidate rejected)
213     best candidate chosen
231     best candidate chosen
312     best candidate chosen
321     suboptimal (2 chosen before 1 is interviewed)

So, r=2 scores the best candidate 50% of the time.

Finally, we check using an r=3. This means we reject the first two candidates. The value of r=3, like r=1, also picks the best candidate 33% of the time.

123     suboptimal (best candidate rejected)
132     suboptimal (best candidate rejected)
213     suboptimal (best candidate rejected)
231     best candidate chosen
312     suboptimal (best candidate rejected)
321     best candidate chosen

We explore all possible values of r, and found our probability of choosing the best candidate is optimized at 50% when r=2. The other two values of r, r=1 and r=3, chose the best candidate 33% (no better than simply selecting the candidate randomly by chance).

With four candidates, they can be presented in 24 ways.

The table below shows the outcome of using the four values of r.

Order

r=1

r=2

r=3

r=4

1234

Yes

No

No

No

1243

Yes

No

No

No

1324

Yes

No

No

No

1342

Yes

No

No

No

1423

Yes

No

No

No

1432

Yes

No

No

No

2134

No

Yes

No

No

2143

No

Yes

No

No

2314

No

Yes

Yes

No

2341

No

Yes

Yes

Yes

2413

No

Yes

Yes

No

2431

No

Yes

Yes

Yes

3124

No

Yes

No

No

3142

No

Yes

No

No

3214

No

No

Yes

No

3241

No

No

Yes

Yes

3412

No

Yes

Yes

No

3421

No

No

No

Yes

4123

No

Yes

No

No

4132

No

Yes

No

No

4213

No

No

Yes

No

4231

No

No

Yes

Yes

4312

No

No

Yes

No

4321

No

No

No

Yes

Times best chosen

6

11

9

6

%

25%

46%

38%

25%

The best value of r is r=2 with the best candidate being chosen 11 times in the 24 permutations of the order in which the candidates are presented.

The following table gives the best r for different sizes of n and the probability, p, of choosing the best candidate (table from Wikipedia).

{\displaystyle n}n

1

2

3

4

5

6

7

8

9

{\displaystyle r}r

1

1

2

2

3

3

3

4

4

p

1.000

0.500

0.500

0.458

0.433

0.428

0.414

0.410

0.406

As the candidate pool increases, both the value of r/n and the probability of selecting the best candidate approaches 0.368, or 1/e. Therefore, the strategy is referred to as the 37% rule. 

Optimal stopping - Wikipedia

4/21/2022 Bigthink article: The 37% rule: How many people should you date before settling down? (bigthink.com)

Vsause has a good video demonstrating the stopping strategy. The Game You Quit - Bing video

Update 3/30/2024 - another article on 37% https://www.upworthy.com/pick-a-random-number-between-100-you-probably-chose-37-and-there-s-a-big-reason-for-that

Thursday, March 28, 2024

Hongkonger Mathematicians

(Image: https://www.iconfinder.com/search/icons?family=flagikon)

This is a short list of famous Hongkonger mathematicians. I invite readers to suggest more.

Shing-Yung Yau (1982 Fields Prize recipient): https://en.wikipedia.org/wiki/Shing-Tung_Yau

Tony F. Chan: https://en.wikipedia.org/wiki/Tony_F._Chan

Tsit Yuen Lam: https://en.wikipedia.org/wiki/Tsit_Yuen_Lam

Lai-Sang Young: https://en.wikipedia.org/wiki/Lai-Sang_Young

Update (4/3/2024): Please see my recent post of The Periodic Table of Primes. If this approach to predicting primes numbers works, there will additional mathematicians to add to this list.


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

 

Wednesday, March 6, 2024

Your Phone Can Solve Any Math Problem: Install Google's Photomath



Your phone can now help you with your math problems. Install Google's app, Photomath. Once installed, you take a photo of your math problem and application will walk you through the steps to get to the problem's solution.

Learn more about the application: https://photomath.com/.

Here is the first photo I tried with Photomath:



The app produced the answer (shown along with the last few steps after setting up the quadratic equation):
Each step can be clicked on in order to explain the individual steps, if necessary.


Large Numbers



In advance of Pi Day, March 14, New Scientist recently published an article describing some very large numbers: These 7 mathematical facts will blow your mind The article includes some familiar numbers, such as Tree(3) and the Dedekind Numbers, and some additional curiosities including Penrose Tiles, mazes, and octonions (the 8-dimension cousin of quaternions

Thursday, February 22, 2024

A Quick Lesson in Data Reliability

(Image: https://www.iconfinder.com/lukaszadam)


A favorite math author of mine, Alex Bellos, writes a math puzzle article for the
Guardian. This week, his puzzle provides a simple lesson on a method for determining if data has been compromised. Here is a link to his article: "Can you solve it? The magical maths that keeps your data safe."

Wednesday, February 21, 2024

Cicada Fest 2024

(Image: https://www.iconfinder.com/khrl11)

This spring and summer there will be an emergence of cicadas in much of the southeastern and midwestern states in the United States. This emergence is unusual as it is the convergence of two cicada broods - one which hibernates 13 years underground and another that hibernates 17 years. The last time both broods emerge in the same year was 1803.

It is not a coincidence that hibernation period of both broods are prime numbers. Having a period of a prime number of years helps reduce the possibility that a predator will have an overlapping period.

Update 4/17/2024: My home state of Illinois is the center of the convergence of the two cicadas broods emerging this year: https://www.cbsnews.com/chicago/news/cicada-maps-illinois-2024/.

Tuesday, February 20, 2024

Why Math is Important

(Image: https://iconfinder.com/kerismaker)

I was recently stunned by a recent internet headline which stated "Buckle up, this viral cow maths puzzle has truly fried everyone’s brains." I knew this was likely just click bait, but I checked it out in case there was a good lesson. Here is the link to the "viral" problem: https://thetab.com/uk/2024/02/20/buckle-up-this-viral-cow-maths-puzzle-has-truly-fried-everyones-brains-353769.

If you don't want to go to the site it stated "I bought a cow for $800; I sold it for $1000; I bought it again for $1000; I sold it again for $1300. How much did I earn?"

As you probably did in your head, I summed: -800+1000-1100+1300=400. The range of answers included $100 - $1500. 

Sometimes such problems have a trick, but I thought this was a straight-forward problem. I believe the only reason this may have been somewhat viral, is that there are too many people who are very uncomfortable with math. My opinion is that this problem on the internet got popular only because many people are uncomfortable performing some basic calculations. Math is important because people need to have confidence in performing calculations to evaluate everyday situations.

Monday, February 19, 2024

IBM's 100th Anniversary

(Image: https://www.iconfinder.com/iconsets/Athena_HD)


The company, International Business Machines or
IBM, was founded in the 1800s. However, it was first known as the Computing-Tabulating-Recording Company, or CTR. It was in 1924 that the company changed its name to IBM. IEEE Spectrum has a good article about this period of time in the early computing history: https://spectrum.ieee.org/ibm-history.

Wednesday, January 31, 2024

Take a tour of the Mandelbrot Set





 (Image: Created by Wolfgang Beyer with the program Ultra Fractal 3. - Own work)


The Mandelbrot set is a two-dimension set that is described by a relatively simple equation, yet it produces a very complex design. In 1980,  Benoit Mandelbrot made high-quality visualizations of the set, named after him, while working at IBM's Thomas J. Watson Research Center. Quantamagazine published a very thorough history of the study of the Manelbort set. In that article, a YouTube video was included that explores its un-ending complexity and many interesting features.

You can view it here: A Long Zoom Into the Mandelbrot Set.

I also recommend this video: The Mandelbrot Set.

100 OEIS Contributions

100
Today, I achieved a milestone in reaching my 100th contribution to the On-Line Encyclopedia of Integer Sequences (OEIS), including 13 new sequences. In a prior post, I wrote about another contributor, Michael S. Branicky, who wrote at least one Python program for an OEIS sequence every day for a year. This inspired me to do the same thing and every day for the last two months I've written a Mathematica program for existing OEIS sequences. Practicing every day is a good way to enhance your ability in a skill.


Friday, January 19, 2024

Fast Space Travel

(Image: https://www.iconfinder.com/kreasikanvas)

Determining the time to complete interstellar space travel is a matter of simple math. Time = distance/velocity. Our closest neighbor, Alpha Centauri, is 38 trillion kilometers away. As of this date, the fastest probe made by humans is the NASA Parker Solar Probe, which achieved a velocity of 386,863 kilometers per hour. Such a craft would require over 10,000 years to reach Alpha Centauri. 

Aeon recently posted a five-minute video explaining a few ways we might be able to reduce interstellar travel time. It is appropriately named: "Go incredibly fast."

Sunday, January 7, 2024

Learn Artificial Intelligence Skills for Free

(Image: https://www.iconfinder.com/ratch0013)

IBM offers a suite of on-line courses for free. Get an account and sign up at: SkillsBuild. I'm currently taking the plan that leads to a certificate in Artificial Intelligence Fundamentals. This consists of six courses, each taking about 1 to 2 hours to complete. I'm taking the course for my general knowledge, as artificial intelligence is becoming more and more a part of  all technologies in our lives.

Update (1/16/2024) - I completed the course and have the credit recorded in the Credly App.

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