首页 » cs代考 » 编程代写|Practice Final Exam: Formal Language Theory

编程代写|Practice Final Exam: Formal Language Theory

本次美国代写是一个编程语言写相关的assignment

Question 1

Consider this regular expression:

01*|1

Which of the following regular expressions is/are equivalent to it?

0(1*|1)
1|0(1*)
(1|0)1*
(01)*|1
0|1*|1

Question 2

Provide the DFA (deterministic finite automaton) for the regular
expression (same as in question #1):

01*|1

You do not have to use the method of converting to an NFA first,
though of course you may.

Question 3

Consider the following deterministic finite automaton:

Which of the following strings is/are not accepted by this automaton?

b10110100111
a
0010
empty string
bb101

Question 4

Why aren’t regular expressions used in the parsing stage of
language translation to determine that tokens follow a grammatically
correct pattern?

Because parsing is concerned with type and scope analysis, and regular
expressions cannot express these context-sensitive issues.

Because regular expressions cannot express balanced characters, such as
balanced parentheses.

Because the implementations of regular expressions (finite automata) are
less efficient than the implementations of context free grammars.

Because regular expressions cannot express languages that are infinitely
large.


程序辅导定制C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


blank

本网站支持 Alipay WeChatPay PayPal等支付方式

E-mail: vipdue@outlook.com  微信号:vipnxx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank