Monthly Archives: January 2015

convert NFA to DFA

Question the better format post : post solution : A = $\varepsilon-closure(0)$ = $\{0\}$ B = $move(A,a)$ = $\{1\}$ C = $move(A,b)$ = $\{\}$ E = $move(B,a)$ = $\{2\}$ F = $move(B,b)$ = $\{0,2\}$ G = $move(E,b)$ = $\{3\}$ = … Continue reading

Posted in programming | Tagged | Leave a comment

reverse word in a string

question Given an input string, reverse the string word by word. For example, Given s = “the sky is blue”, return “blue is sky the”. click to show clarification. Clarification: What constitutes a word? A sequence of non-space characters constitutes … Continue reading

Posted in programming | Tagged | Leave a comment

convert regular expression to dfa

How to convert regulare expression to dfa Note : looks like the wordpress.com doesn’t support mathjax, here is the link with better format of this post : post I’m self-teaching The basics of compiler. Here is the solution of some … Continue reading

Posted in programming | Tagged | Leave a comment