0
$\begingroup$

In Sedgewick and et al.'s Algorithms 4th ed., I found the following definition for a regular express:

A regular expression (RE) is either

  • Empty
  • A single character
  • A regular expression enclosed in parentheses
  • Two or more concatenated regular expressions
  • Two or more regular expressions separated by the or operator (|)
  • A regular expression followed by the closure operator (*)

However, item number 3 references back to the term (regular expression) that it's defining. Is it valid for a formal definition because it brings up a case for circular definition?

asked Sep 17 at 3:01
$\endgroup$

1 Answer 1

1
$\begingroup$

It's a recursive definition.

Exercise: Show that any formal language defined without recursion must be finite.

answered Sep 17 at 3:16
$\endgroup$
2
  • 1
    $\begingroup$ Counterexercise: show that any formal language defined with recursion can be defined without it. $\endgroup$ Commented Sep 17 at 5:52
  • 1
    $\begingroup$ Something something Van Wijngaarden. $\endgroup$ Commented Sep 17 at 6:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.