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
*(a|b)(a|b)(a|b) the third last character is (a|b) right??
noo the third last character must be a b
lol ... a or b ??
ohh a "b" hahahah i see ur confusion
*b(a|b)(a|b) if b *a(a|b)(a|b) if a
well like what do u think abt this one a*b*bab?
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
righhht so that is correct to right? i mean there can be mannnnyyy answers
yes .. this is one of the right answer. *b(a|b)(a|b) is the general pattern
well if u use a|b then its either or b may not neccesarily be the 3 rd last letter
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
haha i am getting confused with all teh a's and b's hahhaah
Couldn't you have more than 3 characters?
As in, shouldn't abbabaabaabbbababaa be a valid expression?
ya y not i mean like i am assuming there can be mannnnnny answerrrsss
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}\]
okkkk yaaaaa i seeee that okkkk
Join our real-time social learning platform and learn together with your friends!