1 Introduction to Languages.pdf - Theory of Computation and Compiler Design Dr D P Acharjya Professor SCOPE 19-Jul-17 Dr D P Acharjya 1 Text Books 1

# 1 Introduction to Languages.pdf - Theory of Computation and...

• 20

This preview shows page 1 - 7 out of 20 pages.

Theory of Computation and Compiler Design 19-Jul-17 Dr. D. P. Acharjya 1 Dr. D. P. Acharjya Professor, SCOPE
Text Books 1.Introduction to Automata Theory, Languages, and Computation: J. E. Hopcroft, Rajeev Motwani, J. D. Ullman; Pearson Education 2.Introduction to Languages and the Theory of 19-Jul-17 Dr. D. P. Acharjya 2 Computation: John Matrin; McGraw Hill 3.Theory of Computation: D. P. Acharjya; MJP Publishers 4.Principles of Compiler Design: A. V. Aho, J. D. Ullman; Addison Wesley
Introduction to Languages 1.Computational Model 2.Alphabets 3.Strings 19-Jul-17 Dr. D. P. Acharjya 3 4.Languages 5.Operations on Languages 6.Introduction to Compiler 7.Phases of a Compiler
Alphabet and Strings ° An alphabet is a finite non-empty set Σ of objects called symbols. - Σ = {0, 1} - Σ = {a, b, c, …,z} - Σ = {a, b, c, 0, 1, 2} 19-Jul-17 Dr. D. P. Acharjya 4 ° An n-tuple of symbols of Σ is called a string or word. In general we use lower case letters to represent string - w = 010001 is a string over Σ = {0, 1,2} - w = abccc is not a string over Σ = {0, 1,2}
° Number of symbols present in the string is known as length of the string. - If w = 010001, then |w| = 6 ° Reverse of a string is obtained by writing the symbols of string in reverse order. 19-Jul-17 Dr. D. P. Acharjya 5 - If w = 00011100, then w R = 00111000 ° A string is said to be palindrome if w = w R - If w = 001100, then w R = 001100 ° A string u is said to be a substring, if it appears in the string. - If w = 0011110, then u =110 is a substring.
Properties of Strings ° Associative Law: ± If u, v, w are strings over Σ , then u(vw)=(uv)w ° Existence of Identity: ± For all strings defined over Σ , there exists and 19-Jul-17 Dr. D. P. Acharjya 6

#### You've reached the end of your free preview.

Want to read all 20 pages?

• Winter '17
• sathya raja shekaran

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes