Skip to main content

Pattern Matching and Regular Expressions

  • Chapter
Automata and Computability

Part of the book series: Undergraduate Texts in Computer Science ((UTCS))

  • 1174 Accesses

Abstract

Here are some interesting and important questions:

  • The goal of this course is to understand the foundations of computation. We will ask some very basic questions, such as

  • How hard is it to determine whether a given string x matches a given pattern α? This is an important practical question. There are very efficient algorithms, as we will see.

  • Is every set represented by some pattern? Answer: no. For example, the set

    $$\left\{ {{a^n}{b^n}|n \geqslant 0} \right\}$$

    is not represented by any pattern. We’ll prove this later.

  • Patterns α and γ are equivalent if L(α) = L(β). How do you tell whether α and β are equivalent? Sometimes it is obvious and sometimes not.

  • Which operators are jedundant? For example, we can get rid of ∊ since it is equivalent to ~(#@) and also to ∅*. We can get rid of @ since it is equivalent to #*. We can get rid of unary + since α+ is equivalent to αα*. We can get rid of #, since if S = {a1,...,an} then # is equivalent to the pattern

    $${a_1} + {a_2} + ... + {a_n}$$

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1977 Springer Science+Business Media New York

About this chapter

Cite this chapter

Kozen, D.C. (1977). Pattern Matching and Regular Expressions. In: Automata and Computability. Undergraduate Texts in Computer Science. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-85706-5_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-85706-5_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-85708-9

  • Online ISBN: 978-3-642-85706-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics