find a regular expression for a given language

93 Views Asked by At

It is given that $\Sigma=\{1,2,4,5,7,9\}$ and $L=\{w: w \in \Sigma^{*} \text{ ,w gets divided completely by }5\}$. Could you help me to find a regular expression for this language?

1

There are 1 best solutions below

9
On BEST ANSWER

If something is divisible by 5 then it ends in zero or five.

So (1|2|4|5|7|9)*5 would characterize your language.