Jumping Finite Automata Alexander Meduna and Petr Zemek Brno University of Technology, Faculty of Information Technology IT4Innovations Centre of Excellence Božetěchova 2, 612 00 Brno, Czech Republic http://www.fit.vutbr.cz/ {meduna, izemek} Based on Alexander Meduna and Petr Zemek. Jumping Finite Automata. International Journal of Foundations of Computer Science (to appear in 2013). Supported by the IT4I Centre of Excellence CZ.1.05/1.1.00/02.0070.
Contents Introduction Definitions and Examples Results Concluding Remarks and Discussion Jumping Finite Automata 2 / 21
Finite Automata a b s c f a a a c b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f a a a c b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f a a c b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f a c b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f c b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f b b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f b b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f b b Jumping Finite Automata 3 / 21
Finite Automata a b s c f b Jumping Finite Automata 3 / 21
Finite Automata a b s c f Accepted! Jumping Finite Automata 3 / 21
Finite Automata a b s c f Accepted language: { a } { c }{ b } Jumping Finite Automata 3 / 21
Jumping Finite Automata s a r c b t b b c a c a Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t b b c a c a Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t b b c c a Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t b c c a Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t b c a Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t b c Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t c Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t Accepted! Jumping Finite Automata 4 / 21
Jumping Finite Automata s a r c b t Accepted language: { w {a, b, c} : w a = w b = w c } Jumping Finite Automata 4 / 21
Definitions Definition A general jumping finite automaton (GJFA) is a quintuple M = ( Q, Σ, R, s, F ) where Q is a finite set of states; Σ is the input alphabet; R is a finite set of rules of the form s is the start state; F is a set of final states. py q (p, q Q, y Σ ) Jumping Finite Automata 5 / 21
Definitions Definition A general jumping finite automaton (GJFA) is a quintuple M = ( Q, Σ, R, s, F ) where Q is a finite set of states; Σ is the input alphabet; R is a finite set of rules of the form s is the start state; F is a set of final states. Definition py q (p, q Q, y Σ ) If all rules py q R satisfy y 1, then M is a jumping finite automaton (JFA). Jumping Finite Automata 5 / 21
Definitions Continued Definition If x, z, x, z, y Σ such that xz = x z and py q R, then M makes a jump from xpyz to x qz, symbolically written as xpyz x qz Jumping Finite Automata 6 / 21
Definitions Continued Definition If x, z, x, z, y Σ such that xz = x z and py q R, then M makes a jump from xpyz to x qz, symbolically written as xpyz x qz n intuitively, a sequence of n jumps (n 0); mathematically, the nth power of intuitively, a sequence of jumps (possibly empty); mathematically, the reflexive-transitive closure of Jumping Finite Automata 6 / 21
Definitions Continued Definition If x, z, x, z, y Σ such that xz = x z and py q R, then M makes a jump from xpyz to x qz, symbolically written as xpyz x qz n intuitively, a sequence of n jumps (n 0); mathematically, the nth power of intuitively, a sequence of jumps (possibly empty); mathematically, the reflexive-transitive closure of Definition The language accepted by M, denoted by L(M), is defined as L(M) = { uv : u, v Σ, usv f, f F } Jumping Finite Automata 6 / 21
Example #1 Example The JFA M = ( {s, r, t}, {a, b, c}, R, s, {s} ) with R = { sa r, rb t, tc s } accepts L(M) = { w {a, b, c} } : w a = w b = w c Jumping Finite Automata 7 / 21
Example #1 Example The JFA M = ( {s, r, t}, {a, b, c}, R, s, {s} ) with R = { sa r, rb t, tc s } accepts L(M) = { w {a, b, c} } : w a = w b = w c For instance: bacbcsa Jumping Finite Automata 7 / 21
Example #1 Example The JFA M = ( {s, r, t}, {a, b, c}, R, s, {s} ) with R = { sa r, rb t, tc s } accepts L(M) = { w {a, b, c} } : w a = w b = w c For instance: bacbcsa bacrbc [sa r] Jumping Finite Automata 7 / 21
Example #1 Example The JFA with accepts For instance: M = ( {s, r, t}, {a, b, c}, R, s, {s} ) R = { sa r, rb t, tc s } L(M) = { w {a, b, c} : w a = w b = w c } bacbcsa bacrbc [sa r] bactc [rb t] Jumping Finite Automata 7 / 21
Example #1 Example The JFA with accepts For instance: M = ( {s, r, t}, {a, b, c}, R, s, {s} ) R = { sa r, rb t, tc s } L(M) = { w {a, b, c} : w a = w b = w c } bacbcsa bacrbc [sa r] bactc [rb t] bsac [tc s] Jumping Finite Automata 7 / 21
Example #1 Example The JFA with accepts For instance: M = ( {s, r, t}, {a, b, c}, R, s, {s} ) R = { sa r, rb t, tc s } L(M) = { w {a, b, c} : w a = w b = w c } bacbcsa bacrbc [sa r] bactc [rb t] bsac [tc s] rbc [sa r] Jumping Finite Automata 7 / 21
Example #1 Example The JFA with accepts For instance: M = ( {s, r, t}, {a, b, c}, R, s, {s} ) R = { sa r, rb t, tc s } L(M) = { w {a, b, c} : w a = w b = w c } bacbcsa bacrbc [sa r] bactc [rb t] bsac [tc s] rbc [sa r] tc [rb t] Jumping Finite Automata 7 / 21
Example #1 Example The JFA with accepts For instance: M = ( {s, r, t}, {a, b, c}, R, s, {s} ) R = { sa r, rb t, tc s } L(M) = { w {a, b, c} : w a = w b = w c } bacbcsa bacrbc [sa r] bactc [rb t] bsac [tc s] rbc [sa r] tc [rb t] s [tc s] Jumping Finite Automata 7 / 21
Example #2 Example The GJFA with accepts H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } Jumping Finite Automata 8 / 21
Example #2 Example The GJFA with accepts For instance: H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } bbsbaa Jumping Finite Automata 8 / 21
Example #2 Example The GJFA with accepts For instance: H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } bbsbaa bbf a [sba f ] Jumping Finite Automata 8 / 21
Example #2 Example The GJFA with accepts For instance: H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } bbsbaa bbf a [sba f ] f bb [f a f ] Jumping Finite Automata 8 / 21
Example #2 Example The GJFA with accepts For instance: H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } bbsbaa bbf a [sba f ] f bb [f a f ] f b [f b f ] Jumping Finite Automata 8 / 21
Example #2 Example The GJFA with accepts For instance: H = ( {s, f }, {a, b}, R, s, {f } ), R = { sba f, f a f, f b f } L(H) = { a, b } { ba }{ a, b } bbsbaa bbf a [sba f ] f bb [f a f ] f b [f b f ] f [f b f ] Jumping Finite Automata 8 / 21
Power of GJFAs and JFAs Theorem Let K be an arbitrary language. Then, K is accepted by a JFA only if K = perm(k ). Jumping Finite Automata 9 / 21
Power of GJFAs and JFAs Theorem Let K be an arbitrary language. Then, K is accepted by a JFA only if K = perm(k ). Proof Idea When using pa q, a can appear on any position. Jumping Finite Automata 9 / 21
Power of GJFAs and JFAs Theorem Let K be an arbitrary language. Then, K is accepted by a JFA only if K = perm(k ). Proof Idea When using pa q, a can appear on any position. Corollary There is no JFA that accepts {a, b} {ba}{a, b}. Jumping Finite Automata 9 / 21
Power of GJFAs and JFAs Theorem Let K be an arbitrary language. Then, K is accepted by a JFA only if K = perm(k ). Proof Idea When using pa q, a can appear on any position. Corollary There is no JFA that accepts {a, b} {ba}{a, b}. Theorem GJFAs are strictly stronger than JFAs. Jumping Finite Automata 9 / 21
Power of GJFAs and JFAs Theorem Let K be an arbitrary language. Then, K is accepted by a JFA only if K = perm(k ). Proof Idea When using pa q, a can appear on any position. Corollary There is no JFA that accepts {a, b} {ba}{a, b}. Theorem GJFAs are strictly stronger than JFAs. Proof Idea The language {a, b} {ba}{a, b} is accepted by the GJFA from Example #2. Jumping Finite Automata 9 / 21
Relations Between Language Families Jumping Finite Automata 10 / 21
Relations Between Language Families {ab, ba} Jumping Finite Automata 10 / 21
Relations Between Language Families {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b = w c } {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b = w c } {a, b} {ba}{a, b} {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b = w c } {a, b} {ba}{a, b} {a} {b} {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b = w c } {a n b n : n 0} {a, b} {ba}{a, b} {a} {b} {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Relations Between Language Families {w : w a = w b = w c } {a n b n c n : n 0} {a n b n : n 0} {a, b} {ba}{a, b} {a} {b} {w : w a = w b } {a} {ab, ba} {ab} Jumping Finite Automata 10 / 21
Further Topics of Investigation By analogy with finite automata: removal of ε-moves (p q and qa r pa r) making JFAs deterministic Jumping Finite Automata 11 / 21
Further Topics of Investigation By analogy with finite automata: removal of ε-moves (p q and qa r pa r) making JFAs deterministic Theorem Every unary language accepted by a JFA is regular. Jumping Finite Automata 11 / 21
Further Topics of Investigation By analogy with finite automata: removal of ε-moves (p q and qa r pa r) making JFAs deterministic Theorem Every unary language accepted by a JFA is regular. Proof Idea In unary languages, it does not matter where the automaton jumps. Jumping Finite Automata 11 / 21
Further Topics of Investigation By analogy with finite automata: removal of ε-moves (p q and qa r pa r) making JFAs deterministic Theorem Every unary language accepted by a JFA is regular. Proof Idea In unary languages, it does not matter where the automaton jumps. Corollary The language of primes { a p : p is a prime number } cannot be accepted by any JFA. Jumping Finite Automata 11 / 21
Closure Properties Theorem JFA is closed under union. Jumping Finite Automata 12 / 21
Closure Properties Theorem JFA is closed under union. Proof We have: Two JFAs M 1 = (Q 1, Σ 1, R 1, s 1, F 1 ) M 2 = (Q 2, Σ 2, R 2, s 2, F 2 ) ( Q1 Q 2 = ) We need: JFA H = (Q, Σ, R, s, F) such that L(H) = L(M 1 ) L(M 2 ) Construction: Q = Q 1 Q 2 {s} Σ = Σ 1 Σ 2 R = R 1 R 2 {s s 1, s s 2 } F = F 1 F 2 ( s / Q1 Q 2 ) Jumping Finite Automata 12 / 21
Closure Properties Continued Theorem JFA is not closed under concatenation. Jumping Finite Automata 13 / 21
Closure Properties Continued Theorem JFA is not closed under concatenation. Proof Consider K 1 = {a} and K 2 = {b}. The JFA M 1 = ({s, f }, {a}, {sa f }, s, {f }) accepts K 1. The JFA M 2 = ({s, f }, {b}, {sb f }, s, {f }) accepts K 2. However, there is no JFA that accepts K 1 K 2 = {ab}. Jumping Finite Automata 13 / 21
Closure Properties Summary GJFA JFA union + + intersection + concatenation intersection with reg. lang. complement + shuffle? + mirror image? + Kleene star? Kleene plus? substitution regular substitution finite substitution + homomorphism + ε-free homomorphism + inverse homomorphism + + Jumping Finite Automata 14 / 21
Decidability Summary GJFA JFA membership + + emptiness + + finiteness + + infiniteness + + Jumping Finite Automata 15 / 21
An Infinite Hierarchy of Language Families Definition A GJFA M = (Q, Σ, R, s, F) is of degree n, where n 0, if py q R implies that y n. Jumping Finite Automata 16 / 21
An Infinite Hierarchy of Language Families Definition A GJFA M = (Q, Σ, R, s, F) is of degree n, where n 0, if py q R implies that y n. Example The GJFA M = ({s, p, f }, {a, b, c}, R, s, {f }) with R = { sabc p, pcc f, f a f } is of degree 3. Jumping Finite Automata 16 / 21
An Infinite Hierarchy of Language Families Definition A GJFA M = (Q, Σ, R, s, F) is of degree n, where n 0, if py q R implies that y n. Example The GJFA M = ({s, p, f }, {a, b, c}, R, s, {f }) with R = { sabc p, pcc f, f a f } is of degree 3. GJFA n the family of languages accepted by GJFAs of degree n Jumping Finite Automata 16 / 21
An Infinite Hierarchy of Language Families Definition A GJFA M = (Q, Σ, R, s, F) is of degree n, where n 0, if py q R implies that y n. Example The GJFA M = ({s, p, f }, {a, b, c}, R, s, {f }) with R = { sabc p, pcc f, f a f } is of degree 3. GJFA n the family of languages accepted by GJFAs of degree n Theorem GJFA n GJFA n+1 for all n 0 Jumping Finite Automata 16 / 21
Left and Right Jumps Definition A GJFA makes a left jump from wxpyz to wqxz by py q: wxpyz l wqxz where w, x, y, z Σ. Jumping Finite Automata 17 / 21
Left and Right Jumps Definition A GJFA makes a left jump from wxpyz to wqxz by py q: wxpyz l wqxz where w, x, y, z Σ. Definition A GJFA makes a right jump from wpyxz to wxqz by py q: wpyxz r wxqz where w, x, y, z Σ. Jumping Finite Automata 17 / 21
Left and Right Jumps Definition A GJFA makes a left jump from wxpyz to wqxz by py q: wxpyz l wqxz where w, x, y, z Σ. Definition A GJFA makes a right jump from wpyxz to wxqz by py q: wpyxz r wxqz where w, x, y, z Σ. l GJFA l JFA r GJFA r JFA GJFAs using only left jumps JFAs using only left jumps GJFAs using only right jumps JFAs using only right jumps Jumping Finite Automata 17 / 21
Left and Right Jumps Results Theorem rgjfa = r JFA = REG Jumping Finite Automata 18 / 21
Left and Right Jumps Results Theorem rgjfa = r JFA = REG Proof Idea r JFA = REG r GJFA = REG simulating a finite automaton simulating a general finite automaton Jumping Finite Automata 18 / 21
Left and Right Jumps Results Theorem rgjfa = r JFA = REG Proof Idea r JFA = REG r GJFA = REG simulating a finite automaton simulating a general finite automaton Theorem ljfa REG Jumping Finite Automata 18 / 21
Left and Right Jumps Results Theorem rgjfa = r JFA = REG Proof Idea r JFA = REG r GJFA = REG simulating a finite automaton simulating a general finite automaton Theorem ljfa REG Proof Idea with accepts M = ( {s, p, q}, {a, b}, R, s, {s} ) R = { sa p, pb s, sb q, qa s } l L(M) = { w : w a = w b } Jumping Finite Automata 18 / 21
A Variety of Start Configurations Definition Let M = (Q, Σ, R, s, F) be a GJFA. Set b L(M) = {w Σ : sw f with f F} (beginning) a L(M) = {uv : u, v Σ, usv f with f F} (anywhere) e L(M) = {w Σ : ws f with f F} (end) Jumping Finite Automata 19 / 21
A Variety of Start Configurations Definition Let M = (Q, Σ, R, s, F) be a GJFA. Set b L(M) = {w Σ : sw f with f F} (beginning) a L(M) = {uv : u, v Σ, usv f with f F} (anywhere) e L(M) = {w Σ : ws f with f F} (end) b GJFA a GJFA e GJFA b JFA a JFA e JFA GJFAs starting at the beginning GJFAs starting anywhere GJFAs starting at the end JFAs starting at the beginning JFAs starting anywhere JFAs starting at the end Jumping Finite Automata 19 / 21
A Variety of Start Configurations Definition Let M = (Q, Σ, R, s, F) be a GJFA. Set b L(M) = {w Σ : sw f with f F} (beginning) a L(M) = {uv : u, v Σ, usv f with f F} (anywhere) e L(M) = {w Σ : ws f with f F} (end) b GJFA a GJFA e GJFA b JFA a JFA e JFA GJFAs starting at the beginning GJFAs starting anywhere GJFAs starting at the end JFAs starting at the beginning JFAs starting anywhere JFAs starting at the end Observations: a L(M) = L(M) a GJFA = GJFA and a JFA = JFA Jumping Finite Automata 19 / 21
A Variety of Start Configurations Results Theorem a JFA b JFA Jumping Finite Automata 20 / 21
A Variety of Start Configurations Results Theorem a JFA b JFA Proof Idea The JFA M = ( {s, f }, {a, b}, {sa f, f b f }, s, {f } ) satisfies b L(M) = {a}{b} ({a}{b} / a JFA). Jumping Finite Automata 20 / 21
A Variety of Start Configurations Results Theorem a JFA b JFA Proof Idea The JFA M = ( {s, f }, {a, b}, {sa f, f b f }, s, {f } ) satisfies b L(M) = {a}{b} ({a}{b} / a JFA). Theorem a GJFA b GJFA Jumping Finite Automata 20 / 21
A Variety of Start Configurations Results Theorem a JFA b JFA Proof Idea The JFA M = ( {s, f }, {a, b}, {sa f, f b f }, s, {f } ) satisfies b L(M) = {a}{b} ({a}{b} / a JFA). Theorem a GJFA b GJFA Theorem e GJFA = a GJFA and e JFA = a JFA Jumping Finite Automata 20 / 21
Conclusion and Open Problem Areas closure properties of GJFA (shuffle, Kleene star, Kleene plus, and mirror image) other decision problems of GJFA and JFA, like equivalence, universality, inclusion, or regularity the effect of left jumps to the power of JFAs and GJFAs (we only know that l JFA REG ) strict determinism applications: verification of a relation concerning the number of symbol occurrences (genetics) Jumping Finite Automata 21 / 21
Discussion