6 Replies - 12650 Views - Last Post: 13 January 2013 - 01:30 PM

#1 Jeet.in  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 12
  • View blog
  • Posts: 304
  • Joined: 30-May 11

Formal Language and Automata

Posted 07 January 2013 - 12:27 PM

Hello.
This semester I have 1 FLAT course which I heard from seniors is quite challenging I have the Ullman book and the Spinser book, other than that how should I learn FLAT to ace in the course and learn the materials? Thanks !
P.S. I have taken several mathematics courses and familiar with discrete mathematics and numerical analysis.

This post has been edited by Jeet.in: 13 January 2013 - 09:42 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Formal Language and Automata

#2 mojo666  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 352
  • View blog
  • Posts: 771
  • Joined: 27-June 09

Re: Formal Language and Automata

Posted 07 January 2013 - 02:50 PM

I believe the reason people find it more challenging is because it does not have as much memorized recipes as other mathematics courses. Also, many other math courses are just different applications of arithmetic operations, while FLAT is more about how to act on individual character input. Just pay attention, try to understand the material, put thought and effort into your excercises, and stop by here for help when you are having trouble.
Was This Post Helpful? 1
  • +
  • -

#3 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Formal Language and Automata

Posted 12 January 2013 - 11:25 PM

Do you have programming experience with lexical analysis and parsing? If so it should really just be a formal/theory application of things you've already worked with
Was This Post Helpful? 1
  • +
  • -

#4 Jeet.in  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 12
  • View blog
  • Posts: 304
  • Joined: 30-May 11

Re: Formal Language and Automata

Posted 13 January 2013 - 12:15 AM

View Postishkabible, on 12 January 2013 - 11:25 PM, said:

Do you have programming experience with lexical analysis and parsing? If so it should really just be a formal/theory application of things you've already worked with


I have no prior programming experience with lexical analysis and parsing. Technically speaking we don't have a lab i.e. practical classes this semester for Automata and Theory of Computation(the are a combined subject). So to gain any practical experience will you recommend me something for self learning? Thanks.
Was This Post Helpful? 0
  • +
  • -

#5 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Formal Language and Automata

Posted 13 January 2013 - 12:41 PM

Write a program that evaluates mathematical expressions. Figure out a lexical schema(regular expressions work well for this) for numbers, operators, and maybe varibles. Learn to write a grammar for mathematical expressions. Write the lexer based on the lexical schema you came up with and then the parser based on the grammar. For a bonus evaluate the expression ;)/>

I'd recommend a recursive decent parser. There is an algorithm called the shunting yard algorithm that does this quite easily but it's incredibly specific and ultimately mimics a recursive decent parser.

This is a non-trivial application, one that I have learned a lot from personally. It may require more programming experience than you have if you've only programmed for a year or so.

This post has been edited by ishkabible: 13 January 2013 - 12:46 PM

Was This Post Helpful? 1
  • +
  • -

#6 Jeet.in  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 12
  • View blog
  • Posts: 304
  • Joined: 30-May 11

Re: Formal Language and Automata

Posted 13 January 2013 - 01:07 PM

View Postishkabible, on 13 January 2013 - 12:41 PM, said:

Write a program that evaluates mathematical expressions. Figure out a lexical schema(regular expressions work well for this) for numbers, operators, and maybe varibles. Learn to write a grammar for mathematical expressions. Write the lexer based on the lexical schema you came up with and then the parser based on the grammar. For a bonus evaluate the expression ;)/>/>

I'd recommend a recursive decent parser. There is an algorithm called the shunting yard algorithm that does this quite easily but it's incredibly specific and ultimately mimics a recursive decent parser.

This is a non-trivial application, one that I have learned a lot from personally. It may require more programming experience than you have if you've only programmed for a year or so.


This is my 2nd year in college so I think the problems you posed would be real challenge for me, but that's what DIC is for :) . As of the shunting yard algorithm I studied it once for a project however I never implemented it. Any other suggestions you would like to make in regarding the course? Thanks.
Was This Post Helpful? 1
  • +
  • -

#7 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Formal Language and Automata

Posted 13 January 2013 - 01:30 PM

That's all I can think of for now. Reading ahead of the class tends to be useful I've found. As mojo666 said, pay attention and think about it and you should be fine.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1