什么是一些算法寻找给定一个整数序列的封闭形式的功能? [英] What are some algorithms for finding a closed form function given an integer sequence?

查看:147
本文介绍了什么是一些算法寻找给定一个整数序列的封闭形式的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待形成了程序化的方式,采取一个整数序列,并吐出一个封闭的形式功能。是这样的:

由于:1,3,6,10,15

返回:N(N + 1)/ 2

样品可能是有用的;语言是不重要的。

解决方案

这倒是数学的一个极其深刻的,复杂和活跃的领域。解决的办法是差点儿微不足道在某些情况下(线性复发)和该死的几乎不可能在其他国家(认为2,3,5,7,11,13,......),你可以先来看看的生成函数的例如,看着香草维尔夫的的不可思议书(参见第1页(2E))上的问题,但只会让你这么远。<​​/ P>

不过我觉得你最好的选择就是放弃,查询斯隆的COM prehensive 整数序列时的百科全书你需要知道的答案,而是花时间阅读意见的人在这个深层问题的最古怪的人物。

任何人谁告诉你这个问题是可以解决的是卖你的蛇油(的​​维尔夫书(2E)的参118页。)

I'm looking form a programatic way to take an integer sequence and spit out a closed form function. Something like:

Given: 1,3,6,10,15

Return: n(n+1)/2

Samples could be useful; the language is unimportant.

解决方案

This touches an extremely deep, sophisticated and active area of mathematics. The solution is damn near trivial in some cases (linear recurrences) and damn near impossible in others (think 2, 3, 5, 7, 11, 13, ....) You could start by looking at generating functions for example and looking at Herb Wilf's incredible book (cf. page 1 (2e)) on the subject but that will only get you so far.

But I think your best bet is to give up, query Sloane's comprehensive Encyclopedia of Integer Sequences when you need to know the answer, and instead spend your time reading the opinions of one of the most eccentric personalities in this deep subject.

Anyone who tells you this problem is solvable is selling you snake oil (cf. page 118 of the Wilf book (2e).)

这篇关于什么是一些算法寻找给定一个整数序列的封闭形式的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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