1000 automatically generated exercises with n-gram grammars

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ab,{\rtimes}bb,aab,aba,abb,baa,bbb,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. aab
  2. bb
  3. abb
  4. bbb
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,abd,caa,cba,dad,dcc,ddc\}\)

  1. cba
  2. dabcdbcd
  3. dcdbacac
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,abaa,abba,abbb,cabb,cbab\}\)

  1. \(\varepsilon\)
  2. b
  3. bcccccca
  4. bcaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,acba,adac,beca,cbdb,cecb,dacd,ebcd\}\)

  1. d
  2. deddbed
  3. baeeedd
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,ba,cc,cd,db,dc,a{\ltimes}\}\)

  1. cabd
  2. dba
  3. edced
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}da,{\rtimes}da{\ltimes},{\rtimes}bdb,{\rtimes}bcc,accc,bcca,cacc,ccac,cccd,ccdb,cdbc,bdb{\ltimes},dbc{\ltimes},db{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},da{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bdb
  2. dd
  3. da
  4. cca
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bab,ccb,dac,dba,dbd\}\)

  1. acab
  2. bbbdcbba
  3. d
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,da,de,ed,ee\}\)

  1. \(\varepsilon\)
  2. cbab
  3. e
  4. bebbec
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}bbb,{\rtimes}b{\ltimes}{\ltimes},aabb,abbb,baab,bbaa,bbba,bbbb,bbb{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aabb
  3. b
  4. aab
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{adc,bdb,bdd,cad\}\)

  1. baabdd
  2. bca
  3. bbaddcb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}bcc,bcbc,bccb,bcdc,bddb,cbcd,cbdd,ccbd,dbcb,ddbc,cdc{\ltimes},dc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. dbaddcdcaaa
  3. cad
  4. d
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}bb,aaa,aab,aba,baa,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbabbab
  2. aabaabbb
  3. \(\varepsilon\)
  4. baba
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,abb,bab,bba\}\)

  1. baabb
  2. baa
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ae,cc,cd,dd,ec\}\)

  1. daaaeb
  2. dee
  3. e
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aac,abc,acb,baa,bab,bca,cbb\}\)

  1. b
  2. \(\varepsilon\)
  3. bc
  4. aac
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ab,{\rtimes}ba,aba,abb,acb,bab,bac,bba,bbb,bbc,cbb,bc{\ltimes},ba{\ltimes},c{\ltimes}{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cccc
  2. baabbacab
  3. b
  4. cab
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acbd,bdbc,cadd,cbab,cbcc,ccca,cdcc,ddca\}\)

  1. cdab
  2. c
  3. \(\varepsilon\)
  4. bcc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}cc,aba,acb,bab,bac,bba,bbb,bca,cbb,cbc,ccb,ca{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bacbccca
  3. c
  4. abcbcbccbb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,bad,bbd,bda,dca,dcb,dcd,dda\}\)

  1. dcccda
  2. a
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adaa,baaa,bbdc,caab,ddad\}\)

  1. \(\varepsilon\)
  2. bbddada
  3. cacccbad
  4. abba
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adab,cccb,cccc,dccc,dcdd\}\)

  1. \(\varepsilon\)
  2. bbadbcd
  3. b
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bebb,cbce,cddb,ebaa\}\)

  1. bbbede
  2. e
  3. \(\varepsilon\)
  4. dea
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dc,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}ad,{\rtimes}cca,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}dc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}ada,aada,abdd,adab,caad,ccaa,dabd,bdd{\ltimes},ada{\ltimes},dc{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},da{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cbccbad
  2. \(\varepsilon\)
  3. ccc
  4. ba
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,acc,bad,cac,ccd,daa,dbb,dda\}\)

  1. dcbddbdd
  2. bdccab
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,aca,ada,bac,bba,bbb,cad,dad,ad{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. cbabbaba
  2. bbbacad
  3. \(\varepsilon\)
  4. bbacad
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bacd,bbdd,cbba,ccbb,cccb,dabc,dbbc\}\)

  1. cd
  2. dca
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,caa,cab,cba\}\)

  1. cbccaaa
  2. c
  3. cc
  4. bcbcb
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}ca,{\rtimes}cab,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abcd,bcdc,cabc,cdcc,dcca,cca{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abcb
  2. aaacd
  3. acdbcddb
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bc,cb,da,dc,eb\}\)

  1. acc
  2. bd
  3. dcbec
  4. aecbdce
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}acc,{\rtimes}bc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},accb,bcbb,cbcb,ccbc,aaa{\ltimes},cbb{\ltimes},aa{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbac
  2. aababc
  3. cbbbc
  4. ccc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bd,cc,da,db,dc,dd\}\)

  1. bdddcdcb
  2. \(\varepsilon\)
  3. acacbaab
  4. ddb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}db{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bdb,acbd,bacb,bdba,bddb,cbdd,dbac,ddbb,dbb{\ltimes},db{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abb
  2. ddc
  3. aacddddc
  4. b
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baaa,baba,bbaa,bbab,bbbb\}\)

  1. bbbabaabaaab
  2. bbaa
  3. bbaababbb
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,abba,bbce,ddea,dded,ecde,edbd,eeee\}\)

  1. acbb
  2. b
  3. e
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}aa,{\rtimes}aae,{\rtimes}aca,aaec,aeac,aece,cedd,daea,ddae,eced,edda,aca{\ltimes},eac{\ltimes},ac{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. dd
  3. aca
  4. cbaabbccd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{caae,cbdb,ccdb,cdce,dceb\}\)

  1. b
  2. d
  3. \(\varepsilon\)
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,abb,baa,bab,bba,bbb\}\)

  1. aaabbba
  2. bbbbaab
  3. \(\varepsilon\)
  4. baababa
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaba,abaa,baaa,bbba,bbbb\}\)

  1. \(\varepsilon\)
  2. babba
  3. aa
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abbb,baab,bbaa,bbab,bbbb\}\)

  1. ab
  2. baba
  3. bbbab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,abab,abba,babb,bbab,bbbb\}\)

  1. a
  2. abbaaaaa
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,bb,bc,ca,cb,cc\}\)

  1. cb
  2. bc
  3. cabbabbba
  4. bcbc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}be,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}d{\ltimes}{\ltimes},{\rtimes}bec,{\rtimes}ac{\ltimes},becd,cdce,ecdc,dce{\ltimes},ce{\ltimes}{\ltimes},ac{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. d
  2. ab
  3. abbbe
  4. bb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}acb,aaab,acaa,acba,baca,caaa,cbac,aab{\ltimes},ab{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cabcaa
  2. a
  3. cbbcccaa
  4. bbaca
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}ca,aab,aba,abc,bab,bca,caa,cab,ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbcacbb
  3. b
  4. bcbbbbc
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}ca,abb,bbc,bca,cab,ab{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. a
  2. cab
  3. ccab
  4. cbbca
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,bedd,cbbd,cbca,dbcb,eeec\}\)

  1. ddadbda
  2. ecc
  3. eaebdea
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,abb,bab,bba,bbb\}\)

  1. \(\varepsilon\)
  2. ababa
  3. a
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ab,abc,aca,bac,bcb,cba,ca{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cabaca
  2. bcbcb
  3. \(\varepsilon\)
  4. aabcabb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ee,aad,ada,dad,eaa,eea,ad{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. dbdad
  2. edad
  3. daccac
  4. adbe
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bec,cab,cad,cdb,ceb,daa,ebb\}\)

  1. b
  2. ed
  3. e
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aec,bae,bcc,cee,eae,eba\}\)

  1. b
  2. abee
  3. cbcbddca
  4. dbacc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}eb,{\rtimes}{\rtimes}ce,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}cec,{\rtimes}eb{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},bdce,cbdc,ccbd,cecc,ceee,dcee,eccb,eee{\ltimes},eb{\ltimes}{\ltimes},ee{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eb
  2. \(\varepsilon\)
  3. aaeaedabd
  4. bee
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,bc,cc,cd,db,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. a
  3. dacb
  4. dadcaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}cb,{\rtimes}db,{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},aba,bbd,bdb,bee,dbb,dbe,eab,eea,cb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cb
  2. \(\varepsilon\)
  3. dbddaee
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}e,bd,ce,db,dc,ed,e{\ltimes},b{\ltimes}\}\)

  1. b
  2. eaa
  3. \(\varepsilon\)
  4. adaac
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aca,bac,bca,cba,ccc\}\)

  1. ca
  2. abcccaa
  3. acbc
  4. bcba
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bc,cb,cc\}\)

  1. \(\varepsilon\)
  2. cccbcbac
  3. abcbcabbbb
  4. cbbbacacc
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}bc,{\rtimes}cca,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}bcb,adcd,cadc,ccad,dcdc,cdc{\ltimes},bcb{\ltimes},dc{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. d
  2. dcadb
  3. bcd
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}bcb,{\rtimes}ca{\ltimes},{\rtimes}aca,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},acad,adad,adcc,cada,dadc,dcc{\ltimes},bcb{\ltimes},cb{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aabacbdb
  3. b
  4. aca
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}b{\ltimes},{\rtimes}ba,aab,abc,baa,bca,bcc,caa,ccc,ab{\ltimes},cc{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. abbbcca
  2. bbab
  3. acaacc
  4. ccbbcca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,babc,caaa,cbab,cbcc\}\)

  1. caacac
  2. cab
  3. \(\varepsilon\)
  4. abcab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}cb,{\rtimes}ca,abb,aca,cab,cac,bb{\ltimes},cb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. cb
  2. cabb
  3. abccb
  4. bac
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ab,{\rtimes}aba,{\rtimes}aaa,{\rtimes}ab{\ltimes},aaba,aabb,abaa,abba,baab,bbaa,baa{\ltimes},aaa{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abaa
  2. \(\varepsilon\)
  3. aaa
  4. ab
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ab,ac,ba,bb,bc,ca,cb,cc,a{\ltimes},b{\ltimes}\}\)

  1. ab
  2. a
  3. bbabbbbcca
  4. acb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,cc,db,dc\}\)

  1. ddc
  2. ddaa
  3. dabdaa
  4. aaacbcc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}c,aa,ab,bb,bc,ca,cb,a{\ltimes},c{\ltimes}\}\)

  1. c
  2. \(\varepsilon\)
  3. a
  4. cbcbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}aba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaba,aabb,abaa,abab,baab,baba,aba{\ltimes},abb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. babbbbaba
  3. bbbb
  4. aba
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}b{\ltimes}{\ltimes},{\rtimes}baa,aaab,aabb,abbb,baaa,bbaa,bbba,baa{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. aaabbbbbb
  3. \(\varepsilon\)
  4. babbbaaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}bb,bac,bbc,bcb,cba,ac{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bcca
  2. cb
  3. c
  4. b
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bac,bcb,cab,cac,cca,ccb\}\)

  1. acaaaaa
  2. baccab
  3. \(\varepsilon\)
  4. ab
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,abe,bcc,cab,dca,edb,eea\}\)

  1. dbbe
  2. cebbbccebb
  3. cbdbbee
  4. e
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abe,ada,adc,aed,cad,cea,deb\}\)

  1. \(\varepsilon\)
  2. b
  3. ebbca
  4. daabeea
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,abab,abbb,baab,bbba,bbbb\}\)

  1. ba
  2. \(\varepsilon\)
  3. b
  4. bb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acb,bab,bbb,bbc,cac,cba,cbc\}\)

  1. bccbbc
  2. \(\varepsilon\)
  3. b
  4. cccbaaca
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ea,{\rtimes}ead,{\rtimes}{\ltimes}{\ltimes}{\ltimes},adbe,becc,ccea,cead,dbec,eadb,ecce,adb{\ltimes},db{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eabcc
  2. e
  3. adbabdaa
  4. ebaadcedae
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ac,ca,cc,c{\ltimes}\}\)

  1. a
  2. bbcb
  3. caabaccc
  4. c
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,baa,bba,bbb\}\)

  1. bba
  2. \(\varepsilon\)
  3. b
  4. abbbab
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aabb,abab,abbb,baab,bbbb\}\)

  1. \(\varepsilon\)
  2. abbbab
  3. bbaaaaa
  4. aaaaaaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,bc,cc,cd,da,db,dc,dd\}\)

  1. bbc
  2. abad
  3. abbacab
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,abc,acc,bbc,cab,cbb,cbc,ccc\}\)

  1. cccc
  2. \(\varepsilon\)
  3. aaca
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aad,abc,bbd,bda,bdc,dad,dcb,dcc\}\)

  1. bacc
  2. cd
  3. aa
  4. adcc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,ad,ba,bb,bc,cb,de,eb,ec,b{\ltimes}\}\)

  1. eddcddce
  2. eddcdab
  3. abbcaeeaba
  4. c
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,ab,bc,cd,da,dd,d{\ltimes}\}\)

  1. \(\varepsilon\)
  2. dc
  3. cb
  4. bbaada
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ac,ba,bc,ca,cb,cc,c{\ltimes}\}\)

  1. cabc
  2. aa
  3. bbb
  4. aaabbaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{cabe,cdaa,cdca,cddc,cecc,dddd\}\)

  1. ade
  2. dc
  3. aeda
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}d,{\rtimes}a{\ltimes},{\rtimes}dd,{\rtimes}cc,aad,aca,adb,bac,cad,daa,dba,dda,ad{\ltimes},cc{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. a
  2. dbdbc
  3. dcacbdbcdc
  4. cc
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}ba,abc,aee,bae,dab,dda,edd,eed,bc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. dbcba
  2. c
  3. cdae
  4. dded
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}bcb,{\rtimes}cbc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},babb,bbab,bbba,bbbb,bcbb,cbbb,cbc{\ltimes},abb{\ltimes},bc{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cacb
  2. baccccca
  3. aac
  4. abcaabcb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,bac,bba,bbd,bcd,dcb,dcc\}\)

  1. \(\varepsilon\)
  2. b
  3. cbddddd
  4. dda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,bbc,beb,ceb,cee,dde,ded\}\)

  1. e
  2. \(\varepsilon\)
  3. b
  4. ec
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}aaa,{\rtimes}baa,{\rtimes}ba{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaaa,aaab,aabb,abba,baa{\ltimes},bba{\ltimes},ba{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbbaa
  2. \(\varepsilon\)
  3. baaa
  4. a
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abca,bbbc,bbcc,bcca,caaa,cbbb,ccbc,ccca\}\)

  1. b
  2. a
  3. \(\varepsilon\)
  4. abbbaabbbc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,abb,baa,bab,bbb\}\)

  1. bb
  2. a
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}bb,{\rtimes}aa,aaa,aab,aba,baa,bb{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abb
  2. abababa
  3. aaabb
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,abbb,baba,babb,bbba\}\)

  1. baa
  2. abaaaa
  3. \(\varepsilon\)
  4. abbbbaaab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,acce,cbae,ceee,dbba,ddcc,ecdd,edbc\}\)

  1. eeaecb
  2. aadaa
  3. \(\varepsilon\)
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,baa,bab,bba\}\)

  1. b
  2. \(\varepsilon\)
  3. bbabaabaa
  4. aabbabaa
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bb,cb,cc\}\)

  1. c
  2. cabaaaa
  3. \(\varepsilon\)
  4. accbaaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ba,{\rtimes}aa,aab,abb,baa,bba,bbb,aa{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abbbab
  2. aa
  3. babaaa
  4. ba
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,abba,abbb,baba,babb,bbab,bbba\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. baabbab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bd,cc,dd\}\)

  1. ab
  2. bcbddaba
  3. acadb
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abe,bbb,ccb,ddb,dde,eca,eee\}\)

  1. \(\varepsilon\)
  2. e
  3. b
  4. eb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}aa,aaa,aab,aba,abb,baa,bab,bba,aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. b
  3. baba
  4. aa
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adac,adcd,cbed,eaee,ebdc\}\)

  1. b
  2. e
  3. cdbada
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}baa,aabb,abba,baab,baba,bbab,aba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. babaab
  2. bbbba
  3. ab
  4. abaabb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,aa,ab,ac,ba,ca,cc,c{\ltimes}\}\)

  1. cbc
  2. \(\varepsilon\)
  3. abcaac
  4. c
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{cdec,dbea,dcba,eebb\}\)

  1. cd
  2. caedbdeeb
  3. \(\varepsilon\)
  4. aaedbaeec
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,abb,caa,cba,cbb,cca,ccb\}\)

  1. b
  2. aac
  3. \(\varepsilon\)
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}be,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb{\ltimes},{\rtimes}bed,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},acdb,bede,deac,eacd,edea,cdb{\ltimes},db{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eceab
  2. dacacaab
  3. daaeebd
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bcd,bdb,cba,cda,cdd,ced,dbb,eae\}\)

  1. ddaddcbda
  2. cdbaaaed
  3. ced
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,baa,bab,bdb,ccc,daa,dcc\}\)

  1. b
  2. a
  3. \(\varepsilon\)
  4. cabbacbdbd
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}cd,abd,bab,bdc,cce,cde,cec,dcc,ecd,de{\ltimes},cd{\ltimes},e{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. deebebab
  2. d
  3. dcddcdcee
  4. abcdecdbc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,bcb,beb,cae,cbd,dcd,ebd\}\)

  1. ecebabce
  2. dbaa
  3. eb
  4. ccac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aeb,bce,bea,dbb\}\)

  1. \(\varepsilon\)
  2. dddceed
  3. e
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbb,baaa,babb,bbbb\}\)

  1. b
  2. \(\varepsilon\)
  3. abbbbabbb
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ab,{\rtimes}b{\ltimes},aab,abb,baa,bba,bb{\ltimes},ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. aabbab
  2. b
  3. abbbaa
  4. aaaa
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}bba,{\rtimes}bb{\ltimes},{\rtimes}bbb,babb,bbab,bbba,bbbb,bba{\ltimes},abb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. bb
  3. aaaa
  4. bba
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aaa,aab,aba,baa,bab,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. abaaabb
  2. bbbabbba
  3. \(\varepsilon\)
  4. ababbbb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bcc,cad,ccd,cdc\}\)

  1. \(\varepsilon\)
  2. d
  3. dd
  4. bacbadb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaca,accb,bacb,cccb\}\)

  1. acaccbcca
  2. bcba
  3. \(\varepsilon\)
  4. bca
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ae,de,ea,ec\}\)

  1. badbbacc
  2. bba
  3. cdce
  4. aaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abda,adcb,bccc,ccca,daab\}\)

  1. a
  2. dcbb
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adae,ccdc,cebd,dedc\}\)

  1. adedc
  2. \(\varepsilon\)
  3. b
  4. e
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}aab,aabb,abba,baaa,bbaa,aaa{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbbaa
  2. ab
  3. \(\varepsilon\)
  4. abbaba
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}aa{\ltimes},{\rtimes}aaa,{\rtimes}baa,aaab,aaba,abaa,baab,baa{\ltimes},aba{\ltimes},aa{\ltimes}{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aa
  2. \(\varepsilon\)
  3. ccc
  4. aacc
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ab,ac,ad,ba,ca,de,ea,c{\ltimes}\}\)

  1. a
  2. ac
  3. abac
  4. acac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,acb,bbc,ccb,cce,edc\}\)

  1. eede
  2. e
  3. abaed
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ac,ad,bc,ca,cb,cc,cd,da,db,c{\ltimes}\}\)

  1. aacd
  2. bcadadbd
  3. ccbbb
  4. ac
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}d,{\rtimes}d{\ltimes},{\rtimes}ac,aab,aac,abd,aca,acb,bcd,caa,cbc,cda,daa,bd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. d
  2. acaabd
  3. caac
  4. cacacbba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acd,bac,bda,cbb,daa,dab,dcc,ddb\}\)

  1. a
  2. \(\varepsilon\)
  3. adcac
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}c{\ltimes},{\rtimes}ac,abb,aca,bbb,bbc,bcb,cab,cbb,bb{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bbb
  2. \(\varepsilon\)
  3. ca
  4. abcc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,bd,db,a{\ltimes}\}\)

  1. a
  2. aa
  3. dba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,bacc,bccb,caaa,caba,cabb,cbcc\}\)

  1. \(\varepsilon\)
  2. cabc
  3. accb
  4. bbbaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,abba,baaa,baab,baba\}\)

  1. \(\varepsilon\)
  2. a
  3. b
  4. abbab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acdc,addb,bddd,cbbb,dbdc,ddca\}\)

  1. b
  2. \(\varepsilon\)
  3. da
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,bab,bba,bbb\}\)

  1. abbabaaba
  2. \(\varepsilon\)
  3. baaabaab
  4. bbbb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}c,bc,bd,cb,cc,cd,db,dc,dd,c{\ltimes},d{\ltimes}\}\)

  1. dabbbca
  2. c
  3. \(\varepsilon\)
  4. abdbc
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,bba,bbb\}\)

  1. abbbaabaa
  2. baaba
  3. bbab
  4. bbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{babd,bcac,bcdb,cbbd,cdab,ddad,dddd\}\)

  1. adccca
  2. \(\varepsilon\)
  3. bdadcdaad
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}ca,{\rtimes}de,{\rtimes}d{\ltimes},aba,aec,bae,cab,ced,dec,eca,ece,edc,dc{\ltimes},ca{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. eadb
  3. eadbaebeaa
  4. dedb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,ac,bd,da,dd,de,eb,ee,c{\ltimes}\}\)

  1. \(\varepsilon\)
  2. accebcbbc
  3. eecdbbbebe
  4. beedbebece
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,cc,cd,dc,dd,c{\ltimes}\}\)

  1. ace
  2. deeda
  3. c
  4. cc
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}aab,{\rtimes}baa,aabb,abbb,baab,babb,bbab,bbba,aab{\ltimes},abb{\ltimes},ab{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aabbbbb
  2. \(\varepsilon\)
  3. babb
  4. b
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}ead,adbb,bbee,beee,dbbe,eadb,eddb,eedd,eeed,eeee,ddb{\ltimes},db{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ebeeacd
  2. cbceced
  3. eba
  4. eadbbeeeddb
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ac,ad,ba,cd,da,dd,a{\ltimes},b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ababdabc
  3. b
  4. ddb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,abb,baa,bba\}\)

  1. \(\varepsilon\)
  2. abaababa
  3. a
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,bd,ca,dc\}\)

  1. cddbdcc
  2. ddd
  3. \(\varepsilon\)
  4. bba
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,abb,bbc,cca,ccc\}\)

  1. cbacab
  2. \(\varepsilon\)
  3. aacacab
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ab,ba,bb,a{\ltimes},b{\ltimes}\}\)

  1. b
  2. ababbaaaa
  3. aaba
  4. bbabba
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}acb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},acbd,bdca,cbdc,acb{\ltimes},dca{\ltimes},cb{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cccdd
  3. b
  4. bacaab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}bc,{\rtimes}bb,aac,aba,aca,baa,bab,bbb,bbc,bcc,cba,ccb,bc{\ltimes},ca{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bc
  2. bbbc
  3. bbc
  4. cbabaaaab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}ca,{\rtimes}bca,{\rtimes}cab,aaaa,aaab,aabc,abcd,bcaa,bcda,caaa,cdaa,cab{\ltimes},daa{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bcaaabcdaa
  2. dcddcca
  3. cab
  4. cdddddcbdad
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. abaaaa
  2. ba
  3. bbbbbbbba
  4. bbbbabbabb
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,aa,ac,ad,ca,cd,da,d{\ltimes}\}\)

  1. cd
  2. ca
  3. \(\varepsilon\)
  4. cad
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,aabc,abbc,acaa,bbcb,bcbc,cabc,cbbc\}\)

  1. abc
  2. acaccaaa
  3. bbbacc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}bba,{\rtimes}a{\ltimes}{\ltimes},aaab,abba,baaa,babb,bbaa,bbab,aab{\ltimes},ab{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. abbbbaa
  3. baaba
  4. babbbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bc,cb\}\)

  1. cbacc
  2. b
  3. \(\varepsilon\)
  4. cba
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bc,ca,cb,a{\ltimes},b{\ltimes}\}\)

  1. bcabccacbabb
  2. c
  3. bbccabacaacb
  4. bbabaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aca,bbd,ccd\}\)

  1. adbd
  2. abaa
  3. d
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}c,aa,ac,bb,bc,cb,cc,c{\ltimes}\}\)

  1. babd
  2. c
  3. cc
  4. ac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,bd,cd,db,dc,dd\}\)

  1. \(\varepsilon\)
  2. accaddc
  3. bcac
  4. ddacdbada
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\ltimes}{\ltimes},{\rtimes}bc,{\rtimes}aa,abc,bab,bba,bcb,cbb,bc{\ltimes},aa{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bc
  2. bab
  3. \(\varepsilon\)
  4. aa
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,bb,cb,cc\}\)

  1. \(\varepsilon\)
  2. ccb
  3. b
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,acd,ace,cdd,cec,dac,dda,ecd,cd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. bbdccceab
  2. acecd
  3. \(\varepsilon\)
  4. acd
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ad,ca,cc,db\}\)

  1. ea
  2. \(\varepsilon\)
  3. dbaea
  4. abb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bbc,bcb,bda,bdb,cbd,ccc,dad,dcc\}\)

  1. bcac
  2. ddaacaa
  3. c
  4. aca
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. abbbab
  2. ab
  3. abbbbabbb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcb,beba,cbdb,cddc,ceed,ceee,dcba,eadb\}\)

  1. e
  2. b
  3. dedc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acab,babb,bcbb,bcca,ccca\}\)

  1. a
  2. b
  3. bcb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,acb,dab,dad,ddb\}\)

  1. b
  2. ccdaccdca
  3. \(\varepsilon\)
  4. aadcacba
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}c,ad,bd,cb,da,a{\ltimes},b{\ltimes}\}\)

  1. dcbbad
  2. bccc
  3. \(\varepsilon\)
  4. dcab
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,{\rtimes}d,aa,ab,bc,bd,cd,da,db,a{\ltimes},c{\ltimes}\}\)

  1. ca
  2. dbdc
  3. \(\varepsilon\)
  4. ddadcdbca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ba,a{\ltimes}\}\)

  1. aaabbaba
  2. a
  3. bba
  4. baaa
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,abaa,baab,bbaa\}\)

  1. bbbbb
  2. aba
  3. bbaa
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ab,{\rtimes}aa,aaa,aab,aba,baa,ab{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abaabaaa
  2. ab
  3. bbbbaabaab
  4. aa
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{cb,ce,da,ea\}\)

  1. cbeeccadca
  2. e
  3. b
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}ba,{\rtimes}cac,{\rtimes}e{\ltimes}{\ltimes},{\rtimes}ba{\ltimes},acbb,bacb,bbac,bbdc,bdcb,cacb,cbba,cbbd,dcb{\ltimes},ba{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ba
  2. cacbbdcb
  3. e
  4. cbbabaacdc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. baaaba
  2. bb
  3. baaab
  4. abbaabaaa
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bd,cb,cc,cd,da,dc\}\)

  1. cbcdad
  2. \(\varepsilon\)
  3. b
  4. dcbccdabd
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bba,bbb\}\)

  1. \(\varepsilon\)
  2. b
  3. aabba
  4. aaa
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ac,ca,cc,c{\ltimes}\}\)

  1. aac
  2. acc
  3. cbbc
  4. ac
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}da,acc,acd,bac,cba,ccb,dac,cd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. acededeb
  2. bbd
  3. ddbecae
  4. cca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ca,abc,bcc,cab,cba,ccb,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ac
  2. accca
  3. \(\varepsilon\)
  4. acbbbc
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acd,bce,bda,cab,cad,ddb,deb\}\)

  1. b
  2. e
  3. \(\varepsilon\)
  4. dee
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}ac{\ltimes},{\rtimes}cbb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abca,babc,bbcb,bcab,bcba,cabc,cbab,cbbc,abc{\ltimes},ac{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ac
  2. \(\varepsilon\)
  3. cbbcba
  4. ccbbcbabc
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bcab,dabd,dacd,dbda,dcdc\}\)

  1. baadacbc
  2. abdbccddcd
  3. badddbdc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}eac,accc,ccca,cccc,eacc,cca{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eaccca
  2. cdbcce
  3. a
  4. bdc
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ba,bb,db,dc,ec,ed\}\)

  1. dbced
  2. daebcaeea
  3. abdaccece
  4. baebedaaac
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,aabb,babb,bbaa,bbab,bbba\}\)

  1. aabbaa
  2. \(\varepsilon\)
  3. babaab
  4. bbbb
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,aab,acb,baa,bba,cbb,ab{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bba
  2. c
  3. a
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bba
  3. aaabaaba
  4. a
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,abbc,bbca,bcaa,cbac,cbbc,cccc\}\)

  1. b
  2. ababcbca
  3. cbbcac
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}ba,aaa,aab,aba,abb,baa,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. baaba
  2. bab
  3. bbaaab
  4. baab
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}de,ace,ada,ced,dac,dda,dea,ead,edd,da{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ebaeceda
  2. daaaaaccac
  3. \(\varepsilon\)
  4. deada
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aadc,adde,bacc,bdea,cded,daea,ddcc\}\)

  1. bac
  2. bdddb
  3. e
  4. abcc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}da,aba,abb,bbe,bed,dab,eda,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cdccada
  2. d
  3. ab
  4. daba
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}b{\ltimes},abb,bbb,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. aaa
  2. \(\varepsilon\)
  3. aab
  4. babaab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}eb,{\rtimes}{\rtimes}ed,{\rtimes}ebd,{\rtimes}eda,aace,aced,cedb,daac,dbda,edaa,edbd,ebd{\ltimes},bda{\ltimes},bd{\ltimes}{\ltimes},da{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ceaee
  2. aacccca
  3. aedbb
  4. beeede
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ad,bc,da\}\)

  1. \(\varepsilon\)
  2. b
  3. cddaa
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}cd,{\rtimes}cda,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}cc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abbe,cdab,dabb,bbe{\ltimes},be{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. d
  2. \(\varepsilon\)
  3. b
  4. da
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bd,be,db,ea,ec,ed,ee\}\)

  1. e
  2. ecbaece
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,abba,bbba\}\)

  1. \(\varepsilon\)
  2. abababa
  3. b
  4. baaabb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabd,acbd,baad,bbab,cbba,cddb,cddc,ddbb\}\)

  1. abbdacb
  2. cd
  3. bacdbaa
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}bc,aac,baa,bbc,bcb,bcd,cba,cbb,cdc,dcb,ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. abdba
  2. abdccca
  3. cd
  4. aa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bb\}\)

  1. cbcabbba
  2. baccb
  3. bbc
  4. caccbbc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ab,{\rtimes}bb,aab,aba,baa,bb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aba
  2. bb
  3. c
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaed,accb,baec,dcdd,deeb,eacc,ecac,eeac\}\)

  1. c
  2. e
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,acba,bbba,cbaa\}\)

  1. aa
  2. aabaac
  3. cabba
  4. bb
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abdb,baaa,bbbd,bcbb,cdbc,cddc,dbdb,dcad\}\)

  1. \(\varepsilon\)
  2. a
  3. b
  4. dbbb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ac,ba,bc,ca,cb,cc,a{\ltimes}\}\)

  1. aaa
  2. ab
  3. a
  4. aa
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,{\rtimes}c,ac,ca,cc,a{\ltimes},b{\ltimes}\}\)

  1. accb
  2. bcbc
  3. \(\varepsilon\)
  4. caaac
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}abc,abca,abcb,bcab,bcbb,cabc,cbb{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cc
  2. cabcba
  3. a
  4. abcbb
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bd,ca,cd\}\)

  1. \(\varepsilon\)
  2. b
  3. a
  4. daacbacccc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ad,bd,dd\}\)

  1. \(\varepsilon\)
  2. ababbbbccc
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}e,aa,ab,ad,ae,be,de,ea,e{\ltimes}\}\)

  1. \(\varepsilon\)
  2. eabcccb
  3. baddcabece
  4. adbbcaad
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,abb,bcb,cbb,cbc\}\)

  1. acabca
  2. cacacccaac
  3. accbaacb
  4. cccbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}bb,{\rtimes}ad,acb,bac,bba,bbd,bde,cbb,ad{\ltimes},de{\ltimes},e{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. caaeac
  2. bbde
  3. ad
  4. abb
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ae,ba,ce,da\}\)

  1. e
  2. acbaebe
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}bb,{\rtimes}aa,aab,aba,abb,baa,bab,bba,bbb,aa{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. b
  2. aa
  3. bba
  4. aaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,bba,bbb\}\)

  1. a
  2. \(\varepsilon\)
  3. b
  4. abbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{adb,cac,dbd,ece,edb\}\)

  1. aacaaeda
  2. eccaed
  3. cddce
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acd,bde,ccb,dea\}\)

  1. abbbcbecbabb
  2. bedbcbadae
  3. \(\varepsilon\)
  4. abcaeeeb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabb,abaa,abbb,babb,bbab,bbbb\}\)

  1. aa
  2. \(\varepsilon\)
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,aa,bb,be,cb,cc,ce,dc,ea,ec,a{\ltimes},d{\ltimes}\}\)

  1. dcea
  2. d
  3. dccea
  4. adcad
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,abbb,baaa,babb,bbaa,bbbb\}\)

  1. ababa
  2. bbaaab
  3. \(\varepsilon\)
  4. bbaaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}d,{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}aa,{\rtimes}bd,bbc,bcc,bdb,cbd,ccb,dbb,aa{\ltimes},bd{\ltimes},d{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ab
  3. badbad
  4. bd
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,ab,ac,ba,bb,be,ca,da,ea,a{\ltimes}\}\)

  1. beeee
  2. aca
  3. a
  4. deebaeab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ac,bc,ca,cb,c{\ltimes}\}\)

  1. cbcc
  2. a
  3. bc
  4. ccacbca
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,abba,baaa,baab,babb\}\)

  1. bbbba
  2. babbab
  3. b
  4. aababb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aab,aba,abb,baa,bab,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aa
  3. ba
  4. aab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aac,aca,acb,ccc\}\)

  1. c
  2. \(\varepsilon\)
  3. b
  4. ccb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abaa,baba,babb,bbab,bbbb\}\)

  1. aabbba
  2. \(\varepsilon\)
  3. baa
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,bc,ca,cb\}\)

  1. a
  2. cabb
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{baa,bab,bbd,bdc,cda,dbe,ddc,edc\}\)

  1. ba
  2. a
  3. adeaecadcaa
  4. ceead
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{add,cab,cbc,dad,dbb,dbd,dcd\}\)

  1. bdacbc
  2. b
  3. \(\varepsilon\)
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}aba,{\rtimes}a{\ltimes}{\ltimes},aabb,abaa,baab,abb{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. abbc
  3. caab
  4. b
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{da,de,eb,ee\}\)

  1. \(\varepsilon\)
  2. e
  3. dcacdd
  4. cbdedebc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ad,bb,cc,cd,da,dd\}\)

  1. \(\varepsilon\)
  2. bcccd
  3. b
  4. dd
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,b{\ltimes}\}\)

  1. bbab
  2. aabb
  3. abbaa
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ae,ba,ca\}\)

  1. b
  2. ad
  3. \(\varepsilon\)
  4. ecac
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bc,ca,cc\}\)

  1. \(\varepsilon\)
  2. b
  3. acbbcc
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}cb,{\rtimes}a{\ltimes},acb,bac,bca,cac,cba,cbc,cb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ccacaa
  2. baabbccc
  3. bccac
  4. cb
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ad,ca,cc,da,db,dd\}\)

  1. \(\varepsilon\)
  2. bdbdbadcb
  3. dbca
  4. db
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,aab,abd,baa,bba,bdd,daa,dda,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. deccae
  2. \(\varepsilon\)
  3. bbaab
  4. bbdaedbe
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}a{\ltimes},{\rtimes}bd,aba,bab,bdb,dba,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. a
  2. bdba
  3. d
  4. dabca
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bb,bc,ca,cb\}\)

  1. bbcaa
  2. \(\varepsilon\)
  3. bcbb
  4. a
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bd,cb,cc,dd\}\)

  1. da
  2. d
  3. ccda
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,bd,ca,cd,db,dd\}\)

  1. dbaccabb
  2. ca
  3. cddbca
  4. aaa
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aacb,abac,accb,baaa,bbac,bbbb,cacc,cbab\}\)

  1. b
  2. abcc
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}bb,aab,aba,abb,baa,bab,bba,ab{\ltimes},bb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aab
  2. \(\varepsilon\)
  3. aaabbbbabbb
  4. bbabbaa
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ae,bc,ca,cd,de,eb,ec,ee,c{\ltimes}\}\)

  1. baccac
  2. aec
  3. ce
  4. aeec
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,aca,bab,bcb,caa,cca\}\)

  1. b
  2. caabbc
  3. \(\varepsilon\)
  4. cba
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ce,db,dc,ec\}\)

  1. caacbdbedab
  2. \(\varepsilon\)
  3. cbdacadd
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ba,ca,cb,cd,db,dc,dd\}\)

  1. dcbc
  2. \(\varepsilon\)
  3. bbcbaaab
  4. baabbb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ab,bc,ca,cb,cc,a{\ltimes}\}\)

  1. cabcabba
  2. \(\varepsilon\)
  3. ca
  4. ccacca
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}d,aa,ab,ad,ba,bd,da,db,b{\ltimes},d{\ltimes}\}\)

  1. b
  2. \(\varepsilon\)
  3. d
  4. dcbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,bb,bc,bd,cb,cc,dc,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. b
  3. bdbabac
  4. dabd
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aadb,bacc,bcac,bdbd,dcca\}\)

  1. \(\varepsilon\)
  2. dccccc
  3. d
  4. bbabaaad
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ec,ade,bad,cba,ecb,de{\ltimes},e{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. e
  2. bec
  3. aaab
  4. dbcdcc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abbbb
  3. aa
  4. bb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,bc,cb,cc\}\)

  1. \(\varepsilon\)
  2. b
  3. ccbccccc
  4. bcbcbacaaa
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bac,{\rtimes}acc,{\rtimes}ca{\ltimes},{\rtimes}b{\ltimes}{\ltimes},accc,ccca,cccc,bac{\ltimes},cca{\ltimes},ac{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cac
  2. b
  3. cbc
  4. ca
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,cb,cc\}\)

  1. bbb
  2. a
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baaa,baab,baba,babb,bbaa,bbba,bbbb\}\)

  1. aa
  2. \(\varepsilon\)
  3. a
  4. ab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcc,adad,bdaa,dacb,dbbc\}\)

  1. dcddcb
  2. bdb
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,abba,baaa,baba,babb,bbaa\}\)

  1. baabab
  2. bb
  3. \(\varepsilon\)
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,bb,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbabba
  3. bba
  4. aab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,caa,dcc,dda\}\)

  1. \(\varepsilon\)
  2. b
  3. cdbca
  4. ab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bc,{\rtimes}bd,aab,abc,acc,bca,bda,caa,cca,dac,ca{\ltimes},bc{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. dde
  2. aebbdbbcdb
  3. \(\varepsilon\)
  4. cebbaebd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}cd,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}cdb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacd,acda,baac,cdaa,cdba,daac,dbaa,acd{\ltimes},cd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. badddbbbdba
  3. dcba
  4. cddaaabbc
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,bba\}\)

  1. \(\varepsilon\)
  2. b
  3. aabaa
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,acb,bba,cca\}\)

  1. a
  2. \(\varepsilon\)
  3. aaaa
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ba,a{\ltimes}\}\)

  1. aa
  2. b
  3. bbaaaaab
  4. a
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bb,bc,bd,da,db,dc\}\)

  1. b
  2. \(\varepsilon\)
  3. bcaa
  4. abdbcca
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,aa,ac,bc,ca,cb,cc,a{\ltimes},b{\ltimes}\}\)

  1. ac
  2. babcabb
  3. cacabbc
  4. bccaba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,abaa,abba,baaa,babb,bbaa,bbba\}\)

  1. b
  2. \(\varepsilon\)
  3. aaaaa
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baac,bbba,bcab,bcbc,bccc,cccc\}\)

  1. abca
  2. \(\varepsilon\)
  3. aababbbb
  4. bcbbacba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bba,bdb,dde,edd\}\)

  1. e
  2. cb
  3. cbaeebccac
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}bb{\ltimes},{\rtimes}baa,abbb,babb,bbab,bbba,bbbb,baa{\ltimes},bab{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bab
  2. baa
  3. bb
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ae,{\rtimes}ea,ade,deb,ead,eba,ae{\ltimes},ba{\ltimes},e{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ea
  2. c
  3. \(\varepsilon\)
  4. abdde
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,{\rtimes}ad,ada,aec,cac,cda,dae,eca,ecd,bb{\ltimes},ac{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aaebcba
  2. bb
  3. \(\varepsilon\)
  4. adaecac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ee,{\rtimes}eeb,{\rtimes}ee{\ltimes},abba,bcdc,cdcd,cdda,dabb,dcdd,ddab,ebcd,eebc,bba{\ltimes},ee{\ltimes}{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ee
  2. bccddedcbcee
  3. bedbcb
  4. eaddab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. bab
  2. \(\varepsilon\)
  3. abbb
  4. baaba
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ca,cb,cc,cd,da,dd\}\)

  1. e
  2. aaedddc
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ac,bc,ca,cc,c{\ltimes}\}\)

  1. aab
  2. bc
  3. ba
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}cc,{\rtimes}cca,{\rtimes}aa{\ltimes},{\rtimes}d{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}eac,acac,acba,baca,cbac,eacb,cca{\ltimes},cac{\ltimes},ac{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aabd
  2. bbdabed
  3. d
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abaaaaabab
  3. baaaaaabb
  4. a
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaba,abaa,bbaa,bbba\}\)

  1. bbbbaa
  2. \(\varepsilon\)
  3. baababb
  4. baa
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}ae,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}c{\ltimes}{\ltimes},{\rtimes}ab{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}aee,aeed,dded,edde,eedd,ded{\ltimes},ab{\ltimes}{\ltimes},ed{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. babedee
  2. cbcadbb
  3. \(\varepsilon\)
  4. cddbaa
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ae,ba,cd,db,dd,ec,d{\ltimes}\}\)

  1. dabcbeca
  2. eaaae
  3. cbccdd
  4. cd
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,aac,abb,acb,baa,bba,bca,cbc,ab{\ltimes},ca{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. a
  2. \(\varepsilon\)
  3. abca
  4. abccbaac
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ab,ac,bc,bd,ca,cd,da,db,dd,a{\ltimes}\}\)

  1. bca
  2. dcabdcbadd
  3. bcdabc
  4. baabbabaacc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. baa
  2. ba
  3. bba
  4. ababbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}ab,{\rtimes}abb,{\rtimes}ca{\ltimes},abba,babc,bbab,abc{\ltimes},bc{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aaabb
  2. ccc
  3. ca
  4. ac
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}bb{\ltimes},{\rtimes}acb,{\rtimes}ccc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abba,bbac,bbcc,bcca,cabb,cbbc,ccab,ccbb,cccb,acb{\ltimes},bac{\ltimes},ac{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. \(\varepsilon\)
  3. bbbbcbbcaca
  4. bb
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}cc,aad,adc,caa,cbd,cca,dcb,ba{\ltimes},bd{\ltimes},d{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bccdbbab
  2. bbac
  3. c
  4. addb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}bb,{\rtimes}bba,{\rtimes}ab{\ltimes},abab,baba,bbab,bab{\ltimes},ab{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aba
  2. \(\varepsilon\)
  3. ab
  4. aa
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}cd,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}cdb,abda,babd,bbab,bdad,cdbb,dadb,dbba,adb{\ltimes},db{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dcbcdcbbc
  2. a
  3. ddccacac
  4. dbdda
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,bb,bc,cb,cd,da,db,dd\}\)

  1. \(\varepsilon\)
  2. aabc
  3. bbbb
  4. dbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb,bc,ca,cb\}\)

  1. a
  2. caabaaaabcba
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,ada,cab,cda,dca,ddb\}\)

  1. d
  2. \(\varepsilon\)
  3. ddd
  4. cac
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,a{\ltimes},b{\ltimes}\}\)

  1. abbbabbb
  2. b
  3. abbbbb
  4. aaaaaabaaab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ae,{\rtimes}{\rtimes}ec,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bac,{\rtimes}ecb,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}ae{\ltimes},acae,baca,caeb,ecb{\ltimes},aeb{\ltimes},ae{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},eb{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ae
  2. \(\varepsilon\)
  3. b
  4. d
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aca,acb,bac,bdd,cac,cbd,dd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. bbc
  2. bcdccb
  3. cec
  4. addded
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}aa,aab,aba,aca,bac,caa,ab{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ba
  2. \(\varepsilon\)
  3. bb
  4. ccbccacb
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,baab,bbab,bbbb\}\)

  1. a
  2. aabb
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}ead,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}dbd,abde,bdda,bded,dabd,dbdd,ddab,dedc,edc{\ltimes},ead{\ltimes},dc{\ltimes}{\ltimes},ad{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cd
  2. eeecc
  3. aebceeaae
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}bc,aac,acc,bcc,caa,cca,ca{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. acabcacb
  2. a
  3. bcca
  4. bac
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}d,{\rtimes}db,{\rtimes}bd,bbd,bdd,dbb,ddb,db{\ltimes},bd{\ltimes},b{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. aaadda
  2. \(\varepsilon\)
  3. db
  4. bd
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ac,ba,bb,cc,cd,db,a{\ltimes},b{\ltimes}\}\)

  1. bdccc
  2. bb
  3. bbdadbccc
  4. abaabbbda
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ae,cc,da,dd,ed\}\)

  1. cbdeda
  2. bddeae
  3. dddeb
  4. ecceecb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ab,ac,bd,ca,cc,da,a{\ltimes}\}\)

  1. cca
  2. ccaccbc
  3. ca
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}ba{\ltimes},{\rtimes}bbb,aabb,abaa,abbb,baab,baba,bbab,bbba,bba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. \(\varepsilon\)
  3. babaabbaa
  4. aaaabab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ad,bb,cc,da,db,dc\}\)

  1. b
  2. dbdbd
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,abca,bacb,cacc\}\)

  1. abbb
  2. accbbbbbac
  3. aac
  4. accabbacc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ba,bb,ca\}\)

  1. ac
  2. a
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abdb,acca,adea,ddbc,deac,eacb,ebdc\}\)

  1. \(\varepsilon\)
  2. b
  3. e
  4. abeacb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dc,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}ca{\ltimes},{\rtimes}c{\ltimes}{\ltimes},{\rtimes}dcc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaaa,caaa,ccdc,cdca,dcaa,dccd,aaa{\ltimes},aa{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ddcb
  2. ccddacbbcb
  3. aacbacd
  4. abbbbdbc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}dd,aca,adb,bdd,caa,dac,dad,dbd,dda,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. acba
  2. \(\varepsilon\)
  3. caabdcaabd
  4. addcbbbbd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,bab,bbb\}\)

  1. aaba
  2. a
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baad,bdae,edaa,edee\}\)

  1. e
  2. cb
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,bbb,cab,cac,ccb\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. cb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,bbaa,bbca,bbcc,caab,cdab,dbab\}\)

  1. b
  2. a
  3. dcbcbcabb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}bb,{\rtimes}bbb,{\rtimes}cb{\ltimes},aaea,aeae,baae,bbaa,bbba,eaee,aee{\ltimes},ee{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abeada
  2. aaabdaae
  3. dcdbea
  4. ecda
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,bb,bc,cb\}\)

  1. bba
  2. cbb
  3. \(\varepsilon\)
  4. c
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}bb,{\rtimes}aa{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}bbb,aabb,abbb,baab,bbaa,bbba,baa{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abab
  2. abaaabbb
  3. bbbbb
  4. abbaabb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}c{\ltimes},{\rtimes}ac,aca,adc,cad,dcb,cb{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ccadaa
  3. c
  4. cdbcb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aacb,aada,accd,addb,dacd,dbcc\}\)

  1. \(\varepsilon\)
  2. b
  3. ddcaaccccbd
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. ab
  2. aab
  3. bbaab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}dac,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaad,aada,acab,adac,daca,cab{\ltimes},dac{\ltimes},ac{\ltimes}{\ltimes},ab{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dacab
  2. \(\varepsilon\)
  3. dac
  4. cacd
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,aabb,abaa,abba,baba,bbaa\}\)

  1. b
  2. bababaa
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. babbaabaaa
  2. ba
  3. aabaaba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ac,bb,bc,ca,c{\ltimes},b{\ltimes}\}\)

  1. bb
  2. b
  3. ccbac
  4. bbcbc
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}dd,acb,adc,cac,cad,cba,cca,dca,dcc,ddc,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ba
  2. adcccbddbd
  3. ddcacba
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,a{\ltimes}\}\)

  1. ababa
  2. babab
  3. a
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,acd,bab,bbb\}\)

  1. \(\varepsilon\)
  2. ccdd
  3. b
  4. db
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}d,aa,ac,ae,ba,be,cb,ea,ec,ee,c{\ltimes},d{\ltimes}\}\)

  1. cacdeebde
  2. \(\varepsilon\)
  3. d
  4. b
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. ababaa
  2. \(\varepsilon\)
  3. abaaba
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,ab,bb,bc,ce,da,e{\ltimes}\}\)

  1. dabce
  2. ae
  3. \(\varepsilon\)
  4. ce
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abaa,abab,abbb,baaa,babb\}\)

  1. bba
  2. aab
  3. bb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,bab,bbb,caa,cbb,ccb\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. acbcacc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ba,bb,bc,ca,cb,cc\}\)

  1. aaccaaac
  2. aa
  3. b
  4. ccbbbcccaac
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,abc,baa,cac\}\)

  1. b
  2. \(\varepsilon\)
  3. bbbccc
  4. aabbab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,abca,acaa,bbaa,bbab,cabc,cccb\}\)

  1. bba
  2. a
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcd,aebc,bade,baec,beeb,cadd,cdcb,decc\}\)

  1. daddcba
  2. b
  3. ad
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,{\rtimes}aa,aaa,aba,baa,bab,bba,bbb,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bababbb
  3. bbabab
  4. bbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{adb,bcd,bda,bdb,cbb,cdb,dca,dcc\}\)

  1. \(\varepsilon\)
  2. ba
  3. b
  4. dbdd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,abb,bca,bcb,bcc,caa,cca,ccb\}\)

  1. aacc
  2. bcbabcaabcca
  3. ccc
  4. acaccbbacaa
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,abbc,baab,cabb,caca,ccaa\}\)

  1. b
  2. \(\varepsilon\)
  3. aabcacbbbccb
  4. acccaaabcb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}e,bd,de,eb,ed,ee,e{\ltimes},b{\ltimes}\}\)

  1. bcbbba
  2. \(\varepsilon\)
  3. e
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ac,ca,cc,a{\ltimes}\}\)

  1. aaacc
  2. bababcb
  3. a
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}dbb,{\rtimes}ab{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aabd,abda,babd,bbab,bdaa,daab,dbba,abd{\ltimes},ab{\ltimes}{\ltimes},bd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. ddaa
  3. ab
  4. ebaecacbbb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aadd,bddd,dabb,dbbb,dcbb,ddda\}\)

  1. dbbdabdb
  2. aadbada
  3. db
  4. cbdbcd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bc,db,dc,eb,ed,ee\}\)

  1. b
  2. bc
  3. \(\varepsilon\)
  4. e
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ac,ba,bb,bc,ca,cb,cc,a{\ltimes},b{\ltimes}\}\)

  1. abcaab
  2. accaaaacaca
  3. aaa
  4. bcb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}{\ltimes}{\ltimes},{\rtimes}be,{\rtimes}dc,aac,acc,caa,cba,cca,ccb,ccc,dcc,be{\ltimes},ba{\ltimes},e{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. be
  2. eddbb
  3. dccba
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ad,bd,da,dc,dd,c{\ltimes}\}\)

  1. adc
  2. aadc
  3. abdc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}ce,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}ceb,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}aa{\ltimes},{\rtimes}bdd,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aeec,bcea,cbdd,ceae,cebc,eaee,ebce,ecbd,eecb,bdd{\ltimes},aa{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ebcdcddcba
  2. \(\varepsilon\)
  3. ba
  4. aeeddeabddcb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,bba,bbc,cbb,cca,ccc\}\)

  1. bbbcbbaab
  2. b
  3. a
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ea,aad,adc,ade,caa,dca,deb,ead,ebe,be{\ltimes},e{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. ad
  2. adba
  3. caede
  4. b
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,acc,baa,bcc,cbb,cbc,cca\}\)

  1. b
  2. abababab
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,aa,ab,ac,ba,bd,cb,da,dd,c{\ltimes}\}\)

  1. cbac
  2. cbcbdccccb
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aada,abac,abdb,bbac,cbbb,daca\}\)

  1. cbdaaadda
  2. a
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acb,bac,bbb,bbc,cbb\}\)

  1. \(\varepsilon\)
  2. c
  3. accabbc
  4. cacca
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acaa,addd,beec,cacc,cccd,dccd\}\)

  1. ddedea
  2. \(\varepsilon\)
  3. e
  4. bacdbcaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,{\rtimes}d,ab,ba,be,cc,ce,dc,eb,ec,e{\ltimes},c{\ltimes}\}\)

  1. e
  2. ababadbb
  3. aeceeab
  4. ec
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}dd,{\rtimes}{\rtimes}de,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}ddd,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}deb,{\rtimes}bc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abba,babb,bade,bbad,bceb,ceba,debc,ebab,ebce,ddd{\ltimes},ade{\ltimes},de{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eaaadeceddc
  2. \(\varepsilon\)
  3. baaede
  4. abc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,aeae,bded,dbee,ddec\}\)

  1. dbdeea
  2. d
  3. edaaa
  4. cb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,abbc,acab,ccbc\}\)

  1. aaccbac
  2. cacaaabc
  3. aaabb
  4. c
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},ab,ac,ad,ba,ce,ea,d{\ltimes}\}\)

  1. ebcc
  2. eb
  3. \(\varepsilon\)
  4. eeeb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}aaa,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bbb,{\rtimes}ba{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaab,aaba,aabb,abaa,abba,baaa,bba{\ltimes},bbb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aaba
  3. bbaba
  4. bbbabb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,bb,b{\ltimes}\}\)

  1. aaababb
  2. bb
  3. baabbaa
  4. aabbba
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ba,aab,aba,abb,baa,bab,bba,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. bababa
  2. ababa
  3. baaaba
  4. abbbbbbbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}ca,{\rtimes}be,aba,abb,bab,bbe,bea,beb,eab,ebc,bc{\ltimes},ca{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bca
  2. badb
  3. bebc
  4. ca
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}da{\ltimes},{\rtimes}dab,{\rtimes}bbe,{\rtimes}{\ltimes}{\ltimes}{\ltimes},acca,bbea,beac,cacd,ccac,eacc,acd{\ltimes},dab{\ltimes},cd{\ltimes}{\ltimes},ab{\ltimes}{\ltimes},da{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. e
  2. abdded
  3. cbdaddc
  4. ecdbaaebc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bdcc,bdcd,cacd,cdab,cddc\}\)

  1. dbbbac
  2. \(\varepsilon\)
  3. a
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bd,ca,dc,ed,ee\}\)

  1. adddbe
  2. ea
  3. e
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb\}\)

  1. aabbabb
  2. bba
  3. abbbbab
  4. aba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}aad,{\rtimes}c{\ltimes}{\ltimes},aadd,addc,ddcd,dcd{\ltimes},cd{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. bb
  3. aabdb
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. bbbaababbb
  2. aaaabbbbb
  3. abaab
  4. aaabbbaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}db,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}dbb,bbdb,bdbd,dbbd,dbdb,bdb{\ltimes},db{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. daddaa
  2. \(\varepsilon\)
  3. d
  4. dcd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}ad,{\rtimes}cbd,{\rtimes}cc{\ltimes},{\rtimes}ada,acbd,bdac,cbda,cbdd,dacb,bdd{\ltimes},ada{\ltimes},cc{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},da{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. d
  2. \(\varepsilon\)
  3. cdc
  4. ccaba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ab,ba,bc,bd,cb,cd,db,b{\ltimes}\}\)

  1. bbbdca
  2. cbadaacab
  3. cb
  4. cdddbdd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}cab,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacb,abba,abca,babb,babc,bbab,bcaa,caac,acb{\ltimes},cab{\ltimes},ab{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. babcaacb
  3. bbbccb
  4. cab
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabb,aadb,bbad,bbbb,dada,dbad\}\)

  1. a
  2. b
  3. dddac
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}db,{\rtimes}ba,acb,bac,bda,cbd,dba,da{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ccdc
  2. d
  3. db
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ac,bb,bc,bd,ca,cb,cc,cd,db,dc,c{\ltimes}\}\)

  1. cc
  2. bdbbabda
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,ac,ae,cd,da,ea,e{\ltimes}\}\)

  1. e
  2. ba
  3. edc
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}e,{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}bc,{\rtimes}ed,acc,bcb,cbc,ccb,dac,dda,ddd,edd,cb{\ltimes},bc{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. cdbbadd
  2. dcdeceab
  3. acad
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,bab\}\)

  1. b
  2. abbaa
  3. a
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,ab,ac,ba,bd,cb,b{\ltimes},d{\ltimes}\}\)

  1. bcddcbad
  2. b
  3. ab
  4. ccc
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},ab,ba,bb,a{\ltimes},b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abbb
  3. a
  4. ab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bda,dce,dee,eaa,ebc\}\)

  1. be
  2. \(\varepsilon\)
  3. bbabb
  4. dcbdb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,bb,bc,ca,cc\}\)

  1. b
  2. cbbb
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}aba,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abab,abea,babe,bea{\ltimes},ea{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. abe
  3. c
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}d,aa,ad,ba,cd,db,dc,a{\ltimes},d{\ltimes}\}\)

  1. \(\varepsilon\)
  2. a
  3. d
  4. cbbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,acca,baab,bacb,bcca,cbba,cbcb\}\)

  1. ccbccc
  2. b
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bcc,aacc,accc,bccc,caac,ccaa,ccca,cccc,ccc{\ltimes},cc{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. aabc
  3. bbaa
  4. bccc
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abab,babc,bcab,caab,ccbc\}\)

  1. abaca
  2. \(\varepsilon\)
  3. cbacca
  4. aaabbcbc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}da,{\rtimes}dae,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}e{\ltimes}{\ltimes},aeaa,daea,eaad,aad{\ltimes},ad{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ddaebe
  3. e
  4. c
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. bbb
  2. \(\varepsilon\)
  3. bababab
  4. baaabbbabb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,{\rtimes}c,bb,bc,cb,cc,b{\ltimes}\}\)

  1. cb
  2. bb
  3. babbaa
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abdc,bbac,bccb,bccd,bcdc,ccbd,dbbc\}\)

  1. bdcadab
  2. c
  3. ca
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}ec,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bbb,{\rtimes}ecc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},cccb,cccc,eccc,ccb{\ltimes},bbb{\ltimes},cb{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eeee
  2. ecba
  3. ea
  4. badc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ae,bb,be,ca,dd,ed\}\)

  1. b
  2. \(\varepsilon\)
  3. d
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,aca,bbb,bbc,bca,cbb\}\)

  1. \(\varepsilon\)
  2. aca
  3. a
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bde,{\rtimes}bc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},bdee,deeb,ebac,eeba,bac{\ltimes},ac{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dceabe
  2. \(\varepsilon\)
  3. cabac
  4. cececcd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. aaba
  2. aba
  3. \(\varepsilon\)
  4. b
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,cc,cd,ce,dd,eb,ec\}\)

  1. acdddeaa
  2. ac
  3. badbdedd
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aaa,aab,aba,abb,baa,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. bbabaa
  2. aabbabbbba
  3. aaaa
  4. aba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abda,bddd,dadd,dbaa,dbca,ddda\}\)

  1. \(\varepsilon\)
  2. b
  3. ac
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{badd,beae,bebc,caca,ccad,dbce\}\)

  1. cc
  2. cccb
  3. adb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,bd,cc,cd,dc,dd\}\)

  1. \(\varepsilon\)
  2. bababba
  3. bbdacbc
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{accb,cabe,cada,ccec,dabb,dbdd\}\)

  1. \(\varepsilon\)
  2. b
  3. cbade
  4. addbdcbb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}b{\ltimes}{\ltimes},{\rtimes}baa,{\rtimes}ba{\ltimes},aaab,aabb,baaa,abb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. aabaa
  3. \(\varepsilon\)
  4. ab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}ce,acb,bac,bce,cbc,ceb,ced,dce,eba,edc,ed{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. dbdcd
  2. aeeddbcaa
  3. bcdebb
  4. da
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaae,adab,baca,bbca,bccb,bdbc,ddcc,ddcd\}\)

  1. \(\varepsilon\)
  2. ccbedca
  3. a
  4. cceedd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bb,bc,ca,cc\}\)

  1. ba
  2. babb
  3. ac
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,bb,bc,ca\}\)

  1. cbc
  2. b
  3. \(\varepsilon\)
  4. aaca
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}c{\ltimes},{\rtimes}de,bec,ceb,dec,ebe,ece,ec{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. c
  2. ecc
  3. dccbdb
  4. dec
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,bb,bc,cb,cc,c{\ltimes}\}\)

  1. acac
  2. cc
  3. bcb
  4. b
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aabb,abaa,abab,abba,baaa,babb,bbaa\}\)

  1. b
  2. a
  3. \(\varepsilon\)
  4. baab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bba,bbc,bcc,bdb,bdc,cdd,dad\}\)

  1. a
  2. cbdacb
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aba,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}abc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaaa,abab,abbc,acaa,babb,bbca,bcac,caaa,caca,abc{\ltimes},aaa{\ltimes},aa{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ccca
  3. bbabcab
  4. aba
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}cc,{\rtimes}cca,abbb,bbbb,bbbc,bbcc,cabb,ccab,bcc{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ccabbbcc
  2. ba
  3. cababaccc
  4. cabccaaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,accb,accc,bcbb,bccc\}\)

  1. \(\varepsilon\)
  2. caba
  3. b
  4. acabbabc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}ba,aaa,aab,aba,baa,bab,aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ba
  3. bbabb
  4. bbbabaabbbbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acdb,badc,bcaa,cbda,cbdb,ddbc\}\)

  1. bbcd
  2. a
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abe,acb,adc,cca,edb,eea,eed,eee\}\)

  1. \(\varepsilon\)
  2. e
  3. b
  4. aac
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}ae,{\rtimes}{\rtimes}da,{\rtimes}ea{\ltimes},{\rtimes}aea,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}dae,aeae,aeec,eaee,ecdd,eecd,dae{\ltimes},cdd{\ltimes},ae{\ltimes}{\ltimes},ea{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ea
  2. cdbe
  3. aaeabc
  4. c
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abab,baab,baba\}\)

  1. \(\varepsilon\)
  2. ab
  3. bbabbba
  4. baabaaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dd,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}ddd,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}cbb,bbdd,bddc,cbbd,cdda,daaa,dcdd,ddaa,ddcd,ddd{\ltimes},aaa{\ltimes},aa{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. bcccddbbbab
  3. aac
  4. ddd
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}abb,{\rtimes}bbb,aaaa,aaab,baaa,bbaa,bbba,aab{\ltimes},abb{\ltimes},ab{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. ab
  3. aaaabaaa
  4. abb
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,acb,acc,bab,bac,cab,cbb,ccb\}\)

  1. ca
  2. abc
  3. bbbabbcba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,aabb,abaa,abab,abba,baab,bbba\}\)

  1. b
  2. bbb
  3. aaab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}bb{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaac,aacc,accb,adbd,badb,cbad,ccba,dbdd,bdd{\ltimes},dd{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dddaddbacd
  2. bdbcdbcd
  3. bb
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,bc,ca,cb\}\)

  1. bbaaba
  2. a
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. baaabaab
  2. abb
  3. \(\varepsilon\)
  4. bababaaaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ac,{\rtimes}acc,{\rtimes}aca,{\rtimes}cb{\ltimes},abcb,acca,baac,bcba,cabc,cbaa,ccab,aca{\ltimes},aac{\ltimes},ac{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ac
  2. caccac
  3. aacc
  4. abbccc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abca,bbbc,bcac,cacb,cbbb,ccbc\}\)

  1. b
  2. aab
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ac,aca,acb,bca,cac,cbc,ca{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abcb
  2. ac
  3. bdca
  4. ccdaabb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ac,ca,a{\ltimes}\}\)

  1. cbbb
  2. c
  3. \(\varepsilon\)
  4. bccb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}aaa,aaab,aabb,abba,baaa,bbaa,abb{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aaabb
  2. abbabbba
  3. \(\varepsilon\)
  4. bbaaabaaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}bb,bbc,bcb,cbb,bc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. c
  2. bbbcac
  3. \(\varepsilon\)
  4. bab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. a
  2. bbbbabb
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}ad,{\rtimes}acc,{\rtimes}ad{\ltimes},accb,cbcd,ccbc,bcd{\ltimes},cd{\ltimes}{\ltimes},ad{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. ad
  3. \(\varepsilon\)
  4. a
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,bc,ca,cb,cc\}\)

  1. bcbbacb
  2. accaaaacbc
  3. b
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba\}\)

  1. baaba
  2. ba
  3. bbbab
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}aa,aba,abb,bab,bba,aa{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. a
  3. b
  4. baba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}ce,{\rtimes}{\rtimes}ad,{\rtimes}e{\ltimes}{\ltimes},{\rtimes}cee,{\rtimes}ab{\ltimes},{\rtimes}adb,adbd,bddc,cade,dbdd,dcad,ddca,ade{\ltimes},cee{\ltimes},de{\ltimes}{\ltimes},ab{\ltimes}{\ltimes},ee{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eddade
  2. abccbdece
  3. bddaebbac
  4. de
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,acb,adb,cdb,daa,dbd\}\)

  1. dbb
  2. b
  3. \(\varepsilon\)
  4. cc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,bc,ca,cb,cc\}\)

  1. \(\varepsilon\)
  2. c
  3. b
  4. aa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}bcb,{\rtimes}acd,{\rtimes}cb{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},acda,adcd,cdad,dadc,bcb{\ltimes},dcd{\ltimes},cd{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. cb
  3. \(\varepsilon\)
  4. babca
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ad,aac,abd,acc,ada,bdd,ccd,daa,dab,dda,ddd,cd{\ltimes},ad{\ltimes},d{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ad
  3. a
  4. acdb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ad,ba,bb,cb,cc,dc,dd,de,ec,c{\ltimes}\}\)

  1. abbb
  2. adc
  3. e
  4. adec
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bb,ca,cd,dd\}\)

  1. dbbadbbcabd
  2. b
  3. dacbbaccda
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,a{\ltimes}\}\)

  1. aaaba
  2. aa
  3. ab
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,abaa,abba,baab,bbbb\}\)

  1. aaaaaa
  2. bbababbab
  3. bbba
  4. aaa
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,accb,bcae,bebe,ecdb\}\)

  1. b
  2. dedbcacdceca
  3. bcc
  4. caeaabebb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,{\rtimes}d,bb,bc,cb,cc,cd,db,dc,c{\ltimes},d{\ltimes}\}\)

  1. c
  2. \(\varepsilon\)
  3. d
  4. aabbddccaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,abb,baa,bab,bba\}\)

  1. b
  2. bbbaa
  3. \(\varepsilon\)
  4. aa
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ad,bb,bd,cb,cd\}\)

  1. d
  2. dccbd
  3. bdadaadab
  4. cbad
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}dd,{\rtimes}bc,aca,cad,dac,dda,bc{\ltimes},ad{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. dbdadb
  2. badc
  3. dc
  4. abae
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aa{\ltimes},{\rtimes}dbb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},acdc,bbca,bcac,cacd,cdcd,dbbc,dcd{\ltimes},cd{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aa
  2. \(\varepsilon\)
  3. cbdbabb
  4. acbadcaa
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}ccb,{\rtimes}b{\ltimes}{\ltimes},abea,aecd,babe,beae,cbab,ccba,eaec,ecda,cda{\ltimes},da{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aedaaadae
  2. bbb
  3. b
  4. ecaccbacccd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,baab,cbba,cccb\}\)

  1. babba
  2. cac
  3. abacab
  4. ca
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,abaa,abba,baaa,baab,babb\}\)

  1. baa
  2. aababaabaa
  3. abaa
  4. aababbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{cbda,ccda,cdcb,ecea\}\)

  1. acbabbce
  2. de
  3. ea
  4. eaeaeda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}acb,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}cb{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},acbb,bbcb,bcbc,cbbc,cbcb,bcb{\ltimes},cb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. acaab
  2. \(\varepsilon\)
  3. cababa
  4. acacac
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,acd,bab,bac,bca,cdb,dcd\}\)

  1. \(\varepsilon\)
  2. a
  3. abcddba
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,bc,cd,db\}\)

  1. adadaccd
  2. \(\varepsilon\)
  3. dadccddcbdad
  4. bccdbd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,abd,adc,bbb,cbd,cdd,dba,dca\}\)

  1. \(\varepsilon\)
  2. a
  3. cbc
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb\}\)

  1. abaab
  2. a
  3. baaa
  4. aabab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abd,acc,bac,cdd,dab,dbc\}\)

  1. ddddbbb
  2. dbacabbdcdb
  3. bacb
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{ace,adb,cab,cdd\}\)

  1. dbdabaeaccca
  2. dacaea
  3. dcea
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. aaa
  2. \(\varepsilon\)
  3. aba
  4. ba
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abd,baa,bac,bbc,cda\}\)

  1. cdcaaccc
  2. \(\varepsilon\)
  3. ccadcda
  4. cbdcbabba
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}bb,{\rtimes}bbc,{\rtimes}bc{\ltimes},{\rtimes}dbd,bbcd,bcdc,bcdd,bddb,cddb,dbcd,dbdd,ddbc,ddbd,cdc{\ltimes},dbd{\ltimes},dc{\ltimes}{\ltimes},bd{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. addbdbdddb
  2. dbbcbcba
  3. dabb
  4. cadadda
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,bcc,bda,bdd,cba,dab,ddb\}\)

  1. b
  2. bdbddddca
  3. \(\varepsilon\)
  4. dc
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,aaba,aabb,baab,baba,bbba\}\)

  1. baabab
  2. bbaa
  3. bab
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,abc,bca,cba,cbb\}\)

  1. cbac
  2. ba
  3. bab
  4. babccbca
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,bb,ca,cb,cc\}\)

  1. \(\varepsilon\)
  2. abcbccccacb
  3. b
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ba,aab,aad,abd,add,baa,bda,daa,dd{\ltimes},b{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. bbd
  2. ccadcbda
  3. \(\varepsilon\)
  4. aabab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}eb,bdb,bdd,dbc,dbd,ddb,ddd,ebd,bc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aeed
  2. ebdbc
  3. ee
  4. c
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}b,{\rtimes}e{\ltimes},{\rtimes}bb,add,bbc,bce,cea,ead,dd{\ltimes},e{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. aba
  2. cc
  3. \(\varepsilon\)
  4. c
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,ba,bb,ca,db,dd\}\)

  1. bbca
  2. abbdccddac
  3. a
  4. acabcaddbc
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}cc,{\rtimes}aa,aad,adc,ccc,ccd,cdd,dcc,dcd,ddc,cc{\ltimes},cd{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bbababdac
  2. acdc
  3. \(\varepsilon\)
  4. caabab
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,ab,bd,ca,cc,ce,db,ec,b{\ltimes}\}\)

  1. bdde
  2. cbdbbb
  3. ecab
  4. eee
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}aa,aac,acc,cbb,ccb,bb{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aa
  2. caaabc
  3. acacc
  4. aaca
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acac,accb,bbcb,bcac,cbcb,cbcc,ccbc,cccc\}\)

  1. \(\varepsilon\)
  2. aaacbc
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,bbca,bbcc,bcbc,caaa,caba,cabb\}\)

  1. a
  2. b
  3. \(\varepsilon\)
  4. acaaaaac
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ac,bc,ca,cb,a{\ltimes},b{\ltimes}\}\)

  1. c
  2. bca
  3. \(\varepsilon\)
  4. bc
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dd,{\rtimes}ddc,bcbd,bdcd,cbcb,cbdc,dcbc,dcda,ddcb,cda{\ltimes},da{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbcdd
  2. bdacb
  3. \(\varepsilon\)
  4. aca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aabb,abaa,abba,babb,bbab,bbba,bbbb\}\)

  1. \(\varepsilon\)
  2. abbbba
  3. baabaabbb
  4. bbbbabbabbaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abd,adb,ceb,daa,dba\}\)

  1. cecaaadaab
  2. cecdbbdebd
  3. ecaecbbbab
  4. ebc
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}ba,aab,aba,abb,baa,bab,bba,bbb,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. babb
  2. b
  3. \(\varepsilon\)
  4. abaaab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}ba,{\rtimes}bb,bac,bbc,bcc,cba,cbc,ccb,ccc,ac{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. cabac
  2. ba
  3. c
  4. aacbcbcaacc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}bbb,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},acba,baca,bacb,bbbc,bbcb,bcba,cbac,aca{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bcacccbaa
  3. bbbcbaca
  4. c
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ab,{\rtimes}b{\ltimes},{\rtimes}ba,aab,aba,abb,baa,bba,bbb,ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. baaaaaba
  2. b
  3. aabba
  4. a
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}bb,{\rtimes}aa,aaa,aab,abb,baa,bba,bbb,ab{\ltimes},bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. a
  2. aababa
  3. baabbb
  4. aabbbaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}ba,{\rtimes}aba,{\rtimes}baa,aaba,abaa,abab,baaa,baab,baba,aba{\ltimes},aaa{\ltimes},aa{\ltimes}{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ab
  2. bababaa
  3. abbb
  4. baabaaba
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}ac,{\rtimes}ba,aca,acb,bac,cac,cbc,bc{\ltimes},ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. babc
  2. abbcba
  3. cca
  4. c
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ac,abd,acb,bab,bba,cbb,bd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. ccacc
  2. abbddae
  3. \(\varepsilon\)
  4. edeba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acde,baab,bbdd,ceab,ebdc\}\)

  1. e
  2. cbebdb
  3. eeaccba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,cbd,cce,ddb\}\)

  1. aacca
  2. ec
  3. eacac
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,abc,bca,caa,cab\}\)

  1. ccacccc
  2. \(\varepsilon\)
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}aaa,{\rtimes}ba{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaab,aaba,abab,abba,abbb,babb,bbab,bbbb,bbb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aaaaababa
  2. abbbabab
  3. abbbbaaa
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,abaa,abbb,bbbb\}\)

  1. ba
  2. \(\varepsilon\)
  3. bba
  4. bb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{baa,bca,cab,cbc,cca\}\)

  1. ccbaab
  2. acabbcccc
  3. acc
  4. bcaccaa
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}a{\ltimes},{\rtimes}ba,aaa,aab,aba,baa,bab,ab{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. babbaa
  2. abbbab
  3. \(\varepsilon\)
  4. aaaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbc,adbc,cbab,cbad,dbbb,dddc\}\)

  1. dbd
  2. abcdcaabc
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}abb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},abab,abba,abbb,baab,baba,babb,bbaa,bbab,bbba,aab{\ltimes},ab{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ababbabaaab
  2. \(\varepsilon\)
  3. b
  4. abbaab
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ba,cb,cc\}\)

  1. aaaa
  2. bcaca
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,bb,bc,ca,cc\}\)

  1. b
  2. \(\varepsilon\)
  3. abaccacc
  4. bbcaabbba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,baab,baba,bbaa,bbba\}\)

  1. bbbaaa
  2. baaabbab
  3. a
  4. aababbbb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}c,ab,ac,bb,bc,ca,c{\ltimes}\}\)

  1. \(\varepsilon\)
  2. baca
  3. aaba
  4. aaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ac,abc,aca,acc,bca,cab,cac,cca,ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bc
  2. \(\varepsilon\)
  3. b
  4. babac
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. bbaaba
  2. \(\varepsilon\)
  3. baa
  4. aaa
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ac,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,abc,acb,bab,bba,bbb,bcc,cbb,cbc,ccb,bc{\ltimes},ba{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ba
  3. cccbcbbca
  4. ac
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}db,{\rtimes}ba,adb,bad,bee,dbe,db{\ltimes},ee{\ltimes},e{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. cab
  2. ebca
  3. abcd
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}ccb,aaaa,baaa,bbaa,cbba,ccbb,aaa{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cc
  3. ccbbaaa
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aac,bab,bbc,cac\}\)

  1. bacbbc
  2. bbccababc
  3. bbaaaabacc
  4. bccbacaaaa
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}ba,abb,bab,bbc,bcc,ccc,cc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. ca
  2. babbcc
  3. bacbbb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,adb,bbd,cdb,dba,dda\}\)

  1. a
  2. \(\varepsilon\)
  3. b
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bb,bd,be,cd,da,dd,eb\}\)

  1. \(\varepsilon\)
  2. bb
  3. ccabaeccabe
  4. dbdeacbddaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,bcb,caa,cbc\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acb,bad,bcd,caa,dca,ddd\}\)

  1. aadbbc
  2. ad
  3. bcbaaa
  4. cadcadb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}cb,aad,adb,baa,bba,cbb,dba,ba{\ltimes},cb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abaa
  2. a
  3. cb
  4. adcdab
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ba,{\rtimes}bb,aaa,aab,abb,baa,bba,bb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bb
  2. bba
  3. a
  4. ba
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ae,be,ea,eb\}\)

  1. ee
  2. ea
  3. aec
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}e,ab,bd,be,ca,da,db,dd,ec,ed,b{\ltimes}\}\)

  1. a
  2. aaee
  3. dddeadebc
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}ba,aaa,aab,abb,baa,bba,bbb,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. a
  2. b
  3. bbbaaaaabba
  4. baababbbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}da,abe,bed,dab,dac,eda,ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. eb
  2. bbe
  3. dac
  4. a
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}aa,aaa,aab,abb,baa,bba,bbb,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abbaaaabaaa
  2. aaa
  3. aa
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aad,abd,adb,caa,cca,dbd\}\)

  1. b
  2. \(\varepsilon\)
  3. bad
  4. cddaacc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,ab,ba,bb,a{\ltimes},b{\ltimes}\}\)

  1. abbaaab
  2. a
  3. b
  4. ab
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ab,{\rtimes}aa,aab,aba,abb,baa,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. abbbbaaabba
  2. bbb
  3. babbbbb
  4. bbbbbbbbbab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,bab,bba,caa,cab,cca,ccc\}\)

  1. b
  2. \(\varepsilon\)
  3. cb
  4. aabcac
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}ce,{\rtimes}bb{\ltimes},{\rtimes}cee,{\rtimes}bdd,abde,bded,cabd,ceec,dabc,deda,ecab,edab,eeca,abc{\ltimes},bdd{\ltimes},bc{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bb
  2. baaecd
  3. acbca
  4. edeebb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabb,abbb,acbb,baca,bbba,cbcc,cccc\}\)

  1. \(\varepsilon\)
  2. a
  3. b
  4. acc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{adc,cba,cca,ddc\}\)

  1. accdbd
  2. abbcc
  3. dda
  4. daddc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,bd,da,b{\ltimes}\}\)

  1. cdcbbc
  2. b
  3. ddddca
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}d,{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}ab,abd,aee,bdc,cae,cde,dca,dcd,dee,edc,eed,ee{\ltimes},d{\ltimes}{\ltimes},e{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. c
  3. abdcdee
  4. d
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,aabb,abaa,abab,abba,baaa,bbab\}\)

  1. a
  2. bbababbaaab
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,acb,bbb,cab,ccb\}\)

  1. b
  2. aacaabca
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bed,ccc,cce,dee,eaa\}\)

  1. dc
  2. eddbae
  3. bdcb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}bb,acc,bac,bba,cac,cca,ccb,ccc,cb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. bbaccb
  2. a
  3. b
  4. caaacac
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aaa,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaab,aaba,aabb,abaa,abab,baaa,baba,abb{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abbbbbabaab
  2. aaabbba
  3. \(\varepsilon\)
  4. aaabb
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abca,acca,baaa,babb,bccc,cabb,cabc,ccbc\}\)

  1. a
  2. \(\varepsilon\)
  3. caaca
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,bb,bc,ca,cb,a{\ltimes}\}\)

  1. aabaac
  2. c
  3. abacc
  4. cba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acbc,adab,cabd,cada,ceee\}\)

  1. cbaaedadcd
  2. edbcbdac
  3. d
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bd,dd\}\)

  1. \(\varepsilon\)
  2. b
  3. a
  4. dcdb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba\}\)

  1. aabbbba
  2. \(\varepsilon\)
  3. bbabaabaab
  4. b
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}ccd,bccd,cbcc,ccda,ccdd,cdad,cddc,dcbc,ddcb,dad{\ltimes},ad{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. ccdad
  3. ddbaaaabcab
  4. cdaba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bbeb,ddbe,dedb,ecbe,eeea\}\)

  1. beceaa
  2. acdc
  3. cdbaddc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,abaa,abab,abbb\}\)

  1. ba
  2. aabbb
  3. baa
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ce,{\rtimes}aae,{\rtimes}cee,aaeb,aebe,bedc,caee,dcae,ebed,edca,aee{\ltimes},cee{\ltimes},ee{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cee
  3. be
  4. e
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,abb,bab,bba\}\)

  1. b
  2. bbbba
  3. baabaabbbba
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ca,aaa,aba,baa,cab,aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. b
  2. aacaaa
  3. cabaa
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,da,dd,ec\}\)

  1. d
  2. dabac
  3. db
  4. acb
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}eb,{\rtimes}ebc,{\rtimes}e{\ltimes}{\ltimes},bccb,ccbc,ebcc,cbc{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. edcc
  2. \(\varepsilon\)
  3. beeb
  4. e
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acaa,baba,bcbc,cbcc,ccab,ccac\}\)

  1. c
  2. \(\varepsilon\)
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}c,ad,bd,be,cc,db,dd,ec,c{\ltimes}\}\)

  1. aacdeeecee
  2. c
  3. \(\varepsilon\)
  4. ccaeeccbeb
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}aa,{\rtimes}bc,aab,abb,baa,bab,bba,bcc,caa,cca,aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. b
  2. \(\varepsilon\)
  3. bbbc
  4. cbacbbacab
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,be,cc,ed\}\)

  1. ea
  2. bbacbcb
  3. \(\varepsilon\)
  4. bace
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ad,ba,ca,de,ed\}\)

  1. bbb
  2. aa
  3. a
  4. dedbd
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}d,ad,da,dd,a{\ltimes},d{\ltimes}\}\)

  1. b
  2. aecee
  3. d
  4. a
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aada,abaa,abbc,abda,baba,bcda,dbca\}\)

  1. acab
  2. \(\varepsilon\)
  3. aaacccddbd
  4. ada
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}ee,{\rtimes}{\rtimes}ce,{\rtimes}ee{\ltimes},{\rtimes}cea,aacc,abdb,acca,cabd,ccab,ceaa,eaac,bdb{\ltimes},db{\ltimes}{\ltimes},ee{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. \(\varepsilon\)
  3. ee
  4. abae
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,a{\ltimes}\}\)

  1. baaabbbb
  2. \(\varepsilon\)
  3. abbaaaaa
  4. aaaaaaaba
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}da{\ltimes},{\rtimes}bab,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaab,aabc,abaa,abcd,baaa,baba,bcdc,cdcd,dcdc,cdc{\ltimes},dc{\ltimes}{\ltimes},da{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. ba
  3. cdcabccbd
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}ab,aab,aba,baa,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ccc
  2. bb
  3. bcabaa
  4. aabca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bdd,cab,dbd,dcd\}\)

  1. bdd
  2. ad
  3. dcccadc
  4. adcac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ab,ba,bb,b{\ltimes}\}\)

  1. aa
  2. bb
  3. bbb
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ac,bc,ca,cb,cc,a{\ltimes},c{\ltimes}\}\)

  1. aacaabaabc
  2. ccaaaba
  3. abbb
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,abaa,abbb,baab,bbaa,bbab,bbbb\}\)

  1. babab
  2. bba
  3. \(\varepsilon\)
  4. aabaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ad,abc,ada,bbc,bca,bcd,cad,cbb,cdc,dab,dcb,ad{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bdbbbb
  3. dcada
  4. dacbddb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}c{\ltimes},{\rtimes}cc,{\rtimes}{\ltimes}{\ltimes},{\rtimes}aa,acc,cac,cca,ccb,ccc,aa{\ltimes},cb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. babcbc
  2. \(\varepsilon\)
  3. cbbccba
  4. bc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}c,aa,ab,ac,ba,cc,cd,da,a{\ltimes},d{\ltimes}\}\)

  1. cbccccbbd
  2. aa
  3. \(\varepsilon\)
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,aa,ab,ac,bb,bc,ca,cd,da,d{\ltimes}\}\)

  1. d
  2. ccaad
  3. \(\varepsilon\)
  4. ccbb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}ca,{\rtimes}caa,{\rtimes}ac{\ltimes},aabc,abcc,bccc,caaa,caab,ccaa,ccca,aaa{\ltimes},aa{\ltimes}{\ltimes},ac{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ac
  3. bcacabcb
  4. bbcbabccca
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ca,cb\}\)

  1. c
  2. babcccc
  3. acaac
  4. b
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}cb,adb,bad,bba,bbb,bbc,cbb,dbb,bc{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cddbd
  3. aa
  4. c
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}cb,abc,bab,bcb,cba,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bac
  2. cba
  3. aa
  4. bba
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}ce,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}ea{\ltimes},{\rtimes}cee,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},ceee,eeac,eeea,eac{\ltimes},ac{\ltimes}{\ltimes},ea{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cece
  2. c
  3. bdbac
  4. cdca
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ae,ba,bc,ca,dd,eb\}\)

  1. e
  2. \(\varepsilon\)
  3. daed
  4. adbabb
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,bd,cb,cd,da,dc\}\)

  1. aadcc
  2. b
  3. \(\varepsilon\)
  4. adcbcbb
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{cba,cbd,cda,dcd\}\)

  1. b
  2. ababddccacbc
  3. ddbacdadbba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}bb,{\rtimes}aaa,{\rtimes}bbb,aaab,baaa,bbaa,bbba,aab{\ltimes},aaa{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aaab
  2. baaab
  3. ba
  4. aaa
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}ab,{\rtimes}aa,abc,bcc,cba,ccb,aa{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbcbcc
  2. caab
  3. \(\varepsilon\)
  4. cbcbbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bb,cb,de,ea,ec\}\)

  1. ce
  2. \(\varepsilon\)
  3. c
  4. d
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{caba,ccaa,ccdc,cdad,ceeb,dbaa,ddea\}\)

  1. b
  2. \(\varepsilon\)
  3. e
  4. cbc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,aabb,abab,abbb,baaa,baab,baba\}\)

  1. aaaba
  2. abba
  3. aaaa
  4. aaaabbaabb
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ac,bc,ca,cb,a{\ltimes}\}\)

  1. bca
  2. \(\varepsilon\)
  3. bcbca
  4. bcbcbca
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbc,abcb,bbab,bcac,caac,cbba,ccba\}\)

  1. b
  2. a
  3. abba
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabc,abca,bcbb,bccb,cbac,dbac,dcba\}\)

  1. adbbcb
  2. bc
  3. caaaad
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbb,accc,bcac,cbab,cdbb\}\)

  1. bcdacad
  2. b
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,bab,bba,bbb\}\)

  1. a
  2. b
  3. \(\varepsilon\)
  4. bbbbba
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ae,bc,ce,ea,eb,ec,ee,e{\ltimes}\}\)

  1. ae
  2. aee
  3. cb
  4. aae
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}aaa,{\rtimes}ba{\ltimes},aaaa,aaab,aabb,abb{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ba
  2. \(\varepsilon\)
  3. b
  4. aaabb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,aaba,abba,baaa,baab,bbba\}\)

  1. bbbbaaa
  2. baaaabaaba
  3. aaabbaab
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,abb,bab,bba\}\)

  1. baab
  2. aabbabaa
  3. bb
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,baac,babb,bbaa,bbbb,bcba\}\)

  1. a
  2. \(\varepsilon\)
  3. ccabcbaa
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baae,bebc,ceac,eaac,eaec,ebcb,ebed\}\)

  1. b
  2. ecceb
  3. ad
  4. eae
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,cb,cd,db,dc,dd\}\)

  1. b
  2. aaaa
  3. ccddadd
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ae,{\rtimes}ae{\ltimes},{\rtimes}cbb,addb,aead,bbca,bcae,caea,cbbc,ddbd,eadd,dbd{\ltimes},ae{\ltimes}{\ltimes},bd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. deeaabc
  3. bebebb
  4. cdbcbabeed
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}da,{\rtimes}dae,{\rtimes}c{\ltimes}{\ltimes},aeeb,daee,eebe,ebe{\ltimes},be{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. deeb
  2. \(\varepsilon\)
  3. dceaac
  4. c
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acc,ada,bbd,cba,ccb,dab,ddb,ddc\}\)

  1. cabca
  2. c
  3. \(\varepsilon\)
  4. cadbc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ac,ba,cb,a{\ltimes}\}\)

  1. aa
  2. adaaac
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,acb,bac,bca,cac,cba,cca\}\)

  1. c
  2. bcaacc
  3. bbbbcba
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}aac,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abca,babc,bcac,cacb,acb{\ltimes},aac{\ltimes},ac{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aac
  3. aca
  4. a
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,aca,baa,bcc,cba,cbc\}\)

  1. cb
  2. cbcbca
  3. cca
  4. bb
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,aabb,bacb,bccb,bccc,caaa,cacb,cbca\}\)

  1. accbc
  2. abbb
  3. aab
  4. bacbca
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,bba,bcb,caa,cba\}\)

  1. bcbcb
  2. cb
  3. ac
  4. bbac
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ac,ba,bc,ca,cb,c{\ltimes}\}\)

  1. baabaccabac
  2. aac
  3. abc
  4. ac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,{\rtimes}cd,aad,ada,cdd,daa,dad,dda,ac{\ltimes},da{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. adbcccbaa
  2. ac
  3. cccbbbcd
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,abb,acb,bbb,bca,caa,cac,cbc\}\)

  1. cbbb
  2. \(\varepsilon\)
  3. acbccccb
  4. abccb
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ab,ba,bb,bc,cb,cc,a{\ltimes}\}\)

  1. aacbaba
  2. bbb
  3. bcaca
  4. acbbabbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}ead,adbc,dbcb,eadb,bcb{\ltimes},cb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. \(\varepsilon\)
  3. c
  4. dcdcbd
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}db,aea,aeb,bea,dbe,eae,eba,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. dadbbb
  3. dbeaeba
  4. c
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}ad,{\rtimes}b{\ltimes}{\ltimes},{\rtimes}adc,adcd,cbdb,cdcb,dcbd,dcdc,bdb{\ltimes},db{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bad
  3. acbccb
  4. c
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,ba,bc,cc,ec,ee\}\)

  1. \(\varepsilon\)
  2. e
  3. eaccb
  4. bcba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}eb,{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},bed,cde,dcd,ebe,edc,de{\ltimes},e{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. acd
  2. ccdc
  3. eacbdab
  4. dcebc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ad,db,dd\}\)

  1. \(\varepsilon\)
  2. dc
  3. da
  4. caa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}bd,{\rtimes}bde,{\rtimes}cba,aace,aced,bdec,cdda,cedb,daac,ddaa,decd,ecdd,edb{\ltimes},cba{\ltimes},ba{\ltimes}{\ltimes},db{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dbdeaab
  2. \(\varepsilon\)
  3. cba
  4. ebeae
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aab,abb,baa,bbc,bc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aaaac
  2. bba
  3. bbc
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,bebe,cbee,ddba,debe\}\)

  1. cbeeeb
  2. ccdaa
  3. e
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,{\rtimes}aa,aaa,aab,aba,abb,baa,bab,bba,bb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bb
  3. abbaabbbaaa
  4. bbaaaaba
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}ad,{\rtimes}ad{\ltimes},{\rtimes}caa,{\rtimes}b{\ltimes}{\ltimes},aaac,aaca,acaa,caaa,caac,aac{\ltimes},ac{\ltimes}{\ltimes},ad{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. baa
  2. a
  3. b
  4. ad
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ab,bc,ca,cb,cc,a{\ltimes}\}\)

  1. ccabcaac
  2. \(\varepsilon\)
  3. baaaab
  4. abcaacbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dc,{\rtimes}{\rtimes}ab,{\rtimes}abb,{\rtimes}dcc,abbc,adee,bbca,bcad,becd,cade,deeb,ebec,eebe,ecd{\ltimes},dcc{\ltimes},cd{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dcc
  2. eceddede
  3. ceaadadb
  4. a
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adcb,bbcb,bcca,caaa,caad,cbbc,dbad,dbba\}\)

  1. a
  2. dadcdc
  3. dabccbabacc
  4. dacbdbdbac
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ad,bb,bc,cc,cd,db,dd\}\)

  1. adaa
  2. d
  3. abababac
  4. bcad
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}ba,{\rtimes}aba,{\rtimes}aab,{\rtimes}ba{\ltimes},aaab,aabb,abbb,baaa,bbaa,bbba,aba{\ltimes},bba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aaaaabaaabab
  2. bbabaaab
  3. ba
  4. bb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}dd,abd,adb,bbc,bda,dab,dad,dbb,dda,ddd,bc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aabccbcebaa
  2. ddadbbc
  3. ddddadbbc
  4. dddadbbc
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,bc,cd,db,ed,ee,d{\ltimes}\}\)

  1. bdc
  2. eadbc
  3. dedbbb
  4. caaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},ac,ad,be,ce,da,db,ed,ee,e{\ltimes},a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. eebae
  3. acab
  4. bdecd
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}be,{\rtimes}{\rtimes}ae,{\rtimes}aba,{\rtimes}be{\ltimes},{\rtimes}aed,aedb,bddc,cadc,dbdd,dcad,ddca,edbd,adc{\ltimes},aba{\ltimes},dc{\ltimes}{\ltimes},ba{\ltimes}{\ltimes},be{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ab
  2. be
  3. da
  4. decd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aee,ced,dca,dda,dea,ded,ead\}\)

  1. dbccce
  2. \(\varepsilon\)
  3. b
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}cc,abc,acc,bca,cab,cac,cca,cc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. ba
  2. ccbc
  3. \(\varepsilon\)
  4. bccba
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}cc,{\rtimes}cca,{\rtimes}cbb,bbcc,bccc,cbbc,cccc,ccc{\ltimes},cca{\ltimes},cc{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cca
  2. ab
  3. bac
  4. cbbccc
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}ed,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}ead,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}ede,decd,ecdd,edec,cdd{\ltimes},ead{\ltimes},ad{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. e
  2. a
  3. dd
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acaa,acca,baab,baac,bacb,bcac,caaa,cccc\}\)

  1. b
  2. a
  3. baabcaacc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaba,abaa,abab,babb,bbaa,bbab,bbbb\}\)

  1. abbba
  2. aba
  3. \(\varepsilon\)
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acdc,adec,bbcd,bdda,ccbb,eaca,ecba,eeca\}\)

  1. e
  2. bdecdbabdb
  3. baeeeedae
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,bb,bd,ca,cc,da,dc\}\)

  1. caccab
  2. cacacdccbcd
  3. addbaccbb
  4. dcabcdcdca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,abb,baa,bab,bba,bbb\}\)

  1. b
  2. aaaabbbbaaba
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}d,aa,ae,bd,db,de,ea,ed,ee,e{\ltimes},d{\ltimes}\}\)

  1. eabdaab
  2. cd
  3. aa
  4. aebbc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acd,baa,cba,dec,ece\}\)

  1. \(\varepsilon\)
  2. e
  3. ed
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ae,bb,ca,cd,ec\}\)

  1. e
  2. b
  3. \(\varepsilon\)
  4. aaea
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}cb,{\rtimes}db,{\rtimes}b{\ltimes},aad,adb,adc,bdc,caa,cad,dbc,dbd,dca,cb{\ltimes},bc{\ltimes},c{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. b
  2. cb
  3. dbc
  4. cdacaadbc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}ec,{\rtimes}ece,{\rtimes}ea{\ltimes},{\rtimes}bde,{\rtimes}c{\ltimes}{\ltimes},aabd,abdc,bdcc,ccdb,ceaa,dccd,eaab,ecea,cdb{\ltimes},bde{\ltimes},db{\ltimes}{\ltimes},de{\ltimes}{\ltimes},ea{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. ebdede
  3. ecdccaeeebe
  4. ea
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ba,bc,ca,cb,cc,a{\ltimes}\}\)

  1. bca
  2. \(\varepsilon\)
  3. ccbaacacca
  4. ba
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bacd,badd,bbda,cbcc,cdca,dbcd,ddac\}\)

  1. \(\varepsilon\)
  2. bb
  3. ddbbbccad
  4. bcaaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,aca,bac,cba,cbb,cca,ccc\}\)

  1. bbcaaaabcb
  2. cbbbcbbb
  3. ca
  4. bcccaaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,abb,abc,aca,bbc,cac,ccc\}\)

  1. b
  2. accb
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}cca,{\rtimes}bc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacc,accb,bbaa,caac,cbba,ccaa,ccbb,baa{\ltimes},aa{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. accbcacb
  3. aaaab
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abba,abbb,bbba\}\)

  1. abbaa
  2. \(\varepsilon\)
  3. a
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,bab,bba,bbb\}\)

  1. aa
  2. baa
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,bc,ca,cc,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ca
  3. b
  4. a
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ab,bc,ca,cc,b{\ltimes}\}\)

  1. bbaccb
  2. bc
  3. acabc
  4. bcab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}ab,aab,aba,abb,baa,bab,bb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aaaab
  2. bbba
  3. bbbabbbb
  4. bbbbaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. a
  2. aaaa
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bc,ea,ec\}\)

  1. dcaccbece
  2. \(\varepsilon\)
  3. eebdcbdbbbec
  4. ec
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{badb,bccc,bebc,cabe,deda,dedb,deed,eabd\}\)

  1. e
  2. dd
  3. ceaa
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcc,abcd,cdbd,ddbc\}\)

  1. b
  2. \(\varepsilon\)
  3. ccbddca
  4. dbdbda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acbc,bbba,bbca,bcac,caab,cccb\}\)

  1. cba
  2. b
  3. \(\varepsilon\)
  4. abb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}b,{\rtimes}cb,{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aac,abc,aca,bab,bcc,caa,cab,cca,cb{\ltimes},ab{\ltimes},c{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. c
  2. \(\varepsilon\)
  3. abccbbcab
  4. cb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}cc,acd,add,bad,cce,cdb,ceb,dac,dda,eba,db{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bccedcbb
  3. eeecddc
  4. d
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbb,accb,cbbb,ccaa,ccba,cccc\}\)

  1. b
  2. a
  3. bbab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}d,{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}ba,aac,acc,baa,bcc,cbc,ccb,ccc,cb{\ltimes},b{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. bbca
  2. d
  3. ccbcd
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ac,bb,bd,ca,cb,cc,d{\ltimes}\}\)

  1. cabbdbd
  2. bad
  3. \(\varepsilon\)
  4. cbd
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ac,bc,ca,a{\ltimes}\}\)

  1. bca
  2. bcaa
  3. bcaaa
  4. cbaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabd,aadc,adda,caaa,caba,cada,dbcb\}\)

  1. b
  2. a
  3. bcbdcdcd
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bb,bc,cc\}\)

  1. accbabacb
  2. baaa
  3. accb
  4. acbabbac
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acac,babe,bdee,cabd,cacd,cbae,ccbe,edcb\}\)

  1. adce
  2. de
  3. bdbabe
  4. cdbc
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb,bc,cc\}\)

  1. cbbaccc
  2. bbaaccb
  3. \(\varepsilon\)
  4. ccbb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,aa,ab,ac,ba,bb,bc,ca,a{\ltimes}\}\)

  1. caa
  2. \(\varepsilon\)
  3. cabac
  4. ca
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. ab
  2. aaab
  3. \(\varepsilon\)
  4. aab
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabd,adda,cdaa,cdba,cdca\}\)

  1. \(\varepsilon\)
  2. aa
  3. bdbbbcabcbbd
  4. abbacc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,abb,abc,bab,bba,bbb,bbc,bca,bcb,cab,cb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. bbcb
  2. b
  3. accbbab
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}d,ac,ad,cc,ce,dd,ea,d{\ltimes}\}\)

  1. cbad
  2. \(\varepsilon\)
  3. bdcaeac
  4. d
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,baa,bab\}\)

  1. aaa
  2. \(\varepsilon\)
  3. b
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}ac,{\rtimes}aca,acac,acba,cacb,cba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. cbccb
  3. baa
  4. acccab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,baa,bab,bbb\}\)

  1. \(\varepsilon\)
  2. baab
  3. aa
  4. abab
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,abaa,abab,abbb,baaa,bbaa,bbba\}\)

  1. bbaaababa
  2. \(\varepsilon\)
  3. b
  4. bbbbbb
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,abb,acb,bdc,cdb\}\)

  1. bc
  2. adcbb
  3. abcd
  4. dbdbac
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,bab,bba,bbb\}\)

  1. babaaab
  2. \(\varepsilon\)
  3. babababab
  4. babbbabb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adab,bdca,dccb,eaec\}\)

  1. e
  2. \(\varepsilon\)
  3. ceaaecbccbea
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}e,ac,ae,ca,cd,da,ec,ee,c{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbdbd
  3. edbbded
  4. acecdddbc
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,baa,bac,bbb,caa,ccb\}\)

  1. bacbb
  2. bcaabbacabc
  3. \(\varepsilon\)
  4. ca
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. abbaba
  2. aab
  3. \(\varepsilon\)
  4. ab
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}b{\ltimes}{\ltimes},{\rtimes}acb,acbb,bbca,cbbc,bca{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aa
  2. b
  3. bbb
  4. c
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,baa,bdd,cba,ddc\}\)

  1. b
  2. cbdabbcdbbdc
  3. dbdbacbaca
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbb,bbee,cada,caea,dcda,ddec,dece,ebee\}\)

  1. e
  2. \(\varepsilon\)
  3. aeadeaa
  4. ba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,adc,add,bbc,cdd,dba,eed\}\)

  1. edeedd
  2. \(\varepsilon\)
  3. dac
  4. cbbac
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acbc,baad,bbcd,ccaa,ddad\}\)

  1. \(\varepsilon\)
  2. bd
  3. a
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}e{\ltimes},{\rtimes}ab,abb,add,bad,bbd,bdb,beb,dbe,ddb,eba,db{\ltimes},b{\ltimes}{\ltimes},e{\ltimes}{\ltimes}\}\)

  1. eeebc
  2. cbbeee
  3. aabcbddbca
  4. cecd
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aabbbaa
  3. bababbbaabab
  4. aaabbabbab
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}dd,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}ddb,{\rtimes}db{\ltimes},{\rtimes}dbb,{\rtimes}b{\ltimes}{\ltimes},aaab,aabd,abdc,baaa,bbaa,bbba,dbbb,ddbb,dbb{\ltimes},bdc{\ltimes},dc{\ltimes}{\ltimes},db{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ababcb
  2. dcd
  3. bbccbaddbc
  4. dcdcccaadab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dc,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}dca,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}cad,{\rtimes}{\ltimes}{\ltimes}{\ltimes},adcd,caaa,cadc,cdca,dcaa,dcad,dcdc,aaa{\ltimes},cad{\ltimes},ad{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbd
  2. acbbabcb
  3. cbcb
  4. a
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb\}\)

  1. bbabbaa
  2. ba
  3. abbbbab
  4. aaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,bba,bca,bcc,cac\}\)

  1. bb
  2. \(\varepsilon\)
  3. bbbbbbb
  4. cccaba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}be,ace,bac,beb,bee,eba,ebe,eeb,ce{\ltimes},e{\ltimes}{\ltimes}\}\)

  1. cccabbd
  2. ccaecbea
  3. d
  4. a
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcc,adad,badd,bbdb,bddb,ccda,dbcb\}\)

  1. dddb
  2. dbbcb
  3. dbd
  4. ddbcbddba
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ab,ba,ca,cc,ce,ec,a{\ltimes}\}\)

  1. eada
  2. dcbbda
  3. cca
  4. ca
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}dd,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}ddb,{\rtimes}abd,{\rtimes}b{\ltimes}{\ltimes},bbbb,dbbb,ddbb,abd{\ltimes},bbb{\ltimes},bd{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbca
  3. cc
  4. dcadbd
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aba,baa,bab,bba\}\)

  1. a
  2. b
  3. bb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}d{\ltimes},{\rtimes}da,acb,adc,bdd,cbd,dac,dad,dcd,dda,cd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. d
  2. baabad
  3. dadcd
  4. acbcacbcbd
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aace,abdd,cabe,cbdd,ccda,eddb,eecd\}\)

  1. ecaadd
  2. e
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}baa,{\rtimes}bba,{\rtimes}ab{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaba,abab,abbb,baab,babb,bbaa,bbba,baa{\ltimes},bba{\ltimes},ba{\ltimes}{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ab
  2. baa
  3. bba
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bddd,bedc,cbea,cdce,ebca,ecab\}\)

  1. \(\varepsilon\)
  2. becaae
  3. bcebadc
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ad,ca,cb,cd\}\)

  1. ddb
  2. adaabdda
  3. c
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}ea,{\rtimes}{\rtimes}be,{\rtimes}{\rtimes}ba,{\rtimes}e{\ltimes}{\ltimes},{\rtimes}bea,{\rtimes}eaa,{\rtimes}ba{\ltimes},abac,aeab,beae,eaba,eaea,eaa{\ltimes},bac{\ltimes},ba{\ltimes}{\ltimes},ac{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. eaa
  2. ba
  3. e
  4. accadead
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{bbba,bbbb,bcdd,cbac,dacb\}\)

  1. bacaaac
  2. bcdcdba
  3. cbcdaabc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,ca,ce,dc,ec,ed,ee,a{\ltimes}\}\)

  1. b
  2. cdaa
  3. ddd
  4. ca
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ae,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}aeb,{\rtimes}e{\ltimes}{\ltimes},aebb,bbeb,bebe,ebbe,ebe{\ltimes},be{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. edadaea
  2. a
  3. edb
  4. aa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aadd,abba,addb,bacb,cbec,cdcb\}\)

  1. b
  2. e
  3. \(\varepsilon\)
  4. ce
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}dd,{\rtimes}ba,bac,cdb,dba,dcd,ddc,ac{\ltimes},ba{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ba
  2. bbbadab
  3. babdaab
  4. bac
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ac,ba,bb,ca,cb,b{\ltimes}\}\)

  1. cabc
  2. \(\varepsilon\)
  3. ccaabbb
  4. c
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ca,cd,eb\}\)

  1. e
  2. ddede
  3. \(\varepsilon\)
  4. eeecbad
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,bc,be,ca,cc,da,db,dc\}\)

  1. bdcaec
  2. \(\varepsilon\)
  3. bdabdb
  4. cbccbc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bbb,bcb,bce,bed,cea,daa,dbc\}\)

  1. dcedc
  2. \(\varepsilon\)
  3. e
  4. d
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,baa,bab,bbb\}\)

  1. \(\varepsilon\)
  2. b
  3. a
  4. ababa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}b{\ltimes},{\rtimes}ba,abb,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. a
  2. \(\varepsilon\)
  3. abb
  4. bbbaab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. abaaa
  2. aaaaa
  3. aaaaabaaa
  4. bbbbbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aacd,abad,acbb,cade,cdee,ddad,edac\}\)

  1. \(\varepsilon\)
  2. edceee
  3. ce
  4. acacae
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}cd,{\rtimes}bd,ace,bda,ced,dac,dcb,edc,cd{\ltimes},cb{\ltimes},b{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. abadad
  2. becba
  3. dbdedca
  4. dbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}baa,{\rtimes}bca,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aabb,abbb,baab,bca{\ltimes},bbb{\ltimes},ca{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aac
  3. c
  4. bca
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaab,abab,abba,abbb,baaa,babb,bbbb\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. abbb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abbbaa
  3. bbabaa
  4. aabbbbbaaaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,bb,bc,cb,c{\ltimes}\}\)

  1. \(\varepsilon\)
  2. b
  3. a
  4. ab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acc,bdc,cbd,ccc,daa,dab,dcd,ddc\}\)

  1. \(\varepsilon\)
  2. bacbbc
  3. b
  4. dcaabda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}d{\ltimes},{\rtimes}dc,{\rtimes}bc,bcc,cce,ced,edb,dc{\ltimes},db{\ltimes},b{\ltimes}{\ltimes},d{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. ebd
  2. dc
  3. d
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}aa,aaa,aab,aba,abb,baa,bab,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aaababab
  3. bbbab
  4. b
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,cb,cc\}\)

  1. b
  2. \(\varepsilon\)
  3. aba
  4. bcacb
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}a{\ltimes},{\rtimes}bb,aab,abb,baa,bab,bba,bb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbbbba
  2. aaba
  3. a
  4. bb
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,da\}\)

  1. a
  2. b
  3. bcc
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}abb,{\rtimes}ab{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaaa,aaab,aaba,abaa,baaa,aaa{\ltimes},abb{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. ab
  3. bab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,aa,ac,ae,bc,ca,cb,ce,dc,dd,ea,eb,b{\ltimes}\}\)

  1. eecbbdbdb
  2. ccc
  3. cbdbead
  4. dcbebca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}baa,aabc,abcb,baab,bcba,cba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. caaaba
  3. a
  4. bac
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}c,ad,bb,bc,ca,cd,db,dc,dd,c{\ltimes}\}\)

  1. \(\varepsilon\)
  2. dbb
  3. bdaabddcca
  4. ccabbacbcd
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}cb,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,aca,bac,bba,cbb,ac{\ltimes},ca{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ddcd
  3. daada
  4. ca
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baaa,bbcb,bccb,bdaa,cdab,cdcd,ddbd,dddc\}\)

  1. dbcc
  2. \(\varepsilon\)
  3. cabda
  4. adcdda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}dad,{\rtimes}cb{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaab,aaba,abaa,adca,baaa,caab,dadc,dcaa,aab{\ltimes},ab{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. caaddaccada
  2. cb
  3. b
  4. dadcaab
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabb,abba,baaa,bbbb\}\)

  1. babab
  2. b
  3. bbb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,b{\ltimes}\}\)

  1. b
  2. abbabb
  3. ababab
  4. \(\varepsilon\)
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}bc,aac,acb,baa,bca,bcb,cba,cbc,bc{\ltimes},ca{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ca
  2. aabbc
  3. baa
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abba,baab,babb,bbaa,bbab,bbba\}\)

  1. baaaaaaaba
  2. bababbbba
  3. ba
  4. aabbb
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. abab
  2. aabbaba
  3. bb
  4. aa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}dbc,{\rtimes}cb{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abad,acab,adac,bada,bcda,cdab,daba,daca,dbcd,cab{\ltimes},ab{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. cb
  3. \(\varepsilon\)
  4. bc
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aacc,bbcc,cbac,cbcb\}\)

  1. aa
  2. bc
  3. ba
  4. bbbac
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ba,db,dc\}\)

  1. b
  2. \(\varepsilon\)
  3. aaaba
  4. bdb
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ca,dd,ee\}\)

  1. cc
  2. adaaeab
  3. e
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,bc,bd,cd,db,de,ea,eb,ed,a{\ltimes}\}\)

  1. dea
  2. ecdbedacba
  3. bedcdcdbdd
  4. beecaceda
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}a,{\rtimes}eb,{\rtimes}aa,aac,acd,bba,cdb,dbb,eb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. c
  2. eeeb
  3. dddbb
  4. ddeda
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aba,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacc,abaa,accb,baac,bbca,bcab,cabc,cbbc,ccbb,abc{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aabcaab
  2. c
  3. \(\varepsilon\)
  4. cabacaac
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,ca,cb\}\)

  1. acc
  2. \(\varepsilon\)
  3. a
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ad,cb,db,dc,dd\}\)

  1. bdaad
  2. \(\varepsilon\)
  3. b
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}c{\ltimes},{\rtimes}ac,ace,ade,bad,ceb,ded,eba,eda,da{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. beee
  2. c
  3. ecbbbab
  4. b
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}cb,bbc,bcc,cbb,cca,ca{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cbbc
  2. c
  3. b
  4. a
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ad,ba,bb,bc,db,dd\}\)

  1. bccabbbd
  2. a
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}dbb,{\rtimes}cc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaba,acaa,bbdc,bdca,caab,caca,dbbd,dcac,aba{\ltimes},ba{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abaddeddc
  3. dbabdebbbe
  4. edcaccde
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,baba,bbaa,bbba\}\)

  1. \(\varepsilon\)
  2. ababaaa
  3. bbabbb
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,ab,ac,ba,cb,cc,a{\ltimes},b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cab
  3. cc
  4. cacab
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ac,ba,bb,bc,ca,cb,cc\}\)

  1. \(\varepsilon\)
  2. bbba
  3. a
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}aa,acb,bac,bcc,cbc,ccc,ccd,cda,da{\ltimes},aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. c
  2. bacbccda
  3. \(\varepsilon\)
  4. aa
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,aab,baa,bba,bbb,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. ba
  3. abba
  4. bbaab
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ba,{\rtimes}aaa,{\rtimes}bb{\ltimes},{\rtimes}bab,{\rtimes}b{\ltimes}{\ltimes},abba,babb,bbab,bab{\ltimes},aaa{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. bb
  3. aaa
  4. aaaaaaaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,bb,cc,cd,da,dc,dd\}\)

  1. aacdccb
  2. \(\varepsilon\)
  3. ccaabdcd
  4. b
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,bd,cd,dc,dd\}\)

  1. b
  2. \(\varepsilon\)
  3. dcccaca
  4. a
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bbb\}\)

  1. abba
  2. b
  3. bba
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,baa,bbb\}\)

  1. aa
  2. baaabb
  3. baabbbaba
  4. aab
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}cd,{\rtimes}bd,aab,abc,acd,aea,bca,cae,cda,daa,dac,ea{\ltimes},bd{\ltimes},d{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cdaabcaea
  2. daedeeabad
  3. bebcdbbbd
  4. bd
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,ab,ad,bc,bd,ca,db,dc,dd,c{\ltimes}\}\)

  1. aada
  2. cdccdaad
  3. \(\varepsilon\)
  4. bdcb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}ba,{\rtimes}acc,{\rtimes}baa,{\rtimes}cc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aabc,abcc,baab,bccb,ccba,acc{\ltimes},cba{\ltimes},ba{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. acc
  2. \(\varepsilon\)
  3. cabacc
  4. cc
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bb{\ltimes},abba,abbb,babb,bbab,bbbb,bbb{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. abbaaa
  3. \(\varepsilon\)
  4. babbaabb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ba,{\rtimes}aa,aab,aba,abb,bab,bbc,bcb,cbc,bc{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. b
  2. bc
  3. ba
  4. cab
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,bb,bc\}\)

  1. \(\varepsilon\)
  2. acccb
  3. ba
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,acd,baa,bdc,dac,dcd\}\)

  1. b
  2. \(\varepsilon\)
  3. bdabddbbd
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bd,cb,eb,ec,ee\}\)

  1. eecde
  2. \(\varepsilon\)
  3. eadaab
  4. eaebdebbd
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bc,ca,cb\}\)

  1. ccca
  2. acca
  3. c
  4. acbcb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ad,bc,bd,cd,da,dd\}\)

  1. ddcaddaa
  2. cbdadad
  3. \(\varepsilon\)
  4. daccacbacd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aadb,abbb,adbd,cdac,dcac,dcdb\}\)

  1. a
  2. b
  3. \(\varepsilon\)
  4. cadcb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bb,bc,ca,cb\}\)

  1. cacbba
  2. cb
  3. ccbbac
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}cb,{\rtimes}aa,bcc,bdb,cbd,dbc,cc{\ltimes},aa{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aa
  2. acc
  3. a
  4. bcc
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}ccb,{\rtimes}b{\ltimes}{\ltimes},bccb,bccc,cbcc,ccbc,cccb,cccc,ccb{\ltimes},cb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ccb
  2. b
  3. acbccacbbbc
  4. ccbccb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ba,{\rtimes}cbd,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}baa,aaba,abab,baab,cbd{\ltimes},bab{\ltimes},ab{\ltimes}{\ltimes},bd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cbbcbc
  2. aac
  3. cbd
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,aa,ad,da,dd,d{\ltimes}\}\)

  1. d
  2. ddd
  3. bd
  4. dd
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}e{\ltimes},{\rtimes}ca,aab,abb,abc,baa,bba,bca,cab,cac,ac{\ltimes},e{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bbabea
  2. cbeccbcad
  3. aceaae
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaab,aabb,abaa,abbb,baaa,bbaa,bbba,baa{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abaa
  2. b
  3. \(\varepsilon\)
  4. aabaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}aba,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}bba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaac,aaca,acaa,acca,bacc,bbac,caaa,caca,ccac,aca{\ltimes},aba{\ltimes},ba{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbaccabca
  2. acbccbccbcb
  3. \(\varepsilon\)
  4. a
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ac,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}aca,{\rtimes}ba{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacc,acaa,accc,caac,cccc,ccc{\ltimes},ba{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. baaaa
  2. ccaa
  3. bccac
  4. cab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}bb,{\rtimes}aab,{\rtimes}bbb,aaba,abaa,baab,bbb{\ltimes},aba{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. abbbaa
  3. abbabba
  4. aaabb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb\}\)

  1. \(\varepsilon\)
  2. a
  3. bbbabb
  4. abb
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}dad,{\rtimes}bc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},adad,adbc,bcda,cdad,dada,dadb,dbcd,dad{\ltimes},ad{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. badcc
  2. bc
  3. \(\varepsilon\)
  4. cbcdad
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabc,abab,abba,acab,cabb\}\)

  1. acacccbab
  2. \(\varepsilon\)
  3. cc
  4. bacbbccccc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ba,bb,ca,cc,ce,db,eb\}\)

  1. bebecda
  2. \(\varepsilon\)
  3. b
  4. e
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ac,ba,bb,ca,cd,db,a{\ltimes}\}\)

  1. ddda
  2. dbad
  3. \(\varepsilon\)
  4. ca
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}aab,aaab,aabb,abba,baaa,bbaa,aab{\ltimes},ab{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aab
  2. baa
  3. abbbaab
  4. abbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bb,bc,be,ca,cb,ea,eb,ee\}\)

  1. \(\varepsilon\)
  2. a
  3. bacacbc
  4. dbcae
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaca,aacb,abba,abbb,abca,abcb,babc,ccaa\}\)

  1. \(\varepsilon\)
  2. ac
  3. b
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aad,ada,baa,bcb,bcc,cab,ccd,dcd\}\)

  1. aaabddabd
  2. \(\varepsilon\)
  3. dbaaa
  4. abacd
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,abc,aca,baa,cac,cbb,cbc\}\)

  1. \(\varepsilon\)
  2. acbcbcbaccb
  3. ab
  4. bbcca
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}cb,{\rtimes}dc,add,bca,cad,cbc,dcc,ddc,ddd,dc{\ltimes},cc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. ddccc
  2. dc
  3. bbbaaa
  4. dcc
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,bac,bcd,bdc,cca,cdb\}\)

  1. b
  2. \(\varepsilon\)
  3. cadc
  4. acacdd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}e,{\rtimes}d,be,de,eb,ed,ee,e{\ltimes},d{\ltimes}\}\)

  1. ed
  2. a
  3. d
  4. e
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,{\rtimes}d,ab,ad,ba,bb,bc,cb,da,db,dd,c{\ltimes},b{\ltimes}\}\)

  1. accaacd
  2. cccbbcab
  3. b
  4. caddad
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abba,baab\}\)

  1. bbababbbabab
  2. ba
  3. \(\varepsilon\)
  4. aaababaaa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{baaa,baeb,bcaa,ccce,ebea\}\)

  1. bcdddbe
  2. de
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,ac,bc,cb,cd,da,dc,dd,b{\ltimes}\}\)

  1. bdbdaaa
  2. dbbba
  3. adddc
  4. cca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,bba\}\)

  1. aaababaabb
  2. bb
  3. bba
  4. aaaab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{acbb,acec,bcaa,cbad,cead,ebee\}\)

  1. \(\varepsilon\)
  2. cdebcbb
  3. dad
  4. eed
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aba,{\rtimes}abb,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aabb,abba,abbb,baab,bbaa,bbba,bbbb,aba{\ltimes},bba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. \(\varepsilon\)
  3. aaa
  4. aba
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}bbc,{\rtimes}cba,{\rtimes}b{\ltimes}{\ltimes},aacb,acba,bbca,bcaa,caac,cbab,bab{\ltimes},cba{\ltimes},ba{\ltimes}{\ltimes},ab{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. abc
  3. acaccb
  4. caaaaca
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{cabd,cbbc,daeb,eccc\}\)

  1. deeaaab
  2. \(\varepsilon\)
  3. adba
  4. ddadbced
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adac,cbcd,dacb,dacc,dcaa\}\)

  1. abcbbbdaad
  2. b
  3. dbcddddda
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}da,abc,aca,bcb,bda,cab,cbd,dac,ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. bdbb
  2. bddeecacce
  3. \(\varepsilon\)
  4. dac
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bb,cc,cd,da,dc\}\)

  1. bbda
  2. a
  3. \(\varepsilon\)
  4. b
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aeed,baae,baea,bdec,caad,ecbd\}\)

  1. eddc
  2. \(\varepsilon\)
  3. deacdaa
  4. deddcbdd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}aa,aab,aba,abb,baa,bab,bba,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. a
  2. abbbaaaabb
  3. bbbbbaaaa
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}baa,{\rtimes}aba,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaba,abaa,abab,baab,baa{\ltimes},bab{\ltimes},ab{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. baaa
  3. bbaaab
  4. aaabaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. ababa
  2. ab
  3. abbbaa
  4. b
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. babbb
  2. b
  3. aaaabb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aed,bea,cee,dbe,dcd,ded,edd\}\)

  1. cee
  2. baceaa
  3. \(\varepsilon\)
  4. ce
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abba,abcb,acaa,acab\}\)

  1. b
  2. \(\varepsilon\)
  3. a
  4. c
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,ab,bb,bc,ca,cb,cc,b{\ltimes}\}\)

  1. \(\varepsilon\)
  2. aacbbbcb
  3. abbbcb
  4. cabbabbb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abab,baba,bbab,bbbb\}\)

  1. \(\varepsilon\)
  2. bb
  3. abaab
  4. bbaaaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}cbc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},aaac,aaba,aacb,abaa,acbc,baab,bcaa,caab,cbca,aab{\ltimes},cbc{\ltimes},ab{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. cbc
  3. ccbccb
  4. aaa
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}cc,cab,cca,ccc,ab{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. acbbaacacaa
  2. \(\varepsilon\)
  3. ca
  4. c
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}db,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}db{\ltimes},{\rtimes}d{\ltimes}{\ltimes},{\rtimes}bba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}bbd,acac,bbdc,bdca,caca,cacc,dcac,acc{\ltimes},bba{\ltimes},ba{\ltimes}{\ltimes},db{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dcbaadd
  2. db
  3. \(\varepsilon\)
  4. d
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,a{\ltimes}\}\)

  1. bbb
  2. ba
  3. bba
  4. baaab
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,acbd,cbad,cbcb,ddbc\}\)

  1. dbcabcdcda
  2. ca
  3. ccbaabdbd
  4. abccbada
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,aa,bb,bc,ca,cc,a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbbca
  3. abb
  4. cbbaba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bc,cb,db,dd,ee\}\)

  1. \(\varepsilon\)
  2. bcdcb
  3. eeecdedc
  4. becb
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,aa,ab,ba,b{\ltimes}\}\)

  1. b
  2. aba
  3. aaab
  4. aaabbabaa
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbb,cbcd,ccbb,dccc\}\)

  1. c
  2. a
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}aba,{\rtimes}dac,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abac,acac,acdb,baca,cacd,cdb{\ltimes},dac{\ltimes},db{\ltimes}{\ltimes},ac{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. addd
  2. \(\varepsilon\)
  3. dac
  4. bdcbbcbd
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,acac,cbaa,cbcb,ccaa,ccca\}\)

  1. ccac
  2. ccbbc
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}da,{\rtimes}dad,abec,adda,adea,beca,cade,dabe,dadd,ddab,ecad,dea{\ltimes},ea{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbdeb
  2. ebcac
  3. aee
  4. cbada
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bc,{\rtimes}ca,adb,bcc,bda,cad,cca,daa,dbd,aa{\ltimes},ca{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. abb
  2. \(\varepsilon\)
  3. bcca
  4. ca
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}d,ac,bb,bc,ca,cb,b{\ltimes},d{\ltimes}\}\)

  1. da
  2. bca
  3. ca
  4. dbadc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}aa,aaa,aab,abb,bbb,bb{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aa
  2. aaa
  3. abaaaa
  4. ba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}cd,{\rtimes}cdd,{\rtimes}bbb,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}bc{\ltimes},cdda,daca,ddac,aca{\ltimes},bbb{\ltimes},bc{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. abba
  3. bb
  4. dba
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}c,aa,ab,ba,bb,bc,ca,cb,cc,b{\ltimes}\}\)

  1. dcaaba
  2. cb
  3. ccb
  4. cbb
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}bb,aaa,abb,baa,bab,bba,bbb,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbaa
  2. b
  3. bbaaa
  4. bbbaa
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,bd,db,d{\ltimes}\}\)

  1. bd
  2. \(\varepsilon\)
  3. cdacaa
  4. bbd
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,bba,bca,bcb,cbb\}\)

  1. bbac
  2. bbc
  3. bbccb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,bb,bc,bd,cd,db,dc,dd,c{\ltimes}\}\)

  1. cbaaa
  2. \(\varepsilon\)
  3. cacda
  4. ddcbccdbd
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,aa,ab,ba,a{\ltimes},b{\ltimes}\}\)

  1. babb
  2. a
  3. b
  4. aa
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}e,aa,bd,be,db,dd,ea,eb,e{\ltimes},a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. e
  3. ea
  4. ddd
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}da,{\rtimes}d{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}dad,adcb,adcd,bcad,cadc,cbca,dadc,dcbc,dcd{\ltimes},cd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ccaddcbcc
  2. a
  3. d
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}aa,{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},aaa,aac,ace,adb,bae,bda,ceb,dad,dba,ebd,ae{\ltimes},e{\ltimes}{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. daad
  2. dcaa
  3. \(\varepsilon\)
  4. b
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}e,{\rtimes}db,{\rtimes}{\ltimes}{\ltimes},{\rtimes}ed,bbd,bdc,bee,cde,ceb,dbe,dcd,ebb,ece,eec,ed{\ltimes},de{\ltimes},d{\ltimes}{\ltimes},e{\ltimes}{\ltimes}\}\)

  1. ed
  2. \(\varepsilon\)
  3. badde
  4. eaccecaed
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,abb,bab,bba,bbb,bb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. babb
  2. \(\varepsilon\)
  3. babbb
  4. aa
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ae,bc,bd,cb,dc\}\)

  1. bcbcdba
  2. d
  3. bceecaabbee
  4. ab
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb,baa,bab,bba,bbb\}\)

  1. bbbaba
  2. bbabbba
  3. b
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abd,dae,dbc,eab\}\)

  1. \(\varepsilon\)
  2. eaaccb
  3. bacaecec
  4. dabedb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bed,cce,cdb,cdd\}\)

  1. \(\varepsilon\)
  2. be
  3. abbaddd
  4. cdcd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adbd,badd,bdbd,ccba,dbdb,deab,eacb\}\)

  1. aa
  2. ebce
  3. dead
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,baaa,baba,bbaa,bbab,bbba,bbbb\}\)

  1. babbb
  2. \(\varepsilon\)
  3. aaaabbab
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}ba,aaa,abc,bab,bca,caa,aa{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. aabbaa
  2. ccbcaabc
  3. bcbbcca
  4. ccbab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}d,{\rtimes}{\ltimes}{\ltimes},{\rtimes}dc,{\rtimes}cc,bda,cbd,ccb,ccc,dac,dc{\ltimes},ac{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. cbabdca
  2. dc
  3. abdd
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}d,ab,ba,bc,cb,cc,b{\ltimes},d{\ltimes}\}\)

  1. dbbbabdc
  2. d
  3. abbbdd
  4. ddab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aac,ada,cad,dad\}\)

  1. a
  2. baabbaba
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}aad,aadb,abdd,adba,babd,dbab,bdd{\ltimes},dd{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cb
  2. aad
  3. bbc
  4. adcb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aeb,bbe,bdb,cad,cba,dcb,eac,edc\}\)

  1. dabcecbbccbe
  2. \(\varepsilon\)
  3. e
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ba,bc,ca\}\)

  1. cbb
  2. bb
  3. cccbabb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,abb,baa,bbb\}\)

  1. bbb
  2. aaaaaabba
  3. ababaaba
  4. bba
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,bba\}\)

  1. aaaaa
  2. b
  3. \(\varepsilon\)
  4. babba
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,abb,bab,bba\}\)

  1. bb
  2. b
  3. a
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb,bd,db,dc,dd\}\)

  1. abca
  2. \(\varepsilon\)
  3. b
  4. badbab
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}c,{\rtimes}{\ltimes}{\ltimes},{\rtimes}cc,cbd,ccb,ccc,bd{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. a
  2. c
  3. ccbd
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abaa,abab,abbb,baba,babb,bbba\}\)

  1. bbbab
  2. \(\varepsilon\)
  3. abbbb
  4. b
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}cc,aba,abb,bab,bbc,bcc,cab,cba,cca,ccb,ccc,ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. ccbabccbc
  2. ccba
  3. ccccabbaaaba
  4. cccba
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abb,ada,add,bdc,cba,dad,dcb\}\)

  1. \(\varepsilon\)
  2. dbddc
  3. b
  4. ddc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}d,aa,ab,ba,bc,cb,cc,cd,da,a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. dbabdcc
  3. a
  4. aa
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,abba,baaa,baba,bbab,bbba\}\)

  1. \(\varepsilon\)
  2. aaab
  3. bbbab
  4. ababbb
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ab,{\rtimes}bb,aab,aba,abb,baa,bab,bba,bbb,bb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. baabaa
  2. \(\varepsilon\)
  3. bbb
  4. aabbab
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ac,{\rtimes}ba,aba,abc,bab,bcc,ac{\ltimes},cc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. ac
  2. bb
  3. babcc
  4. acbacb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}c{\ltimes},{\rtimes}bc,{\rtimes}ca,aac,acc,bbb,caa,cbb,ccb,bb{\ltimes},bc{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. caabcbc
  2. c
  3. bc
  4. aacba
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,bba,bbb\}\)

  1. babba
  2. \(\varepsilon\)
  3. abaababaa
  4. baabbb
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ad,ca,cc,cd,ed\}\)

  1. bd
  2. cecd
  3. abcaeb
  4. abdbadad
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{acc,aeb,aed,bba,cde,ded,edd\}\)

  1. bdc
  2. \(\varepsilon\)
  3. aa
  4. e
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abcb,acbc,bcac,bcba,cabb,cbbc,ccaa\}\)

  1. a
  2. ac
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,abab,abba,bbbb,caab,cbac,ccac,ccba\}\)

  1. bcbbcaccbbcb
  2. ab
  3. abbbacbbaaa
  4. aacbacbbab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,ba,bb,bc,cb,cc\}\)

  1. aca
  2. \(\varepsilon\)
  3. b
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ad,bb,bc,cb,cd,db,dd\}\)

  1. aabc
  2. bdd
  3. \(\varepsilon\)
  4. ccbb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaac,aaba,babb,bbba,bcac,bcbc,caaa,ccba\}\)

  1. aabc
  2. b
  3. bbbaccaca
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}aba,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abac,acde,bacd,cdec,decc,eccc,ccc{\ltimes},cc{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. adbaebec
  2. \(\varepsilon\)
  3. edcedaae
  4. b
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaba,abba,baaa,baba,babb\}\)

  1. babba
  2. b
  3. baaabb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}d,cc,cd,ce,da,dc,dd,ec,a{\ltimes}\}\)

  1. abdb
  2. dd
  3. \(\varepsilon\)
  4. eccdcaadca
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,accb,bbbb,cadc,cbcd,ccbb,ddcb,dddb\}\)

  1. cbbb
  2. ddcca
  3. acb
  4. ccdbbcd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,aca,acb,bab,bbb,bcc,cba,ccb\}\)

  1. bbcbabcb
  2. cbbcabaaca
  3. bb
  4. baaabb
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}c,ab,ac,ba,bb,bc,cb,cc,c{\ltimes},b{\ltimes}\}\)

  1. aacbabbbccab
  2. bbacbcbbbaa
  3. acaaaccabbca
  4. bcabcbcc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabb,abaa,abba,baaa,baab,baba,bbaa,bbab\}\)

  1. \(\varepsilon\)
  2. aaaaba
  3. abb
  4. abbba
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}bd,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}bdb,{\rtimes}c{\ltimes}{\ltimes},aaab,aaba,baaa,bbaa,bdbb,dbba,aba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ddcbaaac
  2. dbbabc
  3. \(\varepsilon\)
  4. c
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ad,bb,bd,ca,ee\}\)

  1. b
  2. e
  3. \(\varepsilon\)
  4. c
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}ee,{\rtimes}ee{\ltimes},{\rtimes}aba,{\rtimes}c{\ltimes}{\ltimes},abac,abdc,acab,baca,bdce,cabd,ceeb,dcee,eeb{\ltimes},eb{\ltimes}{\ltimes},ee{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. dbdbc
  2. c
  3. beba
  4. ee
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}cb,{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}ab,aab,abb,aca,bbc,bca,bcb,caa,cac,cba,cbc,ab{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. acc
  2. cabccacbbcba
  3. \(\varepsilon\)
  4. baaabaabaabb
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,bc,bd,cb,da\}\)

  1. \(\varepsilon\)
  2. aaa
  3. cbad
  4. cdbcc
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}bd,aec,bca,bde,cae,cbc,dcb,ded,ecc,edc,cc{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. aaa
  2. d
  3. \(\varepsilon\)
  4. aebdc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}ccb,{\rtimes}bbb,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}ab{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},accb,bacc,cbac,cbcc,ccba,ccbc,bcc{\ltimes},bbb{\ltimes},ab{\ltimes}{\ltimes},cc{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. c
  2. \(\varepsilon\)
  3. cbacaacab
  4. ab
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}b,ab,ba,bb,a{\ltimes}\}\)

  1. a
  2. aaabbabb
  3. \(\varepsilon\)
  4. bbbb
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,addb,aeba,ddcc\}\)

  1. e
  2. \(\varepsilon\)
  3. b
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}e,ae,ba,ce,de,eb,ec,ed,ee,c{\ltimes},a{\ltimes}\}\)

  1. \(\varepsilon\)
  2. bbadbed
  3. a
  4. beaadcec
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}d,{\rtimes}de,{\rtimes}ee,{\rtimes}d{\ltimes},adb,bdc,ceb,dbd,dce,dea,ead,eb{\ltimes},ee{\ltimes},b{\ltimes}{\ltimes},e{\ltimes}{\ltimes},d{\ltimes}{\ltimes}\}\)

  1. eec
  2. bdcad
  3. deddaaae
  4. d
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes},{\rtimes}bc,aaa,aab,aba,aca,bac,bca,caa,bc{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. baaacabaac
  3. b
  4. bc
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}bc,{\rtimes}{\rtimes}c{\ltimes},{\rtimes}{\rtimes}da,{\rtimes}{\rtimes}ce,{\rtimes}ced,{\rtimes}c{\ltimes}{\ltimes},{\rtimes}bc{\ltimes},{\rtimes}dac,abcb,acdc,bcbd,cbdb,cdab,cdcd,dabc,dacd,dcda,ced{\ltimes},bdb{\ltimes},db{\ltimes}{\ltimes},bc{\ltimes}{\ltimes},ed{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. a
  2. beeddbbaecb
  3. dcc
  4. bbcc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}eb,{\rtimes}{\rtimes}dc,{\rtimes}{\rtimes}ed,{\rtimes}ebe,{\rtimes}dc{\ltimes},{\rtimes}edd,bccd,bedb,ccdc,cdce,ceba,dbcc,dceb,ebed,edbc,eba{\ltimes},edd{\ltimes},dc{\ltimes}{\ltimes},ba{\ltimes}{\ltimes},dd{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. adcaedeeea
  2. dc
  3. abbccb
  4. edd
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,bbcb,cacb,cbab,ccbb\}\)

  1. ca
  2. ababcab
  3. \(\varepsilon\)
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}e{\ltimes},{\rtimes}{\rtimes}eb,{\rtimes}{\rtimes}ec,{\rtimes}{\rtimes}cd,{\rtimes}eca,{\rtimes}cda,{\rtimes}e{\ltimes}{\ltimes},{\rtimes}eb{\ltimes},aede,cdae,daed,deae,eaed,edea,eca{\ltimes},aed{\ltimes},eb{\ltimes}{\ltimes},ed{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. cbcccbbba
  2. ddaca
  3. \(\varepsilon\)
  4. eadab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aabd,abdc,acbb,acbc,adda,ddab\}\)

  1. baac
  2. caaacdcbaba
  3. cccbaac
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaca,abad,abca,bacd,daaa\}\)

  1. dadbdac
  2. \(\varepsilon\)
  3. b
  4. cbcdc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,ae,cb,cc,ce,da\}\)

  1. cbae
  2. bda
  3. dcbbeea
  4. dba
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,bb,bc,cb,cc,c{\ltimes}\}\)

  1. bc
  2. bbc
  3. bca
  4. c
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ab,{\rtimes}aaa,{\rtimes}abc,aaac,aaca,acac,cacb,abc{\ltimes},acb{\ltimes},bc{\ltimes}{\ltimes},cb{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. aac
  2. acac
  3. cbc
  4. abc
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},{\rtimes}c,aa,ab,ac,ba,bc,ca,cb,a{\ltimes},c{\ltimes}\}\)

  1. bcabc
  2. \(\varepsilon\)
  3. baaaa
  4. ccaabc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaba,aabb,baba,bbba\}\)

  1. ab
  2. bbaaab
  3. b
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}ba,{\rtimes}ca,abb,aca,bbb,bbc,bcc,cab,cac,cca,bb{\ltimes},ba{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbcbaaa
  2. bacbabaa
  3. bbcc
  4. baacabc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,baa,bab,bba,bbb\}\)

  1. aabababa
  2. bab
  3. baab
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}c,aa,ab,ac,ba,ca,cb,b{\ltimes}\}\)

  1. cbbab
  2. c
  3. \(\varepsilon\)
  4. a
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,aaa,aab,aba,abb,baa,bab,bba,ab{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. abab
  2. bbaaaaaba
  3. \(\varepsilon\)
  4. baabba
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,aa,ab,ac,ba,bb,ca,cc,a{\ltimes}\}\)

  1. cacc
  2. babb
  3. acaacabba
  4. cc
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}aaa,{\rtimes}bab,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaab,aaba,abab,abba,baba,babb,bbab,bab{\ltimes},abb{\ltimes},ab{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. b
  3. bab
  4. bbaabab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ac,ba,bb,cc,cd,eb,ee\}\)

  1. dbaa
  2. \(\varepsilon\)
  3. dd
  4. a
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abaa,abba,acab,bccb,cbbb,cbcb,cccc\}\)

  1. bababc
  2. baccacaab
  3. \(\varepsilon\)
  4. aaabbabcab
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aba,abb,baa,bab,bba,bbb\}\)

  1. a
  2. \(\varepsilon\)
  3. abaaa
  4. b
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,{\rtimes}ba,acb,adc,bca,cad,cbc,dc{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. cc
  2. ba
  3. dcacdbb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}b{\ltimes}{\ltimes},{\rtimes}bba,{\rtimes}bab,{\rtimes}{\ltimes}{\ltimes}{\ltimes},abbb,babb,bbba,bba{\ltimes},ba{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. bba
  3. abbab
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,bb,bc,cd,db,dc,c{\ltimes}\}\)

  1. ca
  2. dc
  3. dbc
  4. bcbbad
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abac,abbb,acba,baba,babc,bcaa,ccab,ccac\}\)

  1. \(\varepsilon\)
  2. ccabaac
  3. b
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{daca,dbeb,ebbc,ebed,ecda\}\)

  1. cebeee
  2. abebdebe
  3. eaadd
  4. beeeccc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,b{\ltimes}\}\)

  1. b
  2. \(\varepsilon\)
  3. aab
  4. ab
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ba,bc,ca,dd\}\)

  1. bbacacaba
  2. cd
  3. dcbbbdbbc
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. baa
  2. aaaa
  3. bbabaaaabaa
  4. babaaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},aa,ab,ba,bb,a{\ltimes}\}\)

  1. bbab
  2. a
  3. aa
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}cb,{\rtimes}{\rtimes}ba,{\rtimes}baa,{\rtimes}cbc,{\rtimes}ba{\ltimes},aaab,aaba,abaa,baaa,bcaa,caaa,cbca,baa{\ltimes},aaa{\ltimes},ba{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. baaa
  2. baa
  3. ba
  4. aabb
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},abcb,babc,bacc,bcba,cbac,acc{\ltimes},cc{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bcbc
  2. ababcc
  3. c
  4. \(\varepsilon\)
  1. No
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ab,ba,bb,b{\ltimes}\}\)

  1. baa
  2. ab
  3. babbbb
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ba,{\rtimes}aa,aab,abb,baa,bab,bba,ab{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbabba
  2. aab
  3. b
  4. aa
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}ba,{\rtimes}{\rtimes}ca,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}cac,{\rtimes}bab,{\rtimes}ba{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaca,abaa,baac,baba,aca{\ltimes},cac{\ltimes},ba{\ltimes}{\ltimes},ac{\ltimes}{\ltimes},ca{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. acbc
  3. caaca
  4. bbac
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}b,{\rtimes}e{\ltimes},{\rtimes}bd,aad,aba,add,baa,bde,cda,dab,ddb,dec,ecd,db{\ltimes},b{\ltimes}{\ltimes},e{\ltimes}{\ltimes}\}\)

  1. a
  2. e
  3. ebecaeeedab
  4. dceacaaaa
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aca,bda,cbb,daa,dcb\}\)

  1. daa
  2. \(\varepsilon\)
  3. cbb
  4. b
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}b,aa,ac,ba,bb,bc,cb,cc,a{\ltimes},b{\ltimes}\}\)

  1. bbccacabbb
  2. cabba
  3. bbca
  4. ccb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}bb,{\rtimes}{\rtimes}ed,{\rtimes}{\rtimes}d{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}ed{\ltimes},{\rtimes}d{\ltimes}{\ltimes},{\rtimes}bbc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},addb,bbca,bcad,beea,cadd,dbee,ddbe,eea{\ltimes},ea{\ltimes}{\ltimes},ed{\ltimes}{\ltimes},d{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. eabecdd
  3. cacba
  4. dddaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,aba,acb,bba,cbb\}\)

  1. cca
  2. aabba
  3. \(\varepsilon\)
  4. a
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,aaba,aabb,abba,baab,baba,bbab,bbbb\}\)

  1. bbabb
  2. bbaa
  3. bbbbbb
  4. a
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,bb,ca,cc,cd\}\)

  1. cddcbccddd
  2. ab
  3. bdc
  4. bdcbacbacdc
  1. No
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,accb,baca,bcba,caca,cacc,ccbc\}\)

  1. bc
  2. \(\varepsilon\)
  3. cac
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}bb,{\rtimes}aa,aab,abb,baa,bba,bb{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. abbb
  2. \(\varepsilon\)
  3. ab
  4. babcc
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}cc,{\rtimes}{\rtimes}ba,{\rtimes}baa,{\rtimes}cc{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},aacc,abbc,acca,baac,bbca,bcaa,cabb,ccab,caa{\ltimes},cc{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},c{\ltimes}{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. \(\varepsilon\)
  2. b
  3. cbbc
  4. abbbaaaa
  1. Yes
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aabb,abaa,abab,abba,baaa,baab,babb\}\)

  1. aaaba
  2. b
  3. aaababb
  4. baba
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{adc,bdc,ccb,dbd\}\)

  1. \(\varepsilon\)
  2. abdab
  3. cdcdb
  4. dcadacad
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{ab,bb,bc,ca,cb,da,dd\}\)

  1. cbbbbd
  2. b
  3. dbac
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aac,abb,abc,aca,acb,bca,cca\}\)

  1. \(\varepsilon\)
  2. cc
  3. bbaaabcb
  4. bbcabbcc
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{bd,ca,cb,cc,da\}\)

  1. b
  2. ac
  3. \(\varepsilon\)
  4. cbc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ac,ba,bb,ca,cc\}\)

  1. \(\varepsilon\)
  2. cc
  3. c
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,aa,ac,ad,ae,ca,ce,da,dc,ed,e{\ltimes}\}\)

  1. cddecac
  2. aeaccccedbda
  3. ddcedbaceae
  4. ebedbdcceadc
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aed,bce,cea,ced\}\)

  1. e
  2. eabddb
  3. eeae
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,bba,bbc,bca,bcb,cba,cbc\}\)

  1. ccc
  2. aa
  3. ccbbaccaa
  4. cb
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}e,{\rtimes}{\rtimes}c,{\rtimes}cb,{\rtimes}ee,adb,dad,eda,eed,db{\ltimes},cb{\ltimes},b{\ltimes}{\ltimes}\}\)

  1. cc
  2. \(\varepsilon\)
  3. ee
  4. bd
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ba,bc,bd,cd,db\}\)

  1. cadccd
  2. cdcbdcadb
  3. b
  4. \(\varepsilon\)
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaab,aaba,abab,baab\}\)

  1. aaab
  2. a
  3. b
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}{\ltimes},{\rtimes}c{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ac,{\rtimes}ab,aca,acb,bca,cab,cac,cbc,ab{\ltimes},b{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. cc
  2. bb
  3. cabac
  4. abbcb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ad,bc,bd,da,db,dd\}\)

  1. b
  2. \(\varepsilon\)
  3. ccd
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aec,cac,cce,dad\}\)

  1. a
  2. \(\varepsilon\)
  3. d
  4. b
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aba,abb\}\)

  1. abbbbba
  2. abbbaabbabba
  3. aaaaabaabab
  4. bbbaaabaa
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}ab,{\rtimes}{\rtimes}b{\ltimes},{\rtimes}b{\ltimes}{\ltimes},{\rtimes}aaa,{\rtimes}abb,aaaa,aaab,aaba,abb{\ltimes},aba{\ltimes},ba{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bbaaba
  2. b
  3. \(\varepsilon\)
  4. a
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,bb,ca,cb\}\)

  1. cbcbb
  2. \(\varepsilon\)
  3. bb
  4. abcab
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aaa,aab,aca,acc,cab\}\)

  1. bac
  2. \(\varepsilon\)
  3. b
  4. bc
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{bbd,ccd,dcc,dda,ddb,ddc\}\)

  1. b
  2. adcacab
  3. abcbccb
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcd,bbdd,bddc,ccac,ddbc\}\)

  1. bab
  2. ccddbb
  3. \(\varepsilon\)
  4. dbacbaa
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}a{\ltimes},{\rtimes}bb,acc,bac,bba,cab,cca,ab{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. cba
  2. a
  3. bcccbbb
  4. bcaacba
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,{\rtimes}{\ltimes},ab,ac,bc,bd,cb,cd,da,db,dc,c{\ltimes}\}\)

  1. dbbaccbcbaac
  2. cbcd
  3. addaa
  4. ccdbd
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaaa,accc,babb,bbbc,bcab,cacc\}\)

  1. aac
  2. cbcaac
  3. abcaac
  4. cb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,ac,ae,ba,bb,ca,ec,ee,c{\ltimes}\}\)

  1. bbac
  2. bac
  3. baec
  4. d
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}a,ab,ba,bb,a{\ltimes}\}\)

  1. abaab
  2. b
  3. aba
  4. a
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{aaed,adba,beae,ccdb,cddb,ceab\}\)

  1. d
  2. eabcbdcbace
  3. ddbceccce
  4. \(\varepsilon\)
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}{\ltimes},{\rtimes}b,{\rtimes}c,aa,ac,ba,cb,c{\ltimes},b{\ltimes}\}\)

  1. acac
  2. \(\varepsilon\)
  3. bbbb
  4. cbba
  1. No
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}d,{\rtimes}dc,{\rtimes}ac,acb,bcb,bdc,cbc,cbd,dca,dc{\ltimes},ca{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. cddaa
  2. ba
  3. \(\varepsilon\)
  4. dabbbb
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ac,bb,bc,cb,cc\}\)

  1. a
  2. b
  3. \(\varepsilon\)
  4. abba
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}a{\ltimes},{\rtimes}{\rtimes}ad,{\rtimes}a{\ltimes}{\ltimes},{\rtimes}ade,aade,adea,deaa,eaad,ade{\ltimes},de{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},e{\ltimes}{\ltimes}{\ltimes}\}\)

  1. ade
  2. becccdc
  3. a
  4. cdee
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}b,aa,ab,ba,bb,b{\ltimes}\}\)

  1. bab
  2. \(\varepsilon\)
  3. bb
  4. b
  1. Yes
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}bb,aab,aba,abb,baa,bab,bba,bbb,bb{\ltimes},aa{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbbbbbbb
  2. b
  3. bbaabaaaba
  4. bbbbababaa
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}ac,{\rtimes}{\ltimes}{\ltimes},{\rtimes}bc,abb,acb,baa,bab,bba,bbb,bca,cac,cba,aa{\ltimes},ac{\ltimes},c{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bcac
  2. ac
  3. \(\varepsilon\)
  4. bcbccabc
  1. Yes
  2. Yes
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}a,{\rtimes}a{\ltimes},{\rtimes}ca,ade,bbc,bcc,cad,ccb,dbb,ded,edb,cb{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bb
  2. eadda
  3. a
  4. aaaacd
  1. No
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}aa,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}bb,{\rtimes}aab,{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}bb{\ltimes},aaba,abaa,baab,aab{\ltimes},ab{\ltimes}{\ltimes},bb{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. bb
  2. \(\varepsilon\)
  3. aabaa
  4. bbba
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}{\rtimes}d,{\rtimes}{\rtimes}dd,{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}a{\ltimes},{\rtimes}a{\ltimes}{\ltimes},{\rtimes}ddc,{\rtimes}{\ltimes}{\ltimes}{\ltimes},bada,bddb,cbdd,ccbd,dbad,dccb,ddba,ddcc,ada{\ltimes},da{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes}\}\)

  1. abdcbbab
  2. a
  3. abcc
  4. \(\varepsilon\)
  1. No
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{aab,abb,abc,acb,baa,bab,bcb,cba\}\)

  1. \(\varepsilon\)
  2. aacba
  3. b
  4. ccba
  1. Yes
  2. No
  3. Yes
  4. No

For each one of the strings below say whether it is generated by the following negative 2-gram grammar:
\(G^-\): \(\{aa,ab,ba,bb\}\)

  1. babba
  2. ab
  3. \(\varepsilon\)
  4. b
  1. No
  2. No
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 3-gram grammar:
\(G^-\): \(\{abc,ace,ade,bee,eba,ecc\}\)

  1. \(\varepsilon\)
  2. eedb
  3. b
  4. dcbdda
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{babb,bacc,bbaa,bcab,bcbc,ccab\}\)

  1. b
  2. \(\varepsilon\)
  3. ab
  4. a
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following positive 4-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\rtimes}{\ltimes},{\rtimes}{\rtimes}b{\ltimes},{\rtimes}{\rtimes}{\ltimes}{\ltimes},{\rtimes}{\rtimes}ba,{\rtimes}bab,{\rtimes}ba{\ltimes},{\rtimes}{\ltimes}{\ltimes}{\ltimes},{\rtimes}b{\ltimes}{\ltimes},aaaa,abba,baaa,babb,bbaa,aaa{\ltimes},ba{\ltimes}{\ltimes},aa{\ltimes}{\ltimes},a{\ltimes}{\ltimes}{\ltimes},b{\ltimes}{\ltimes}{\ltimes}\}\)

  1. b
  2. ba
  3. bbba
  4. a
  1. Yes
  2. Yes
  3. No
  4. No

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}c,{\rtimes}{\rtimes}b,{\rtimes}b{\ltimes},{\rtimes}ca,aab,aba,bac,caa,ac{\ltimes},ca{\ltimes},b{\ltimes}{\ltimes},a{\ltimes}{\ltimes},c{\ltimes}{\ltimes}\}\)

  1. b
  2. c
  3. cabcbc
  4. ca
  1. Yes
  2. No
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 2-gram grammar:
\(G^+\): \(\{{\rtimes}d,ac,ad,bd,cb,da,db,dc,dd,c{\ltimes}\}\)

  1. dc
  2. ddc
  3. adcbdaacdc
  4. dac
  1. Yes
  2. Yes
  3. No
  4. Yes

For each one of the strings below say whether it is generated by the following positive 3-gram grammar:
\(G^+\): \(\{{\rtimes}{\rtimes}a,{\rtimes}{\rtimes}b,{\rtimes}{\rtimes}{\ltimes},{\rtimes}a{\ltimes},{\rtimes}{\ltimes}{\ltimes},{\rtimes}ba,{\rtimes}bb,aba,abb,baa,bab,bba,aa{\ltimes},ba{\ltimes},a{\ltimes}{\ltimes}\}\)

  1. bbbaaaa
  2. aababb
  3. bbbbbba
  4. aaaab
  1. No
  2. No
  3. No
  4. No

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{adaa,bceb,ccab,cebb\}\)

  1. \(\varepsilon\)
  2. bcc
  3. cbcdcbeac
  4. addedb
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abcc,adaa,cdcc,daad,dccd\}\)

  1. \(\varepsilon\)
  2. cddbb
  3. cadadaba
  4. dbdbd
  1. Yes
  2. Yes
  3. Yes
  4. Yes

For each one of the strings below say whether it is generated by the following negative 4-gram grammar:
\(G^-\): \(\{abbc,cbbb,cccc,cdba\}\)

  1. ca
  2. dddd
  3. bdcd
  4. dbd
  1. Yes
  2. Yes
  3. Yes
  4. Yes