微积分和编程语法之间有什么关系?

发布于 2024-09-16 06:47:34 字数 267 浏览 5 评论 0原文

我这个学期开始学微积分。我以前使用过编程(或脚本)语言,主要是 PHP 和 C#。我没有做过太多低级的工作。我在语法之间建立的唯一关系是带有 Y 组合器的匿名函数和带有集合表示法的数组(我什至不确定这些是否正确)。

我总是看到微积分和编程之间的相似之处——它几乎就像命理学——那么微积分和编程语言有什么关系呢?

潜意识里,我知道存在关系,但我认为我不知道描述它的正确术语。有些人向我推荐了“计算理论”和“图灵机”,但我还没有真正研究过。如果我不完全理解计算理论,我还能认为自己是程序员吗?

I'm starting Calculus this semester. I've used programming (or scripting) languages before, mostly PHP and C#. I haven't done much low-level work. The only relationships I've made between the syntaxes are Anonymous functions with Y-Combinators and Arrays with Set-notation (I'm not even sure if these are correct).

I always see similarities between Calculus and programming — it's almost like numerology — so how do calculus and programming languages relate?

Subconsciously, I know there are relationships, but I don't think I know the proper terminology to describe it. Some people have referred me to "computational theory" and "Turing machines", but I haven't really looked into it yet. Can I still consider myself a programmer if I don't fully understand computational theory?

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

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

发布评论

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

评论(2

芯好空 2024-09-23 06:47:34

“微积分”这个词在数学中的含义是:

任何具有象征意义的正式系统
表达式根据
遵守固定规则。

因此,仅仅因为两个概念的名称都包含“微积分”一词就认为它们在某种程度上相关,这是没有道理的。

Lambda 演算是建模计算的一种形式主义,可证明等价于 图灵机。图灵机和 lambda 演算(大约在同一时间独立开发)的目的是提供一个形式系统,在该系统中可以严格证明有关计算的陈述。这是理论计算机科学的基础。它与编程语言相关是因为 Church-Turing 论文,该论文本质上指出任何编程能够模拟图灵机的语言能够计算任何可能计算的东西。满足此属性的语言称为图灵完备。几乎所有现代通用编程语言都具有此属性。

微分/积分,你在高中学到的那种,与其他 lambda 演算没有任何共同之处比“微积分”这个词更重要。它与编程无关......除非您正在编写一个程序来计算积分或导数。

一阶逻辑(一种谓词演算)在人工智能领域具有一定的相关性自动化定理证明,但这只是使用计算机来解决数学问题,与计算的基础理论或编程语言的设计无关。

"Calculus" is a word meaning, in the context of mathematics:

Any formal system in which symbolic
expressions are manipulated according
to fixed rules.

So it does not stand to reason that two concepts are in some way related just because their names both contain the word "calculus".

Lambda calculus is a formalism for modeling computation, provably equivalent to the Turing machine. The purpose of both Turing Machines and the lambda calculus (which were developed independently around the same time), is to provide a formal system in which statements about computation can be rigorously proved. This is the fundamental underpinning of theoretical computer science. It relates to programming languages because of the Church-Turing Thesis, which essentially states that any programming language capable of emulating a Turing Machine is capable of computing anything that can possibly be computed. A language satisfying this property is called Turing-complete. Nearly all modern general-purpose programming languages have this property.

Differential/Integral calculus, the kind you learned in high school, has nothing in common with lambda calculus other than the word "calculus". It has nothing to do with programming... unless you're writing a program to compute integrals or derivatives.

First-order logic (a type of predicate calculus) has some relevance in the domain of artificial intelligence and automated theorem-proving, but again this is just using computers to solve math problems, and has no relationship to the underlying theory of computation, or to the design of programming languages.

凉城 2024-09-23 06:47:34

数字命理学是完全不同的东西,但这不是重点!

我已经有一段时间没有学微积分了,但它仍然是数学。它在物理和机械工程中有很多应用。

微积分和编程有些相关,比如你提到的计算理论,它也是数学的一个子集,但严格来说它根本不是编程。

最后,您可以使用编程语言和软件来求解微积分方程,但您不需要这样做。微积分的存在时间比计算机要长得多!

Numerology is something entirely different, but that's not the point here!

Its been awhile since I took calculus, but nevertheless, it is mathematics. It has a lot of applications with physics and mechanical engineering.

Calculus and programming are somewhat related, such as your mention of computational theory, which is also a subset of mathematics, but strictly speaking it is not at all programming.

Lastly, you can use programming languages and software to solve calculus equations, but you don't need to. Calculus has been around for a lot longer than computers!

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