0 0 votes Theory of Computation finite-automata + – himgta 2.7k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 1 1 vote for binary string the value to be divisible by : 4 will have 3 states. 5 will have 5 states. so minimum states will be gcd(3,5) which is equal to 1 so we multiply the number of states in this case. 15 states. arvin answered Jul 30, 2018 • selected Jul 31, 2018 by srestha arvin comment Share Follow See all 28 Comments 28 28 Comments reply aambazinga commented Jul 30, 2018 reply Follow flag Why #states in case of divisible by 4 is 3?? It should be 4, no? For remainder 0,1,2,3. 0 0 replyShare abhishekmehta4u commented Jul 30, 2018 reply Follow flag Yes divisible by 4 we need 4 state 0 0 replyShare abhishekmehta4u commented Jul 30, 2018 reply Follow flag Answer should be 20 0 0 replyShare aambazinga commented Jul 30, 2018 reply Follow flag Yeah. 0 0 replyShare arvin commented Jul 30, 2018 reply Follow flag @aambazinga because when we construct the dfa it has 4 states. which can be minimised to 3 as two states apart from initial and final will be equal. so we will have 3states. 0 0 replyShare arvin commented Jul 30, 2018 reply Follow flag @abhishek bro it says about the divisibility of the binary string not the number of symbols... means we will make dfa for {0,100,1000,1100.... } 0 0 replyShare aambazinga commented Jul 30, 2018 reply Follow flag @arvin I'm honestly not getting what you are trying to do and say. Please elaborate 0 0 replyShare Shaik Masthan commented Jul 30, 2018 reply Follow flag @arvin, GCD formula used when ( d1 is divisible by d2 or d2 is divisible by d1 ) and the connector is or here d1 = 4 and d2 =5 ===> can't use GCD formula, use LCM formula ===> you can get 20 states.. so minimum states will be gcd(3,5) then result is 1, right? 0 0 replyShare arvin commented Jul 30, 2018 reply Follow flag @shaik masthan see now i updated. i forgot something. and did u got how dfa has 3 states. 0 0 replyShare arvin commented Jul 30, 2018 reply Follow flag @aambazinga i dont think u are minimising the dfa which will have 3 states. 0 0 replyShare aambazinga commented Jul 30, 2018 reply Follow flag Ok yeah, Q1,Q3 turns out to be equivalent states. 0 0 replyShare srestha commented Jul 31, 2018 reply Follow flag how Q1Q3 in one state? There will be 20 states 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag @srestha if we make a dfa than it gets reduced to 3 states. 0 0 replyShare aambazinga commented Jul 31, 2018 reply Follow flag @srestha, @arvin is right... I too had that confusion , but when I applied minimization, they actually come out to be equivalent states. And this is true to do because we require to check divisibility only, but not to find modulus. 1 1 replyShare arvin commented Jul 31, 2018 reply Follow flag @aambazinga it has a formula : when binary string is divisible by a value 2^k . than we get (k+1) states. 0 0 replyShare aambazinga commented Jul 31, 2018 reply Follow flag @arvin, bhai please give reference to any book or lecture where you learmed that.. I usually stuck in these kind of questions. 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag it was taught to us last year there are three case : 1) when divided by a factor of 2^k : states k+1 2) when divided by odd number (k) : states K 3)when divided by even number not equal to 2^k : divide the number by 2 unless an odd number comes and than add odd remaining value +no. of division eg : divided by 20 : 20/2 = 10 : 10/2 = 5 --> 5+1+1 states 1 1 replyShare Shaik Masthan commented Jul 31, 2018 reply Follow flag @ arvin, Sorry BRO.... Yes you are right.... I forget that it is a Binary Number.... i mistakenly assume it is decimal number.. i am really sorry bro... i wasted so much of your time. Thanks @Srestha Mam, For responding on this question on my request 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag @shaik masthan : its ok bro i am here too to make mistakes and learn. dont worry :) 0 0 replyShare srestha commented Jul 31, 2018 reply Follow flag @arvin Can u plz draw the minimized DFA I still doubt, is that formula correct? 0 0 replyShare srestha commented Jul 31, 2018 reply Follow flag I tried divisible by 2 or 3 and got ans 6 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag @srestha you can check it now :p :) 1 1 replyShare arvin commented Jul 31, 2018 reply Follow flag when we divide by 2 we will get 2 as per formula :2^k =k+1 2^1 : means : 1+1 = 2 state 0 0 replyShare srestha commented Jul 31, 2018 reply Follow flag @arvin ok :) See then minimized DFA for mod5 it has 4 states $a_{0},a_{2},\left \{ a_{1}a_{3} \right \},a_{4}$ right? 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag no mam @srestha its asking for binary values which is {0000,0101,1010,1111.......................} i think you are getting it wrong. u dont worry about the formulae they have been tested. 0 0 replyShare srestha commented Jul 31, 2018 reply Follow flag where wrong? See I drawn the table 0 0 replyShare arvin commented Jul 31, 2018 reply Follow flag no mam these two states wont be equal do this by calculating 0equi , 1equi, 2equi.... u can prove this. 1 1 replyShare srestha commented Jul 31, 2018 reply Follow flag yes, it have 5 states not 4 1 1 replyShare Please log in or register to add a comment.