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*)*
但它没有通过一些测试......请帮助我。