• +91 9723535972
  • info@interviewmaterial.com

Automata Interview Questions and Answers

Automata Interview Questions and Answers

Question - 51 : - What is the difference between the alphabet and an element of a set?

Answer - 51 : -

Alphabets is a set of letters nothing else but a set of strings (elements) can have more than one letters in one string.

Question - 52 : - Difference between Palindrome and Reverse function?

Answer - 52 : -

The language consisting of Λ and the strings s defined over Σ such that Rev(s)=s.It is to be denoted that the words of PALINDROME are called palindromes.
Reverse (w) = w

Example: Σ={a,b},

PALINDROME={Λ , a, b, aa, bb, aaa, aba, bab, bbb, …}

If a is a word in some language L, then reverse (a) is the same string of letters spelled backwards, called the reverse of a.

e.g

reverse (xxx) = xxx

reverse (623)    = 326

reverse (140)    = 041

Question - 53 : - Define Strings?

Answer - 53 : -

Concatenation of finite letters from the alphabet is called a string.
e.g  If Σ= {a,b} then a language L can be defined asL = {a, abab, aaabb, ababababababababab,……………}
it’s mean all words with a’s more or equal to b’s

Question - 54 : -
Define empty or null strings?

Answer - 54 : -

Concatenation of finite letters from the alphabet is called a string.Sometimes a string with no symbol at all is used, denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called an empty string or null string.

Question - 55 : -
Difference between string and word?

Answer - 55 : -

Any combination of letters of alphabet that follows rules of language is called a word.
A string is a finite sequence of symbols from an alphabet.

Question - 56 : -
There are as many palindromes of length 2n as there are of length 2n-1, please explain?

Answer - 56 : -

If we try to create palindromes then middle elements (2 in even palindromes & 1 in odd palindrome) does not cause any change in no. of palindromesDefining the language PALINDROME, of length 2n and 2n-1 defined over S = {a,b}
e.g if we take n= 2 for 2n

Length (2n) = 4 and string can be written as

{aaaa, abba, baab, bbbb}

And if we take n = 2 for 2n-1

Length (2n-1) = 3 and string can be written as

{aaa, aba, bab, bbb}


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners