Sunday, 22 January 2017

P Versus NP. The Solution!



Previously on Erin the Cat Princess..... 



".........this thing I have discovered is WAY too big for just me to hang on to. It could solve every known problem on earth AND problems not yet known. It will affect our understanding of the universe, time and space, and I hope answer that really big question, why does cream go off so fast?


The one BIG, and I mean MASSIVE with a capital M, down side is it will also render EVERY computer based security code completely useless, breakable, and bring down governments, countries, and worse still, make on-line nip shopping completely impossible. Mouses!!


OK, so what you need to do is this, enter this code 'erinthecatprincess' in your laptop, and sit down and wait.... I'll find you, you won't know where or when, but it will be soon. Or maybe later. Or it may well be next Sunday. But it will come, and the secrets of and solution to P versus NP conundrum will be revealed to the enlightened few, and the $1M Millenium Prize will be ours, to share for the good of peep and cat kind. purrs"








And now, the concluding part of this true life story.... What society chooses to do with this information is now in your hands...... 


What's that, peep, you want to know now you say, in case something happens to me? I really don't thi..... hmm you may be right, I did see some rather dodgy looking characters dressed in black loitering in the oak tree earlier. OK, better to have a back up plan I suppose, for posterity. Well it all started........


****** Wavy lines and time travel backwards 3 months ******



.......just the other day as I was listening to a very good radio discussion about the Millennium Prizes which are a series of $1 million prizes to solve hitherto unsolved by computer, problems. One that caught my ear was to Pee versus Not to Pee.

Well, being the educated Princess that I am, all self taught you know, OH yes. I've slept on many a fine journal and dissertation, National Geogra (page was torn on that one), The Old Scientist, and what Dairy Cream Cow were my favourites, and you can't help but have some of that stuff rub off on you, especially when it's damp. purrs

Anyways my interest was piqued and I thought I stood a chance at solving this problem and it surprised me no peep scientist or computer had figured this out. Clearly it is better to use the litter box than not on the basis that its better out than in. By that I mean that's better in the litter box than out, unless of course you happen to be out and about and haven't got a litter box in which case out is perfectly fine, unless you happen to have no shelter in which case maybe IN would be better than OUT? Mouses, no wonder those peeps struggle with this!

Now I confronted my peep later that day and suggested we book a ticket to Finland, where the prize is judged, and present our case, or in fact litter box. Now peeps, and pardon the pun, put a damper on my litter box solution and advised that problem is actually P verses NP and nothing to do with litter boxes. Mouses!

OK I hear you say, we understood the litter box science but what's this other P & NP stuff?

Well being a Princess does mean I have to have a paw on the pulse of science and a handle on the facts for sure, though without opposable thumbs it is a bit difficult. purrs

So in a nutshell, and you may wish to have a commercial break and a coffee handy, the whole science thing stuff goes as follows:

Scientist peeps use Al Gores rhythms to...

What's that peep? Oops, sorry folks Mr Gore had nothing to do with this matter, apparently those scientists used algorithms! 

Anyways, those clever peeps use these algorithms in computers to either (a) find the solution to a problem e.g. how many cartons of cream do I need this week, or (b) verify that the seven cartons of cream I hope peep has bought are the correct number that will last the week given I use one a day, which I hasten to add I don't, heck I'd be as fat as ...well lets not go there, or mention peeps derriere. Mouses!

Anyhows, what science peeps want to know is, if  any problem, cream related or not that can be easily solved by an algorithm can also be verified as easily by an algorithm.  Well to my mind that's an easy one as all I need to know is that there's room in the fridge. purrs

Moving on, as I can see peep is dozing off, this sort of cream conundrum is easy when there are only a few cartons of cream. BUT apparently there is one big problem which is very very difficult and time consuming to solve, and that's the Travelling Cream Salesman problem. OK so I am paraphrasing that, but roll with me on this if you will.

The problem is along the lines of finding the shortest route for the cream to be delivered to any given number of cats in any given number of cities along the shortest route so that the cream doesn't go off and you don't deliver to the same cat twice, that's very important, and always end up back at the creamery.

Now if you have only 3 cats in 3 cities the problem is an easy one but if you have 30 cats in 30 cities the number of variations of routes (not to mention spilt cream) is, well, beyond my paws to count and apparently would take twenty times the age of the universe to solve, which I suppose means that cream would have to be long life. Mouses!

Being an enquiring sort of a princess I couldn't help but ponder the problem during the daily trip to the Royal cardboard box, for meditation purposes you understand. Sat there it hit me! not the box as I prefer the open top style, but the answer to all the long journeys that poor and no doubt very tired, deliveryman has to make.

Drum roll would be good about this time, peep...

peep...

PEEEP! Ah, now I have your attention, and queue drum roll......

****** Sound of two fingers drumming on desk ******


Hmm, remind me not to hire you any time soon. Mouses!


Anyways, the real problem ISN'T that P versus NP stuff, it's that these peeps computers use such very long algorithms that they can't see the end of them. Now sat in the middle of  my box I could see every corner and side and the distance to each was easily touched by my paw. Eureka! that was it I thought, you need to have a different sort of algorithm which is shaped like a box, a sphere even, three dimensional as it were, where you are sat in the middle, rather than at one end, and can see and have a paw in all the cream, as it were.

After all if I were living as a stray again, I would live in the middle of my patch so the shortest distance to any food would always be from the middle. Heck those little spiders sussed that long ago.

And so my fellow educated cats, I give to the cream loving world, and cream delivery peeps everywhere, Erin's Box (or Sphere) Algorithm! Now I would add at this juncture that this will work equally well for nip, and cheese deliveries too. purrs

Impressive huh! All in a mornings work for a Princess you know. Just takes a small amount of napp... er... meditation and ET VOILA!

I think my work is done here now, yep, I'm fairly certain I have successfully better than halved the distance and time taken to deliver that cream. As to that last bit of P versus NP, the actual equation, I think it best that I leave that to the peeps to sort, heck I can't do everything what with Palace duties to sort, mice to chase and a peep to keep in line. It should be a doddle for them, so long as they sit in a box and have a na... er... meditate, yep meditation will do it. purrs

But there is an etiquette to these things and being a Princess amateur algorithmist and all, it wouldn't seem right to have all that prize, so I think it would be fairer for all if  I have enough to recompense me for the tiring work, not to mention draining the cream supplies, and box wear and tear. New boxes don't come cheap peep says, especially ones with those eye slots at each end. Shall we say 95% plus expenses?

Now if you will excuse me, I need to work on a way more important, more complex matter, one of great concern, nay international concern to us cats, namely, where do all those nip mice go?....

Hmm, I feel a meditation session coming on. purrs


The End.... or is it just the beginning?

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????


It's Sunday Selfie time!  This blog is a hop and is hosted by the fabulous Kitties Blue, from the Cat on My Head blog. 

If you have never participated before, give it a go, it sure is fun and you get to meet loads of pals from across the globe, and even some that are closer than you might have thought.











This weeks selfie was what peep saw looking up at 2am this morning after having awoken from a slight stabbing pain to the pate! 


Strange that, I didn't see a thing....


To see what all our pals have been up to, click the links/images below, and enjoy the HOP!