Conversion of NFA to DFA (Example 2)
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- TOC: Problem Number 2 on Conversion of Non-deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).
Topics discussed:
This lecture shows how to convert a given NFA to its equivalent DFA using the Subset Construction method.
Full Course on TOC: goo.gl/f4CmJw
Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
Follow me on Instagram: @jaiz_itech (bit.ly/2M3xyOa)
Contribute: www.nesoacademy...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy...
Website ► www.nesoacademy...
Forum ► forum.nesoacad...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#TheoryOfComputation #TOCByNeso #NFAtoDFA #NFA #DFA #AutomataTheory
All the best for tomorrow's exam mate😂
Thanks bro my exam is tommorow
thanks lol
🤣👍
lol my exam after 10 hours
I'm going to exam hall while watching 😂
after 6 years ,still helping passing semester exams.
fr brother
yeh!
very true
True bro
Passing!! bhai isse padke to top hai
Millions of thanks to you dear sir. Your tutorial is the best material to learn "Theory of Computation"
i love it when he asks "what is the meaning of this?". my gut reaction is of "i dont know, its not my fault"
Is this a reference to something?
no its just a funny reaction
lol.. relatable enough..
lmao so true
😂😂😂
ans : should not start with 'ba' and must have odd no of b(s) at the end
correct!! Thanks
But abab is accepted ?
@@dheepakraaj8352 strings with not starting with ba and having odd no of b's and ending with odd no. of b's
for ababab, it is wrong according to your condition
@@paramsavalia7900 yeah you're right
These examples are fantastic. Thanks for explaining it step-by-step!
Right? It really helps having every detail explained clearly, so I can see what the process actually is. Was about pulling my hair out doing my class assignment because my notes weren't the best.
2 years back this day,best tutorial ever
still the best lol
Assignment Answer could be:
L = {Set of all strings over (a,b) that ends with 'b' but does not start with 'ba' and has odd number of 'b' incase of no 'a' and does not contain 'ababa'}
For both DFA abd NFA : {set of all strings over (0, 1) that does not start with 'ba' and ends with 'b' and has odd number of 'b'}
1) ends with an odd number of b’s
2) cannot start with “ba”
3) cannot contain “baba” after an even number of b’s or any number of a’s
bbb is answer according to your logic but it will fail
So it think answer should be {b, does not start with 'ba' and ends with 'ab' and has odd number of 'b'}
@@dakshdixit7286 So, what is right task done in this question?
@@avinashmishra9163 i wrote in my comment
@@dakshdixit7286 How does bbb fail it is in the accepting state.
I think its {dont start with ba, end with b or ab}
It accepts the string which satisfies following conditions: -
1. It should not start with 'ba'.
2. Total Number of b's in the string should be odd.
3. The string should end with odd number of b's.
Are you sure with your 2. sentence. Try "abaab".
abab is accepted
This question came to my university paper. Thanks for the help 🌟
The Q are really helping clearing the concept. Even after 7 years it's still helpful ❤
i am really a fan of your teaching...such complicated topics are being taught in an easy and simply wap...HATS OFF to you sir...Lots of love from the bottom of my heart.....
The given NFA and it's equivalent DFA accepts any strings made with {a, b} and that must have a single 'b' at the end.
Thanks for the lecture sir.
---------
incorrect try baab
1) ends with an odd number of b’s
2) cannot start with “ba”
3) cannot contain “baba” after an even number of b’s or any number of a’s
Correct
You're so genious
#3 is not correct, "bbabab" is accepted.
i.e strings ends with 'a((b)^n+1) ; n={0,1,....}
Mayurdeep Pathak thats 1 b... thats an odd number of b's
answer: case1 : strings can contain only one character 'b' ,
case 2: start with 'a' followed by as much 'a' as you want and end with an odd number of 'b's
it can also accept strings with no 'a's and only odd no. of 'b'.
like if you see, it can accept 'b' or 'bbb' or 'bbbbb' and so on..
@@smortlogician9258 yes That is exactly what i was about to say
@@smortlogician9258 so it would be 3 cases?
@@stefangjorgjevski1990 no still 2 cases. As a single b is included in the case of odd no
Of bs
@@stefangjorgjevski1990 I think the best answer would be that this FSM accepts string of the form (a^n)(b^m) where n is a whole no. and m is a natural number
Assignment Answer could be:
L = {Set of all strings over (a,b) that ends with 'b' but does not start with 'ba' and has odd number of 'b' incase of no 'a' and does not contain 'ababa'}
Strings which are accepted in NFA and DFA both are -
1. Only b.
2. End with b.
3. End with ab.
wrong,, fails for ababab ,bb,baab etc etc
Great video! Assignment question answer: It takes a string ending with odd number of b to reach it's final state.
But in some cases b Is even bro,so I think so the result will end with b.
@@lokeshyanamandra7775 no it takes only odd number of b's
try "abbabab"
I think it accept every string ending with b
@@AcezeroGame yeah its string ending with b
So answer of the last question is :
string must contain odd number of b's after the first 'a' from the right side and also it must not contain odd number of b's before first 'a' from the left side.
all string which follow the above constraint will accept by the given NFA
please correct me, if I'm wrong.
i think -> The given NFA and it's equivalent DFA accepts any strings made with {a, b} and that must have a single 'b' at the end.
try input abab --where no odd numbers of b is present.
Feel free to correct me if you think i'm making any mistake.
Thanks Neso Academy you are doing a great job for students like us. 👍
Thanks a lot. Today is my exam. I took my preparation through your lecture.
For both DFA abd NFA, {set of all strings over (a, b) that ends with odd number of 'b'.}
it accepts "abab" though. (you've probably already passed atc lol but just saying)
doesn't accept babb
Assignment answer. String cannot start with 'ba', ends with odd number of b's or at most 2 consecutive 'ab's
{a*b, any number of 'a' end with odd number of 'b'}
it accepts strings that start with a*n, n=0,1,2.. and followed by b*n/2 != 0
but it can also accept strings that start with 'b', no?
Ans :-
1. it will take odd numbers of 'b'
2. it will take odd number of 'b' end will be followed by 'ab'
example :- ''bbb', 'bbbab' this will be accpected by the DFA
Nah bro, abab is also accepted in that dfa , according to me it's the collection of string ends with b
@@arsh5587 i mentioned end with ab.... That abab ends with ab..... So it is accepted
@@dereck2199 yeH u r right but b can be even also
The language accepts strings
1. Doesn't start with 'ba' AND
2. Odds number of 'b' in sequence from the ends
That is not correct according to your explanation ababab should be accepted.
But your answer is close. Some modification is required
My answer: All words ending in "b", can't start with "ba", can't contain "baba" (all applied at the same time)
Example words that work: b, a(a)b, bb(a)b, bbbbb(bb), a(a)baa(a)b, bb(a)baab;
Example words that break the automat: ababa, ba, a(a)baba;
Note: Brackets symbolize periods such as in some representations of rational numbers.
"bb" is also excluded. Both the DFA and NFA representation do not accept any example words that end with the input "abb"
The answer should be: (a +(a+bb)b*a + bb)*b
In order to do this, you need to first watch lecture 51.
thanks
It's ans is the strings that ends with odd no of B
Because it accepts every string that has odd no of B and doesnt focus on the no of a and b it had in between
string abab is accepted.what now ;-
NFA : set of all strings over {a,b} that ending with b
DFA:set of string b or atleast one 'a' followed by a 'b'
aabb?
The machine accepts the string 'b' or a string of at least one 'a' followed by a 'b'.
THANK YOU FOR YOUR EXISTENCE
Hi
Best tutor ever on YT
L = { set of all strings over (a,b) that contain just 'b' or that starts with 'a' and ends with 'a*b' or that starts with 'bb' and ends with 'a*b'}
Neso academy is such a life saver
It accepts the String start from a and nth number of a's and ends with b or String starts with b followed by b and nth number of a's and end with b.
Why b and not nth number of b's?
thank you so much you really saved me ,i have an exam next week and i'm ready because of you
Using Arden's Theorem on Above DFA, I get my regular expression solution as:
L = ( (b) + ( a + bb )(a + bb + baa + babb)*(bab) )
Which is 100% correct but help me out with reducing it...
To claritfy my answer in first bracket there option between either 'b' or whole right side term.
in that term, there's three concatinated strings.
1st string has two options 'a' or 'bb'
2nd string has 4 options which is starred (*) which means it can be used 0 or more times.
3rd string is fixed with 'bab'
It's a dad of all channels to understand kinly the Automata &TOC
GREAT EXPLANATION SIR! YOU MADE IT VERY SIMPLE AND EASY.
This guy saved my life.
YOU MUST TELL THE ANSWERS OF THE ASSIGNMENT YOU HAVE GIVEN IN YOUR VIDEOS ,
I think it’s answer is that “the string that either end with ‘b’ or ‘ab’”.
@@sundarraj6509 you are correct but there's one more.. the number of ' b ' should be odd, because even number of ' b ' ends in the state AB which is not the final state.
@@Adithyan7274 The machine accepts string "abab" so i guess there's more to it than just odd numbers of "b".
i think if the number of 'b' is either prime or odd then it's accepted by the machine.
@@abelii8726 but 'abbbab' is also accepted
far the best video explanation with an example for the conversion of NFA to DFA. thank you so much for this !!!!!!
Bhai aap kon se college se the? Or aapka college me placements ka kya scene tha/hai, Or aapka placement hua?
L: {accepts the strings which neither start or end with 'ba'}
Thank you Sir. When I learn with your videos , I understand everything thing.
your videos I just awesome, no words god-level explanation with full concept
Neso academy is heart of csit students.
Bhai aap kon se college se the? Or aapka college me placements ka kya scene tha/hai, Or aapka placement hua?
i first time create diagram by myself feeling good. Thank you sir. Allah-humma-Barik to you are your family.
I think he is not a Muslim ....
the string that only ends with odd number of b is allowed
and if the string starts with b and has to contain a , then their must be at least 2 b in the start
On condition and---- ab🤔?? And for odd number abbbab??
@@kingbond470 the string that contain odd no. of b at end
@@shivamjaiswal7950 abbbab??
Thank you so much.... I express my sincere gratitude to you.
After 6 years, still helping me
all strings ending with b or odd no of b's or a followed by odd no of b's
Starting with a and ending with odd b,s OR starting and ending with a 'b' only
this and union, starts with even b's followed by infinite a's with even b's and ends with b.
way much better than my lecturer thanks a lot.
string that accepts all the string over {a,b} that starts from a & must end with ab
It's 2021 , and tomorrow is my exam I have no worries after watching these videos
I think that this DFA/NFA accepts all strings which end with b^k sub string where k is an odd number.
L={set of all string over 'a' and 'b' that ends with 'ab'}
it is very very very good tutorial live in ethiopia
I found out NFA is stated based on the current input. The DFA has a unique transition from each state to every input. Thanks a million. ❤️🙏
Today I have a final exam. I hope I will get an A+
L={set of all strings with 0 or a's and end with odd number of b's}
Answer to the assignment: set of strings on (a,b) such that no 'ba' string is present and odd no. of b's at end of string.
ASSIGNMENT :- a string which starts with even number of 'b' and ends with odd number of 'b'
i dont think it is even number of b's. It is odd only.
But abab works but shouldn't be accepted according to your definition
@@rajearyan No, It must be even also. Example- "ba" won't be accepted but it still contains odd number of b's.
@@okko7788 No, it will be accepted according to my definition. "abab" is starting with 0- 'b' and zero is an even number and it is ending with 1- 'b' and one is an odd number.
I can see that my definition is wrong. one condition is also there, that after odd number of 'b' there should not be 'aba'.
Sometimes I found your videos more useful than university lectures.
all the time
all the time 😂
String that contains any no of a's followed by 0 or even no of b's and end with odd no of b's
I think the DFA/NFA accepts all strings over { a , b } that end with an odd number of b-s. Please let me know if I'm right.
I think it's not odd number of b-s but rather all strings ending with a single "b". For example: b, ab, aab, abab. But NOT abb or aabb or aabbb.
Thanks for this teaching, awesome lecture
you deserve my math teacher's salary
Accepts a string ending with odd number of b's unless one of the following is true:
1. String starts with 'ba'
2. There is an occurrence of 'aba' after an odd number of b's
No, strings starting with 'ba' will end up in the dead state.
This condition is not true for aabbb
set of all strings starts with {a, b} that ends with odd no of b
the answer to the last question is
the string that contains only odd no.of b's, strings that ends with oddno.of b's.
Excellent tutorial professor.
VERY NICE EXPLANATION. NICE ACADEMY ROCK IS ALL SUBJECTS
ASSIGNMENT: L = {Set of all strings over (a, b) that ends with a odd number of 'b's}
check it for ababab
ups! With ababab I will end in state D and this is not a final state. So - let me think about it again ;-)
L={Set of all strings over (a,b) that ends with 'b' , 'bbb' or 'ab'}
Thanks for your help
for NFA sol :accepted string ending with. (b) followed by even no of (a).
ab is also a string which is accepted.... Here a is not even
It accepts the string that starts with 'a and ends with b' & string 'b'.
It is accepting the strings that end with sequence of 'b' having odd numbers of b consecutively
Amazing Sir!! You deserve a subscriber. I HAVE SUBSCRIBED
great video. is the answer " a^n b^2n+1 n>=0 "?
thankyou please complete the compiler design tutorial as soon as possible
Thankyou very much for this valuable class
very good video easy explanation thank you
Very well explained
I'm supposing the design style doesnt matter, meaning where i put C or D like in up or down direction as long as all the arrows are correct
This DFA accepts a string which is ending with 'ab' or has odd number of b's in it.
Not end with 'ab', it ends with odd no of 'b'
@@manishshee6990 bro check for 'aab' ?
@@java_with_yash yes in NFA it goes to 'C' state & in DFA it goes to 'BC' state
@@manishshee6990 bro string is acceptable or not ? 'aab'...
@@manishshee6990 yes so ..c and bc both are final states..so the string is accepted.
It accepting strings of a&b's which having atleast one b and should ends with b only
thanks sir
Set of all strings over (a, b) that ends with 'b'
abb is not accepted
set of all string that ends with b and contain odd no. of b.
any sting which ends with odd no's of b and do not start with ba will be a accepting string
L={don't start with ba and ends with an odd number of b's for set of all strings over {a,b}}
I think the best answer would be that this FSM accepts string of the form (a^n)(b^m) where n is a whole no. and m is an odd natural number
I think it will accept strings if it ends with odd number of b
Any strings end with odd no. Of 'b' which does not starts with 'ab' will accept by this DFA .... am I ri8 sir?
Assignment answer. String cannot start with 'ba', ends with odd number of b's or at most 2 consecutive 'ab's
Strings will be accepted which doesn't start with 'ba' and containing odd no of 'b's and end with either single 'b' or 'a' followed by 'b'.
Is it the right answer, Sir?
I think answer will be, accept any string over {a, b}, that ends with 'ab', except starting string 'ba'.
Is it right??
Really thank you so much sir best tutorial 👌
Please you have any notes
Your tutorial on this subject is best sir... Respectfully thank you so much sir...
Thankyou so much sir
It help me a lot
I guess what is this for is strings with starts with an 'a' and has an odd number of 'b'.
You have been a great help 🙏