Top Banner
Theory of Computation Tree and Quantum Automata - A Brief Introduction (NTU EE) Tree and Quantum Automata Spring 2020 1 / 19
19

Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Jul 12, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Theory of ComputationTree and Quantum Automata - A Brief Introduction

(NTU EE) Tree and Quantum Automata Spring 2020 1 / 19

Page 2: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Why Tree Automata?

Foundations of XML type languages (DTD, XML Schema, RelaxNG...)Provide a general framework for XML type languagesA tool to define regular tree languages with an operationalsemanticsProvide algorithms for efficient validationBasic tool for static analysis (proofs, decision procedures in logic)...

E.g. Binary trees with an even number of a’s

(NTU EE) Tree and Quantum Automata Spring 2020 2 / 19

Page 3: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Binary Trees & Ranked Trees

Binary trees with an evennumber of a’sHow to write transitions?

I (even, odd) a→ evenI (even, even) a→ oddI ...

Ranked Tree:I Alphabet:{a(2), b(2), c(3),#(0)}

I a(k): symbol a with arity(a) =k

(NTU EE) Tree and Quantum Automata Spring 2020 3 / 19

Page 4: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Bottom-up (Ranked) Tree Automata

A ranked bottom-up tree automaton A consists of:Alphabet(A): finite alphabet of symbolsStates(A): finite set of statesRules(A): finite set of transition rulesFinal(A): finite set of final states (⊆ States(A))

where Rules(A) are of the form (q1, ..., qk)a(k)→ q;

if k = 0, we write ε a(0)→ q

(NTU EE) Tree and Quantum Automata Spring 2020 4 / 19

Page 5: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Bottom-up Tree Automata: An Example

(NTU EE) Tree and Quantum Automata Spring 2020 5 / 19

Page 6: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Top-down (Ranked) Tree Automata

A ranked top-down tree automaton A consists of:Alphabet(A): finite alphabet of symbolsStates(A): finite set of statesRules(A): finite set of transition rulesFinal(A): finite set of final states (⊆ States(A))

where Rules(A) are of the form q a(k)→ (q1, ..., qk);

if k = 0, we write ε a(0)→ q

Top-down tree automata also recognize all regular tree languages

(NTU EE) Tree and Quantum Automata Spring 2020 6 / 19

Page 7: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Top-down Tree Automata: An Example

(NTU EE) Tree and Quantum Automata Spring 2020 7 / 19

Page 8: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Expressive Power of Tree Automata

Theorem 1The following properties are equivalent for a tree language L:(a) L is recognized by a bottom-up non-deterministic tree automaton(b) L is recognized by a bottom-up deterministic tree automaton(c) L is recognized by a top-down non-deterministic tree automaton(d) L is generated by a regular tree grammar

(NTU EE) Tree and Quantum Automata Spring 2020 8 / 19

Page 9: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Deterministic Top-down Tree Automata

Deterministic top-down tree automata do not recognize all regular treelanguages

Example:

(NTU EE) Tree and Quantum Automata Spring 2020 9 / 19

Page 10: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Unranked Trees

δ(σ, q): specified by a regular expression (i.e., regular language).

(NTU EE) Tree and Quantum Automata Spring 2020 10 / 19

Page 11: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Quantum Automata

Qubits:A quantum bit can exist in a superposition of states. In general,α|0〉+ β|1〉, where α and β are complex numbers, satisfying|α|2 + |β|2 = 1.Any attempt to measure the state results in |0〉with probability|α|2, and |1〉with probability |β|2. After the measurement, thesystem is in the measured state!

(NTU EE) Tree and Quantum Automata Spring 2020 11 / 19

Page 12: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Quantum Entanglement

An n-qubit system can exist in any superposition of the 2n basisstates.

α0|000...000〉+ α1|000...001〉+ · · ·+ α2n−1|111...111〉

Sometimes such a state can be decomposed into the states ofindividual bits

1√2(|00〉+ |01〉) = |0〉 ⊗ 1√

2((|0〉+ |1〉))

But,1√2(|00〉+ |11〉)

is not decomposible, which is called an entangled state.

(NTU EE) Tree and Quantum Automata Spring 2020 12 / 19

Page 13: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Unitary Evolution

A quantum system that is not measured (i.e. does not interactwith its environment) evolves in a unitary fashion.That is, it’s evolution in a time step is given by a unitary linearoperation.Such an operator is described by a matrix U such that

UU∗ = I

where U∗ is the conjugate transpose of U.

(3 3 + i

2− i 2

)∗=

(3 2 + i

3− i 2

)

(NTU EE) Tree and Quantum Automata Spring 2020 13 / 19

Page 14: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Marix View of DFA

1

q1 q2 q3

0

0,1

1

0

Figure: A Finite Automaton M

Consider the following matrix representation:

Initial state I =

100

; final state F =

0 0 00 1 00 0 0

;

M0 =

1 0 00 0 10 1 0

; M1 =

0 0 01 1 10 0 0

.

(NTU EE) Tree and Quantum Automata Spring 2020 14 / 19

Page 15: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Matrix View of DFA

The computation q11→ q2

0→ q31→ q2 is represented by 0 0 0

1 1 10 0 0

· 1 0 0

0 0 10 1 0

· 0 0 0

1 1 10 0 0

· 1

00

= 0 0 01 1 10 0 0

· 1 0 0

0 0 10 1 0

· 0

10

= 0 0 01 1 10 0 0

· 0

01

=

010

As

010

T

·

0 0 00 1 00 0 0

· 0

10

=

010

T

·

010

= 1, the input

”101” is accepted.

(NTU EE) Tree and Quantum Automata Spring 2020 15 / 19

Page 16: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Quantum Automata

Quantum finite automata are obtained by letting the matrices Mσ

have complex entries. We also require each of the matrices to beunitary. E.g.

Mσ =

(−1 00 i

)If all matrices only have 0 or 1 entries and the matrices are unitary,then the automaton is deterministic and reversible.

(NTU EE) Tree and Quantum Automata Spring 2020 16 / 19

Page 17: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Quantum Automata

Consider the automaton in a one letter alphabet as:

The initial state |ψ0〉 = 1 · |0〉+ 0 · |1〉 = (1, 0)T

Maa =

(0 1−1 0

). Hence, upon reading aa, M’s state is

|ψ〉 =(

0 1−1 0

)·(

10

)=

(0−1

)= 0 · |0〉+−1 · |1〉

There are two distinct paths labelled aa from q1 back to itself, andeach has non-zero probability, the net probability of ending up inq1 is 0.The automaton accepts a string of odd length with probability 0.5and a string of even length with probability 1 if its length is not amultiple of 4 and probability 0 otherwise.

(NTU EE) Tree and Quantum Automata Spring 2020 17 / 19

Page 18: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Measure-once Quantum Automata

The accept state of the automaton is given by an N ×N projectionmatrix P, so that, given a N-dimensional quantum state |ψ〉 , theprobability of |ψ〉 being in the accept state is 〈ψ|P|ψ〉 = ‖P|ψ〉‖2.

In the previous example, P =

(0 00 1

)The probability of the state machine accepting a given finite inputstring σ = (σ0, σ1, · · · , σk) is given byPr(σ) = ‖PUσk · · ·Uσ1Uσ0 |ψ〉‖2. In the previous example, Pr(aa)=(

0−1

)T

·(

0 00 1

)·(

0−1

)= 1

A regular language is accepted with probability p by a quantumfinite automaton, if, for all sentences σ in the language, (and agiven, fixed initial state |ψ〉), one has p < Pr(σ).

(NTU EE) Tree and Quantum Automata Spring 2020 18 / 19

Page 19: Theory of Computation Tree and Quantum Automata - A Brief ...ccf.ee.ntu.edu.tw/~yen/courses/toc20/Chapter-X.pdfTheory of Computation Tree and Quantum Automata - A Brief Introduction

Language Accepted

Measure Many 1-way QFA: Measurement is performed after eachinput symbol is read.Measure-many model is more powerful than the measure-oncemodel, where the power of a model refers to the acceptancecapability of the corresponding automata.MM-1QFA can accept more languages than MO- 1QFA.Both of them accept proper subsets of regular languages.

(NTU EE) Tree and Quantum Automata Spring 2020 19 / 19