Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (anonymous):

Find a regular expression that defines teh lang consisting of all strings of a's and b's in which the third character from teh end is a b

OpenStudy (experimentx):

*(a|b)(a|b)(a|b) the third last character is (a|b) right??

OpenStudy (anonymous):

noo the third last character must be a b

OpenStudy (experimentx):

lol ... a or b ??

OpenStudy (anonymous):

ohh a "b" hahahah i see ur confusion

OpenStudy (experimentx):

*b(a|b)(a|b) if b *a(a|b)(a|b) if a

OpenStudy (anonymous):

well like what do u think abt this one a*b*bab?

OpenStudy (experimentx):

it says it should begin with 'a' at some unknown point it must be b and the third last is b second last is a last is b

OpenStudy (anonymous):

righhht so that is correct to right? i mean there can be mannnnyyy answers

OpenStudy (experimentx):

yes .. this is one of the right answer. *b(a|b)(a|b) is the general pattern

OpenStudy (anonymous):

well if u use a|b then its either or b may not neccesarily be the 3 rd last letter

OpenStudy (experimentx):

use \( \large \color{Red} b \) in third last place use \( \large \color{Red} {(a|b)} \) in second last place use \( \large \color{Red} {(a|b)} \) in last place

OpenStudy (anonymous):

haha i am getting confused with all teh a's and b's hahhaah

OpenStudy (kinggeorge):

Couldn't you have more than 3 characters?

OpenStudy (kinggeorge):

As in, shouldn't abbabaabaabbbababaa be a valid expression?

OpenStudy (anonymous):

ya y not i mean like i am assuming there can be mannnnnny answerrrsss

OpenStudy (kinggeorge):

Well it seems like you could do something like \[\begin{matrix}(a|b)(a|b)(a|b)....(a|b)(b)(a|b)(a|b)\end{matrix}\]

OpenStudy (anonymous):

okkkk yaaaaa i seeee that okkkk

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!