[Date Index]
[Thread Index]
[Author Index]
Re: Substitution!!!
*To*: mathgroup at smc.vnet.net
*Subject*: [mg35679] Re: [mg35660] Substitution!!!
*From*: Tomas Garza <tgarza01 at prodigy.net.mx>
*Date*: Thu, 25 Jul 2002 04:46:29 -0400 (EDT)
*References*: <200207240607.CAA28759@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
To start with, you have only 13 *and not 14* polynomials. I would suggest
you make a straightforward assignment, such as
In[1]:=
Clear[s];
s = {1 + x, 1 + x + x^2, 1 + x + x^3,
1 + x^2 + x^3, 1 + x + x^6, 1 + x^3 + x^6,
1 + x + x^2 + x^4 + x^6, 1 + x + x^3 + x^4 + x^6,
1 + x^5 + x^6, 1 + x + x^2 + x^5 + x^6,
1 + x^2 + x^3 + x^5 + x^6, 1 + x + x^4 + x^5 + x^6,
1 + x^2 + x^4 + x^5 + x^6};
Here you check that there are only 13:
In[2]:=
Length[s]
Out[2]=
13
so that, for example,
In[3]:=
s[[1]]
Out[3]=
1 + x
Then, you get
In[4]:=
Product[s[[i]], {i, 1, 8}]
Out[4]=
(1 + x)*(1 + x + x^2)*(1 + x + x^3)*(1 + x^2 + x^3)*
(1 + x + x^6)*(1 + x^3 + x^6)*(1 + x + x^2 + x^4 + x^6)*
(1 + x + x^3 + x^4 + x^6)
as desired. You could benefit enormously by using a proper notation and
display form. Define
In[5]:=
Subscript[s_, n_] := s[[n]]
and display this cell (and other cells, too) as standard form (select the
cell or cells, and then Cell | Convert To | Standard Form). You'll see your
formulas displayed very nicely. It is easy to write Subscript[s, n] by
typing s, then Ctrl - (i.e., Ctrl key and then minus sign) and then n.
Tomas Garza
Mexico City
----- Original Message -----
From: "Chekad Sarami" <csarami at mtu.edu>
To: mathgroup at smc.vnet.net
Subject: [mg35679] [mg35660] Substitution!!!
> Hi,
>
>
> I have a question regarding substitute of an expression with index
> variables..I need to make a table for some products of irreducible
> polynomials (Irreducible factors of x^63 -1) . But they are so large and I
> can't fit them into the columns of my table. So I need to use these
> substitutions
>
> {S_1, S_2, S_3, S_4, S_5, S_6, S_7, S_8, S_9, S_10, S_11, S_12, S_13,
S_14}
> : ------> {1 + x, 1 + x + x^2, 1 + x + x^3, 1 + x^2 + x^3, 1 + x + x^6,
> 1 + x^3 + x^6, 1 + x + x^2 + x^4 + x^6, 1 + x + x^3 + x^4 + x^6, 1 +
> x^5 + x^6, 1 + x + x^2 + x^5 + x^6, 1 + x^2 + x^3 + x^5 + x^6, 1 + x +
x^4
> + x^5 + x^6, 1 + x^2 + x^4 + x^5 + x^6}
>
>
>
> ***** The right side is a list of irreducible polynomials which is
assigned
> to {S_1, S_2,.... S_14}.*******
>
>
>
> For example instead of putting this large expression (1 + x) (1 + x +
x^2)
> (1 + x + x^3) (1 + x + x^6) (1 + x^3 + x^6) (1 + x + x^2 + x^4 + x\^6) (1
+
> x + x^3 + x^4 + x^6) (1 + x + x^2 + x^5 + x^6) in my table I can write it
in
> tems of S_i's in this form S_1 S_2 S_3 S_4 S_5 S_6 S_7 S_8.
>
>
>
> I tried ReplaceAll but it changes i.e. the above example to S_1
(S_1+x^3)
> (S_1+x_6) .... Which is not what I want.
>
> Can anybody tell me how to do this.
>
>
>
>
>
> Regards
>
> CHEKAD
>
>
>
>
Prev by Date:
**RE: Re: Slow iteration in a functional program**
Next by Date:
**RE: RE: Re: Q: Simplify with "muchless"assumptions**
Previous by thread:
**Re: Substitution!!!**
Next by thread:
**Re: Substitution!!!**
| |