Regular Expression for $L = \{a^n b^m | n \geq 1, m \geq 1, nm \geq 3\}$

2.5k Views Asked by At

I'm trying to find a regular expression for $L = \{a^n b^m: n \ge 1, m \ge 1, nm \ge 3\}$ It's really hard for me to figure this out. can anybody please help?

1

There are 1 best solutions below

1
On BEST ANSWER

I'd go with something like $aa^*b^*b^3+a^2a^*b^*b^2+a^3a^*b^*b$. The essential part of this line of thought is to notice that the constraints on $n,m$ are equivalent to the logical disjunction of a finite number of inequalities $H_i$ of the form $H_i\equiv [n\ge \alpha_i\land m\ge \beta_i]$.