TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Powerset construction in C#

29 点作者 MitjaBezensek大约 10 年前

2 条评论

kazinator大约 10 年前
The terminology is a little confusing. It's better to call the NFA to DFA algorithm the "subset construction". The power set is a term which is used to denote the set of all subsets of a set. The states of a DFA are not all the possible subsets of the NFA; just those subsets which are generated by epsilon-closures on the state transitions. I.e. the set of DFA states consists of a subset of the power set of the NFA states.
评论 #9469315 未加载
carsongross大约 10 年前
Believe it or not, I implemented powerset() as a joke in Gosu years ago:<p><pre><code> var set : java.util.Set&lt;String&gt; = {&quot;a&quot;, &quot;b&quot;, &quot;c&quot;} print( set.powerSet() ) </code></pre> prints<p><pre><code> [[], [b], [c], [b, c, a], [a], [b, c], [a, c], [b, a]] </code></pre> You can try it here (until the Heroku dyno goes down):<p><pre><code> http:&#x2F;&#x2F;gosu-lang.github.io&#x2F;play.html</code></pre>
评论 #9467063 未加载
评论 #9467117 未加载