编程是数学的一个子集吗? [英] Is programming a subset of math?

查看:85
本文介绍了编程是数学的一个子集吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经多次听到,所有编程实际上都是数学的一个子集. 有人建议 OO从根本上讲是基于数学的,但是我不明白除了一些明显的例子外,这种联系:

I've heard many times that all programming is really a subset of math. Some suggest that OO, at its roots, is mathematically based, but I don't get the connection, aside from some obvious examples:

  • 使用归纳法证明递归算法,
  • 形式正确性证明
  • 功能语言,
  • lambda演算,
  • 渐近复杂度
  • DFA,NFA,图灵机和一般的理论计算,
  • 以及包装盒上的所有东西都是二进制的事实.

我知道数学对编程非常重要,但是我对这种子集"观点感到困惑.用什么方式编程数学的子集?

I know math is very important to programming, but I struggle with this "subset" view. In what ways is programming a subset of math?

我正在寻找一种可能与企业/OO开发有关的解释,即如果存在足够牢固的联系.

I'm looking for an explanation that might have relevance to enterprise/OO development, if there is a strong enough connection, that is.

推荐答案

总的来说,请记住数学是逻辑的形式化编码,这也是我们在软件中所做的事情.

Overall, remember that mathematics is a formal codification of logic, which is also what we do in software.

您的问题中的主题列表充满了数学问题.我们能够在相当高水平的抽象上进行编程,因此原始数学可能不会让您望而却步.例如,您提到了DFA.您可以在程序中使用正则表达式而无需任何数学知识,但是当您想设计一个好的正则表达式引擎时,会发现对数学有更多的需求.

The list of topics in your question is loaded with mathematical problems. We are able to do programming on a fairly high level of abstraction, so the raw mathematics may not be staring you in the face. For example, you mentioned DFAs.. you can use a regular expression in your programs without knowing any math, but you'll find more of a need for mathematics when you want to design a good regular expression engine.

我认为您的观点很有趣.编程是一门艺术,也是一门科学.有很多交易工具",您不必坐下来做很多高级数学运算就可以简单地编写程序.实际上,当您进行编程时,很多人并没有真正在做很多数学或计算机科学.

I think you've hit on an interesting point. Programming is an art and a science. There are a lot of "tools of the trade", and you don't necessarily sit down and do a lot of high-level mathematics in order to simply write a program. In fact, when you're programming, you many not really being doing much mathematics or computer science.

当我们开始解决计算机科学中的难题时,数学就出现了.您越深入,它就会越充实自己..通常在较低的抽象级别.

It's when we start to solve difficult problems in computer science that mathematics shows up. The deeper you go, the more it will flesh itself out.. often in lower levels of abstraction.

还有一些编程领域,您不必一定要从事,但它们涉及更多的数学运算.例如,虽然您当然可以在没有任何正式数学的情况下学习语言并编写一些应用程序,但是如果没有一些应用数学,您在算法分析中就不会走得太远.

There are also some realms of programming that you don't necessarily have to work in, but they involve more math. For example, while you can certainly learn a language and write some apps without any formal mathematics, you won't get very far in algorithm analysis without some applied math.

这篇关于编程是数学的一个子集吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆