分类 学习 下的文章

形式语言与自动机2023春季期末试题回忆版

捏 今天刚考完,趁着记忆清晰,先放上来
题只能说大概一致,仅供参考

  1. Design a DFA on $\Sigma=\{a,b,c\}$, which accepts the string that there is at least one $b$ between any two $a$s
  2. Design an NFA equivalent to $a^*b^*c^+$ with 3 states
  3. Design regular expressions on $\Sigma =\{a,b\}$
    1. strings that substring $aa$ occurs at most two times
    2. strings starts with $bb$ and the length of string is divisible by 4
  4. Prove that $\{w| w\ \mathrm{which}\ 0\ \mathrm{occurs\ more\ than} 1 $}$ is not regular with pumping lemma
  5. Prove $L_1 \cup L_2$ is not regular if $L_1$ is regular $L_2$ is not regular and $L_1 \cap L_2 = \varnothing$
  6. $L=\{a^nb^n | n\geq 0\}$, design a context free grammer for $\overline{L}$, $\overline{L}$ means the complement of $L$ to $\Sigma^*$
  7. Design a DPDA for $\{a^ib^j |i\geq 1,\ j\geq i+3\}$
  8. Give a grammer $G_0$:$$ S \rightarrow aAA|aBB$$ $$A\rightarrow aaA|\epsilon$$$$B\rightarrow bBB|bbC$$$$C\rightarrow B$$
    1. Eliminate ε-productions.
    2. Eliminate any unit productions in resulting grammar.
    3. Put the resulting grammar into Chomsky Normal Form.
  9. G: $$S\rightarrow AB|aaB$$$$A\rightarrow aA|a$$$$B\rightarrow b$$
    1. Show that this grammar is ambiguous
    2. Find a grammar for the same language that is unambiguous
  10. Design a Turing Machine that turn $0^m$ to $0^{m \mod 5}$ such as $f(0^7) = 00$ and $f(0^5) = \epsilon$

如果你在期末考试前读到了这个文章,那祝你考试顺利

形式语言与自动机 部分英文单词对应

Anglais Chinois
string 字符串
alphabet 字母表
substring 子串
determinism 确定性
nondeterminism 非确定性
Deterministic Finite Automata DFA
finite 有穷
infinite 无穷
every run of 0s 0的每一趟~1
prefix 前缀
differ by n 相差n
even 偶数
odd 偶数
appear/occurrence 出现
symbol 符号
induction on 于...的归纳
consecutive 连续的
divisible by 5 可被5整除的
binary 二进制
integer 整数
be interpreted as 被解释为/被当做~2
a multiple of 5 5的倍数
in reverse 反转的
string consisting of 由...组成的字符串
nonempty 非空
transition table 转换表
proof/demonstrate/show/prove 证明/说明
inductive hypothesis 归纳假设
digit 数字
separated by 被...分开
regular 正则
regular expressions 正则表达式
suffix 后缀
contain 包含
except 除了
such that 使
adjacent 相邻的
set 集合
equal 相等的
closure 闭包
simplify 简化
transition diagram 转移图
eliminating 消除
pumping lemma 泵引理
perfect square/cube 完全平方/立方
prime 质数
common divisor 公约数
quotient
proper prefix 真前缀
states 状态
minimize 最小化
homomorphism 同态
context-free laugnage 上下文无关语言
grammar 语法
variables 变元
terminals 终结符
productions 产生式/产物
repeated 重复的
twice as many 0’s as 1’s 0是1的二倍
rightmost derivations 最右派生
derivation 派生
right-linear 右线性
a sequence of 一连串
ambiguous 歧义的
unambiguous 非歧义的
parse tree 语法分析树
operands 操作数
unit productions 单元产生式
Chomsky Normal Form 乔姆斯基范式
recursively 递归的
blocks 块,理解同runs
pushdown automata PDA,下推自动机
empty stack 空栈
final state 接受状态
Turing machines TM,图灵机
  1. eg. every run of 0s has length at least 3有0时只能是000或更多连续0
  2. eg. be interpreted as binary integer

感谢Doctor Z.制作的形式语言与自动机的英文单词对照,如果能帮到大家的话十分荣幸