سوال ۴۶ کنکور ارشد مهندسی کامپیوتر ۱۴۰۴
کدامیک از زبانهای زیر، منظم است؟
پاسخ صحیح: گزینهٔ C —
A language of the form is regular iff the membership condition does not force the exponent of one block to equal (be a function of) the exponent of a different block. Whenever two separated blocks must share the same counter, a finite automaton cannot remember the count, and the language becomes (at best) context-free, not regular.
Examine each option:
Option 1 — . The exponent is reused for the , , and blocks (). The machine would have to count 's and later check . Pumping the -block breaks the equality, so this is not regular.
Option 2 — . The -block and the -block both carry the exponent , with a block between them. Matching across an arbitrary middle is not regular (it is context-free). Not regular.
Option 3 — with the single condition and . Here are four independent exponents, so the underlying skeleton is just which is regular. The only extra requirement, , says the total length must exceed . Because each exponent is at least , the length is at least ; the constraint merely removes the finitely many strings of length . A regular language minus a finite set is still regular (finite difference / closure under set difference with a finite, hence regular, set). Therefore option 3 is regular. ✅
Option 4 — . The -block and the -block share the exponent across a block, exactly the same matching problem as option 2. Not regular.
Only option 3 avoids cross-block counting, so it is the regular language.
Exam trick: For -style sets, scan the exponents: if a letter's superscript reappears (possibly scaled, e.g. ) on a non-adjacent block, the language is non-regular. A bound that is only a linear inequality on otherwise-independent exponents just trims finitely many strings, keeping the language regular.