• 沒有找到結果。

Regular Operations I

N/A
N/A
Protected

Academic year: 2022

Share "Regular Operations I"

Copied!
10
0
0

加載中.... (立即查看全文)

全文

(1)

Regular Operations I

Regular operations can be used to study whether languages are regular or not

That is, these operations can help us to check if for a given language, whether there are finite automata to recognize it or not

We mainly consider three operations.

Assume A, B are given languages union

A ∪ B

(2)

Regular Operations II

concatenation

A ◦ B = {xy | x ∈ A, y ∈ B}

star:

A = {x1· · · xk | k ≥ 0, xi ∈ A}

(3)

Regular Operations III

If k = 0, what do we mean x1· · · xk? We define

ϵ : empty string in this situation

Thus

ϵ ∈ A

(4)

Regular Operations IV

Example

Σ = {a, . . . , z}

A = {good , bad } B = {boy , girl }

A ◦ B = {goodboy , . . .}

A : {ϵ, good , bad , goodgood , . . .}

We say an operation R is closed if the following property holds

if x ∈ A, y ∈ A, then xRy ∈ A

(5)

Regular Operations V

Example: N = {1, 2, . . .} is closed under multiplication

Th 1.25: regular languages are closed under the union operation

A1, A2 are regular languages

⇒A1 ∪ A2 is regular Proof

(6)

Regular Operations VI

Assume we are given two automata M1 = (Q1, Σ, δ1, q1, F1) M2 = (Q2, Σ, δ2, q2, F2)

Question: you want to think about why we can consider the same Σ

Idea: we construct a parallel machine to run two machines simultaneously

(7)

Regular Operations VII

Definition of our new machine M = (Q, Σ, δ, q0, F )

Q = {(r1, r2) | r1 ∈ Q1, r2 ∈ Q2} δ((r1, r2), a) = (δ1(r1, a), δ2(r2, a)) q0 = (q1, q2)

F = {(r1, r2) | r1 ∈ F1 or r2 ∈ F2} Example: combining

{w | w has an odd # 1’s}∪

{w | w has an odd # 0’s}

(8)

Regular Operations VIII

qe qo

1

0 0

1

se so

0

1 1

0

(9)

Regular Operations IX

qe, se

qe, so

qo, se

qo, so 0

0

1 1 1

1

0 0

Is this proof rigorously enough?

(10)

Regular Operations X

A formal proof should be done by induction. But we don’t provide it here

Th 1.26: closed under concatenation

If A, B are regular, then A ◦ B is regular But the proof is not easy

It’s unclear where to break the input

To easily do the proof, we introduce a new technique called nondeterminism

參考文獻

相關文件

We say that the series converges if the partial sums converge and denote the limit by.. It is usually not easy to determine whether a

You should identify the major operations Then check percentage of these operations From the results you draw some conclusions Let’s consider a good example (from P2 of Davis

[r]

In this paper we introduce a notion of a regular expression over infinite alphabets and show that a language is definable by an infinite alphabet regular expression if and only if it

By using this approach, the hamming distance is clearly lower than one in Fig.1, so it represents weights can help us to get more reliable value in order to determine whether

May not be scanned, copied, or duplicated, or posted to a publicly accessible website, in whole or in part.. It follows that the given series is

Therefore, we have seen that given a field K, there is a unique (up to isomorphism) algebraic closure, denoted K. Then it is convenient for our further study of roots

• A language has uniformly polynomial circuits if there is a uniform family of polynomial circuits that decide