Wednesday, March 14, 2018

Stephen Hawking (1942-2018)

Stephen Hawking passed away earlier this morning in Cambridge, England. As a brilliant theoretical physicist and best-selling author all while dealing with a debilitating disease, Hawking rose to be the best-known scientist of his time. 

I'll leave it to the physics blogs to talk about his research. Hawking inspired me through his 1988 book, A Brief History of Time. Hawking told Time magazine before the magazine's publication "Someone told me that each equation I included in the book would halve the sales. In the end, however, I did put in Einstein’s famous equation E = mc2. I hope that this will not scare off half my potential readers.”

So you read the book and he manages to describe his highly mathematical-based view of the universe without resorting to mathematics, by far the best written popular science book I have read.

A Brief History of Time came out when I was in grad school so it didn't play a role in me becoming an academic but it did make me realize that science has a story to tell. From the preface of my own book.
I took inspiration from Stephen Hawking's A Brief History of Time, which explains physics not through formulas and technicalities but with examples and stories. I attempt to do the same here to explore the spirit and importance of the P versus NP problem.
I am under no illusion that I came even close to Hawking's level of exposition.

A poll taken last year showed most Americans could not name a single living scientist but among the 19% that could, the scientist they named most often was Stephen Hawking. We lost not only a brilliant physicist but one of the great symbols for science of our generation.

Monday, March 12, 2018

Wanted: An Easy Proof of a Weak Theorem in NT so that I can get another VDW--> Primes infinite proof to be really easy.

(All math in this article is here)

A while back I posted about a proof that Van Der Waerden's theorem implies the number of primes
is infinite (see the post here). That post brought up some logical issues.

More recently there is another proof that the primes are infinite that raises (for me at least) some number theory results and proofs. The proof uses the following theorem:

There are no 4-length Arithmetic Progressions consisting of squares.

This is attributed to Fermat. All of the proofs I've seen of it look difficult.

Here is a sketch of the proof of infinite number of primes from VDW and the theorem above.
Assume that {p1,...,pm} are all of the primes.  Let vi(n) be the power of pi in the factorization of n.

We define the following 2m coloring of N

COL(n) = ( v1(n) mod 2, ... vm(n) mod 2)

There exists a monochromatic 4-AP.  We leave it to the reader to show that you can use this to get a 4-AP of squares.

Using Fermats 4-AP theorem is hard!  In the write up I show how to use a stronger VDW theorem and a weaker (at least easier to prove in my opinion) result in Number Theory to get a different proof.

VDWPlus: for all k,c there exists W such that for all c-colorings of [W] there exists a,d such that

a, a+d, a+2d, ..., a+(k-1)d AND d (that's the PLUS part) are all the same color.

Now to prove primes are infinite. Assume not. p1,...,pm are all of the primes.

Let vi(n) be as above

COL(n) = (v1(n) mod 4, ..., vm(n) mod 4)

just apply this to the k=1 case so we have

a, a+d, d all the same color.  Say the color is (b1,...,bm) where bi in {0,1,2,3}

mult all three by p1^{4-b1} ... pm^{4-bm}.

now we have A, A+D, D all four powers. call them x^4, z^4, y^4 and you
contradict the n=4 case of Fermat'ls last theorem (this is the easiest case and was proven by Fermat)

TO DO: find an even easier theorem in Number Theory to use with a perhaps more advanced form of VDW theorem to get a proof that primes are infinite.

Coda: Cute that I replace one theorem by Fermat with another theorem by Fermat.

Friday, March 09, 2018

Data-Driven Programming

Five years ago I posted about Flash Fill, a then new Microsoft Excel feature that would reformat data based on examples. I just checked the latest version of Excel and Flash Fill is still there just working by making suggestions when appropriate. It uses a programming language approach finding the simplest string manipulation program consistent with the examples.

I loved the idea of example-based programming but it did seem pretty limited at the time. With the machine learning revolution we've gone full circle. We solve a number of problems with data and examples alone: voice recognition, face recognition, spam detection, playing Chess and Go from scratch in ways we wouldn't even know how to program.

That's not completely true: Designing a good machine learning program requires programming to get data in a good format and creating the right network structure to learn is still considerably an art. But the real magic does happen when the deep learning process happens creating a neural net that works well in ways we can't fully understand even when we look at the final network produced.

Now "it's all about the data". This hit me when I got an email invitation for the Uber visa card. Unlike other branded cards it gives you no particular discounts or rewards for Uber. Rather it gives you significant cash back for dining and travel, in other words for giving Uber the data about you that can make Uber itself more valuable to you.

Nothing in this post should be new to you readers. But every now and then just take a breadth and realize who much our notions of computing and data have changed over even the past five years.

Programmers aren't going away. Machine learning works well for things humans do well instinctively. But for actual number crunching, simulations and manipulation, even what Flash Fill does, machine learning has much more to do.

Wednesday, March 07, 2018

When the Wrong People raise the issue

On my discrete math final in Spring 2017 I had a question:

Prove that sqrt(2/3) is irrational.

A student emailed me the folloing (I paraphrase and am prob not as elegant or as long as he was)

Dr. Gasarch

I received only 2 points out of 20 on Problem 3 of the final- the one that asked us to prove that sqrt(2/3) is irrational. This was graded rather harshly, and the reason is endemic to the entire course. It was unclear what we could and could not assume in this problem. That has been unclear all semester.

I responded (I leave out the name for privacy)

Mr. Student

Come by my office and we will look over  your final. At the same time, bring by your HWs and Midterms to look at. The deadline for regrading those is up; however, either you are correct and I will learn how to run a better course by looking over your HWs and midterms, or you incorrect and you will be enlightened by us looking over them.

We agreed to meet. The Student came all ready to  argue not just points on the final but also about the course in general. I looked forward to this since either I would learn about how to run the course better OR I would enlighten a student!

STUDENT:  I used the obvious fact that the ratio of two irrationals is irrational. How was I supposed to know I had to prove something so obvious!!!!!!!! And only 2 points!!!!!!! Really!!!!!!

BILL: What is the ratio of \sqrt{8} to \sqrt{2}.

STUDENT:  sqrt(8)/sqrt(2) = sqrt(8/2) = sqrt(4) = 2. Why is that relevant?

BILL: You just showed that the ratio of two irrationals could be rational.


BILL: Lets look over your HW and midterm and see there were times when it was not clear what you could assume OR if not then I can clear up some misconception you had.

STUDENT: Uh, Uh. Nevermind.

BILL: You are here with your HWs and midterms, lets take a look.

He really didn't want to. I think he really just wanted more points on the final But since he phrased it as a philosphical debate about how the course was run, I took him at his word.  Everything he showed me was either clearly wrong or clearly unclear. None of it fell into the category of `not clear what you can assume'.

This disappointed me. I suspect someone could make a case that my course sometimes does not make it clear what you can assume. Other students with a similar story as above claim my course is to pedantic. But the examples they show me of this are usually just wrong, not marked wrong for being to pedantic.

There is a more general problem here. The students who complain about a  course may well have a valid point to make!  But its usually students who are not very good making the complaint, and hence they are not the ones who could make a good argument.  One thing I have done when a student has a complaint about how I run the course is then ask my TAs about it. This has been helpful sometimes but they are on the other end -- the course is easy for them so its hard for them to see the problems.

Having said all of this I will own up to one flaw I've had which the students complained about incoherently  (see here) and my TA pointed out the fair objection.  I had taught ONE type of Pigeon hold argument and tested them on a very closely related but different type -- as a way of testing if they understood pigeon hole and were not just memorizing. It was a fair question BUT my TA said
(correctly) I was more interested in getting a good test question then, you know, TEACHING them the Pigeon hole principle -- so I should in the future (and I have) teach them LOTS of versions, make sure they understand them, and then if on the exam I give them a variant its more fair. But more importantly he pointed out that I (and this is correct, or was) have a QUESTION I really want to put on the midterm and then teach the course so that it makes sense to do so. The question is fair, but this is NOT the point (which is why the students objections were incoherent- the question was fair). I am setting (some of them) up to fail.  I have CHANGED my Teaching style and exam style since them.

But my point is that the students could not possibly have raised that objection-- partly because the students complaining are not very good, but also because they do not see what goes on behind the scenes.

UPSHOT- if your students have an incoherent complaint there may be something to it and you should ask your TAs.

Thursday, March 01, 2018

Me and My Bolt

On Tuesday I got a knock on my car's window. Rolling it down someone asked if I liked my car as he was thinking of buying one himself. Was I driving the latest Tesla? No, the Chevy Bolt, General Motor's newest fully electric car.

On March 31, 2016 me and 180,000 of my closest friends put $1000 down sight unseen on the Tesla 3. As an east coast resident with no prior Tesla I am well down the list even though I made a reservation on the first day. I got disillusioned by early production problems and delays and bait-and-switch emails.
Now that some more details regarding Model 3 came out, I wanted to gauge your interest in coming in for a test drive in a Model S. An incredibly well equipped Model S can be had for under $80k and with the $7500 federal tax credit and $1000 referral code from a current owner, you can get into a Model S for close to $70k, meanwhile a Model 3 can cost up to $60k. Model S is considerably quicker and has an incredible amount of space to seat 5 comfortably. It is our flagship vehicle and has 5 years of manufacturing behind it to perfect the build quality of the car. Not to mention a quick turnaround time on delivery. I would love to host you in our showroom so I can showcase some of the incredible features in the Model S.
Meanwhile a GM executive on the Georgia Tech College of Computing's advisory board suggested I take a look at the Bolt. I was skeptical but he arranged for a local dealer to bring down a car to test drive. I got sold and bought my own Bolt in December.

It's an all electric car with no transmission so quick smooth acceleration. The Bolt has a one pedal driving mode as the "gas" pedal also works as a break which slows down the car by pulling power to the battery. The car doesn't even pretend to be mechanical, a screen boots up when I turn the car on, you can shift into park by pressing a button. The rear view "mirror" is really a camera. When driving slowly there is a simulated view from above. A little freaky but it helps with parking. With Android Auto I basically have Google Assistant and Maps in the car which I prefer to an in-car navigation the Bolt doesn't have.

I get over 200 miles on a full charge and can plug in overnight to get enough power to get to work and back. The car has considerable safety features that warn about cars in blind sports or getting too close to the car in front of you or if you drift from lanes. The Bolt lacks any autonomous features even adaptive cruise control or parking assist. I suspect you could get significant autonomous behavior with a software upgrade but I doubt GM would ever do so.

The car is missing some basic features like power seats and a garage door button. No problem, I rigged up Google Assistant to open the garage door when I say the magic words. Far cooler than pressing a button.

It's not as sleek looking as a Tesla and nobody will shoot it into space but I'm driving the future and it is amazing.