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*
しかし、それはいくつかのテストに失敗します...誰かが私を助けることができますか?
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*)*
しかし、いくつかのテストに失敗します...助けてください。