Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GO TO and DON'T GO TO ! proof of this:

Tags:

algorithm

is this proofed:

every algorithm A designed using go to or something like, is equivalence to another algorithm B that does not use go to.

in other words:

every algorithm designed using go to, can be designed without using go to.

how to proof?

like image 777
sorush-r Avatar asked Mar 24 '10 07:03

sorush-r


1 Answers

C. Böhm, G. Jacopini, "Flow diagrams, Turing Machines and Languages with only Two Formation Rules", Comm. of the ACM, 9(5): 366-371,1966.

http://en.wikipedia.org/wiki/Structured_program_theorem

http://en.wikipedia.org/wiki/P"

The Böhm-Jacopini proof describes how to construct a structured flow chart from an arbitrary chart, using the bits in an extra integer variable to keep track of information that the original program represents by the program location. This construction was based on Böhm's programming language P′′. The Böhm-Jacopini proof did not settle the question of whether to adopt structured programming for software development, partly because the construction was more likely to obscure a program than to improve it. On the contrary, it signalled the beginning of the debate. Edsger Dijkstra's famous letter, "Go To Statement Considered Harmful," followed in 1968. Subsequent proofs of the theorem addressed practical shortcomings of the Böhm-Jacopini proof with constructions that maintained or improved the clarity of the original program.1

like image 70
ja. Avatar answered Oct 18 '22 10:10

ja.