Question: Write regular expressions that match the following string patterns. ( a ) ( 1 0 points ) Let Sigma = { a , b ,
Write regular expressions that match the following string patterns.
a points Let Sigma abcd be the alphabet of the strings. Let L be a languate consist of all strings made up of just as bs and ds including the empty string. So abd, aabdab, adabaa etc. should all match, but aababcad shouldnt match because it has a c in it Which regular expression represents L
b points Let Sigma abc be the alphabet of the strings. Let L be a language contains all strings that made up of at least two different kinds of symbols where one of them must be aso you cannot have a string such as aaa because it has only one kind, a but you can have a string such as abcabc because it has at least two kinds of it Which regular expression represents L
cbonus points Let Sigma ab Let L be a language such that all strings made up of as and bs that have an either even number of a or odd number of b This is OR condition so if it satisfy at least one condition, then it is acceptable.
So aabbbis acceptable as there are two as and three bs and aaabbb is also acceptable as there are odd number of bs even there are odd numbers of as Also, bb is acceptable as we count as an even number even there are even number of bs However, abb is not acceptable since there are odd number
of as and even number of bs which violoates both conditions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
