Write a regular expression over {0,1} whose language contains only strings that do not end with 01. [closed]
up vote
-1
down vote
favorite
My answer to this is:
0*1*1ᵐ0* | m>0
but i realize that it may include a string of "01".
discrete-mathematics
closed as off-topic by amWhy, user21820, Alexander Gruber♦ Nov 30 at 3:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, user21820, Alexander Gruber
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-1
down vote
favorite
My answer to this is:
0*1*1ᵐ0* | m>0
but i realize that it may include a string of "01".
discrete-mathematics
closed as off-topic by amWhy, user21820, Alexander Gruber♦ Nov 30 at 3:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, user21820, Alexander Gruber
If this question can be reworded to fit the rules in the help center, please edit the question.
1
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
1
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
My answer to this is:
0*1*1ᵐ0* | m>0
but i realize that it may include a string of "01".
discrete-mathematics
My answer to this is:
0*1*1ᵐ0* | m>0
but i realize that it may include a string of "01".
discrete-mathematics
discrete-mathematics
asked Nov 28 at 11:10
cosmo
41
41
closed as off-topic by amWhy, user21820, Alexander Gruber♦ Nov 30 at 3:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, user21820, Alexander Gruber
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by amWhy, user21820, Alexander Gruber♦ Nov 30 at 3:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, user21820, Alexander Gruber
If this question can be reworded to fit the rules in the help center, please edit the question.
1
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
1
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41
add a comment |
1
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
1
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41
1
1
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
1
1
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
empty string | 1 | (0*1*)*(0|11)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
empty string | 1 | (0*1*)*(0|11)
add a comment |
up vote
1
down vote
empty string | 1 | (0*1*)*(0|11)
add a comment |
up vote
1
down vote
up vote
1
down vote
empty string | 1 | (0*1*)*(0|11)
empty string | 1 | (0*1*)*(0|11)
answered Nov 28 at 22:43
William Elliot
7,0422518
7,0422518
add a comment |
add a comment |
1
I think usually no $m$th powers restricted to $m>0$ can appear in a regular expression. [I may be wrong.]
– coffeemath
Nov 28 at 11:44
1
Firstly, as mentioned by coffeemath, no $m^{text{th}}$ power can appear in a regular expression, please revise the definition of regular expression. Secondly, to find a regular expression matching all string over ${0, 1}$ not ending with $01$, my hint would be to first find regular expression for these three cases: (Case 1) string with length $0$ (Case 2) string with length $1$ (Case 3) string with length $ge 2$. Can you find them?
– Alex Vong
Nov 28 at 12:41