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!

February 27, 2009

New youth

Recently I realized that I am an adult! Yes, there are only 2 years to my mother's retiring and there are only few years to my working. I am 20 years old now, I am a youth! I should shoulder ability from now on.
From now on I will be a youth, a new youth. From now on I should think something different and my times is coming! I should not only sleep and play games all the day without thinking anything.
Though I have done something but I still have a lot of things to do!
So from now on there will be a tag that record other youths' which are standing and my own thought!
In my opinion a excellent youth should be a man who is self-confident, optimistic, diligent and having his own thought.

Software Engineering--Is there a useful model

In today's lecture--Software Engineering,we talk about the models in Software Engineering which can discribe the developing progress. We talk about models from the formal Waterfall Model to the lattest Fountain model. My teacher Haiyan Che(in Chinese 车海燕) said that software developing is an iteration progress, and the OO(object-oriented) is the most useful way now, so the Fountain model seems the best.
But in my opinion, those models still have a unity. In my formal two years I have used most of the thoughts of these models to develop, But to manage a item is still a very very difficult thing.
Sometimes I even cann't stand the enormous pressure! I think managing a item is a thing which need courage. You should always shoulder huge pressure. Sometimes I even think I cann't stand any more!
As to my formal experience of failure you can see my javaeye(http://bbsunchen.javaeye.com) blog which is written in Chinese. I create this blog is in the hope of ask for people's help. But it seems that there are few people who have enough experience. I think I am lack of enough good experience.
In my college, students will form a 4-6 members' team. In these teams, all the students are lack of experience, so they will have to go through a hard period. Fortunately, the team which I am in do well in this period and we create many excellent software.
To come back to the subject, I am thirst for a really useful model which can guide the developing and a really useful method which can decrease the pressure that the developers have, especially the managers have!
To this subject, I create the tag "Software Engineering" for sustained attention.
Welcome to share your opinion!

February 26, 2009

How to to take precaution against computer game

Recently I want to get rid of the computer game. I do not mean that game is a bad thing, but you know I am a man who will forget any thing when playing games. Once I start to play games, I will be addiction to them and can not stop.
I think that is because when I start to play game I will feel guilty for not studying but playing. But I think there are other reasons that make me addict to it.
I do not know how to control myself so I just prevent me from playing them.
But you know it is a hard thing! There are a lot of people playing games every day around me! I just can not stand this situation!
What I do now is to convince myself to get up from the computer and have some exercise and do some games without computer such as playing card and so on. But you just cann't find a person to play with you because your friends are playing computer games!
Can any one help me?!

How to learn computer science

From now on, there will be an tag in my blog called "Teacher forum". In these articles there will be important opinions from which I learn in my usual classes.
This time I want to talk about how to learn computer science(CS) and Algorithms. Computer science is often said to be the hardest thing to learn in the world because you should learn many math and you should always think about a lot of things when you solve these things.
Here I don't want to talk about what I think about this questions. As I said before, I just introduce my teachers' opinions. In today's classes, my teacher of Data Mining and Artificial Intelligence(数据挖掘和人工智能) whose name is JiWen Guan(in Chinese 管纪文)said "If you want to learn things, you should master the basic definition and understand them. Only in this way can you learn them. This is also right to Computer Science. After mastering them, there will be Aura in your brain when you solve problems." Guan is the most famous teacher in China in the area of Computer Science and I respect him very much. He is in his 70th but can have class for about 2 hours with high spirit.
Another thing I want to refer in this article is my Algorithms class. My teacher is XiaoDong Zhu(in Chinese 朱晓冬), he is a young teache in Jilin Univisity. When he is talking, you will forget the time.
Today he talk about a question. There is eight players and one is definitly better than another. That is to say when any two of them have a match there will be a winner and a loser, in the same time ,no matter when and where they have a match, the winner will always be the winner and the loser will be always be the loser.Then how many matches do they have to have to find the champion.The answer is 8.
Then how many to find the champion and the second place?
You can solve this problem like this:

In this picture, there are 8 matches to find the champion, and the rest thing is to find the second. You will find that the second is the one that have had match with the champion, or he will not lose. So you just have to select the there players and let them have 2 matches. So the answer is 10!

My new home-Hello World

Hi everyone, my name is bbsunchen. Sunchen is my Chinese name and bb is in the name of my home town BengBu.
From now on, I will use this blog. At the beginning, I used the Baidu blog http:hi.baidu.com/bbsunchen.
I do not mean that google is better than baidu, just because I use the gmail, so I think it may be more convenient to use this bloger. Even more, I think that hi-baidu have more functions than google-blogger.So when I public a new article, I will update the hi-baidu blog.
Another reason I create this blog is to make my blog more international, that is to say I want much more people to see my article, to see my thought, so we can conmunicate with each other.
In this blog, you will see articles about life styles, computer science, math, art and economy. There will be no words about policy and so on just because this is only a place to make academic exchanges. So please value my opinion and value this place.
As English is the most popular language in the world, the author will respect most people's habits even though I am a Chinese and even though my English is not so good.
Welcome to exchange your thought and welcome to correct me.