L= { w is {1,2,3}*
| w starts with 3, ends with 2 and there is a substring of only 1 with length
even equal or >2}.
Таким образом, результат некоторых тестов должен быть:
3323112: accepted
311211112: non accepted
31112: non accepted
32: non accepted
2113: non accepted
313212: non accepted
Мой ответ: 3*(11)*2*
Но он не проходит некоторые тесты ... Может кто-нибудь помочь мне?
Второе упражнение:
L= { w is {1,2}*
| in w after every 1 there is one or more 2, but if the 1 is the last
character it could be the last (no 2 after it)}
Тестовые строки:
1: accepted
222: accepted
221212122: accepted
1222121: accepted
111221: not accepted
11: not accepted
Мое решение - (12*)*
Но оно не проходит некоторые тесты ..Помогите мне, пожалуйста.