有限状态机的典型字母大小是多少?

发布于 2024-10-23 00:35:37 字数 422 浏览 0 评论 0原文

不太确定这是否是正确的论坛,但理论计算机科学建议我将其移至此处...

有限状态机的典型字母大小是多少?

我目前正忙于实现一个高性能 FA 库,需要在继续之前进行一些设计考虑。我的状态空间约为 2 147 483 647 (Integer.MAX_VALUE),我觉得这已经足够了,即使对于非一般用途也是如此。现在,只剩下字母空间了。

假设字母表通常只包含所有可显示的字符(在这种情况下它可以存储为字节,这将带来非常好的性能)是否有任何优点?或者应该将字母符号转换为 String 以便您拥有字母标签?在这种情况下,我需要保留一个将 String 转换为 intshortbyte 的 Map ,取决于我想把它做成多大。

Not quite sure if this is the correct forum, but it was suggested at Theoretical Computer Science that I move it here...

What is the typical alphabet size of Finite State Machines?

I am currently busy implementing a high-performance FA library and need to make some design considerations before continuing. My state space will be in the order of 2 147 483 647 (Integer.MAX_VALUE) which I feel is more than enough, even for non-general use. Now, all that remains is the alphabet space.

Is there any merit in assuming that the alphabet would usually only consist of all displayable characters (in which case it can be stored as a byte which would result in really good performance)? Or should alphabet symbols rather be translated into Strings so that you rather have alphabet labels? In this case I would need to keep a Map that translates a String into either a int, short or byte, depending on how large I want to make it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘味果▽酱 2024-10-30 00:35:37

实际上,有限状态机的字母表是任何类型的数学“集合”。该集合的内容没有任何限制,可以是 1 和 0、AZ 或苹果橙。本身并没有“典型”的 FSM 字母大小。您的图书馆有心目中的用户吗?

Really the alphabet of a finite state machine is a mathematical 'set' of any type. There is nothing restricting the content of the set, it could be 1's and 0's, A-Z, or apples-oranges. There is no 'typical' FSM alphabet size as per se. Do you have a user in mind for your library?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文