ISRO Scientist/Engineer CSE 2020Theory of Computation › Not yet assigned to a topic
ISRO Scientist/Engineer CSE 2020 PYQ: Which of the following classes of languages can validate an $\text{IPv4}$ address in dotted decimal format?…
Which of the following classes of languages can validate an $\text{IPv4}$ address in dotted decimal format? It is to be ensured that the decimal values lie between 0 and 255.
- ARE and higherCorrect answer
- BCFG and higher
- CCSG and higher
- DRecursively enumerable language
Answer
(A) RE and higher
Approach
An IPv4 address in dotted decimal form is a string over a finite alphabet with a fixed structure: four decimal numbers in [0,255] separated by dots. Since the set of valid strings is finite and fully specifiable, a DFA (hence a regular expression) can recognize it. Therefore the smallest class that can validate it is the regular languages, and any class containing the regular languages (RE and higher) can also validate it.
Reviewed by ISRO IQ Editorial Team.