- Example: >= {a,b}, L₁ = { anbn: n ≥0 and L₂ = { ab, aa } 2 • How many sentences/strings are in L₁ L₂? - Is the language finite or infinite?
The following is one big question, please answer the following
Example: Σ= {a,b), L1 = {an bn: n≥0} and L2 = {ab, aa}
- How many sentences/strings are in L1 or L2?
Is the language finite or infinite?
Is ab in L1 or L2?
Is aabb in L1 or L2?
- Is aa in L1 or L2?
Is aaaabbbb in L1 or L2?
Answer: - How many sentences/strings are in L1 or L2?
Is the language finite or infinite?
The alphabet Σ is {a, b}. This means that the only symbols allowed in the strings for both L1 and L2 are 'a' and 'b'.
L1 = {an bn: n≥0} is a language that consists of all strings that contain an equal number of 'a's and 'b's, in any order, including the empty string ε. For example, L1 contains strings like ε, 'ab', 'aabb', 'aaabbb', etc. The notation "an bn" means that there must be n 'a's followed by n 'b's, where n is any non-negative integer.
Step by step
Solved in 2 steps