Question

l. Suppose the alphabet is Σ = {a,b, ,2,0,1, , 9, :), i.e., the standard letters az, decimal numbers, and colon (:). The colon is used as a delimiter between fields in a text file. Each line of the file thus corresponds to a string a) Give a regular expression that accepts strings with four fields (i.e., with 3 delimiters). b) Give a regular expression that accepts strings where the second field is numerical. c) Give a regular expression that accepts strings where the third field is non-empty (a field is non-empty if it has at least one symbol). 2. In tutorial 1, we discussed the DFA that determines whether a binary string is divisible by three or not. The state diagram is depicted below. Convert it to a corresponding regular expression 0 0 start0 0 Figure 1: DFA to check whether a binary number is divisible by 3.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

」.(a) Ghen.onta SHesて Jel o stale be 2 J Stede be - go

92= 122402, Nole AvclenA The or em Soted en the

Kindly Rate my Answer if you like and for query please comment :)

Add a comment
Know the answer?
Add Answer to:
Suppose the alphabet is sigma = {a, b, ..., z, 0, 1, ..., 9,: }, i.e.,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the...

    1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...

  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • The first script is validate.sh. This is a simple form validation script that will be used...

    The first script is validate.sh. This is a simple form validation script that will be used to verify the inputs given. Normally, this would be done to validate input from a website or another program before entry into a database or other record storage. In this case, we will keep it simple and only focus on the input validation step. In particular, the script should prompt the user for four values: first name, last name, zip code, and email address....

  • Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C -...

    Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C - A consecutive group of memory chunks. D - None of the choices. Question 2 How many times is the body of the loop executed? int i=1; while(true) { cout << i; if(++i==5) break; } A - Forever B - 4 C - 5 D - 6 E - 0 Question 3 What is wrong with the following piece of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT