0% found this document useful (0 votes)
177 views3 pages

Gradiance Online Accelerated Learning 3

computer science

Uploaded by

charan__
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views3 pages

Gradiance Online Accelerated Learning 3

computer science

Uploaded by

charan__
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

8/25/2015

Gradiance Online Accelerated Learning

Gradiance Online Accelerated Learning

Pavan Kumar

Homework Assignment Submitted Successfully.

Home Page
Assignments Due

You obtained a score of 12.0 points, out of a possible 12.0 points.


You have answered all the questions correctly.

Progress Report

Congratulations, you have achieved the maximum possible score.

Handouts
Tutorials
Homeworks

Submission number:
Submission certificate:
Submission time:

20352
DF539663
2015-08-24 12:23:41 PST (GMT - 8:00)

Lab Projects
Log Out

Help

Number of questions:
Positive points per question:
Negative points per question:
Your score:

4
3.0
1.0
12

Questions about regular expressions.

1.Apply the McNaughton-Yamada-Thompson construction in Section 3.7.4 (p.


159) to convert the regular expression (0+1)*(0+) to an epsilon-NFA. Count
1. The number of states.
2. The number of states that have more than one out-arc.
3. The number of states that have more than one in-arc.
http://www.newgradiance.com/casu/servlet/COTC

1/3

8/25/2015

Gradiance Online Accelerated Learning

4. The number of arcs labeled


Then, identify the true statement about your epsilon-NFA from the list
below:
a) There are 3 states with more than one arc out.
b) There are 7 states.

c) There are 14 arcs labeled .


d) There are 5 states with more than one arc out.
Answer submitted: c)

You have answered the question correctly.

2.Suppose that in some language a real number is represented by the following


elements, which must be in order, if they occur at all (i.e., are not optional):
1.
2.
3.
4.
5.

http://www.newgradiance.com/casu/servlet/COTC

An optional minus sign (-).


One or more digits (0 through 9).
A decimal point.
Zero or more digits.
An optional exponent, consisting of:
An "E" in upper or lower case.
An optional minus sign.
One or more digits.

Write a regular expression for real numbers in the form described above.
There are several options, of course. Identify from the list below, one of the
possible regular expressions that denotes all these real numbers and nothing
else.
a) -?[0-9][0-9]*.[0-9]*((E|e)-?[0-9][0-9]*)?

b) [-]?[0-9]+.[0-9]+([Ee][-]?[0-9]+)?

c) -?[0-9]+.[0-9]*[Ee]-?[0-9]+

d) -?[0-9][0-9]*.[0-9]*((E|e)-[0-9][0-9]*)?
2/3

8/25/2015

Gradiance Online Accelerated Learning

Answer submitted: a)

You have answered the question correctly.

3.The UNIX-style regular expression [a-e]*f?bc* generates which of the


following strings?
a) dcfbc
b) acedc
c) edcffb

d) the empty string


Answer submitted: a)

You have answered the question correctly.

4.Identify from the list below the regular expression that generates all and only
the strings over alphabet {0,1} that end in 1.
a) (0*1*)+1

Copyright 2007-2015Gradiance Corporation.

b) (0+1)*1+1

c) (0*+1)*
d) (0+1)*10*
Answer submitted: a)

You have answered the question correctly.

http://www.newgradiance.com/casu/servlet/COTC

3/3

You might also like