Conversion from NFA to DFA. Suppose there is an NFA N Q, ∑, q0, δ, F which recognizes a language L. Then the DFA D, ∑, q0, δ’, F’ can be constructed for language L as: Step 1: Initially Q’ = ɸ. Step 2: Add q0 to Q’. Step 3: For each state in Q’, find the possible set of states for each input symbol using transition function of NFA. NFA to DFA program. Program a program to create two classes Commercial and Domestic. Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Define the program calculateTax which determines the tax on the gross pay.
Why don't you just tell us your teacher's email address so that we can send the program directly?:mrgreen: isn't this the 'black market' forum??:mrgreen:Anyways, IMHO, that's fair if you are only taking a simple course because of the credits, etc., and you are not studying something directly related to CS.But I'm pretty sure COMPILERS THEORY/DESIGN does not fix in that cathegory. Please give a look at the method described in your book and try to understand it, even if you don't want to program. It's worth it.I know a bunch of graduated dudes that don't know how to code a damn Fibonacci sequence. I know a bunch of graduated dudes that don't know how to code a damn Fibonacci sequence.I know about half a dozen professional programmers who couldn't get a recursive function to calculate the Fibonacci sequence right on the first try. Then again, I also know quite a few who would churn out several versions including recursive, non-recursive, dynamic recursive, and heuristic formula without breaking a sweat and then dare you to find a bug.;)Guess what? Some of them work as teachers!
LMAOBTW, who are you struggling against?:o. Woah woah woah.
What's so illegal with 'i=i'? Wouldn't it just try to increment i, and then set i equal to the original value of i, making the do effectively nothing? That's what it does when I try it, but I don't have a straight C compiler handy.-Fredricwrong. It is undefined behavior. Some compilers the final version is the original version but on other compilers it final value is the incremented value.
VC 6.0 is incremented value, but Dev-C is the original value. So, although the statement compiles (no illegal syntax error) it produces behavior that has not been defined by c or c standrds. But in my experience, the majority of teachers only teach because they're not good enough to actually write code for a living.You must be hanging around the wrong crowd:lol: Many people with Ph.D.s (in computer science) teach because they are over-qualified for jobs. Software houses don't need (or want) Ph.D.s to write code, and masters degree is streatching it.
Most teachers that do not have Ph.D. Have masters degrees and only teach part time - they hold down full-time programming positions in industry (I work with someone like that). Hello!That was a my homework last year, and i'm still keeping the complete source code,can u give me u email to send u the source code in it? My email is editEmail removed by moderators: We don't help people to cheat/edit just contact me and i will send u the complete source code. And if u have any idea how for that program i'll be ready to help u.Sincerely,AyoubHERE IS MY E-MAIL PLEASE SEND ME THE SOURCE CODE AND I WILL TRY TO UNDERSTAND IT, WHEN I NEED U I WILL CALL YOUBEST REGARDS.
Finite Automata Learning Tools FSM simulatorFSM simulator allows you to define your own DFA, and run the DFA step by stepvisually, so that you can see how a string is recognized or rejected by a DFA.Here are the steps to run the simulator:. Click to download the FSM simulator. Itis a zip file. Unzip the zip fileunzipfsm.zip. Go to the directory fsmsimbgm/classes. Run the java program: java FSM. Define an FSM in a text file.
You can also use an existing FSA definitionin fsm-sources.You can also try to load the following automata discussed in our class:. for (a b).abb. for (a b).abb.
Generate the transition diagram;. Run the simulator and observe how strings are recognized.DFA appletThis tool is similar to the previous one, except that it is an applet, andyou can define a DFA interactively in the GUI. You can directly run the tool ina web browser by clicking.Once the GUI is up and running, you need to define the alphabet, the states,and the transitions in the GUI. When a DFA is defined, you can run the DFAagainst an input string. JFLAPJFLAP is a graphic tool to help students with concepts in grammar andautomata theory.
It can transform regular expression to NFA, NFA to DFA,and minimize DFA.Here are steps to run JFLAP:. click to down load the JFLAP.jar file.
run the jar file by typing 'java -jar JFLAP.jar'. When a GUI is there, try to load an regular expression. For more information about JFLAP, you can go to theBy using this tool, you can verify whether your derivation is correct.Note: in notation of regular expression is a little different. Or isdenoted by '+' instead of ' '.
Say, (a b).abb is represented as(a+b).abb.Here is more explanation from the tool's help menu:To make expressionsfor this program to work with,type them in the field.Adjacent symbolsimply concatenation.No symbol is used.Many or nothing,Asterisk (.) is the Kleene star.What precedes repeats.Additionally,if you want an 'or' symbolthe plus (+) should be used.Screaming nothingness,exclamations (!) are special.They act as lambda.Formatting errorswill be reported to youwhen you choose actions.