Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to select all polynomials which have degree greater than a give number out of a list of polynomials!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35518] Re: [mg35498] How to select all polynomials which have degree greater than a give number out of a list of polynomials!
  • From: Andrzej Kozlowski <andrzej at yhc.att.ne.jp>
  • Date: Wed, 17 Jul 2002 02:09:12 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In Mathematica you do not use loops or recursion for such tasks because 
you have purpose designed functions  like Select or Cases. In this case:


In[15]:=
Length[Select[s,Exponent[#,x]â?¥31&]]

Out[15]=
2300

you see that there are 2300 polynomials of degree >=31. (If you want a 
list of them just run the above code without Length).

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/


On Tuesday, July 16, 2002, at 04:50  AM, Chekad Sarami wrote:

> Sorry,,I was not sure if the last one went through or not!!:)
>
>
> Hi,
>
> I want to choose from the following list of polynomials ( list s ),
>
> a: =FactorList[Factor[x^63-1, Modulus\[Rule]2]]
> t :=Table[a[[i,1]],{i,Length[a]}]
> s :=Union[Flatten[
>       Table[
>
>         PolynomialMod[(x+1)*
>             t[[3]]^x3 t[[ 4]]^x4   t[[5]]^x5 t[[ 6]]^x6  t[[7]]^x7  t
> [[ 8]]^
>               x8  t[[9]]^x9  t[[ 10]]^x10 t[[11]]^x11  t[[ 12]]^x12 
> t[[13]]^
>               x13  t[[ 14]]^x14,2] ,{x3,0,1}, {x4 ,0,1},{x5,0,1}, {x6 
> ,0,
>           1},{x7,0,1}, {x8 ,0,1},{x9,0,1}, {x10 ,0,1},{x11,0,1}, {x12 
> ,0,
>           1},{x13,0,1}, {x14 ,0,1}]]
>                                                     ]
>  polynomials of degree greater than 31.
>
>
>  I wrote these these 2 functions but none of these work.
>
>
>
> 1. Using Recursion on list
>
>
>
>
>
> v={};w=1;
> If[Exponent[s[[w]],x]>31,Append[v, {}],Append[v, s[[w]]]];
> v
>
>
>
> 2. Using While
>
>
>
>
>
> v={};w=1;
> While[Exponent[s[[w]],x]>31,v=Append[v, s[[w]]]; i++ ];
> v
>
>
>
> Does anybody have an idea to do this.
>
> Thanks a lot for your help
>
>
>
> Best regards
>
>
>
> CHEKAD SARAMI
>
>
>
> Department of Mathematical Sciences
>
> Michigan Technological University
>
> Houghton, MI 49931
>
> Phone:    906-487-1990
>
> Office:    Widmair Bld. CRI
>
> email:   csarami at mtu.edu
>
> Fax:    906-487-3313
>
>
>
> ****************************************************************
>
> Sometimes out light goes out but is blown into flame by
>
> another human being. Each of us owes our deepest thanks
>
> to those who have rekindled this light,
>
> --- Albert Schweitzer ---
>
>
>
> ****************************************************************
>
>
>
>
>
>
>
>
>



  • Prev by Date: Re: Function resolution bug in g++ ?
  • Next by Date: Re: How to select all polynomials which have degree greater than a give number out of a list of polynomials!
  • Previous by thread: How to select all polynomials which have degree greater than a give number out of a list of polynomials!
  • Next by thread: Re: How to select all polynomials which have degree greater than a give number out of a list of polynomials!