Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6479 > unrolled thread
| Started by | richardmathur <rickarrano@gmail.com> |
|---|---|
| First post | 2011-11-16 09:52 +0000 |
| Last post | 2011-11-18 11:26 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Function fits with combinations richardmathur <rickarrano@gmail.com> - 2011-11-16 09:52 +0000
Re: Function fits with combinations "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-11-17 11:06 +0000
Re: Function fits with combinations DrMajorBob <btreat1@austin.rr.com> - 2011-11-18 11:26 +0000
| From | richardmathur <rickarrano@gmail.com> |
|---|---|
| Date | 2011-11-16 09:52 +0000 |
| Subject | Function fits with combinations |
| Message-ID | <ja015e$64t$1@smc.vnet.net> |
Hello, I've been attempting to use Wolfram to help me identify a function but after playing with "fit" it keeps giving me linear/quadratic/etc. solutions and I am sure that the function generating my data is using combinations. I have a series of n length/m length pairs and I've been generating alignments between the two, and in the first segment of the pair any character can map to 1-3 chars of the latter. The number of alignments is as follows: 3,3 = 1 3,4 = 3 3,5 = 6 3,6 = 7 3,7 = 6 3,8 = 3 3,9 = 1 4,4 = 1 4,5 = 4 4,6 = 10 4,7 = 16 4,8 = 19 4,9 = 16 4,10 = 10 4,11 = 4 4,12 = 1 5,5 = 1 5,6 = 5 5,7 = 15 5,8 = 30 5,9 = 45 5,10 = 51 5,11 = 45 5,12 = 30 5,13 = 15 5,14 = 5 5,15 = 1 Can anyone help me to either identify the function in question or figure out how to point to Wolfram that it almost certainly has to do with combinations? Thanks, Richard
[toc] | [next] | [standalone]
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Date | 2011-11-17 11:06 +0000 |
| Message-ID | <ja2prq$ma0$1@smc.vnet.net> |
| In reply to | #6479 |
In such cases I always start by consulting the Sloan page:
http://oeis.org
And violĂ , your function on the right hand sides is clearly A027907
The values are the coefficients of the expansion of (1+x+x^2)^n
Clear[x, n];
Table[{n, Expand[(1 + x + x^2)^n]}, {n, 1, 5}];
{1, 1 + x + x^2}
{2, 1 + 2*x + 3*x^2 + 2*x^3 + x^4}
{3, 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6}
{4, 1 + 4*x + 10*x^2 + 16*x^3 + 19*x^4 + 16*x^5 + 10*x^6 + 4*x^7 + x^8}
{5, 1 + 5*x + 15*x^2 + 30*x^3 + 45*x^4 + 51*x^5 + 45*x^6 + 30*x^7 +
15*x^8 + 5*x^9 + x^10}
An explicit formula is (cf. link above)
Table[Sum[Binomial[n, i]*Binomial[n - i, k - 2*i], {i, 0, n}], {n, 0,
5}, {k, 0, 2*n}];
{1}
{1, 1, 1}
{1, 2, 3, 2, 1}
{1, 3, 6, 7, 6, 3, 1}
{1, 4, 10, 16, 19, 16, 10, 4, 1}
{1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1}
Best ragards,
Wolfgang
"richardmathur" <rickarrano@gmail.com> schrieb im Newsbeitrag
news:ja015e$64t$1@smc.vnet.net...
> Hello,
> I've been attempting to use Wolfram to help me identify a function
> but
> after playing with "fit" it keeps giving me linear/quadratic/etc.
> solutions and I am sure that the function generating my data is using
> combinations. I have a series of n length/m length pairs and I've
> been
> generating alignments between the two, and in the first segment of
> the
> pair any character can map to 1-3 chars of the latter. The number of
> alignments is as follows:
>
> 3,3 = 1
> 3,4 = 3
> 3,5 = 6
> 3,6 = 7
> 3,7 = 6
> 3,8 = 3
> 3,9 = 1
>
> 4,4 = 1
> 4,5 = 4
> 4,6 = 10
> 4,7 = 16
> 4,8 = 19
> 4,9 = 16
> 4,10 = 10
> 4,11 = 4
> 4,12 = 1
>
> 5,5 = 1
> 5,6 = 5
> 5,7 = 15
> 5,8 = 30
> 5,9 = 45
> 5,10 = 51
> 5,11 = 45
> 5,12 = 30
> 5,13 = 15
> 5,14 = 5
> 5,15 = 1
>
> Can anyone help me to either identify the function in question or
> figure out how to point to Wolfram that it almost certainly has to do
> with combinations?
>
> Thanks,
> Richard
>
[toc] | [prev] | [next] | [standalone]
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-11-18 11:26 +0000 |
| Message-ID | <ja5fc8$6ct$1@smc.vnet.net> |
| In reply to | #6479 |
Sloan's encyclopedia is sometimes a VERY valuable resource!
Bobby
On Thu, 17 Nov 2011 05:04:19 -0600, Dr. Wolfgang Hintze <weh@snafu.de>
wrote:
> In such cases I always start by consulting the Sloan page:
> http://oeis.org
>
> And violĂ , your function on the right hand sides is clearly A027907
>
> The values are the coefficients of the expansion of (1+x+x^2)^n
> Clear[x, n];
> Table[{n, Expand[(1 + x + x^2)^n]}, {n, 1, 5}];
> {1, 1 + x + x^2}
> {2, 1 + 2*x + 3*x^2 + 2*x^3 + x^4}
> {3, 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6}
> {4, 1 + 4*x + 10*x^2 + 16*x^3 + 19*x^4 + 16*x^5 + 10*x^6 + 4*x^7 + x^8}
> {5, 1 + 5*x + 15*x^2 + 30*x^3 + 45*x^4 + 51*x^5 + 45*x^6 + 30*x^7 +
> 15*x^8 + 5*x^9 + x^10}
>
> An explicit formula is (cf. link above)
>
> Table[Sum[Binomial[n, i]*Binomial[n - i, k - 2*i], {i, 0, n}], {n, 0,
> 5}, {k, 0, 2*n}];
> {1}
> {1, 1, 1}
> {1, 2, 3, 2, 1}
> {1, 3, 6, 7, 6, 3, 1}
> {1, 4, 10, 16, 19, 16, 10, 4, 1}
> {1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1}
>
> Best ragards,
> Wolfgang
>
>
> "richardmathur" <rickarrano@gmail.com> schrieb im Newsbeitrag
> news:ja015e$64t$1@smc.vnet.net...
>> Hello,
>> I've been attempting to use Wolfram to help me identify a function
>> but
>> after playing with "fit" it keeps giving me linear/quadratic/etc.
>> solutions and I am sure that the function generating my data is using
>> combinations. I have a series of n length/m length pairs and I've
>> been
>> generating alignments between the two, and in the first segment of
>> the
>> pair any character can map to 1-3 chars of the latter. The number of
>> alignments is as follows:
>>
>> 3,3 = 1
>> 3,4 = 3
>> 3,5 = 6
>> 3,6 = 7
>> 3,7 = 6
>> 3,8 = 3
>> 3,9 = 1
>>
>> 4,4 = 1
>> 4,5 = 4
>> 4,6 = 10
>> 4,7 = 16
>> 4,8 = 19
>> 4,9 = 16
>> 4,10 = 10
>> 4,11 = 4
>> 4,12 = 1
>>
>> 5,5 = 1
>> 5,6 = 5
>> 5,7 = 15
>> 5,8 = 30
>> 5,9 = 45
>> 5,10 = 51
>> 5,11 = 45
>> 5,12 = 30
>> 5,13 = 15
>> 5,14 = 5
>> 5,15 = 1
>>
>> Can anyone help me to either identify the function in question or
>> figure out how to point to Wolfram that it almost certainly has to do
>> with combinations?
>>
>> Thanks,
>> Richard
>>
>
>
--
DrMajorBob@yahoo.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web