logo

AQA A-Level Computer Science practice

Describe the language recognised by the regular expression (a|b)*abb. Give three example strings that are recognised and one string that is not recognised, explaining your choices.

Try the question first, then check the answer and practise the same topic again.

At a glance

Question

Type

practice

Style

Topic

Regular languages

Exam-style question

Try this first

Describe the language recognised by the regular expression (a|b)*abb. Give three example strings that are recognised and one string that is not recognised, explaining your choices.

Answer and explanation

Concise answer

The language consists of strings made from a and b that end with abb.

Why this is correct

The final abb is compulsory. The preceding part can contain any sequence of a and b, including no characters, so the string may be exactly abb or may have additional characters before abb.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions