小编red*_*ing的帖子

证明某种语言是正常的

在我的计算理论课中,我们有一个证明语言是常规的任务.该语言定义为:

B = { | 在与含有至少 1秒,对}1kyy{0, 1}*ykk >= 1

这种语言在我看来就像需要一个下推自动机来为此创建一台机器,但是如果有人能够推动我朝着正确的方向努力来证明这是一种常规语言.向我展示其中一种证明方法:创建NFA,DFA,正则表达式或常规语法会很有帮助.

regex regular-language

5
推荐指数
1
解决办法
1692
查看次数

Haskell中的无限产品列表

我试图用Haskell解决的问题定义如下:

Write a function that takes a list of numbers in increasing order and
returns a list of all Integers (in increasing order) that can be made
by multiplying only the numbers in the input list. Note that this is
an infinite list, eg., for the input list 2, 3, 5, the output list will be
2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, ...
Run Code Online (Sandbox Code Playgroud)

在Haskell中,我建立了以下代码:

prodList s = [f| f <- [(head s)..], …
Run Code Online (Sandbox Code Playgroud)

haskell types list

1
推荐指数
1
解决办法
191
查看次数

标签 统计

haskell ×1

list ×1

regex ×1

regular-language ×1

types ×1