FORMAL LANGUAGE & AUTOMATA THEORY
100406Module 4: Turing Machines (TM)
Q1a. A language is said to be recursively enumerable if it is accepted by a (i) DFA (ii) Turing Machine (iii) PDA (iv) Linear Bounded Automaton20252m
Module 4: Turing Machines (TM)
View this question on its own page →A language is said to be recursively enumerable if it is accepted by a
(i) DFA
(ii) Turing Machine
(iii) PDA
(iv) Linear Bounded AutomatonWorked SolutionAnswer
Correct Option: (ii) Turing Machine
Explanation
A language is called Recursively Enumerable (RE) iff there exists a Turing Machine such that , i.e., halts and accepts exactly the strings in . On strings not in , may either reject or loop forever. This is the most general language class in the Chomsky hierarchy (Type-0).
Why other options are incorrect
- (i) DFA : Accepts Regular languages (Type-3), strictly smaller than RE.
- (iii) PDA : Accepts Context-Free Languages (Type-2), also properly contained in RE.
- (iv) Linear Bounded Automaton (LBA) : Accepts Context-Sensitive Languages (Type-1), also a proper subset of RE.
Hierarchy recall
- REG → DFA
- CFL → PDA
- CSL → LBA
- RE → Turing Machine
- Recursive → Decidable TM (always halts)
Final Answer
Hence, Recursively Enumerable Languages are exactly those accepted by Turing Machines. Correct answer is (ii) Turing Machine.
Q1a. If an infinite language is passed to Machine M, the subsidiary which gives a finite solution to the infinite input tape is: (i) Compiler (ii) Interpreter (iii) Loader and Linkers (iv) None of the mentioned20242m
Module 4: Turing Machines (TM)
View this question on its own page →If an infinite language is passed to Machine , the subsidiary which gives a finite solution to the infinite input tape is:
(i) Compiler
(ii) Interpreter
(iii) Loader and Linkers
(iv) None of the mentionedWorked SolutionAnswer
Correct Option: (iv) None of the mentioned
Explanation
An infinite language requires a machine with unbounded memory. In the Turing Machine model the tape is infinite, but the finite control itself is finite.
- Compiler: Translates a high-level program to target code before execution. It does not provide run-time handling of an infinite input tape; it assumes input is finite source text.
- Interpreter: Executes source line-by-line, still requires entire input to be presented finitely; it does not make an infinite tape finite.
- Loader and Linkers: Perform loading / relocation of object code into memory. They handle finite modules, not an infinite language / infinite tape.
The subsidiary that actually gives a finite description of an infinite computation is the finite control (finite automaton) + the Turing Machine’s transition function or, in language theory, the finite representation (regular expression / grammar / TM description) itself. None of the three listed system softwares fulfills this role.
The theoretical concept is:
- Infinite language is described finitely by a grammar / regular expression / TM encoding , not by compiler/interpreter/loader.
Hence none of (i)-(iii) is correct.
Final Answer
None of the mentioned. The finite solution is provided by the finite control / finite encoding of the machine, not by compiler / interpreter / loader.
Q1b. Enumerator in a Turing machine is a TM with: (i) an output printer (ii) 5 input tapes (iii) a stack (iv) None of the above20212m
Module 4: Turing Machines (TM)
View this question on its own page →Enumerator in a Turing machine is a TM with:
(i) an output printer
(ii) 5 input tapes
(iii) a stack
(iv) None of the aboveWorked SolutionAnswer
Correct Option: (i) an output printer
Explanation
An Enumerator is a variant of Turing Machine that enumerates a language.
Formal definition (Sipser):
Enumerator is a TM with a work tape and a write-only output tape (printer). The printer head moves only right and cannot read. Whenever wants to output a string, it writes it on the printer and the string is considered enumerated.
- Enumerator has no input; it starts from blank tape.
- Language enumerated is .
- Theorem: is Turing-recognizable iff some enumerator enumerates .
Options:
- (ii) 5 tapes — multi-tape TM, not enumerator.
- (iii) stack — PDA, not enumerator.
- Hence (i) is correct.
Final Answer
Enumerator = TM with an output printer → Option (i).
Q1f. A Turing Machine that prints strings of a language is called (i) Acceptor (ii) Transducer (iii) Generator (iv) Enumerator20252m
Module 4: Turing Machines (TM)
View this question on its own page →A Turing Machine that prints strings of a language is called
(i) Acceptor
(ii) Transducer
(iii) Generator
(iv) EnumeratorWorked SolutionAnswer
Correct Option: (iii) Generator (also enumerated as Transducer/Enumerator in some texts — “Generator” is the term for printing strings)
Explanation
TM views:
Mode Description Acceptor / Recognizer Decides by accepting/rejecting (yes/no). Transducer Computes function on output tape. Generator / Enumerator Prints (generates) strings of one after another on output tape (printer). Decider Acceptor that always halts. A TM that prints strings of a language is called Generator (or Enumerator if it lists all). Many textbooks list (iii) Generator and (iv) Enumerator as synonyms; exam key typically Generator.
Final Answer
Generator (prints strings) → Option (iii). Enumerator is equivalent variant.
Q1g. A Turing machine that is able to simulate other Turing machines is called: (i) nested Turing machine (ii) universal Turing machine (iii) counter machine (iv) None of the above20222m
Module 4: Turing Machines (TM)
View this question on its own page →A Turing machine that is able to simulate other Turing machines is called:
(i) nested Turing machine
(ii) universal Turing machine
(iii) counter machine
(iv) None of the aboveWorked SolutionAnswer
Correct Option: (ii) universal Turing machine
Explanation
Universal Turing Machine : A TM that takes as input encoding of any TM and input : .
- Can simulate any other TM (stored-program concept).
- Basis for von Neumann architecture, stored-program computers.
- Exists by Church-Turing thesis; constructed by Turing (1936).
- Leads to undecidability of halting problem.
Other options:
- Nested TM — not standard.
- Counter machine — weaker (but Turing-equivalent with 2 counters).
Final Answer
Universal TM → Option (ii).
Q1g. A Turing Machine has: (i) A finite tape (ii) An infinite tape (iii) A stack (iv) A queue20242m
Module 4: Turing Machines (TM)
View this question on its own page →A Turing Machine has:
(i) A finite tape
(ii) An infinite tape
(iii) A stack
(iv) A queueWorked SolutionAnswer
Correct Option: (ii) An infinite tape
Explanation
Turing Machine model: with
- Finite control (states ),
- One infinite tape divided into cells, each holds symbol from (), extends infinitely in one direction (or both in some definitions), with a read/write head.
- Initially tape contains input + blanks to the right (infinite blanks).
It does not have a stack (that's PDA) or queue as primary memory, nor finite tape (that would be LBA / finite automaton).
Final Answer
TM has an infinite tape → Option (ii).
Q1h. From the options, the pair having different expressive powers is: (i) DPDA and NPDA (ii) DFA and NFA (iii) single-tape TM and multi-tape TM (iv) deterministic single-tape TM and nondeterministic single-tape TM20232m
Module 4: Turing Machines (TM)
View this question on its own page →From the options, the pair having different expressive powers is:
(i) DPDA and NPDA
(ii) DFA and NFA
(iii) single-tape TM and multi-tape TM
(iv) deterministic single-tape TM and nondeterministic single-tape TMWorked SolutionAnswer
Correct Option: (i) DPDA and NPDA
Explanation
Expressive power comparison:
Pair Power Same? DPDA vs NPDA Different — NPDA = CFL, DPDA = DCFL ⊂ CFL. Example is CFL but not DCFL. DFA vs NFA Same — both = Regular Single-tape TM vs Multi-tape TM Same — both = RE, polytime difference only Deterministic single-tape TM vs Nondeterministic single-tape TM Same — in power Hence different expressive powers is DPDA vs NPDA.
Final Answer
DPDA and NPDA have different power → Option (i).
Q1i. RASP stands for: (i) Random Access Storage Program (ii) Random Access Stored Program (iii) Randomly Accessed Stored Program (iv) Random Access Storage Programming20222m
Module 4: Turing Machines (TM)
View this question on its own page →RASP stands for:
(i) Random Access Storage Program
(ii) Random Access Stored Program
(iii) Randomly Accessed Stored Program
(iv) Random Access Storage ProgrammingWorked SolutionAnswer
Correct Option: (ii) Random Access Stored Program
Explanation
RASP = Random Access Stored Program machine.
- Model by Elgot–Robinson, Hartmanis.
- Like RAM but program stored in memory like data (von Neumann).
- Has registers and memory with random access, program counter.
- Turing-equivalent, but more realistic cost model.
Other expansions are incorrect variations.
Final Answer
Random Access Stored Program → Option (ii).
Q1i. Recursive languages are: (i) a proper superset of CFLs (ii) always recognizable (iii) also called type-0 languages (iv) recognizable by Turing machines20232m
Module 4: Turing Machines (TM)
View this question on its own page →Recursive languages are:
(i) a proper superset of CFLs
(ii) always recognizable
(iii) also called type-0 languages
(iv) recognizable by Turing machinesWorked SolutionAnswer
Correct Option: (i) a proper superset of CFLs (and (ii)/(iv) also true depending on option set)
Explanation
Recursive languages = Decidable languages = decided by TM that always halts.
Hierarchy:
- (i) Proper superset of CFLs → True. Every CFL is recursive (PDA can be simulated by halting TM), but not vice versa (e.g., is recursive not CFL).
- (ii) Always recognizable (RE) → True, recursive ⊂ RE, so yes.
- (iv) Recognizable by TM → True (RE definition).
- (iii) also called Type-0 → False, Type-0 = RE, not Recursive (Type-1 is CSL, not Recursive either; Recursive is not a Chomsky type but decidable).
If single choice, (i) proper superset of CFLs is the intended answer. If multiple, (i),(ii),(iv) are true.
Final Answer
Recursive languages are proper superset of CFLs → Option (i) (also RE).
Q1j. A language L is Turing decidable if: (i) recursive (ii) TM recognizes L (iii) TM accepts L (iv) None of the above20222m
Module 4: Turing Machines (TM)
View this question on its own page →A language is Turing decidable if:
(i) recursive
(ii) TM recognizes
(iii) TM accepts
(iv) None of the aboveWorked SolutionAnswer
Correct Option: (i) recursive (Turing decidable = recursive)
Explanation
Turing decidable ≡ Recursive language ≡ Decided by a TM that always halts (decider).
Definitions:
- Recursively Enumerable (RE): TM recognizes (accepts if , may loop if $w
otin L$). Options (ii) “TM recognizes” and (iii) “TM accepts” describe RE, not decidable. - Recursive: TM decides : for every , TM halts and says accept/reject.
So is Turing decidable iff is recursive.
Decider vs Recognizer distinction is key: recognizer may not halt on rejection.
Final Answer
Decidable = recursive → Option (i).
- Recursively Enumerable (RE): TM recognizes (accepts if , may loop if $w
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q1j. Multi-tape TM is (i) More powerful than single-tape TM (ii) Less powerful (iii) Equivalent in power (iv) Not equivalent20252m
Module 4: Turing Machines (TM)
View this question on its own page →Multi-tape TM is
(i) More powerful than single-tape TM
(ii) Less powerful
(iii) Equivalent in power
(iv) Not equivalentWorked SolutionAnswer
Correct Option: (iii) Equivalent in power
Explanation
Multi-tape TM vs Single-tape TM:
- Power: Equivalent. Any -tape TM can be simulated by single-tape TM with at most quadratic slowdown (or ). Both accept exactly RE languages; deciders both accept Recursive languages.
- Efficiency: Multi-tape can be faster (e.g., palindrome vs on single tape), but not more powerful in computability.
- Construction: Single tape encodes tapes via tracks (-track tape) + markers for heads.
Therefore they are equally powerful (Turing-equivalent).
Final Answer
Equivalent in power → Option (iii).
Q4a. Design a Turing Machine to compute n \bmod 2.20217m
Module 4: Turing Machines (TM)
View this question on its own page →Design a Turing Machine to compute .
Q5a. Design a Turing Machine that increments a binary number by 1.20247m
Module 4: Turing Machines (TM)
View this question on its own page →Design a Turing Machine that increments a binary number by .
Q5b. Design a Turing machine that recognizes strings containing equal number of 0’s and 1’s.20237m
Module 4: Turing Machines (TM)
View this question on its own page →Design a Turing machine that recognizes strings containing equal number of ’s and ’s.
Q6b. Explain the various types of Turing Machines.20247m
Module 4: Turing Machines (TM)
View this question on its own page →Explain the various types of Turing Machines.
Q7a. Design a Turing machine that accepts all palindromes over: \Sigma = \{ a, b \}20227m
Module 4: Turing Machines (TM)
View this question on its own page →Design a Turing machine that accepts all palindromes over:
Q7b. Design a Turing Machine that enumerates all strings over {a, b} in lexicographic order. Explain the working of the machine.20257m
Module 4: Turing Machines (TM)
View this question on its own page →Design a Turing Machine that enumerates all strings over {a, b} in lexicographic order. Explain the working of the machine.
Q8a. Design a single-tape Turing Machine that multiplies two unary numbers, where the input is of the form 1^m 0 1^n and the output is 1^{m \times n}. Clearly define the input alphabet, tape alphabet, and halting condition. Simulate the working of the Turing Machine on the input string 1101.20257m
Module 4: Turing Machines (TM)
View this question on its own page →Design a single-tape Turing Machine that multiplies two unary numbers, where the input is of the form and the output is . Clearly define the input alphabet, tape alphabet, and halting condition. Simulate the working of the Turing Machine on the input string .
Q9b. Write short notes on: Multi-tape Turing Machine.20237m
Module 4: Turing Machines (TM)
View this question on its own page →Write short notes on: Multi-tape Turing Machine.
Q9b(iii). Write a short note on Multi-stack Turing Machine.20227m
Module 4: Turing Machines (TM)
View this question on its own page →Write a short note on Multi-stack Turing Machine.