arrow
arrow
arrow
Given below are two statements: Statement I: The family of context-free languages is closed under homomorphism. Statement II: The family
Question



Given below are two statements:
Statement I: The family of context-free languages is closed under homomorphism.
Statement II: The family of context-free languages is closed under reversal.
In light of the above statements, choose the correct answer from the options given below:

A.

Both Statement I and Statement II are true.

B.

Both Statement I and Statement II are false.

C.

Statement I is true but Statement II is false.

D.

Statement I is false but Statement II is true.

Correct option is A


Statement I: The family of context-free languages is closed under homomorphism
(True)
Homomorphism is a mapping of input symbols to strings (e.g., mapping a → xy, b → z, etc.). For any context-free language L, applying a homomorphism h (where each symbol in L is replaced by its image under h) results in another context-free language. This is because the transformation can be modelled by modifying the production rules of the grammar.
Statement II: The family of context-free languages is closed under reversal (True)
Reversal means reversing the strings of the language (e.g., abc → cba). For a context-free language L, if we construct a grammar where each production rule generates strings in reverse order, the reversed language is also context-free. Hence, context-free languages are closed under reversal.
Information Booster:
· Closure Properties of Context-Free Languages (CFL):
1. Closed under: Union, concatenation, Kleene star, reversal, and homomorphism.
2. Not closed under: Intersection, complementation, and difference.

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
176k+ students have already unlocked exclusive benefits with Test Prime!

Free Tests

Free
Must Attempt

UGC NET Paper-I (21 August 2024 Shift 2)

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper-I (21 August 2024 Shift 2)

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper-I (21 August 2024 Shift 2)

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English