国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫ECS 120、代做Java/Python編程設計

時間:2024-01-30  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Homework 1 – ECS 120, Winter 2024
1 Auto-graded problems
These problems are not randomized, so there is no need to first submit a file named req. Each
problem below appears as a separate “Assignment” in Gradescope, beginning with “HW1:”.
1.1 DFAs
For each problem submit to Gradescope a .dfa file describing a DFA deciding the given language.
Make sure that it is a plain text file that ends in .dfa (not .txt).
Use the finite automata simulator to test the DFAs: http://web.cs.ucdavis.edu/~doty/
automata/. Documentation is available at the help link at the top of that web page.
Do not just submit to Gradescope without testing on the simulator. The purpose
of this homework is to develop intuition. Gradescope will tell you when your DFA gets an answer
wrong, but it will not tell you why it was wrong. You’ll develop more intuition by running the
DFA in the simulator, trying to come up with some of your own examples and seeing where they
fail, than you will by just using the Gradescope autograder as a black box. Once you think your
solution works, submit to Gradescope. If you fail any test cases, go back to the simulator and use
it to see why those cases fail. During an exam, there’s no autograder to help you figure out if your
answer is correct. Practice right now how to determine for yourself whether it is correct.
Gradescope may give strange errors if your file is not formatted properly. If your file is not
formatted properly, the simulator will tell you this with more user-friendly errors. Also, if you lose
points on a Gradescope test case, try that test case in the simulator to ensure that your DFA is
behaving as you expect.
begin and end: {w ∈ {0, 1}

| w begins with 010 and ends with a 0 }
at most three 1s: {w ∈ {0, 1}

| w contains at most three 1’s}.
no substring: {w ∈ {a, b, c}

| w does not contain the substring acab}.
even odd: {w ∈ {a, b}

| w starts with a and has even length, or w starts with b and has odd
length }.
mod: {w ∈ {0, 1}

| w is the binary expansion of n ∈ N and n ≡ 3 mod 5}. Assume ε represents
0 and that leading 0’s are allowed. A number n ∈ N is congruent to 3 mod 5 (written n ≡ 3
mod 5) if n is 3 greater than a multiple of 5, i.e., n = 5k + 3 for some k ∈ N. For instance,
3, 8, and 13 are congruent to 3 mod 5.
1.2 Regular expressions
For each problem submit to Gradescope a .regex file with a regular expression deciding the given
language. Use the regular expression evaluator to test each regex: http://web.cs.ucdavis.
edu/~doty/automata/. Do not test them using the regular expression library of a programming
language; typically these are more powerful and have many more features that are not available in
the mathematical definition of regular expressions from the textbook. Only the special symbols (
) * + | are allowed, as well as “input alphabet” symbols: alphanumeric, and . and @.
Note on subexpressions: You may want to use the ability of the regex simulator to define
subexpressions that can be used in the main regex. (See example that loads when you click “Load
Default”). But it is crucial to use variable names for the subexpressions that are not themselves
symbols in the input alphabet; e.g., if you write something like A = (A|B|C);, then later when
you write A, it’s not clear whether it refers to the symbol A or the subexpression (A|B|C). Instead
try something like alphabet = (A|B|C); and use alphabet in subsequent expressions, or X =
(A|B|C); if X is not in the input alphabet.
Note on nested stars: Regex algorithms can take a long time to run when the number of
nested stars is large. The number of nested stars is the maximum number of ∗
’s (or +’s) that appear
on any root-to-leaf path in the parse tree of the regex. a
∗b
∗ has one nested star, (a

)
∗b
∗ has two
nested stars, and ((a

)
∗b

)
+ has three nested stars. Note that some of these are unnecessary; for
instance (a

)
∗b

is equivalent to a
∗b
∗ None of the problems below require more than two nested
stars; if you have a regex with more, see if it can be simplified by removing redundant stars such
a
x has an even number of a’s, or x has an odd number of b’s, or
x contains both the substrings babb and aabaa 
first appears more:
{x ∈ {0, 1}

| |x| ≥ 3 and the first symbol of x appears at least three times total in x}
repeat near end: {x ∈ {0, 1}

| x[|x| − 5] = x[|x| − 3] }
Assume we start indexing at 1, so that x[|x|] is the last symbol in x, and x[1] is the first.
email: {x ∈ Σ

| x is a syntactically valid email address}
Definition of “syntactically valid email address”: Let Σ = {., @, a, b } contain the
alphabetic symbols a and b,
1 as well as the symbols for period . and “at” @. Syntactically
valid emails are of the form username@host.domain where username and host are nonempty
and may contain alphabetic symbols or ., but never two .’s in a row, nor can either of them
begin or end with a ., and domain must be of length 2 or 3 and contain only alphabetic
symbols. For example, aaba@aaabb.aba and ab.ba@ab.abb.ba are valid email addresses,
but aaabb.aba is not (no @ symbol), nor is .ba@ab.abb.ba (username starts with a .), nor is
1
It’s not that hard to make a regex that actually uses the full alphanumeric alphabet here, but historically we’ve
found that many students’ solutions are correct but use so many subexpressions that they crash the simulator. Using
only two alphabetic symbols a and b reduces this problem, even though it makes the examples more artificial-looking.
2
aaba@aaabb.aaaaaa (domain is too long), nor is aaba@aaabb.a or aaba@aaabb. (domain is
too short), nor is ab..ba@ab.aaabb.aba (two periods in a row), nor is ab.ba@ab@aaabb.aba
(too many @ symbols).
sequence design for DNA nanotechnology: We once designed some synthetic DNA strands
that self-assembled to execute Boolean circuits: https://web.cs.ucdavis.edu/~doty/papers/
#drmaurdsa. We had to be careful designing the DNA sequences to ensure they behaved as
we wanted. Among other constraints, every sequence needed to obey all of the following rules:
• starts with a G or C and ends with a G or a C,
• has an A or T within two indices of each end (i.e., the first, second, or third symbol is
an A or T, and also the last, second-to-last, or third-to-last symbol is an A or T),
• has at most one appearance of C,
• does not have four G’s in a row; this would form something we didn’t want, called a
G-tetrad or G-tetraplex : https://tinyurl.com/yzkq3tzw
Write a regex indicating strings that violate any of the rules above, i.e., it decides the following
language: {x ∈ {A, C, G, T}

| x violates at least one of the rules}.
1.3 CFGs
For each problem submit to Gradescope a .cfg file with a context-free grammar deciding the given
language.
mod length: {x ∈ {a, b}

| |x| ≡ 3 mod 5}
substring: {x ∈ {a, b}

| x contains the substring abba}
equal 0 and 1: {x ∈ {0, 1}

| #(0, x) = #(1, x)}
palindrome: {x ∈ {0, 1}

| x = x
R}
Recall that x
R is the reverse of x.
first or last: {0
i1
j0
k
| i, j, k ∈ N and (i = j or j = k)}
integers: The set of strings that look like nonnegative decimal integers with no leading 0’s. For
example: 0, 1, 2, 3, 10, 11, 12, 21, 100, 99999
expressions: The set of strings that look like arithmetic expressions using nonnegative integers
and the operations +, -, *, /, and parentheses to group terms.
For example, the following are properly formatted arithmetic expressions: 0, 2, 2+30, 2+30*401,
(2+30)*401/(23+0), (((1+2)/3-4)*5+6)*7
The following are not: 02, (2+30, 2+30*401+, (2+30)*401), -4, 2++3, (), 2*(), ((((1+2)*3-4)*5+6)*7
3
2 Written problems
Please complete the written portion of this homework on Gradescope, in the assignment titled
“HW1 written”. There, you will find the problem statements for the written portion. Please type
solutions directly into Gradescope, using appropriate mathematical notation when appropriate,
by typing LATEX in double dollar signs. For example, type $$D = (Q,\Sigma,\delta,s,F)$$ to
display D = (Q, Σ, δ, s, F). By clicking outside the text entry field, you can see a preview of how
the mathematics will render. See the second half of this page for examples: https://hackmd.io/
cmThXieERK2AX_VJDqR3IQ?both#Gradescope-MarkdownLatex
Your written solutions will be checked for completeness but not for correctness. To receive
credit, you must make a serious attempt at all problems.
3 Optional challenge problems
Please read the syllabus for a discussion of optional challenge problems. Briefly, you don’t have to
submit a solution to these, and they aren’t worth any points. But, if you find any interesting, and
if you think you have a solution, please email it directly to me: doty@ucdavis.edu.
1. You showed by a simple counting argument that some language A ⊂ {0, 1}
≤5
cannot be
decided by any DFA with fewer than 9 states. In this problem, we will see how far this can
be pushed.
Step 1 (easy): Devise a single DFA D that can decide any language A ⊂ {0, 1}
≤5 by setting
accept states appropriately. In other words, give Q, s ∈ Q, and δ : Q × {0, 1} → Q so
that, for every A ⊂ {0, 1}
≤5
, there is FA ⊆ Q such that, letting DA = (Q, {0, 1}, δ, s, FA)
be a DFA, we have L(DA) = A. How large is |Q|?
Step 2 (moderate): If you are allowed to modify both the set of accept states and the
transitions, can you make the number of states of D less than 30? In other words, show
that for every language A ⊂ {0, 1}
≤5
, some DFA with at most 30 states decides A.
Step 3 (difficult): What is the smallest number of states needed to decide any language
A ⊂ {0, 1}
≤5
? More precisely, if s(A) is the number of states in the smallest DFA
deciding A, what is max
A⊆{0,1}≤5
s(A)? For this, you might find the Myhill-Nerode Theorem
useful: https://en.wikipedia.org/wiki/Myhill%E2%80%93Nerode_theorem
如有需要,請加QQ:99515681 或WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:代寫GA.2250、代做Python設計程序
  • 下一篇:代發EI會議論文 EI論文發表咨詢
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    99热成人精品热久久66| 成人免费在线网| 国产精品一区专区欧美日韩| 深夜精品寂寞黄网站在线观看| 色综合老司机第九色激情| 欧美一级成年大片在线观看| 久久亚洲国产成人精品无码区 | 亚洲精品一区二区三| 免费观看精品视频| 国产精品久久久久久网站| 欧美最猛黑人xxxx黑人猛叫黄| 国产高清一区视频| 天天综合五月天| 国产精品69久久| 亚洲a级在线播放观看| chinese少妇国语对白| 在线观看污视频| 国产免费观看高清视频| 蜜臀久久99精品久久久无需会员 | 欧美成人一区在线| 欧美久久久久久一卡四| 久久久久久久国产| 日本高清一区| 久久国产精品一区二区三区四区| 日本欧美色综合网站免费| 国产极品粉嫩福利姬萌白酱| 色噜噜色狠狠狠狠狠综合色一| 久久综合精品一区| 日本不卡一区二区三区视频 | 黄色一级片网址| 国产精品视频福利| 麻豆成人av| 欧美乱人伦中文字幕在线| 国产日韩在线播放| 国产片侵犯亲女视频播放| 久久精品99久久久久久久久 | 免费看成人午夜电影| 少妇精69xxtheporn| 免费在线观看日韩视频| 精品视频9999| 成人国产精品久久久久久亚洲| 色综合久久88| 91精品在线播放| 国产成人精品福利一区二区三区 | www.亚洲一区| 亚洲精品天堂成人片av在线播放| 国产精品69页| 欧美诱惑福利视频| 国产精品加勒比| 草b视频在线观看| 久久免费视频3| 国内精品久久国产| 亚洲国产高清国产精品| 国产精品电影网| 在线观看国产一区| 含羞草久久爱69一区| 欧美激情日韩图片| 国产成人精品久久二区二区91| 欧美精彩一区二区三区| 欧美精品激情视频| 亚洲综合中文字幕在线| 国产精品女视频| 九九九久久久| 91精品国产91久久久久久| 国产免费成人av| 国内精品久久久久影院优| 日韩xxxx视频| 亚洲精品久久区二区三区蜜桃臀| 久久国内精品一国内精品| 久久久国内精品| 丰满少妇久久久| 国产一区二区不卡视频| 欧美日韩亚洲一区二区三区四区 | 久久天天躁狠狠躁夜夜av| 久久男人资源站| 91免费福利视频| 国产日韩精品久久| 国产日韩欧美综合精品| 国产中文欧美精品| 美日韩免费视频| 精品午夜一区二区| 黄色动漫在线免费看| 欧美日韩亚洲第一| 欧美精品一区二区三区三州| 日本电影亚洲天堂| 日本精品久久久| 日本一区二区三区在线播放| 亚洲一区二区久久久久久久| 欧美激情精品久久久久| 欧美成人中文字幕在线| 精品伦理一区二区三区| 欧美精品在线看| 久久亚洲国产成人| 国产精品大片wwwwww| 国产精品免费视频一区二区| 国产精品视频久| 国产精品成av人在线视午夜片| 国产精品入口免费视频一| 久久视频在线观看免费| 国产精品欧美日韩久久| 国产精品日韩av| 国产精品国产对白熟妇| 国产精品手机在线| 国产精品免费电影| 国产精品第三页| 欧美激情日韩图片| 亚洲精品成人a8198a| 日批视频在线免费看| 日本国产高清不卡| 欧美精彩一区二区三区| 免费在线a视频| 黄色国产小视频| 国产美女精品视频| 91精品国产99| 久草精品电影| 久久九九免费视频| 不卡av在线网站| 欧美激情亚洲精品| 亚洲在线一区二区| 日产精品高清视频免费| 欧美一级大片在线观看| 国产日本欧美在线| 91免费看片在线| 久久久久中文字幕| 国产精品久久久久91| 中文字幕成人一区| 日韩av免费一区| 国内精品视频在线| 爱福利视频一区二区| 国产厕所精品在线观看| 国产精品免费区二区三区观看| 欧美激情在线观看视频| 天堂精品视频| 韩国一区二区av| 97成人在线观看视频| 久久久久久久久国产| 国产精品久久久久久久久影视| 欧美激情伊人电影| 日本精品va在线观看| 国产日韩精品综合网站| 久久久免费看| 国产精品极品美女粉嫩高清在线| 亚洲永久在线观看| 欧美另类一区| 91精品国产自产在线老师啪| 国产精品区一区二区三在线播放| 亚洲一区二三| 国内精品久久久久久久久| 国产玖玖精品视频| 久久久久久久久久国产精品| 久久婷婷国产麻豆91天堂| 肉大捧一出免费观看网站在线播放| 精品一区二区国产| 国产成人a亚洲精v品无码| 国产一区二区在线网站| 日韩久久精品一区二区三区| 欧美 国产 精品| 国产乱人伦精品一区二区| 91国偷自产一区二区三区的观看方式 | 91福利视频在线观看| 久久久久久久91| 国产精品户外野外| 一本色道久久综合亚洲精品婷婷| 三级网在线观看| 国内精品伊人久久| 91免费在线观看网站| 色婷婷综合久久久久| 欧美精品制服第一页| 懂色一区二区三区av片| 欧美精品欧美精品| 国产伦精品一区二区三区视频免费| 91精品国产99久久久久久| 久久最新资源网| 亚洲综合小说区| 日韩色妇久久av| 国产欧美日韩视频一区二区三区| 久久亚洲一区二区| 国产精品国产三级国产aⅴ浪潮 | 欧美激情日韩图片| 日韩一级免费看| 国产美女永久无遮挡| 久久久久久久国产精品| 最新不卡av| 免费在线国产精品| 国产精品av免费在线观看| 国产精品九九久久久久久久| 日韩avxxx| 成人免费网站在线| 国产精品裸体瑜伽视频| 亚洲bt天天射| 国产一区二区三区免费不卡| 国产二区不卡| 色综合久久88色综合天天看泰| 欧美一级片免费播放| 国产婷婷一区二区三区| 久久久久久九九九九| 亚洲精品一区国产精品| 国产日韩一区二区三区| 国产成人免费观看| 亚洲精品在线观看免费|