407 views
0 votes
0 votes
difference between empty language and empty string

2 Answers

Best answer
4 votes
4 votes

Consider an empty box in an empty bag. 

  1. If box -- whether empty or not is in the bag -- can it really be empty? -- NO. 
  2. Only if nothing is in the bag, it is empty.

Now, replace boxes with strings and bags with languages. 

  1. If no string is in a language it is empty -- $\{\}$
  2. If string is empty (no characters in it usually denoted by $\epsilon$) it resembles an empty box
  3. Even an empty string makes a language not empty -- $\{\epsilon\}$
selected by
0 votes
0 votes
Empty language is a language which contains nothing( no strings at all ). But whereas empty string is a string of length '0'.( which we call it epsilon)

A language is said to be not empty even if it contains empty string.

Related questions

0 votes
0 votes
1 answer
1
prasoon054 asked Dec 7, 2023
184 views
Is countable sets part of GATE CS 2024 syllabus?
3 votes
3 votes
2 answers
2
1 votes
1 votes
1 answer
3