How does “δ:Q×Σ→Q” read in the definition of a DFA (deterministic finite automaton)?

δ is like a mathematical function called the transition function . Something like. z = f(x, y) A function in mathematical defines mapping of elements in one set to another set. In function set of input arguments are called Domain of a function and output is the rage. [ANSWER]    In expression “δ:Q×Σ → Q”, … Read more

What is the language of this deterministic finite automata?

How to write regular expression for a DFA In any automata, the purpose of state is like memory element. A state stores some information in automate like ON-OFF fan switch. A Deterministic-Finite-Automata(DFA) called finite automata because finite amount of memory present in the form of states. For any Regular Language(RL) a DFA is always possible. … Read more

Example of Non-Linear, UnAmbiguous and Non-Deterministic CFL?

“IN CONTEXT OF CHOMSHY CLASSIFICATION OF FORMAL LANGUAGE” (1) L3 = {wwR | w ∈ {a, b}* } Language L3 is a Non-Deterministic Context Free Language, its also Unambiguous and Liner language. (2) Lp is language of parenthesis matching. There are two terminal symbols “(” and “)”. Grammar for Lp is: S → SS S … Read more

Is there a typical state machine implementation pattern?

I prefer to use a table driven approach for most state machines: typedef enum { STATE_INITIAL, STATE_FOO, STATE_BAR, NUM_STATES } state_t; typedef struct instance_data instance_data_t; typedef state_t state_func_t( instance_data_t *data ); state_t do_state_initial( instance_data_t *data ); state_t do_state_foo( instance_data_t *data ); state_t do_state_bar( instance_data_t *data ); state_func_t* const state_table[ NUM_STATES ] = { do_state_initial, do_state_foo, … Read more