Message Boards Message Boards

0
|
6449 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

lookup result. (Equation Solving)

Is there a way to obtain, as a result, a table or matrix containing only numeric values of l, m, n, o, p, x? without ConditionalExpression, and without C[1],C[1][Element]Integers&&C[2][Element]Integers&&C[3][Element]Integers&&C[4][Element]Integers&&C[5][Element]Integers],

from this:

a = 14;
b = 1;
c = 46;
d = 80;
e = 83;
d1 = 18;
d2 = 45;
d3 = 90;
d4 = 54;
d5 = 27;
Solve[{x == Mod[a + (90*l + d1)/9, 90] == Mod[b + (90*m + d2)/9, 90] == Mod[c + (90*n + d3)/9, 90] == Mod[d + (90*o + d4)/9, 90] == Mod[e + (90*p + d5)/9, 90]}, {l, m, n, o, p, x}, Integers]

i get this:

{{l -> ConditionalExpression[9 C[1], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && 
     C[5] \[Element] Integers], 
  m -> ConditionalExpression[1 + 9 C[2], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && C[5] \[Element] Integers], 
  n -> ConditionalExpression[5 + 9 C[3], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && C[5] \[Element] Integers], 
  o -> ConditionalExpression[2 + 9 C[4], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && C[5] \[Element] Integers], 
  p -> ConditionalExpression[2 + 9 C[5], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && C[5] \[Element] Integers], 
  x -> ConditionalExpression[16, C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && 
     C[5] \[Element] Integers]},
 {l -> ConditionalExpression[1 + 9 C[1], C[1] \[Element] Integers && C[2] \[Element] Integers && C[3] \[Element] Integers && C[4] \[Element] Integers && C[5] \[Element] Integers], 
  m -> ConditionalExpression[2 + 9 C[2], C[1] \[Element] In …
…

TNK

POSTED BY: Mutatis Mutandis
5 Replies
Posted 8 years ago

I usually find if I get that kind of output it's because I haven't given enough information in the form of limits, i.e. also include an upper value for {l, m, n, o, p, x}. However, if you examine the behaviour of just the first Mod section you will find it is cyclic about these numbers

{122/9, 212/9, 302/9, 392/9, 482/9, 572/9, 662/9, 752/9, 32/9, 122/9}

and you are asking for Integer solutions therefore it wont find any. You could try removing the ==x so it just compares the Mod sections, you would still need to include an upper limit for the variables and in this case it would run for hours even with the limit set at 90. Simplifying your equations somewhat and including an upper limit just for x returns a result quite quickly.

Solve[Mod[(14 + (90  l + 18))/9, 90] == 
   Mod[(1 + (90  m + 45))/9, 90] == Mod[(46 + (90  n + 90))/9, 90] == 
   Mod[(80 + (90  o + 54))/9, 90] == Mod[(83 + (90  p + 27))/9, 90] ==
    x && x < 90, {l, m, n, o, p, x}, Integers]

{}

Returning to the limits it's also wise to include lower limits too as in 0 < x < 90 if you are interested in just positive solutions.

POSTED BY: Paul Cleary

i fond "NORMAL" as great solution…

Normal[Solve[{function}, {x,y}, Integers]] /. {C[1] -> 1, C[2] -> 1}

remove "conditional expression" and replacing C[n] with 1 (if present as a product in solutions) u get a clear result.

POSTED BY: Mutatis Mutandis

grazie, poi provo...

POSTED BY: Mutatis Mutandis

Once you define

a = 14; b = 1; c = 46; d = 80; e = 83; d1 = 18; d2 = 45; d3 = 90; d4 \
= 54; d5 = 27; 
sol = Solve[{x == Mod[a + (90 l + d1)/9, 90] == 
        Mod[b + (90 m + d2)/9, 90] == Mod[c + (90 n + d3)/9, 90] == 
        Mod[d + (90 o + d4)/9, 90] == Mod[e + (90*p + d5)/9, 90]}, {l, m, 
       n, o, p, x}, Integers]

you can remove the ConditionalExpression for example with

Simplify[sol, Element[Array[C, 6], Integers]]

or with

sol /. ConditionalExpression -> (#1 &)
POSTED BY: Gianluca Gorni
Solve[x == a + (90 l + d1)/9 == b + (90 m + d2)/9 == c + (90 n + d3)/9 == d + (90 o + d4)/9 == e + (90*p + d5)/9, {l, m, n, o, p, x},
 Modulus -> 90]

{{l -> C[1], m -> 1 + C[1] + 9 C[2], n -> 5 + C[1] + 9 C[3], o -> 2 + C[1] + 9 C[4], p -> 2 + C[1] + 9 C[5], x -> 16 + 10 C[1]}}
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract