Shell script that accepts a filename, starting and ending line numbers as arguments and displays all the lines between the given line numbers

Concept:Cat: cat command is used to create the fileSyntax: cat > file name for creationSyntax: cat file name for displaying a fileSed: sed means stream editor it can be used for editing…

Continue ReadingShell script that accepts a filename, starting and ending line numbers as arguments and displays all the lines between the given line numbers

Show that the problem of whether a Turing machine, when started on a blank tape, ever writes a given symbol (say a) of its input alphabet on its tape is not decidable

Assume the problem was decidable. Then there must be a total Turing machine Ma deciding it. We shall use Ma to build a new total Turing machine M∈ deciding the…

Continue ReadingShow that the problem of whether a Turing machine, when started on a blank tape, ever writes a given symbol (say a) of its input alphabet on its tape is not decidable

Explain why the trivial properties of the recursively enumerable sets are decidable, by suggesting suitable total Turing machines for these properties

Solution: There are exactly 2 trivial properties: the empty set (of r.e. sets) and the set of all r.e. sets. Since we represent every r.e. set by some (encoding of…

Continue ReadingExplain why the trivial properties of the recursively enumerable sets are decidable, by suggesting suitable total Turing machines for these properties