In computability theory, the recursion theorem states that Turing machines can obtain their own description, which can
Question:
In computability theory, the recursion theorem states that Turing machines can obtain their own description, which can then be used in further computation [2]. The ability of a Turing machine to implement self-referential algorithms means that any Turing complete language can be used to construct a program that outputs an exact copy of its source code when executed. These self-reproducing programs were later coined as quine programs by Douglas Hofstadter in his book G¨odel, Escher, Bach: An Eternal Golden Braid [3]. A quine-relay extends quine computing to multiple levels or recursion. For example, a quine relay program A generates program B which generates program C and so on. An ouroboros (like the serpent eating its own tail) is a quine-relay that eventually produces the original starting program.
A. Your task is to write an ouroboros quine-relay program that writes to two output streams (stdout and stderr), while adhering to the following requirements.
Requirements:
- Your ouroboros program should be written in Java and contained in a single class file named Ouroboros.java
- Your ouroboros program cannot receive any form of input, including reading from a file.
- Each output program in the ouroboros should write the source code of the next program to be executed to stdout (System.out).
- Each output program must include comments in the output source code.
- Your first name and last name must be in a multi-line comment block following the author annotation (Example: /* @author Payas Awadhutkar */)
- Each program in the ouroboros should output a single character to stderr (System.err).
- Using the provided runner (runner.sh), the ouroboros should repeatedly output your first and last name followed by a newline to the file result.txt
B. What is the relationship of your ouroboros program to a computer virus and what implications does the recursion theorem have on anti-virus software? Explain your answer.
College Mathematics for Business Economics Life Sciences and Social Sciences
ISBN: 978-0321614001
12th edition
Authors: Raymond A. Barnett, Michael R. Ziegler, Karl E. Byleen