Author |
Message |
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 13 May 2007 01:43:55 pm Post subject: |
|
|
Mode snippets?
1st Spoiler wrote: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans→X
seq(sum(Ans=Ans(X)),X,1,dim(Ans
Ans=max(Ans
LX(max(Ansseq(X,X,1,dim(Ans
[post="102845"]<{POST_SNAPBACK}>[/post] 2nd Spoiler wrote: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans→X
SortA(LX
not(ΔList(LX
LX(max(seq(XAns(X)Ans(X-1),X,2,dim(Ans
[post="102845"]<{POST_SNAPBACK}>[/post] 3rd Spoiler wrote: [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans→X
seq(sum(Ans=Ans(X)),X,1,dim(Ans
LX*(Ans=max(Ans
[post="102859"]<{POST_SNAPBACK}>[/post]
New challenge:
Teaser/Challenge #23
Given a list of the coefficients of a univariate polynomial, make a 40-byte
program that will display each successive derivative [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ć’([font="times"]n)([font="times"]x), save where
the result is [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]0, in the same format as the input. Visit here if you're stuck!
Last edited by Guest on 15 Jun 2007 02:49:31 am; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 13 May 2007 01:49:28 pm Post subject: |
|
|
by "display each successive derivative" do you mean in a loop?
Oh and what are those spoilers the solution to? |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 13 May 2007 02:04:52 pm Post subject: |
|
|
DarkerLine wrote: by "display each successive derivative" do you mean in a loop? Since the entered polynomial can be of any degree, one or more loops is required to display all of the subsequent derivatives.
DarkerLine wrote: Oh and what are those spoilers the solution to? The mode teaser, as shown by the accompanying snapbacks.
Last edited by Guest on 13 May 2007 02:06:05 pm; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 13 May 2007 02:16:37 pm Post subject: |
|
|
Snapbacks, right. I've become accustomed to ignoring those in quotes, my eye just skipped right over them.
[quote name='33-byte single mode program']real(max(Ans+iE9seq(sum(Ans(I)=Ans),I,1,dim(Ans[/quote] |
|
Back to top |
|
|
thornahawk μολών λαβέ
Active Member
Joined: 27 Mar 2005 Posts: 569
|
Posted: 14 May 2007 07:17:38 am Post subject: |
|
|
Not the solution Goose had in mind (weighing in at 51 bytes minus title), yet this uses a rather cute formula. :)
Solution (highlight below):
Ans→A
For(J,1,dim(Ans
Pause seq(((I-1) nPr (J-1))∟A(I),I,J,dim(∟A
End
thornahawk |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 14 May 2007 08:34:31 am Post subject: |
|
|
Nor quite the orientation of input I had in mind, but it works great. :D
Also, [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]nPr is tightly bound to its arguments—utilize this!
Clear a set of parentheses, and it'll work the same.
Last edited by Guest on 14 May 2007 08:41:03 am; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 14 May 2007 05:21:55 pm Post subject: |
|
|
Weregoose, did you intend the term degrees to go in increasing or decreasing order? I can only get 40 bytes if I write the polynomial "backwards": that is, {1,0,2,3,4} is 4x4+3x3+2x2+1. The other way gets me 42 bytes.
Last edited by Guest on 14 May 2007 07:30:52 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 14 May 2007 06:47:44 pm Post subject: |
|
|
In my 40-byte (ignoring title) program, 4x4+3x3+2x2+1 would be entered as [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]{4,3,2,0,1}. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 14 May 2007 07:30:34 pm Post subject: |
|
|
Right, I forgot the x term, let me fix that for clarity.
I guess my program needs more work then? |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 16 May 2007 11:31:07 am Post subject: |
|
|
Are there any other attempts at this before I reveal? If it's trouble understanding
this challenge, then it's not that hard to figure out once you get your hands dirty.
Click on the link I gave earlier and try a few polynomial inputs. There is a pattern!
Last edited by Guest on 16 May 2007 11:37:20 am; edited 1 time in total |
|
Back to top |
|
|
Recursive Acronym
Advanced Member
Joined: 11 Dec 2006 Posts: 499
|
Posted: 16 May 2007 08:56:48 pm Post subject: |
|
|
I know the power rule, but I don't have my calc handy.
Last edited by Guest on 16 May 2007 08:58:02 pm; edited 1 time in total |
|
Back to top |
|
|
trigkid213
Member
Joined: 30 Mar 2006 Posts: 208
|
Posted: 16 May 2007 09:12:11 pm Post subject: |
|
|
Give me just a little more time - I know how to do it, just can't quite get the 40 bytes. |
|
Back to top |
|
|
|