in Theory of Computation
10,507 views
19 votes
19 votes

The number of states required by a Finite State Machine,to simulate the behavior of a computer with a memory capable of storing 'm' words, each of length 'n' bits is?

  1. $m \times 2^n$
  2. $2^{m+n}$
  3. $2^{mn}$
  4. $m+n$
in Theory of Computation
10.5k views

5 Answers

40 votes
40 votes
Best answer

We need to find the number of different configurations possible for memory and each of these will be a state in FSM. (At any time memory will be in one configuration and in next instance it either remains same or goes to a different configuration)

A word is of n bits. And we have m such words. So, total number of bits = m*n.

We need a separate state for each bit combination. So, no. of states = 2mn.

selected by
by

5 Comments

i don't think that is correct. I think it should be 2mn.

since a particular word can be in 2n states and since there are m such words.

Let's take an example. say we have 3 words of 2 bits each then :

word1         word2        word3    

00                  00              00

01                  01              01

10                  10              10

11                  11               11

so states of the machine can be represented as triplets :

{(0,0),(0,0),(0,0)} {(0,0),(0,0),(0,1)} {(0,0),(0,0),(1,0)} {(0,0),(0,0),(1,1)}

{(0,0),(0,1),(0,0)} {(0,0),(0,1),(0,1)} {(0,0),(0,1),(1,0)} {(0,0),(0,1),(1,1)}

 

{(0,0),(1,0),(0,0)} {(0,0),(1,0),(0,1)} {(0,0),(1,0),(1,0)} {(0,0),(1,0),(1,1)}

{(0,0),(1,1),(0,0)} {(0,0),(1,1),(0,1)} {(0,0),(1,1),(1,0)} {(0,0),(1,1),(1,1)}

these are different words combinations, even if one can be reached by rearranging the other. But since the registers are different so they are different combinations.
 

so there are 22+2 states for the first state of the first word.

so there are 22*(22+2) = 22+2+2 = 26

so for general case this should be 2m*n

@arjun sir please verify if i am correct if wrong state the reason.

28
28
You are correct. I hadn't considered words separately- corrected now. Thanks :)
1
1
@timojit does 0,0 in the configuartion represents that nothing is stored in that word
0
0

I dont understand why there are 22+2 states for the first state of the first word?

0
0

because first state of the first word (0,0) only contains 16 different states , i.e. 22*2, where 1st 22*2 contains all combination of (0,0),(0,0),(0,0) and 22*2 contains all combination of (0,0),(0,0),(0,0)

0
0
2 votes
2 votes
by
2 votes
2 votes

For every data here length is ‘n’ and memory's states are defined in terms of power of 2, 
Here the total memory capability for all the words = mn
Hence number of states are 2mn

1 vote
1 vote

Total m words. Each of size n bit.

Total m*n bits .

Number of states in FSM  are 2m*n
 

[ 1 bit need 1 flip-flop , represent 2 states, 0 or 1.]

2 Comments

Is it possible to simulate the behavior of computer using FSM?
0
0
Is FSM is DFA or NFA ??

If it is DFA,

If we have a word with n bits long, then we require (n+2) states to recoginese that.

Ex: to accept aa over alphabet, we need to 4 states.

So if we have one word of length n, we need (n+2) states DFA.

For other words also we require same number of states, then it would become (n+2) states.

Even after minimising the above DFA, we will have (n+2) states only,

please correct me if  iam wrong.
0
0
Answer:

Related questions