Fina levennumberzeroesandonesver2 uglyducklingver1

147
-1

Published on

JNTU QUALITATIVE VISUAL ALGORITHMS

Published in: Entertainment & Humor
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
147
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Fina levennumberzeroesandonesver2 uglyducklingver1

  1. 1. PROBLEMSHOW THAT THE MINIMAL DFA ACCEPTING THE SET OF ALL STRINGS DENOTED BY THE REGULAR EXPRESSION[00 + 11 +(01 + 10)(00 + 11)*)(01 + 10)]*HAS FOUR STATES AND ACCEPTS THE SET OF ALLL STRINGS OVER {0,1} CONTAINING AN EVEN NUMBER OF 0’S AND AN EVEN NUMBER OF 1’S.
  2. 2. PROBLEM SHOW THAT THE MINIMAL DFA ACCEPTING THE SET OF ALL STRINGS DENOTED BY THE REGULAR EXPRESSION [wetwet + hothot +(wethot +hotwet)(wetwet + hothot)*)(wethot + hotwet)]* HAS FOUR STATES AND ACCEPTS THE SET OF ALL STRINGS OVER {wet,hot} CONTAINING AAN EVEN NUMBER OF wet’S AND AN EVEN NUMBER OF hot’S.
  3. 3. EXAMPLE FINITE AUTOMATAUglyDuckling GeeseDucksCatHen Swans
  4. 4. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDucksCatHen Swans
  5. 5. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDuckshotCatHen Swans
  6. 6. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDuckshot hotCatHen Swans
  7. 7. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDucks wethot hotCatHen Swans
  8. 8. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDucks wethot hot hotCatHen Swans
  9. 9. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDucks wethot hot hotCatHen Swans wet
  10. 10. EXAMPLE FINITE AUTOMATA wetUglyDuckling GeeseDucks wethot hot hot hotCatHen Swans wet
  11. 11. UglyDuckling IS THE FINAL STATE wetUglyDuckling GeeseDucks wethot hot hot hot wetCatHen Swans wet
  12. 12. START UglyDuckling IS THE START STATE wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  13. 13. START WE HAVE OUR FA wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  14. 14.  ABSTRACTIO
  15. 15. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  16. 16. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  17. 17. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  18. 18. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  19. 19. UglyDuckling = ?GeeseDucks = ?CatHen = ?Swans = ?
  20. 20. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  21. 21. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot UglyDuckling GeeseDucks CatHenIIIIIIV
  22. 22. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  23. 23. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIIIIV
  24. 24. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  25. 25. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot+ wet CatHen UglyDuckling SwansIV
  26. 26. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  27. 27. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot+ wet CatHen UglyDuckling SwansIV = wet+ hot Swans CatHen GeeseDucks
  28. 28. SUBSTITUTE IV IN II AND IIII =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = wet hot GeeseDucks CatHen + Swans
  29. 29. SUBSTITUTE II IN IV TO GET RID OF III =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = wet hot GeeseDucks CatHen + Swans
  30. 30. SUBSTITUTE II IN IV TO GET RID OF III =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = wet wet hotho + hot UglyDuckling hot t Swans CatHen Swans
  31. 31. SUBSTITUTE III IN IV TO GET RID OF IIII =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = hot wet hot . UglyDuckling . hot UglyDuckling . hot+ Swans wet hot Swans wet . + + wet
  32. 32. SOLVING IV USING ARDEN’S LEMMAI =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = hot wet hot . UglyDuckling . hot UglyDuckling . hot+ Swans wet hot Swans wet . + + wet
  33. 33. SOLVING IV USING ARDEN’S LEMMAI =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  34. 34. SUSTITUTING II IN II =€+ wet hot UglyDuckling GeeseDucks + CatHenII = UglyDuckling wet hot GeeseDucks + SwansIII = UglyDuckling hot wet CatHen + SwansIV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  35. 35. SUSTITUTING II IN II =€+ + hot UglyDuckling CatHen + UglyDuckling wet hot . Swans . wet wet +III = UglyDuckling hot wet CatHen + SwansIV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  36. 36. SUSTITUTING III IN II =€+ + hot UglyDuckling CatHen + UglyDuckling wet hot . Swans . wet wet +III = UglyDuckling hot wet CatHen + SwansIV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  37. 37. SUSTITUTING III IN II =€+ + UglyDuckling + UglyDuckling wet hot . Swans . wet wet + UglyDuckling hot wet + . Swans . hot hot +IV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  38. 38. REARRANGING THE TERMSI =€+ UglyDuckling UglyDuckling (wetwet + hothot) + hot Swans . wet + wet Swans . hotIV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  39. 39. COMBINING I AND IVI =€+ UglyDuckling UglyDuckling (wetwet + hothot) + Swans (wethot + hotwet)IV = hot Swans UglyDuckling (wethot+hotwet)(wetwet + hothot)*
  40. 40. COMBINING I AND IVI =€+ UglyDuckling UglyDuckling (wetwet + hothot) + UglyDuckling (wethot+hotwet)(wetwet + hothot)* . (wethot + hotwet) hot
  41. 41. REWRITING = € +I UglyDuckling (wetwet + hothot) + + UglyDuckling (wethot+hotwet)(w etwet + hothot)* hot (wethot + hotwet)
  42. 42. SOLVING BY ARDEN’S LEMMA =I UglyDuckling [(wetwet + hothot) + (wethot+hotwet) (wetwet + hothot)* (wethot + hotwet)]* hot
  43. 43. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  44. 44. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot+ wet CatHen UglyDuckling SwansIV = wet+ hot Swans CatHen GeeseDucks
  45. 45. SUBSTITUTE IV IN II AND IIII =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet hot GeeseDu UglyDuck + ling Swans cksIII = UglyDuck hot wet CatHen + Swans lingIV = wet hot + GeeseDuc Swans CatHen ks
  46. 46. SUBSTITUTE IV IN II FIRSTI =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet ???? ???? hot GeeseDu UglyDuck + cks lingIII = UglyDuck hot wet CatHen + Swans lingIV = wet hot + GeeseDuc Swans CatHen ks
  47. 47. SUBSTITUTE IV IN II FIRSTI =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet ???? ???? hot. GeeseDu UglyDuck + CatHen wet. GeeseDuc hot cks ling hot ksIII = UglyDuck hot wet CatHen Swans ling +IV = wet hot GeeseDuc Swans CatHen + ks
  48. 48. SUBSTITUTE IV IN III NEXTI =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet ???? ???? hot. GeeseDu UglyDuck + CatHen wet. GeeseDuc hot cks ling hot ksIII = UglyDuck hot wet CatHen Swans ling +IV = wet hot GeeseDuc Swans CatHen + ks
  49. 49. SUBSTITUTE IV IN III NEXTI =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet ???? ???? hot. GeeseDu UglyDuck + CatHen wet. GeeseDuc hot cks ling hot ksIII = UglyDuck hot ??? ??? wet CatHen ling +IV = wet hot GeeseDuc Swans CatHen + ks
  50. 50. SUBSTITUTE IV IN III NEXTI =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet ???? ???? hot. GeeseDu UglyDuck + CatHen wet. GeeseDuc hot cks ling hot ksIII = UglyDuck hot ??? ??? hot. CatHen ling + CatHen wet. wet GeeseDuc wet ksIV = wet hot GeeseDuc Swans CatHen + ks
  51. 51. START ABSTRACTION CONTROL: GIVE DIFFERENT COLORS TO STATES wet UglyDuckling GeeseDucks wet hot hot hot hot wet CatHen Swans wet
  52. 52. THE REGULAR EXPRESSION EQUATIONS ARE SET UPI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot+ wet CatHen UglyDuckling SwansIV = wet+ hot Swans CatHen GeeseDucks
  53. 53. SUBSTITUTE IV IN II AND IIII =€+ wet hot UglyDuck GeeseDuc + CatHen ling ksII = wet hot GeeseDu UglyDuck + ling Swans cksIII = UglyDuck hot wet CatHen + Swans lingIV = wet hot + GeeseDuc Swans CatHen ks
  54. 54. SUBSTITUTING IV IN III WE ELIMINATE EQATION IVI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot CatHen UglyDuckling + wetw hotwe et+ t CatHen GeeseDucks
  55. 55. REARRANGING THE NEW EQUATION IIII =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot+ hotwe GeeseDucks t CatHen UglyDuckling + wetw et CatHen
  56. 56. REARRANGING EQUATION IIII =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII =( hot+ hotwe GeeseDucks t) CatHen UglyDuckling + wetw et CatHen
  57. 57. USING ARDEN’S LEMMA: X=r =+Xs gives X=rs*I =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot(w etwet GeeseDucks hotwe t(wet CatHen UglyDuckling )*+ wet)*IV = wet+ hot Swans CatHen GeeseDucks
  58. 58. SUBSTITUTING IV IN III =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIII = hot(w etwet GeeseDucks hotwe t(wet CatHen UglyDuckling )*+ wet)*IV = wet+ hot Swans CatHen GeeseDucks
  59. 59. SUBSTITUTING IV IN III =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ hot GeeseDucks UglyDuckling SwansIV = wet+ hot Swans CatHen GeeseDucks
  60. 60. SUBSTITUTING IV IN III =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ weth CatHen ot+ GeeseDucks UglyDuckling hothot GeeseDucks ‘ CatHen
  61. 61. SOLVING THE NEW EQUATION II USING ARDEN’S LEMMAI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet+ wetho CatHen t+ GeeseDucks UglyDuckling hotho GeeseDucks t ‘ CatHen
  62. 62. SOLVING THE NEW EQUATION II USING ARDEN’S LEMMAI =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = wet’(1 wetho ’hot)* CatHen t GeeseDucks UglyDuckling + (hot1’ )’* GeeseDucks ‘ CatHen
  63. 63. REINTRODUCING EQUATION IIII =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = +wet’ wetho (1’hot CatHen t GeeseDucks UglyDuckling )*+ (hot1’ )’*III = GeeseDucks UglyDuckling +hot( wetw GeeseDucks hotwe t CatHen et)* (wetw et)* ‘ CatHen
  64. 64. SUBSTITUTING III IN III =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = +wet’ wetho (1’hot CatHen t GeeseDucks UglyDuckling )*+ (hot1’ )’*III = GeeseDucks UglyDuckling +hot( wetw GeeseDucks hotwe t CatHen et)* (wetw et)* ‘ CatHen
  65. 65. SUBSTITUTING III IN III =€+ wet+ hot GeeseDucks CatHen UglyDucklingII = +wet’ (1’hot GeeseDucks UglyDuckling )* + GeeseDucks +hot( wetw GeeseDucks hotwe t UglyDuckling et)*w (wetw ethot et)*w (hot1’ ethot )’* (hot1’ )’* CatHen ‘
  66. 66. REWRITUNG EQUATION III =€+ wet+ hot UglyDuckling GeeseDucks CatHenII = UglyDuckling GeeseDucks + wet(hothot)* + +hot(wetwet)*wet UglyDuckling hot GeeseDucks (hot1’)’* + hotwet(wetwet)* GeeseDucks wethot (hot1’)’* CatHen
  67. 67. SOLVING II BY ARDEN’S LEMMAI =€+ wet+ hot UglyDuckling GeeseDucks CatHenII = UglyDuckling GeeseDucks + wet(hothot)* + +hot(wetwet)*wet UglyDuckling hot GeeseDucks (hot1’)’* + hotwet(wetwet)* GeeseDucks wethot (hot1’)’* CatHen
  68. 68. SOLVING II BY ARDEN’S LEMMAI =€+ wet+ hot UglyDuckling GeeseDucks CatHenII =( UglyDuckling GeeseDucks + wet(hothot)* + +hot(wetwet)*wet UglyDuckling hot GeeseDucks (hot1’)’* ) [hotwet(wetwet)* wethot (hot1’)’*]* CatHen
  69. 69. SUBSTITUTING II IN II =€+ wet+ hot UglyDuckling GeeseDucks CatHenII =( UglyDuckling GeeseDucks + wet(hothot)* + +hot(wetwet)*wet UglyDuckling hot GeeseDucks (hot1’)’* ) [hotwet(wetwet)* wethot (hot1’)’*]* CatHen
  70. 70. SUBSTITUTING II IN II =€+ wet+ hot UglyDuckling GeeseDucks CatHenII =( UglyDuckling GeeseDucks + wet(hothot)* + +hot(wetwet)*wet UglyDuckling hot GeeseDucks (hot1’)’* ) [hotwet(wetwet)* wethot (hot1’)’*]* CatHen

×