自动机有什么应用?

发布于 2024-12-12 07:50:27 字数 70 浏览 0 评论 0原文

换句话说,我为什么要学习它?我什么时候会说……哦,我需要了解下推自动机或图灵机。

我看不到该材料的应用。 谢谢

In other words, why should I learn about it? When am I going to say... oh I need to know about push down automata or turing machines for this.

I am not able to see the applications of the material.
Thanks

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

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

发布评论

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

评论(4

内心激荡 2024-12-19 07:50:27

您应该学习自动机理论,因为它将帮助您了解给定系统中计算的可能性。了解下推自动机和通用图灵机之间区别的人就会明白为什么尝试使用正则表达式解析 HTML 是一个坏主意。那些认为尝试使用 RE 解析 HTML 不合适的人。

You should learn about automata theory because it will help you understand what is computationally possible in a given system. People who understand the difference between a push-down automata and a universal turing machine understand why trying to parse HTML with regular expressions is a bad idea. People who don't think it is just fine to try to parse HTML with REs.

拍不死你 2024-12-19 07:50:27

有些问题非常适合这种解决方案,其中一些是:

  • 解析器
  • 有状态系统的
  • 模拟事件驱动问题

可能还有很多其他问题。如果您开始编写具有一些临时状态变量的代码(具体取决于某些函数可以执行此操作或执行此操作),那么您可能会从正确的 FSA 中受益。

There are problems that are nice fit to this kind of solutions, some of which are:

  • parsers
  • simulations of stateful systems
  • event-driven problems

There are probably many others. If you start writing code that has some ad-hoc state variable depending on which some functions can do this or that, you can probably benefit from proper FSA.

牵强ㄟ 2024-12-19 07:50:27

首先,我的立场是,有些东西值得学习,不是因为它们立即有用,而是因为它们本质上有价值。现代教育的一大失败在于,当学生仍然易受影响时,它无法让他们相信这一点。

话虽这么说,自动机理论既具有内在价值,又非常有用。解析文本、编译程序和计算设备的功能只能使用自动机理论给我们的东西来真正理解……而充分利用计算系统需要深入的理解。自动机理论使我们能够回答一些关于计算的最基本问题:我们需要哪些资源来进行计算?有了给定的资源,我们能解决什么问题?是否存在无论我们拥有多少资源都无法解决的问题?更不用说复杂性理论(涉及计算效率)需要自动机理论才能进行有意义的定义。

First off, it's my position that there are things worth learning not because they're immediately useful, but because they are inherently valuable. A great failing of modern education is that it does nothing to convince students of this when they're still impressionable.

That being said, automata theory is both inherently valuable and incredibly useful. Parsing text, compiling programs, and the capabilities of computing devices can only really be understood using the kinds of things automata theory gives us... and getting the most out of computational systems requires deep understanding. Automata theory allows us to answer some of the most fundamental questions we can ask about computation: what resources do we need to do computation? with given resources, what can we solve? are there problems which can't be solved no matter how many resources we possess? Let alone the fact the complexity theory - which deals with the efficiency of computations - requires automata theory in order to be meaningfully defined.

哭了丶谁疼 2024-12-19 07:50:27

了解自动机(只不过是机器)可以让我们了解计算的局限性。当自动机不接受字符串时,意味着机器无法将该字符串作为输入。状态图通常给出输入的可能结果,这使我们能够构建解析器/机器。

一个很好的例子是检查电子邮件 ID 的格式。如果电子邮件格式不好,软件在填写表单时不会接受电子邮件 ID。此处,该软件仅接受特定格式的电子邮件 ID。我们能够通过使用自动机和状态机从理论上解决这个问题来构建这样的软件。

Learning about automata(which are nothing but machines) gives an idea about the limits of computation. When an automata does not accept a string, it mean a machine cannot take that string as an input. State diagrams generally gives the possible outcomes for an input which makes us build parsers/machines.

Good example would be checking the format of email-id. Softwares donot accept the email-ids while filling a form if the email format is not good. Here the software is accepting email-ids only in a specific format. We were able to build a software of such by basically sorting out this theoretically using automata and state machines.

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