Slide 11
Slide 11 text
twitter.com/jeanneboyarsky mastodon.social/@jeanneboyarsky
Sample solutions
11
One or more
• x+
• x{1,}
• xx*
• x{1}x*
• x{1,1}x*
• x{1}x{0,}
• x{1,1}x{0,}
• xx{0,}
• x{0,0},x{1,}
• (x|x)+
• etc
Zero or more
• x*
• x*x*
• x{0}x*
• x{0,}x*
• x{0,0}x*
• x*x{0}
• x*x{0,}
• x*x{0,0}
• x{0}x{0,}
• (x|x)+
• etc
Two
• xx
• x{2}
• x{2,2}
• x{1},x{1}
• x{1,1},x{1,1}
• x{0}x{2}
• x{0,0}x{2}
• x{0,0}x{2}
• x{2}x{0}
• (x|x){2}
• etc