This presentation is the property of its rightful owner.
1 / 19

# Simple Languages and Concatenation-State Machines PowerPoint PPT Presentation

Simple Languages and Concatenation-State Machines. Solidum 1997-2002 Acquired by IDT Corp. In 2002 Packet classification programmable chips Transmission-time speed Using state-machine technology Stateless stack automaton Hundreds of thousands of states

Simple Languages and Concatenation-State Machines

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

### Simple Languages and Concatenation-State Machines

• Solidum 1997-2002

• Acquired by IDT Corp. In 2002

• Packet classification programmable chips

• Transmission-time speed

• Using state-machine technology

• Stateless stack automaton

• Hundreds of thousands of states

• Algorithm time complexities were critical

• Possibility of reading more than one input symbol per memory cycle

## Simple Languages and Concatenation-State Machines

Joint work with WojtekFraczak (IDT), LeszekGasieniec (Liverpool), WojciechRytter (Warsaw), FeliksWelfeld (IDT) + MsC and PhD students

### Concatenation-State Machine (CSM)

• C = (S ,S, C, i, f, tS, tC)

• S - input alphabet

• S - switch (transition) states

• C – concatenation states

• i – initial state, i SC

• A – accept (terminal) state, A  SC

• tS – switch state transition function

tS: S x S  SC {A}

• tC – concatenation state transition function

tC: C  SC {A} x SC {A}

1

L = {abb, bba}

a

b

2

b

3

4

b

a

A

• Example 1

L = abaab

1

1

1

2

2

2

A

A

A

a

b

a

b

a

b

• Example 2

1

L = a + (bb)*a

b

a

2

b

A

• Example 3

### Concatenation-State Machine as a Compact Version of DSM

L = {a25}

11001

• Relation to:

• String compression

• Common sub-expressions

• in optimizing compilers

1

A

A

1

• Example 4

a

1

4

3

a

a

2

b

L = anbn

b

A

b

• Example 5

### Executing a CSM.

• Single-state (stateless) push-down automaton

• Acts on the input symbol and the top-of-stack symbol

• Each state of the CSM corresponds to a different stack symbol, but no symbol (or empty string) corresponds to the Accept state.

• When starting the execution, the stack contains the symbol of the initial state of the CSM

• For each switch state s of the CSM, its symbol is popped from the stack, input symbol i is read and a symbol of the transitions state tS(s,i) is pushed on the stack

• For each concatenation state c of the CSM, its symbol is popped from the stack, and two symbols c1 and c2 corresponding to the state successors of c, (c1, c2) = tC(c) are pushed on the stack, c2 on the top (no input symbol is read)

• The input string is accepted when it is completely read and the stack is empty

L = a + (bb)*a

input stack

b

ba

X

<

1

X

ba

Y

<

b

Y

a

ba

Z

X<

2

a

X<

Z

<

b

A

bbbba

b

L = a + (bb)*a

bba

1

X

b

b

b

b

Y

a

1

1

2

2

1

2

1

1

2

Z

b

b

a

A

A

A

A

A

A

b

a

### Converting a CSM to a grammar.

• Each state of the CSM, except the Accept state, corresponds to a different non-terminal symbol of the grammar. The Accept state corresponds to the empty string

• The initial state of the CSM corresponds to the axiom of the grammar

• For each transition tS (c1,i) = c2 a production rule

C1 iC2 is added to the grammar, with c1, c2 corresponding to C1, C2 respectively

• For each transition tC (c) = (c1, c2)a production rule

CC1C2 is added to the grammar, with c, c1, c2 corresponding to C, C1, C2respectively

### Converting a CSM to a grammar.

Example 6

bbbba

b

X bY

X a

Y ZX

Z b

L = a + (bb)*a

1

X

X bYbZXbbXbbbY

bbbZXbbbbXbbbba

By factorizing we get

X bY

X  a

Y bX

b

b

b

Y

a

1

1

2

2

1

2

Z

b

A

A

A

A

b

a

### Converting a CSM to a grammar.

Example 7

SaX

S bB

X aY

XbC

Y aZ

Y b

BCD

C EZ

D ZS

E XZ

SaX

S bB

X aY

XbC

Y aZ

Y b

BXZZZS

C XZZ

D ZS

E XZ

SaX

S bB

X aY

XbC

Y aZ

Y b

B aYZZZS

B bCZZZS

C aYZZ

C bCZZ

D bS

E aYZ

E bCZ

S

a

b

1

2

4

B

X

a

b

3

C

Y

D

a

A

E

Z

b

Deterministic Greibach Normal Form

### Simple languages and CSMs.

• Deterministic simple languages are generated by deterministic grammars in Greibach Normal Form

• The class of deterministic simple languages is equivalent to the class of languages acceptable by Concatenation State Machines

• The class of deterministic simple languages is acceptable by stateless pushdown deterministic automata

aaa

baa

aba

1

2

bb

bbb

aaa

aa

3

4

5

a

A

b

aab

-1

3

3

3

+2

1

2

0

+2

2

3

3

2

5

4

3

0

+2

+1

1

-1

A

1

3