MathGroup Archive 2001

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

Search the Archive

Re: help create a unique solution system

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27656] Re: help create a unique solution system
  • From: "cdes" <cdes43 at videotron.ca>
  • Date: Sat, 10 Mar 2001 00:49:45 -0500 (EST)
  • References: <9850ep$5jr@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks mr Giroux for the infos ...here's what I did :

In[1]:= a = Table[Random[Integer, {1, 10}], {i, 5},
{j, 5}]

Out[1]:= {{6, 9, 1, 2, 3}, {10, 7, 7, 4, 9}, {4, 3, 7, 2, 1}, {5, 9, 6, 5,
5}, {10, 5, 9, 2, 6}}

In[2]:= b = Table[Random[Integer, {1, 10}], {i, 5}]

Out[2]:= {4, 1, 10, 7, 9}

x = {x1, x2, x3, x4, x5}

In[3]:= equ = Table[Sum[a[[i, j]]x[[j]], {j, 5}] ==
b[[i]], {i, 5}]

Out[3]:= {6 x1 + 9 x2 + x3 + 2 x4 + 3 x5 == 4, 10 x1 + 7 x2 + 7 x3 + 4 x4 +
9 x5 == 1, 4 x1 + 3 x2 + 7 x3 + 2 x4 + x5 == 10, 5 x1 + 9 x2 + 6 x3 + 5 x4 +
5 x5 == 7, 10 x1 + 5 x2 + 9 x3 + 2 x4 + 6 x5 == 9}

(* Ci-dessus notre systeme de 5 equations lineaires a 5 inconnues x1, x2,
x3, x4, x5, avec des coefficients entiers et des seconds membres entiers non
tous nuls *)

(* b) Trouver la solution exacte de ce systeme et faire la verification. *)

In[4]:= sol1 = Solve[equ, x]

Out[4]:= {{x1 -> -329/251, x2 -> 927/502, x3 -> 1161/502,
      x4 -> -1555/502, x5 -> -73/251}}

In[5]:= verif1 = equ /. sol1

Out[5]:= {{True, True, True, True, True}}

Mc


"cdes" <cdes43 at videotron.ca> a écrit dans le message news:
9850ep$5jr at smc.vnet.net...
> Could someone help me create a unique solution system of 5 random linear
> equations with 5 unknown x1, x2, x3, x4, x5, with integer coefficients
> (different from zero) and second members integers (all different from
zero).
> Thanks in advance,
> Mc
> kaoum at videotron.ca
>
>
>



  • Prev by Date: Re: Letting integers be integers (when using //N)
  • Next by Date: Re: help create a unique solution system
  • Previous by thread: Re: help create a unique solution system
  • Next by thread: Re: help create a unique solution system