![]() |
![]() |
#1 (permalink) |
Crazy
Location: Raleigh, NC
|
Finite Automata question
If I am supposed to define a finite state machine for an expression described as:
w is in (0,1)* and |w|[0] mod 3 = 1 what languages does that machine accept? My main question is, what does the |w|[0] mean? The []'s mean subscript... Thanks
__________________
"Good artists copy, great artists steal." - Pablo Picasso |
![]() |
![]() |
#2 (permalink) |
Addict
Location: Grey Britain
|
Hmm. Don't know for certain about the notation in this specific context, but the |w| would mean the absolute value of w in the only context I've come across it before. That is to say take your value of w and get rid of any minus sign if there is one.
if w=x; |w|=x if w=-x; |w|=x easy
__________________
"No one was behaving from very Buddhist motives. Then, thought Pigsy, he was hardly a Buddha, nor was he a monkey. Presently, he was a pig spirit changed into a little girl pretending to be a little boy to be offered to a water monster. It was all very simple to a pig spirit." |
![]() |
![]() |
#3 (permalink) |
Insane
|
| also means OR
W[0] is the initial case... So you have to accept: any number in the 0-1 range, or a number divisible by 3 but only if its the initial number... so: Init: Nmod3 -> Acceptor .......0<N<1 -> Acceptor ......else -> fail and no other states Transitions: 0<N<1 -> Acceptor N<0|N>1 -> Fail and no other state Something like that? |
![]() |
Tags |
automata, finite, question |
|
|