March 10, 2009

A proof that the Halting Problem is undecidable

VIA:http://www.lel.ed.ac.uk/~gpullum/loopsnoop.html
SCOOPING THE LOOP SNOOPER
A proof that the Halting Problem is undecidable

Geoffrey K. Pullum
(School of Philosophy, Psychology and Language Sciences, University of Edinburgh)


No general procedure for bug checks succeeds.
Now, I won't just assert that, I'll show where it leads:
I will prove that although you might work till you drop,
you cannot tell if computation will stop.

For imagine we have a procedure called P
that for specified input permits you to see
whether specified source code, with all of its faults,
defines a routine that eventually halts.

You feed in your program, with suitable data,
and P gets to work, and a little while later
(in finite compute time) correctly infers
whether infinite looping behavior occurs.

If there will be no looping, then P prints out `Good.'
That means work on this input will halt, as it should.
But if it detects an unstoppable loop,
then P reports `Bad!' --- which means you're in the soup.

Well, the truth is that P cannot possibly be,
because if you wrote it and gave it to me,
I could use it to set up a logical bind
that would shatter your reason and scramble your mind.

Here's the trick that I'll use -- and it's simple to do.
I'll define a procedure, which I will call Q,
that will use P's predictions of halting success
to stir up a terrible logical mess.

For a specified program, say A, one supplies,
the first step of this program called Q I devise
is to find out from P what's the right thing to say
of the looping behavior of A run on A.

If P's answer is `Bad!', Q will suddenly stop.
But otherwise, Q will go back to the top,
and start off again, looping endlessly back,
till the universe dies and turns frozen and black.

And this program called Q wouldn't stay on the shelf;
I would ask it to forecast its run on itself.
When it reads its own source code, just what will it do?
What's the looping behavior of Q run on Q?

If P warns of infinite loops, Q will quit;
yet P is supposed to speak truly of it!
And if Q's going to quit, then P should say `Good'
--- which makes Q start to loop! (P denied that it would.)

No matter how P might perform, Q will scoop it:
Q uses P's output to make P look stupid.
Whatever P says, it cannot predict Q:
P is right when it's wrong, and is false when it's true!

I've created a paradox, neat as can be ---
and simply by using your putative P.
When you posited P you stepped into a snare;
Your assumption has led you right into my lair.

So where can this argument possibly go?
I don't have to tell you; I'm sure you must know.
By reductio, there cannot possibly be
a procedure that acts like the mythical P.

You can never find general mechanical means
for predicting the acts of computing machines.
It's something that cannot be done. So we users
must find our own bugs. Our computers are losers!

Is J2ME good enough for development?

Recently our team are planing to research security and enforcement of mobile code, we are following the R's MCC.
And now I am facing a problem of finding a mobile platform. I decide to use J2ME. As J2ME is still used widely. Such as

nokia

3410
3510i
3585
3590
6310i
6650
3650
7650
9210
9210i
9290
siemens

SL55
M55
S55
S57
C55 / C(T)56
2128
M(T)50 / M46
3118
SL45i
6688i
motorola

v720
v720i
388
388c
830
6288
Of cause, there are other reasons but for the security I can't refer them. But after the item about 1 year latter, I will plaster the technique on my blog.

March 04, 2009

Eatting for a bright brain


[Our Brain]
In the past, scientest believe that our brain has grown up at the age about 3. But recently I read an article that our brain is always growing.
And in the life of our brain, diet is very important. Our brain desire artiquated diet--nutriment that the nature had designed for brain hundreds of thousands of years before, and they are still the best food for brain. They are fruit, vegetables, marine product, meat, nuts, beans, corn, milk, suger, oil, kalium, natrium and so on. Nowadays some nutriment is not definitly from food but from factories. They are often excessive and do harm to our body easily soch as the refined oil. But there are still some things that can rescue our brain, for example, olive oil can protect memory, antioxidant can make you bright, happy and juvenility. Especially the fish oil, it is a new method to rescue brain.
There are also tonic to our brain, such as vitamin, folacin, thiamin, acerbity, selenium, qingkqo and so on, they can prevent brain from getting sick and make it efficient.

[Fruit and vagitables are good to our brain]

March 03, 2009

A new discovery of Programming

I was preparing to do excise in USACO about a number of mouths before, but what I do is so few!
Today I went to USACO and then find these words:
Hal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the top several comprise almost 80% of the problems seen at the IOI. Here they are:

* Dynamic Programming
* Greedy
* Complete Search
* Flood Fill
* Shortest Path
* Recursive Search Techniques
* Minimum Spanning Tree
* Knapsack
* Computational Geometry
* Network Flow
* Eulerian Path
* Two-Dimensional Convex Hull
* BigNums
* Heuristic Search
* Approximate Search
* Ad Hoc Problems

The most challenging problems are Combination Problems which involve a loop (combinations, subsets, etc.) around one of the above algorithms - or even a loop of one algorithm with another inside it. These seem extraordinarily tricky to get right, even though conceptually they are ``obvious''.

If you can master solving just 40% of these problem types, you can almost guarantee a silver medal at the IOI. Mastering 80% moves you into the gold range almost for sure. Of course, `mastery' is a tough nut to crack! We'll be supplying a plethora of problems so that you can hone your skills in the quest for international fame.

I think data structure and algorithm is one of the most important thing to a computer science student. So from now on there will be a tag called "data structure and algorithm". My teacher said it is simple because you only need to know a few definitions and what you need is to have the flexibility to use them.
Want to learn it, follow me!

March 01, 2009

Tired or boring?You need a rest!

I don't know why in this weekend, I don't want to do anything! When I sit before the computer, I feel boring, I don't want to work, no matter vsto or game.
I told this to my friends, and we finnally deside to waste a daytime to relax, so we play DaFuWeng(a kind of desk game made by paper and cards,in Chinese 大富翁) and table tenis, the we go to the KTV and sing songs for about two hours, then we go shopping.
When I came back I am free from any sick feelings and I only spare one hour and a half to solve my vsto problems.
It feel good!