Jump to content

hisoka

Recommended Posts

I tried to find the solution for this problem :

 

a+b+c+d+e+f+g+h+i+j+k....=1286

 

(a*b*c*d*e*g*h*i*j*k....) mod 65537 = 16628

 

the same numbers used to find 1286 should be used to find 16628

 

 

numbers used can be from 97 to 122

 

when I added

 

97+101+102+105+106+107+108+109+110+112+114+115=1286

 

but

 

(97*101*102*105*106*107*108*109*110*112*114*115) mod 65537 = 6825

 

 

 

2262746359185661109376000 mod 65537 = 6825 which is wrong because it is not 16628

 

2262746359185661109385803 mod 65537 = 16628 but I could not find what are the numbers that

 

when added give 1286 and when multiplied together mod 65537 give 16628

 

Moreover there are many possibilities to get 1286 and many possibilities to get 16628 but I cannot

 

find the possibility that give 1286 and 16628 so any help would be appreciated on how to find this possibility.

Link to comment
Share on other sites

You might want to use MATLAB to solve problems if you run into them this frequently. It's a command line for working with math. It has a steep learning curve, though.

 

You can just try to solve them on paper. The more variables you have the more difficult it is to find a solution to a problem and you have a whole lot of them.

Link to comment
Share on other sites

the MATLAB program is a huge program and environment , it needs a knowledge of the MATLAB programming language , a great computer resources ( like 1g of Ram) which I do not have and it will not serve me if I ignore the algorithm or the trick by which my mathematical problem will be solved . Besides , to be sincere , I do not want to lose my time in learning about MATLAB (which is a secondary thing for me )meanwhile ignoring(the important thing which is my problem). There is a trick if I know it I will be able to find the solution. The problem is that I cannot find it this trick.

 

I noticed that , by all respect to your answers which I appreciated and thanks , you give me links to follow instead of you trying to give me your own solution or version or vision to the problem. This is why I would like to make something clear : Before I even post any message in this thread to ask for help , I always exhaust all the resources , data , information , articles and videos in Google . Once I find nothing that can help me and I feel that I am stuck and confused , then and only then , I post my message in this forum . I am a newbie and I never learned computer programming in any school or university and I have no one to show me or teach me . I am alone like a little ship in the immense ocean . I count on myself but sometime, I reach a level that I cannot surpass without some forum help this is why I am here . So you no need to give me links . It would be useful if you give me your own knowledge instead of giving me other links that I already exhausted and already know

Link to comment
Share on other sites

This isn't a programming problem. It's a math problem.

 

The solution to your question is difficult. What makes it even more difficult is that the number of variables is variable in itself.

 

Let's start with just one variable:

a = 1286

a mod 65537 = 16628

 

There is no solution to this because the system is incompatible.

 

Now two variables:

a + b = 1286

a*b mod 65537 = 16828

 

We can use any of the three methods of two variable equations to find it out. For example, singling out a in both equations

a = 1286 - b

a*b = 16828 + 65537 → a = (16828 + 65537) / b

 

therefore

1286 - b = (16828 + 65537) / b

which leads to

-b2 + 1286*b - 82365

 

Now we have a quadratic equation to solve. I asked Wolfram Alpha to solve it and I got this:

http://www.wolframalpha.com/input/?i=-x^2+%2B+1286x+-+82365+%3D+0

 

Quadratic equations have two possible solutions, so here they are approximated:

a = 1218.399 b = 67.601

a = 67.6 b = 1218.4

 

Would you like to find the solution for three variables?

Link to comment
Share on other sites

I think the best solution is to write a brute force program in javascript that does the work for me . However , as I am not good in programming and a newbie , I thought about an easier solution :

 

the algorithm to solve this problem will be like this :

 

1) generate all the possible addition operations with their result to see all the possible addens that gives 1286

 

2) once find multiply them together mod 65537 and see which combination of addends when multiplied together mod 65537 gives 16628

 

the first step is the hard step for me . the second is easy .

 

the first step

 

var a = new Array (97 , 98, 99 , 100 , 101 , 102,103,104,105,106 , 107,108,109,110,111,112,113,114,115,116,117,118)

 

now I need help on how to iterate through them using for loop and add the addends in all possible cominations and to see all the possible combinations of these numbers that can provoke 1286

 

the rest is easy . So any help would be appreciated

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...