Virtual University of Pakistan Study forum !
Don't copy paste make your own solution in new doc file and then submit...
Note :if you see any mistake then correct it by
yourself and then also post in group
Finite automata are useful theoretically because they're not complex enough for the Halting Problem to apply to them, which means you can prove things about them that you can't prove about Turing Machines.
Regular and context-free grammars are useful practically because they describe languages you can comprehend using regexes and parsers.
Unfortunately, the practical and theoretical stuff are usually taught together in upper-level electives, and then people who took those electives have to explain to MIT CS grads who didn't take those electives that it's impossible to write a regex that matches XML, no matter how long or complicated you make that regex.