If the value of n that the program reads is 2, then it will eventually find combinations of integers such as total = 12, x = 3, y = 4, and z = 5, for which xn + yn = zn. Thus, for input 2, the program does print hello, world.However, for any integer n > 2, the program will never find a triple of positive integers to satisfy xn + yn = zn, and thus will fail to print hello, world. Interestingly, until a few years ago, it was not known whether or not this program would print hello, world for some large integer n. The claim that it would not, i.e., that there are no integer solutions to the equation xn + yn = zn if n > 2, was made by Fermat 300 years ago, but no proof was found until quite recently. This statement is often referred to as “Fermat’s last theorem.”Let us define the hello-world problem to be: determine whether a given C program, with a given input, prints hello, world as the first 12 characters that it prints. In what follows, we often use, as a shorthand, the statement about a program that it prints hello, world to mean that it prints hello, world as the first 12 characters that it prints.It seems likely that, if it takes mathematicians 300 years to resolve a question
đang được dịch, vui lòng đợi..
