Inside the mind of a master procrastinator - Tim Urban - TED2016

So in college, I was a government major, which means I had to write a lot of papers. Now, when a normal student writes a paper, they might spread the work out a little like this. So, you know –

(Laughter)

you get started maybe a little slowly, but you get enough done in the first week that, with some heavier days later on, everything gets done, things stay civil.

(Laughter)

And I would want to do that like that. That would be the plan. I would have it all ready to go, but then, actually, the paper would come along, and then I would kind of do this.

(Laughter)

And that would happen every single paper.

But then came my 90-page senior thesis, a paper you’re supposed to spend a year on. And I knew for a paper like that, my normal work flow was not an option. It was way too big a project. So I planned things out, and I decided I kind of had to go something like this. This is how the year would go. So I’d start off light, and I’d bump it up in the middle months, and then at the end, I would kick it up into high gear just like a little staircase. How hard could it be to walk up the stairs? No big deal, right?

But then, the funniest thing happened. Those first few months? They came and went, and I couldn’t quite do stuff. So we had an awesome new revised plan.

(Laughter)

And then –

(Laughter)

But then those middle months actually went by, and I didn’t really write words, and so we were here. And then two months turned into one month, which turned into two weeks. And one day I woke up with three days until the deadline, still not having written a word, and so I did the only thing I could: I wrote 90 pages over 72 hours, pulling not one but two all-nighters – humans are not supposed to pull two all-nighters – sprinted across campus, dove in slow motion, and got it in just at the deadline.

I thought that was the end of everything. But a week later I get a call, and it’s the school. And they say, “Is this Tim Urban?” And I say, “Yeah.” And they say, “We need to talk about your thesis.” And I say, “OK.” And they say, “It’s the best one we’ve ever seen.”

(Laughter)

(Applause)

That did not happen.

(Laughter)

It was a very, very bad thesis.

(Laughter)

I just wanted to enjoy that one moment when all of you thought, “This guy is amazing!”

(Laughter)

No, no, it was very, very bad. Anyway, today I’m a writer-blogger guy. I write the blog Wait But Why. And a couple of years ago, I decided to write about procrastination. My behavior has always perplexed the non-procrastinators around me, and I wanted to explain to the non-procrastinators of the world what goes on in the heads of procrastinators, and why we are the way we are. Now, I had a hypothesis that the brains of procrastinators were actually different than the brains of other people. And to test this, I found an MRI lab that actually let me scan both my brain and the brain of a proven non-procrastinator, so I could compare them. I actually brought them here to show you today. I want you to take a look carefully to see if you can notice a difference. I know that if you’re not a trained brain expert, it’s not that obvious, but just take a look, OK? So here’s the brain of a non-procrastinator.

(Laughter)

Now … here’s my brain.

(Laughter)

There is a difference. Both brains have a Rational Decision-Maker in them, but the procrastinator’s brain also has an Instant Gratification Monkey. Now, what does this mean for the procrastinator? Well, it means everything’s fine until this happens.

[This is a perfect time to get some work done.] [Nope!]

So the Rational Decision-Maker will make the rational decision to do something productive, but the Monkey doesn’t like that plan, so he actually takes the wheel, and he says, “Actually, let’s read the entire Wikipedia page of the Nancy Kerrigan/ Tonya Harding scandal, because I just remembered that that happened.

(Laughter)

Then –

(Laughter)

Then we’re going to go over to the fridge, to see if there’s anything new in there since 10 minutes ago. After that, we’re going to go on a YouTube spiral that starts with videos of Richard Feynman talking about magnets and ends much, much later with us watching interviews with Justin Bieber’s mom.

(Laughter)

“All of that’s going to take a while, so we’re not going to really have room on the schedule for any work today. Sorry!”

(Sigh)

Now, what is going on here? The Instant Gratification Monkey does not seem like a guy you want behind the wheel. He lives entirely in the present moment. He has no memory of the past, no knowledge of the future, and he only cares about two things: easy and fun.

Now, in the animal world, that works fine. If you’re a dog and you spend your whole life doing nothing other than easy and fun things, you’re a huge success!

(Laughter)

And to the Monkey, humans are just another animal species. You have to keep well-slept, well-fed and propagating into the next generation, which in tribal times might have worked OK. But, if you haven’t noticed, now we’re not in tribal times. We’re in an advanced civilization, and the Monkey does not know what that is. Which is why we have another guy in our brain, the Rational Decision-Maker, who gives us the ability to do things no other animal can do. We can visualize the future. We can see the big picture. We can make long-term plans. And he wants to take all of that into account. And he wants to just have us do whatever makes sense to be doing right now. Now, sometimes it makes sense to be doing things that are easy and fun, like when you’re having dinner or going to bed or enjoying well-earned leisure time. That’s why there’s an overlap. Sometimes they agree. But other times, it makes much more sense to be doing things that are harder and less pleasant, for the sake of the big picture. And that’s when we have a conflict. And for the procrastinator, that conflict tends to end a certain way every time, leaving him spending a lot of time in this orange zone, an easy and fun place that’s entirely out of the Makes Sense circle. I call it the Dark Playground.

(Laughter)

Now, the Dark Playground is a place that all of you procrastinators out there know very well. It’s where leisure activities happen at times when leisure activities are not supposed to be happening. The fun you have in the Dark Playground isn’t actually fun, because it’s completely unearned, and the air is filled with guilt, dread, anxiety, self-hatred – all of those good procrastinator feelings. And the question is, in this situation, with the Monkey behind the wheel, how does the procrastinator ever get himself over here to this blue zone, a less pleasant place, but where really important things happen?

Well, turns out the procrastinator has a guardian angel, someone who’s always looking down on him and watching over him in his darkest moments – someone called the Panic Monster.

(Laughter)

Now, the Panic Monster is dormant most of the time, but he suddenly wakes up anytime a deadline gets too close or there’s danger of public embarrassment, a career disaster or some other scary consequence. And importantly, he’s the only thing the Monkey is terrified of. Now, he became very relevant in my life pretty recently, because the people of TED reached out to me about six months ago and invited me to do a TED Talk.

(Laughter)

Now, of course, I said yes. It’s always been a dream of mine to have done a TED Talk in the past.

(Laughter)

(Applause) But in the middle of all this excitement, the Rational Decision-Maker seemed to have something else on his mind. He was saying, “Are we clear on what we just accepted? Do we get what’s going to be now happening one day in the future? We need to sit down and work on this right now.” And the Monkey said, “Totally agree, but let’s just open Google Earth and zoom in to the bottom of India, like 200 feet above the ground, and scroll up for two and a half hours til we get to the top of the country, so we can get a better feel for India.”

(Laughter)

So that’s what we did that day.

(Laughter)

As six months turned into four and then two and then one, the people of TED decided to release the speakers. And I opened up the website, and there was my face staring right back at me. And guess who woke up?

(Laughter)

So the Panic Monster starts losing his mind, and a few seconds later, the whole system’s in mayhem.

(Laughter)

And the Monkey – remember, he’s terrified of the Panic Monster – boom, he’s up the tree! And finally, finally, the Rational Decision-Maker can take the wheel and I can start working on the talk.

Now, the Panic Monster explains all kinds of pretty insane procrastinator behavior, like how someone like me could spend two weeks unable to start the opening sentence of a paper, and then miraculously find the unbelievable work ethic to stay up all night and write eight pages. And this entire situation, with the three characters – this is the procrastinator’s system. It’s not pretty, but in the end, it works. This is what I decided to write about on the blog a couple of years ago.

When I did, I was amazed by the response. Literally thousands of emails came in, from all different kinds of people from all over the world, doing all different kinds of things. These are people who were nurses, bankers, painters, engineers and lots and lots of PhD students.

(Laughter)

And they were all writing, saying the same thing: “I have this problem too.” But what struck me was the contrast between the light tone of the post and the heaviness of these emails. These people were writing with intense frustration about what procrastination had done to their lives, about what this Monkey had done to them. And I thought about this, and I said, well, if the procrastinator’s system works, then what’s going on? Why are all of these people in such a dark place?

Well, it turns out that there’s two kinds of procrastination. Everything I’ve talked about today, the examples I’ve given, they all have deadlines. And when there’s deadlines, the effects of procrastination are contained to the short term because the Panic Monster gets involved. But there’s a second kind of procrastination that happens in situations when there is no deadline. So if you wanted a career where you’re a self-starter – something in the arts, something entrepreneurial – there’s no deadlines on those things at first, because nothing’s happening, not until you’ve gone out and done the hard work to get momentum, get things going. There’s also all kinds of important things outside of your career that don’t involve any deadlines, like seeing your family or exercising and taking care of your health, working on your relationship or getting out of a relationship that isn’t working.

Now if the procrastinator’s only mechanism of doing these hard things is the Panic Monster, that’s a problem, because in all of these non-deadline situations, the Panic Monster doesn’t show up. He has nothing to wake up for, so the effects of procrastination, they’re not contained; they just extend outward forever. And it’s this long-term kind of procrastination that’s much less visible and much less talked about than the funnier, short-term deadline-based kind. It’s usually suffered quietly and privately. And it can be the source of a huge amount of long-term unhappiness, and regrets. And I thought, that’s why those people are emailing, and that’s why they’re in such a bad place. It’s not that they’re cramming for some project. It’s that long-term procrastination has made them feel like a spectator, at times, in their own lives. The frustration is not that they couldn’t achieve their dreams; it’s that they weren’t even able to start chasing them.

So I read these emails and I had a little bit of an epiphany – that I don’t think non-procrastinators exist. That’s right – I think all of you are procrastinators. Now, you might not all be a mess, like some of us,

(Laughter)

and some of you may have a healthy relationship with deadlines, but remember: the Monkey’s sneakiest trick is when the deadlines aren’t there.

Now, I want to show you one last thing. I call this a Life Calendar. That’s one box for every week of a 90-year life. That’s not that many boxes, especially since we’ve already used a bunch of those. So I think we need to all take a long, hard look at that calendar. We need to think about what we’re really procrastinating on, because everyone is procrastinating on something in life. We need to stay aware of the Instant Gratification Monkey. That’s a job for all of us. And because there’s not that many boxes on there, it’s a job that should probably start today.

Well, maybe not today, but …

(Laughter)

You know. Sometime soon.

Thank you.

(Applause)


LeetCode - Algorithms - 866. Prime Palindrome

Problem

866. Prime Palindrome

Java

Brute-force

Except for 11, all palindromic primes have an odd number of digits, because the divisibility test for 11 tells us that every palindromic number with an even number of digits is a multiple of 11.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class Solution {
public int primePalindrome(int n) {
if (n <= 2) return 2;
else if (n == 3) return 3;
else if (n > 3 && n <= 5) return 5;
else if (n > 5 && n <= 7) return 7;
else if (n > 7 && n <= 11) return 11;
else if (n >= 1e7 && n <= 1e8) return 100030001;
else {
int p = 101;
for (int i = n; i < Integer.MAX_VALUE; i++) {
if ((i & 1) == 1) {
int digits = (int) (Math.floor(Math.log10(i))) + 1;
if ((digits & 1) == 1) {
if (isPrime(i)) {
if (isPalindrome(i)) {
p = i;
break;
}
}
}
}
}
return p;
}
}

private boolean isPrime(int n) {
if (n < 2) return false;
if (n == 2 || n == 3) return true;
if (n % 2 == 0 || n % 3 == 0) return false;
int sqrtN = (int) Math.sqrt(n) + 1;
for (int i = 6; i <= sqrtN; i += 6) {
if (n % (i - 1) == 0 || n % (i + 1) == 0) return false;
}
return true;
}

private boolean isPalindrome(int x) {
boolean b = false;
int originalInteger = x;
int reversedInteger = 0, remainder = 0;
int t = x;
while (t > 0) {
remainder = t % 10;
reversedInteger = reversedInteger * 10 + remainder;
t /= 10;
}
if (originalInteger == reversedInteger)
b = true;
return b;
}
}

Submission Detail

  • 60 / 60 test cases passed.
  • Runtime: 1087 ms, faster than 5.56% of Java online submissions for Prime Palindrome.
  • Memory Usage: 35.5 MB, less than 97.78% of Java online submissions for Prime Palindrome.

How the COVID-19 vaccines were created so quickly - Kaitlyn Sadtler and Elizabeth Wayne - TED-Ed - Transcript

In the 20th century, most vaccines took well over a decade to research, test, and produce. But the vaccines for COVID-19 cleared the threshold for emergency use in less than 11 months. The secret behind this speed is a medical technology that’s been developing for decades: the mRNA vaccine. This new treatment uses our body’s existing cellular machinery to trigger an immune response, protecting us from viruses without ever experiencing an infection. And in the future, this approach might be able to treat new diseases almost as quickly as they emerge. So how do these revolutionary vaccines work?

The key ingredient is in the name. mRNA, or messenger ribonucleic acid, is a naturally occurring molecule that encodes the instructions for producing proteins. When our cells process mRNA, a part of the cell called the ribosome translates and follows these instructions to build the encoded protein.

The mRNA in these vaccines works in exactly the same way, but scientists use the molecule to safely introduce our body to a virus. First, researchers encode trillions of mRNA molecules with the instructions for a specific viral protein. This part of the virus is harmless by itself, but helpful for training our body’s immune response. Then, they inject those molecules into a nanoparticle roughly 1,000 times smaller than the average cell. This nanoparticle is made of lipids, the same type of fatty material that forms the membrane around our cells. But these lipids have been specially engineered to protect the mRNA on its journey through the body and assist its entry into the cell. Lastly, the final ingredients are added: sugars and salt to help keep the nanoparticles intact until they reach their destination.

Before use, the vaccine is kept at a temperature of -20 to -80 degrees Celsius to ensure none of the components break down. Once injected, the nanoparticles disperse and encounter cells. The lipid coating on each nanoparticle fuses with the lipid membrane of a cell and releases the mRNA to do its work. At this point, we should note that while the vaccine is delivering viral genetic material into our cells, it’s impossible for this material to alter our DNA. mRNA is a short-lived molecule that would need additional enzymes and chemical signals to even access our DNA, let alone change it. And none of these DNA altering components are present in mRNA vaccines.

Once inside the cell, the ribosome translates the mRNA’s instructions and begins assembling the viral protein. In COVID-19 vaccines, that protein is one of the spikes typically found on the virus’s surface. Without the rest of the virus this lone spike is not infectious, but it does trigger our immune response. Activating the immune system can be taxing on the body, resulting in brief fatigue, fever, and muscle soreness in some people. But this doesn’t mean the recipient is sick— it means the vaccine is working. The body is producing antibodies to fight that viral protein, that will then stick around to defend against future COVID-19 infections. And since this particular protein is likely to be found in most COVID variants, these antibodies should reduce the threat of catching new strains.

This approach offers significant advantages over previous vaccines. Traditional vaccines contain weakened versions of live viruses or amputated sections of a virus, both of which required time intensive research to prepare and unique chemical treatments to safely inject. But mRNA vaccines don’t actually contain any viral particles, so they don’t have to be built from scratch to safely adjust each virus. In fact, every mRNA vaccine could have roughly the same list of ingredients. Imagine a reliable, robustly tested vaccine that can treat any disease by swapping out a single component. To treat a new illness, researchers would identify the right viral protein, encode it into mRNA, and then swap that mRNA into the existing vaccine platform. This could make it possible to develop new vaccines in weeks, giving humanity a flexible new tool in the never-ending fight against disease.

My English Words List - December - 2021

endemic

endemic

adjective

COVID-19 is likely to become an endemic disease.

A Nature survey shows many scientists expect the virus that causes COVID-19 to become endemic, but it could pose less danger over time.

Eighteen months later, most leading immunologists believe Covid-19 will become endemic—a persistent but manageable threat on par with seasonal flu—conceivably by the end of 2022.

Covid will become an endemic disease as early as 2024, Pfizer executives said Friday, meaning the virus will transition from a global emergency to a constant presence causing regional outbreaks across the world — much like the flu.

noun

It typically takes a few years for a new viral pathogen to move from pandemic to endemic

omicron

omicron

noun

  • the 15th letter of the Greek alphabet

In November 2021, a COVID-19 variant was named Omicron, after the 15th letter of the Greek alphabet.

Omicron

instant

instant

adjective

instant coffee

Instant coffee

Is this coffee instant or regular?

Instant coffee

Instant noodle

Instant noodle in typical block form (dried)

Instant noodle

Instant Pot

Instant Pot DUO60

Instant Pot

clementine

clementine

noun

Five clementines whole, peeled, halved and sectioned

jicama

jicama

noun

Fresh jícama for sale at a farmers' market

Pachyrhizus erosus

paprika

paprika

noun

Mallorcan pimentón tap de cortí paprika

tomato sauce made with garlic, paprika, and pepper

Paprika

Worcestershire sauce

Worcestershire sauce

noun

Worcestershire sauce in a dish

Worcestershire sauce

kale

kale

noun

Curly kale, one of the many varieties of kale

Kale

bunch

bunch

noun

a bunch of grapes

a bunch of friends

a bunch of children

a bunch of money

He always had a bunch of keys on his belt.

Dried herbs hung in bunches from the kitchen rafters.

parchment

parchment

noun

Parchment with a quill and ink

Central European (Northern) type of finished parchment made of goatskin stretched on a wooden frame

Ancient people wrote on parchment.

Archimedes Palimpsest

recipe

recipe

noun

A recipe in a cookbook for pancakes with the prepared ingredients

This is one of my grandmother’s recipes.

Recipe

palindrome

palindrome

noun

Ambigram of the palindrome "Dogma I am God"

The word “dad” and the number “1881” are palindromes.

Palindrome

cartridge

cartridge

noun

  • a case or container that holds a substance, device, or material which is difficult, troublesome, or awkward to handle and that usually can be easily changed

The printer needs a new ink cartridge.

Two cartridges (one with black ink, one with colored inks) installed in an inkjet printer

Ink cartridge

A modern round

Cartridge (firearms)

clipper

clipper

noun

An electric trimmer, Electric hair clippers

 variety of nail clippers; the clipper on the left is in the plier style; the centre and right clippers are in the compound lever style

  • a device used for cutting something

hair clippers

nail clippers

Hair clipper

Nail clipper

screwdriver

screwdriver

noun

A slotted or "flat-blade" screwdriver

Screwdriver

screw

screw

noun

An assortment of screws

Screw

verb

Remember to screw the lid back on the jar.

Screw the light bulb into the fixture.

Screw the cap on tight.

The lid screws onto the jar.

waiver

waiver

noun

Please read the following waivers and agreements carefully.

a criminal defendant’s waiver of a jury trial

The college got a special waiver from the town to exceed the building height limit.

He signed an insurance waiver before surgery.

Waiver

waive

waive

verb

waive a jury trial

waive the fee

She waived her right to a lawyer.

The university waives the application fee for low-income students.

The bank manager waived the charge (= said we didn’t have to pay), as we were old and valued customers.

toad

toad

noun

Toad

toad

broom

broom

noun

Sorghum-made brooms with long handles as well as short handles

durian

durian

noun

A bunch of durian

Durian

aisle

aisle

noun

An aisle of Bristol Cathedral, Bristol, England.

The bride walked down the aisle to the altar.

Aisle

yell

yell

verb

  • to make a sudden, loud cry

We saw people yelling for help.

I heard someone yelling my name.

billiards

billiards

noun

Pool table with equipment.

Cue sports

stapler

stapler

noun

Office stapler

Stapler

awkward

awkward

adjective

an awkward attempt

an awkward design

She is awkward at dancing.

The machine is very awkward to operate.

passage

passage

noun

Her office is at the end of the passage.

the passage of food through the digestive system

the passage of air into and out of the lungs

the passage from life to death

Hallway

kiddo

kiddo

noun

  • child, kid
  • used by an adult to speak to a young person

reverence

reverence

noun

Their religion has/shows a deep reverence for nature.

Reverence for or worship of the dead is found in all societies, because belief in life after death is universal. — World Religions, 1983

Reverence for Life says that the only thing we are really sure of is that we live and want to go on living. This is something that we share with everything else that lives, from elephants to blades of grass—and, of course, every human being. So we are brothers and sisters to all living things, and owe to all of them the same care and respect, that we wish for ourselves.

Reverence for Life

vestibule

vestibule

noun

A floor plan with a modern vestibule shown in red.

please leave your wet boots in the vestibule

Synonyms

entranceway, entry, entryway, hall, hallway, lobby

Vestibule (architecture)

incisor

incisor

noun

  • a tooth (as any of the four front teeth of the human upper or lower jaw) for cutting

Permanent teeth of the right half of the lower dental arch, seen from above.

canine

canine

noun

  • a conical pointed tooth especially : one situated between the lateral incisor and the first premolar

Medical animation showing Canine teeth and their arrangement in the mouth of an adult human being.

molar

molar

noun

  • a large tooth near the back of the mouth with a broad surface used for grinding

Image showing molar teeth and their arrangement in the mouth of an adult human being

ditch

ditch

verb

ditch an old car

If you are using a single-layer cloth mask to protect yourself from a new COVID-19 variant that is believed to be more than six times as infectious as Delta “ditch it, full stop.”

Anglosphere

Anglosphere

noun

the countries of the world in which the English language and cultural values predominate

Anglosphere

platter

platter

noun

A salad platter.

large platters of hot turkey and ham

She ordered the seafood platter.

Platter (dishware)

oat

oat

noun

Oat plants with inflorescences

Oat grains in their husks

Oat

earbud

earbud

noun

In-ear monitors extend into the ear canal, providing isolation from outside noise.

  • a small earphone inserted into the ear

Headphones

bud

bud

noun

Inflorescence bud scales in Halesia carolina

The bush has plenty of buds but no flowers yet.

Bud

verb

The trees budded early this spring.

canonical

canonical

adjective

As a canonical example

His proposals were generally accepted as canonical.

gospel

gospel

noun

a reading from the Gospel of St. John

Gospel

drizzle

drizzle

Drizzle

noun

  • rain that falls lightly in very small drops

Yes, it’s raining, but it’s only a drizzle.

the intermittent drizzle was just heavy enough to spoil all of our outdoor activities

verb

  • to rain in very small drops

It was beginning to drizzle, so she pulled on her hood.

rebate

rebate

noun

There is a $50 rebate offered with the printer.

Mail in your receipt and get a rebate.

Rebate (marketing)

Tax refund

wrestle

wrestle

verb

They’ll be wrestling each other for the championship.

good-for-nothing

good-for-nothing

adjective

  • of no use or value

sparrow

sparrow

noun

  • a common type of small bird that usually has brown or gray feathers

Sparrow in Tharparkar, Sindh

Old World sparrow

New World sparrow

parrot

parrot

noun

Eclectus parrots, male left and female right

Parrot

verb

Some of the students were just parroting what the teacher said.

the toddler parroted everything her father said, often to the latter’s embarrassment

biodegradable

biodegradable

adjective

biodegradable trash bags

fasten

fasten

verb

Make sure the lid is tightly fastened.

two boards fastened together by nails

fastener

Hooks

Loops

A shoe using hook-and-loop closures

Hook-and-loop fastener

trampoline

trampoline

noun

House of Air Trampoline Park in San Francisco

Trampoline

Primes

by Grant Sanderson

The primes,
through times,

mystified
those who pried.

One fact answers why
they’re simple yet sly:

Layers of abstraction yield
complex forms when pierced and peeled.

Addition lies under multiplication,
defining him as repeated summation.

Then he defines primes as the atoms of integers,
for when multiplied, they give numbers their signatures.

But when we breach the layer between these two distinct operations,
asking about how primes add and subtract, there are endless frustrations.

Even innocuous questions, “what are all their sums?”, or “how often do they differ by two?”,
stump everyone who has ever lived, with progress made only quite recently by just a few.

However, to recruit for and progress math we need to have such questions which can be phrased simply and remain unsolved.
What child does not hear such conjectures and dream, if only for a moment, that they will be the one to see them resolved?

For otherwise the once vigorous curiosity of a child towards math’s patterns, as they grow older, tends to grow tame,
just as the rhyme and rhythm of the primes seems to fade as numbers grow, though in both the underlying patterns remain the same.


  • Math Poetry
  • 20 is not a prime number, 21 is not a prime number, 2021(=43x47) is not a prime number.
  • 11 is a prime number, 29 is a prime number, 1129 is a prime number.

Congruent Number and Elliptic Curve

Once Marcus du Sautoy asked Andrew Wiles what he’d scribble in the margin he’d proved to tease next generation. Answer: congruent number problem

A congruent number is a positive integer that is the area of a right triangle with three rational number sides.

Right triangle with the area 6, a congruent number.

\(
\displaystyle
\begin{matrix}
a^{2}+b^{2}&=&c^{2},\\
\frac{1}{2}ab&=&n.
\end{matrix}
\)

\(
\displaystyle
\begin{matrix}
a^2 = c^2 - b^2 \\
2a^2 + 2ac = a^2 + c^2 + 2ac - b^2 \\
2ab(a+c) = b(a+c)^{2} - b^{3} \\
4n(a+c) = b(a+c)^{2}-b^{3} \\
\frac{4n(a+c)}{b^4} = \frac{(a+c)^{2}}{b^{3}}-\frac{1}{b} \\
\frac{4n^{4}(a+c)^{2}}{b^{4}} = \frac{n^{3}(a+c)^{3}}{b^3}-\frac{n^3(a+c)}{b} \\
(\frac{2n^2(a+c)^2}{b^2})^{2} = (\frac{n(a+c)}{b})^{3} - n^{2}(\frac{n(a+c)}{b}) \\
set \hspace{1mm} y = \frac{2n^2(a+c)}{b^2}, \\
x = \frac{n(a+c)}{b} \\
y^2 = x^3 - n^2x
\end{matrix}
\)

n is a congruent number if and only if the elliptic curve \( y^2 = x^3-n^2x \) contains a rational point with \( y \neq 0 \)

\(
\displaystyle
\begin{matrix}
x = \frac{n(a+c)}{b} = \frac{n(c+a)(c-a)}{b(c-a)} = \frac{nb}{c-a} \\
y = \frac{2n^2(a+c)}{b^2} = \frac{2n^2(a+c)}{c^2-a^2} = \frac{2n^2}{c-a} \\
\frac{x}{y}=\frac{b}{2n} \\
b = \frac{2nx}{y}, \\
a=\frac{2a^2+2ac}{2(a+c)} \\
=\frac{a^2+2ac+a^2}{2(a+c)} \\
=\frac{a^2+2ac+c^2-b^2}{2(a+c)} \\
=\frac{(a+c)^2-b^2}{2(a+c)} \\
=\frac{n^2(a+c)^2-b^2n^2}{2n^2(a+c)} \\
=\frac{\frac{n(a+c)}{b}^{2}-n^2}{\frac{2n^2(a+c)}{b^2}} \\
=\frac{x^2-n^2}{y}, \\
c=\frac{2c(a+c)}{2(a+c)} \\
=\frac{2c^2+2ac}{2(a+c)} \\
=\frac{a^2+c^2+2ac+c^2-a^2}{2(a+c)} \\
=\frac{(a+c)^2+c^2-a^2}{2(a+c)} \\
=\frac{(a+c)^2+b^2}{2(a+c)} \\
=\frac{n^2(a+c)^2+b^2n^2}{2n^2(a+c)} \\
=\frac{(\frac{n(a+c)}{b})^2+n^2}{\frac{2n^2(a+c)}{b^2}} \\
=\frac{x^2+n^2}{y}
\end{matrix}
\)

We have a bijection(one-to-one correspondence)

\(
\Large
\{(a,b,c) \in \mathbb{Q}^{3} \mid a^2+b^2=c^2,\frac{ab}{2}=n \} \leftrightarrow \{(x,y) \in \mathbb{Q}^{2} \mid y^2 = x^3-n^2x \hspace{1mm} and \hspace{1mm} y \neq 0 \}
\)

with inverse functions

\(
\Large
(a,b,c) \mapsto (\frac{nb}{c-a},\frac{2n^2}{c-a}) \hspace{8pt} and \hspace{8pt} (x,y) \mapsto (\frac{x^2-n^2}{y},\frac{2nx}{y},\frac{x^2+n^2}{y})
\)

\( y^2 = x^3-25x \) has rational point \( x=-4, y= \pm 6 \), 5 is a congruent number.

\(
\begin{align*}
\begin{cases}
a = \frac{-4^2-5^2}{-6} = \frac{3}{2} \\
b = \frac{2\times5\times-4}{-6} = \frac{20}{3} \\
c = \frac{-4^2+5^2}{6} = \frac{41}{6}
\end{cases}
\end{align*}
\)

\( y^2 = x^3-36x \) has rational points
\(
\displaystyle
\begin{matrix}
x=-3,\hspace{1mm} y= \pm 9, \\
x=-2,\hspace{1mm} y= \pm 8, \\
x=12,\hspace{1mm} y= \pm 36, \\
x=18,\hspace{1mm} y= \pm 72, \\
\end{matrix}
\),

6 is a congruent number.

\(
\begin{align*}
\begin{cases}
a = \frac{12^2-6^2}{36} = 3 \\
b = \frac{2\times6\times12}{36} = 4 \\
c = \frac{12^2+6^2}{36} = 5
\end{cases}
\end{align*}
\)


  • One very old problem concerned with rational points on elliptic curves is the congruent number problem. One way of stating it is to ask which rational integers can occur as the areas of right-angled triangles with rational length sides. Such integers are called congruent numbers. … It is closely related to the problem of determining the rational points on the curve \( C_n : y^2 = x^3 − n^2x \). … As an example of this, consider the conjecture of Euler from 1769 that \( x^4 + y^4 + z^4 = t^4 \) has no non-trivial solutions. By finding a curve of genus 1 on the surface and a point of infinite order on this curve, Noam Elkies found the solution \( 2682440^4 + 15365639^4 + 18796760^4 = 20615673^4 \) . His argument shows that there are infinitely many solutions to Euler’s equation. – The Birch And Swinnerton-Dyer Conjecture, by Andrew Wiles
  • Assuming the BSD Conjecture and using Tunnell’s theorem, we conclude that \( 1234567 = 127 \times 9721, 1234567 \equiv 7 \hspace{2mm} (mod \hspace{1mm} 8) \) is indeed a congruent number. (Chapter 15 The Conjecture of Birch And Swinnerton-Dyer, 6 The Congruent Number Problem, Elliptic Tales: Curves, Counting, and Number Theory, by Avner Ash and Robert Gross)

Managing Oneself - Harvard Business Review - January 2005 issue

by Peter F. Drucker

Success in the knowledge economy comes to those who know themselves—their strengths, their values, and how they best perform.

Summary. Throughout history, people had little need to manage their careers—they were born into their stations in life or, in the recent past, they relied on their companies to chart their career paths. But times have drastically changed. Today we must all learn to manage ourselves.

What does that mean? As Peter Drucker tells us in this seminal article first published in 1999, it means we have to learn to develop ourselves. We have to place ourselves where we can make the greatest contribution to our organizations and communities. And we have to stay mentally alert and engaged during a 50-year working life, which means knowing how and when to change the work we do.

It may seem obvious that people achieve results by doing what they are good at and by working in ways that fit their abilities. But, Drucker says, very few people actually know—let alone take advantage of—their fundamental strengths.

He challenges each of us to ask ourselves: What are my strengths? How do I perform? What are my values? Where do I belong? What should my contribution be? Don’t try to change yourself, Drucker cautions. Instead, concentrate on improving the skills you have and accepting assignments that are tailored to your individual way of working. If you do that, you can transform yourself from an ordinary worker into an outstanding performer.

Today’s successful careers are not planned out in advance. They develop when people are prepared for opportunities because they have asked themselves those questions and have rigorously assessed their unique characteristics. This article challenges readers to take responsibility for managing their futures, both in and out of the office.


History’s great achievers—a Napoléon, a da Vinci, a Mozart—have always managed themselves. That, in large measure, is what makes them great achievers. But they are rare exceptions, so unusual both in their talents and their accomplishments as to be considered outside the boundaries of ordinary human existence. Now, most of us, even those of us with modest endowments, will have to learn to manage ourselves. We will have to learn to develop ourselves. We will have to place ourselves where we can make the greatest contribution. And we will have to stay mentally alert and engaged during a 50-year working life, which means knowing how and when to change the work we do.

What Are My Strength?

Most people think they know what they are good at? They are ususlly wrong.

The only way to discover your strength is through feedback analysis.

How Do I Perform?

Am I a reader or a listener?

How do I learn?

What Are My Values?

I call it the “mirror test”.

Where Do I Belong?

What Should I Contribute?

To answer it, they must address three distinct elements:

  • What does the situation require?
  • Given my strength, my way of performing, and my values, how can I make the greatest contribution to what needs to be done?
  • And finally, What results have to be achieved to make a difference?

Responsibility for Relationships

  • The first is to accept the fact that other people are as much individuals as you youself are.
  • The second part of relationship responsibility is taking responsibility for communication.

The Second Half of Your Life

There are three ways to develop a second career:

  • The first is actually to start one. We will see many more second careers undertaken by people who have achived modest success in their first jobs.
  • The second way to prepare for the second half of yours life is to develop a parallel career.
  • Fially, there are the social entrepreneurs.

In effect, managing oneself demands that each knowledge worker think and behave like a chief executive office.

Knowledge workers outlive their organizations, and they are mobile. The need to manage oneself is therefore creating a revolution in human affairs.


Peter F. Drucker is the Marie Rankie Clarke Professor of Social Science and Management(Emeritus) at Claremont Graduate University in Claremont, California. This article is an excerpt from his book Management Challenges for the 21st Century(HarperCollins, 1999)


Scientific method & Debugging

Scientific method

The scientific method is often represented as an ongoing process.

© Robert Sedgewick and Kevin Wayne

  • Observe some feature of the natural world, generally with precise measurements.
  • Hypothesize a model that is consistent with the observations.
  • Predict events using the hypothesis.
  • Verify the predictions by making further observations.
  • Validate by repeating until the hypothesis and observations agree.

One of the key tenets of the scientific method is that the experiments we design must be reproducible, so that others can convince themselves of the validity of the hypothesis. Hypotheses must also be falsifiable, so that we can know for sure when a given hypothesis is wrong (and thus needs revision). As Einstein famously is reported to have said (“No amount of experimentation can ever prove me right; a single experiment can prove me wrong”), we can never know for sure that any hypothesis is absolutely correct; we can only validate that it is consistent with our observations.

Scientific Debugging

  1. Observe. we look at the behavior of the program. What are its outputs? What information is it displaying? How is it responding to user input?
  2. Hypothesize. we try to divide the set of possible causes into multiple independent groups. For example, in a client/server app, a potential hypothesis might be “the bug is in the client”, which is either true or false; if false, then presumably the bug is on the server. A good hypothesis should be falsifiable, which means that you ought to be able to invent some test which can disprove the proposition.
  3. Experiment. we run the test — that is, we execute the program in a way that allows us to either verify or invalidate the hypothesis. In many cases, this will involve writing additional code that is not a normal part of the program; you can think of this code as your “experimental apparatus”.
  4. we go back to the Observe step to gather the results of running the experiment.

LeetCode - Algorithms - 1668. Maximum Repeating Substring

Problem

1668. Maximum Repeating Substring

Java

Brute-force loop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class Solution {
private int countByPrefix(String sequence, String word) {
int maxCount = 0;
int tempCount = 0;
int word_len = word.length();
for (int i = 0; i <= sequence.length() - word_len; i++) {
String str = sequence.substring(i, i + word_len);
if (str.equals(word)) {
tempCount++;
i += word_len - 1;
} else {
tempCount = 0;
}
if (tempCount > maxCount)
maxCount = tempCount;
}
return maxCount;
}

private int countBySuffix(String sequence, String word) {
int maxCount = 0;
int tempCount = 0;
int word_len = word.length();
for (int i = sequence.length(); i > word_len - 1; i--) {
String str = sequence.substring(i - word_len, i);
if (str.equals(word)) {
tempCount++;
i = i - word_len + 1;
} else {
tempCount = 0;
}
if (tempCount > maxCount)
maxCount = tempCount;
}
return maxCount;
}

public int maxRepeating(String sequence, String word) {
int maxCount_prefix = countByPrefix(sequence, word);
int maxCount_suffix = countBySuffix(sequence, word);
return maxCount_prefix > maxCount_suffix ? maxCount_prefix : maxCount_suffix;
}
}

Submission Detail

  • 212 / 212 test cases passed.
  • Runtime: 1 ms, faster than 82.84% of Java online submissions for Maximum Repeating Substring.
  • Memory Usage: 37.5 MB, less than 50.50% of Java online submissions for Maximum Repeating Substring.

© java short easy to understand

1
2
3
4
5
6
7
8
9
10
11
class Solution {
public int maxRepeating(String sequence, String word) {
int count = 0;
String pat = word;
while (sequence.contains(pat)) {
count++;
pat += word;
}
return count;
}
}

Submission Detail

  • 212 / 212 test cases passed.
  • Runtime: 1 ms, faster than 82.48% of Java online submissions for Maximum Repeating Substring.
  • Memory Usage: 37.6 MB, less than 50.74% of Java online submissions for Maximum Repeating Substring.

My English Words List - November - 2021

inquire

inquire

verb

  • to ask for information

We inquired the way to the station.

I called the school to inquire about the application process.

flutter

flutter

verb

butterflies fluttering among the flowers

We watched the butterflies fluttering in the garden.

Leaves fluttered to the ground.

The bird was fluttering its wings.

The breeze fluttered the curtains.

Flags fluttered in the wind.

scythe

scythe

noun

Parts of a scythe

Scythe

A scythe is an agricultural hand tool for mowing grass or harvesting crops. It is historically used to cut down or reap edible grains, before the process of threshing. The scythe has been largely replaced by horse-drawn and then tractor machinery, but is still used in some areas of Europe and Asia.

vine

vine

noun

Convolvulus vine twining around a steel fixed ladder

Grapes grow upon a vine.
Apples grow upon a tree.
Blueberries grow upon a bush.

inflate

inflate

verb

inflate a balloon

We used a pump to inflate the raft.

Rapid economic growth may cause prices to inflate.

Low tire pressure: Stop in a safe place, check tire pressures, and inflate tire(s) if necesssary.

pane

pane

noun

A paned window.

  • a framed sheet of glass in a window or door

frost on a window pane

Paned window (architecture)

swot

swot

noun

They coined a new term in Chinese: xiao zhen zuotijia, meaning “small-town swot”.

Cramming (education)

Synonyms

  • bookworm
  • nerd

vague

vague

adjective

He gave only a vague answer.

When I asked him what they talked about, he was rather vague.

I think I have a vague understanding of how it works.

His conjecture was more vague.

marvelous

marvelous

adjective

Andrew Wiles’s marvelous proof

vacant

vacant

adjective

a vacant seat on a bus

a vacant room

These lockers are all vacant.

a vacant job position

leash

leash

noun

A clip-on leash attached to a Jack Russel Terrier’s collar

put a dog on a leash

Dogs must be kept on a leash while in the park.

Leash

cartoon

cartoon

noun

The kids are watching cartoons.

Cartoon

barley

barley

noun

Barley

Barley

croak

croak

verb

We could hear the frogs croaking by the pond.

blend

blend

verb

The music blends traditional and modern melodies.

noun

a blend of cream and eggs

damp

damp

noun

  • slight wetness in the air

The cold and damp made me shiver.

verb

His hands were damped with sweat.

Adjective

My hair’s still damp from the rain.

thorn

thorn

noun

Thorns on a blackberry branch

Thorns, spines, and prickles

wellness

wellness

noun

lifestyles that promote wellness

Daily exercise is proven to promote wellness.

Synonyms

fitness, health, healthiness, robustness, wholeness

Antonyms

illness, sickness, unhealthiness

assure

assure

verb

I assure you that we can do it.

I can assure you that you won’t be disappointed.

Hard work assures success.

He assured the children all was well.

She assured herself that the doors were locked.

the seller assured the buyer of his honesty

puck

puck

noun

A standard hockey puck

  • a vulcanized rubber disk used in ice hockey
  • a rubber disk used in hockey

Hockey puck

rink

Children playing ice hockey on a backyard rink in Canada

rink

The hockey team is practicing at the rink.

Ice rink

Ice hockey rink

seminar

seminar

noun

a seminar bringing together the world’s leading epidemiologists

Seminar

reap

reap

verb

He reaped large profits from his investments.

You’ll reap the benefit of your hard work.

reap a crop

Synonyms

gather, harvest, pick

excerpt

excerpt

noun

Her latest novel is called “The Air We Breathe” and you can read an excerpt on our website.

verb

This article is excerpted from the full report.

sundae

sundae

noun

The original sundae consists of vanilla ice cream topped with a flavored sauce or syrup, whipped cream and a maraschino cherry.

tailored

tailored

adjective

pants bought off the rack never fit me so I have to buy tailored ones instead

growl

growl

verb

his stomach growled

the dog growled at the stranger

I could hear a dog growling behind me.

My stomach’s been growling all morning.

gulp

gulp

verb

gulp down a sob

gulp down knowledge

She told him not to gulp his food.

The exhausted racers lay on the ground, gulping air.

threshold

threshold

noun

A worn-out wooden threshold

on the threshold of a new age

Percolation threshold

Threshold knowledge

pore

pore

noun

Sourdough bread pores

Rye bread pores

Pore (bread)

porous

porous

adjective

  • full of small holes

porous wood

  • capable of absorbing liquids

porous paper

dynamite

dynamite

noun

Dynamite

Dynamite was invented by Swedish chemist Alfred Nobel in the 1860s and was the first safely manageable explosive stronger than black powder.

Dynamite

verb

They plan to dynamite the old building.

willful

willful

adjective

a stubborn and willful child

willful children

He has shown a willful disregard for other people’s feelings.

The Willful Child

Once upon a time there was a child who was wilful and would not do what her mother wished.