Message Boards Message Boards

0
|
4595 Views
|
7 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Reuse the solutions {(x==-6&&y==-7)... in the other formula?

HELLO!

I get as the output of a given number of equations, these integer values of x, y. (comma separates each group of solutions for each equation)

{(x==-6&&y==-7)||(x==-6&&y==4)||(x==-5&&y==4)||(x==-3&&y==-6)||(x==-2&&y==-3)||(x==-2&&y==-1),(x==-6&&y==-7)||(x==-5&&y==4)||(x==-2&&y==-3)||(x==-2&&y==-1)||(x==-1&&y==-3),(x==-6&&y==-7)||(x==-5&&y==4)||(x==-4&&y==-4)||(x==-2&&y==-3)||(x==-2&&y==-1)||(x==0&&y==2)||(x==2&&y==5)||(x==4&&y==8),(x==-6&&y==-7)||(x==-6&&y==4)||(x==-5&&y==4)||(x==-2&&y==-1)||(x==3&&y==8)||(x==6&&y==3)||(x==7&&y==3),(x==-6&&y==-7)||(x==-5&&y==4)||(x==-2&&y==-1)||(x==-1&&y==-3)||(x==3&&y==8)}

then I know the number of output lines, equal to the number of equations, but does not know the number of integers solutions for each row.

how can I reuse x, y as variables, in this formula, where "a, b, m" are known numbers?

Mod[a*x+b*y,m]

thank you

"non esiste peggior pericolo di uno stupido al potere"

POSTED BY: Mutatis Mutandis
7 Replies

Prof. Gianluca, can i write to u in private @ university mail?

POSTED BY: Mutatis Mutandis

Yes!

POSTED BY: Gianluca Gorni

If commas do not separate enough for your taste, you can try for example with

{x,y,Mod[a x + b y, m]} /. 
 Map[ToRules, {(x == -6 && y == -7) || (x == -6 && y == 4)}]
POSTED BY: Gianluca Gorni

HEHE… rispondi sempre tu alle mie stupide domande ;-)) ma qui mi caziano se scrivo in italiano, se scrivo maiuscolo… se… grazie

POSTED BY: Mutatis Mutandis

This is only English-language forum. Please use only English in your posts.

POSTED BY: Moderation Team

thanks, it works!!! but I get a single flat list of results.

it is possible to maintain the initial separation of solutions, for every equation?

thank you

POSTED BY: Mutatis Mutandis

You can use ToRules:

Mod[a x + b y, m] /. 
 Map[ToRules, {(x == -6 && y == -7) || (x == -6 && y == 4)}]
POSTED BY: Gianluca Gorni
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