Answers of Questions in Assignment 1
Answers of Questions in Assignment 1
1.1
Describe the languages denoted by the following regular expressions:
1. 0(0|1)*0
Strings of 0s and 1s that begin and end with 0.
2. (0|1)*0(0|1)(0|1)
Strings of 0s and 1s where the third bit from the end is 0.
3. 0*10*10*10*
Strings of 0s and 1s that have three 1s.
1.2
Write the regular definitions for the following languages.
1. Floating-point numbers. A floating-point number has the following parts: an integer, a decimal point (.), a fractional part, and an exponent. The exponent, if present, is indicated by the ASCII letter e or E followed by an optionally signed integer.
Integer -> [+|-] Digits
Fraction -> Digits
Exponent -> (e|E)Integer
FloatingPointNumber -> Integer '.' Fraction [Exponent]
2. All strings of letters in which the letters are in ascending lexicographic order.
A*B*...Z*
3. Comments consisting of a string surrounded by /* and */ without an intervening */ unless it appears in side the quotes " and ".
Σ1 : the set of all characters and "*/"
Σ2 : Σ1−{/,*}
Comment -> /* (/* ** (Σ2 Σ1*)*)* */
1.3
Implement a program in C for recognizing the language as specified by the following regular expression:
letter (letter | digit)*
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- types of questions in english
- answers to questions websites
- free answers to questions online
- string of questions in quotes
- english proficiency test with answers 20 questions pdf
- list of questions in spanish
- use of metformin in type 1 diabetes
- trivia answers and questions free
- list of questions in quotations
- assignment 1 1 introductory speech outline
- answers to questions about the bible
- mathematical literacy grade 10 assignment 1 2021 finance