Guessing Game & Non-computability

#include <stdio.h>

int main(){
	int n;
	printf("==== Guessing Game ====\n\n");

	printf("RULE:\n");
	printf("1. You guess a number, either 0 or 1.\n");
	printf("2. then I will tell you the correct number.\n\n");

	printf("Please make a guess 0 or 1:\n");
	scanf("%d", &n);
	printf("The correct number is %d.\n", !n);
}

The rule of guessing game is simple:
1. You guess a number, either 0 or 1.
2. then I will tell you the correct number.
This game is rather silly, the correct number is always opposite to yours. But that is exactly the argument of non-computability.

Consider the question

Can you predict the number correctly?

You will find that it is either providing a wrong answer or providing no answer.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s