Message Boards Message Boards


Calculate Mod and more in W|A

Posted 3 months ago
3 Replies
2 Total Likes

I want to calculate a MOD-11 check digit; and then do some additional calculations.

I start with 12 integer variables a-l; some values are known a=5,b=6,g=6,h=5,k=7,l=9

I calculate intermediate weighted sum as

x=(a * 13)+(b * 12)+(c* 11)+(d * 10)+(e * 9)+(f * 8)+(g * 7)+(h * 6)+(i * 5)+(j * 4)+(k * 3)+(l * 2)

Then calculate MOD-11 of that sum y=mod(x,11)

Then calculate check digit z=11-y

Now I do these two additional calculations:

9.812+((x * z)/1000)=11.288, 15.780-((x * y)/1000)=11.844

I was hoping this site can tell me values of c,d,e,f,i,j that makes this all work; but I get "Wolfram|Alpha doesn't understand your query" message with the following input:

a=5,b=6,g=6,h=5,k=7,l=9,x=(a * 13)+(b * 12)+(c * 11)+(d * 10)+(e * 9)+(f * 8)+(g * 7)+(h * 6)+(i * 5)+(j * 4)+(k * 3)+(l * 2),y=mod(x,11),9.812+((x * z)/1000)=11.288,15.780-((x * y)/1000)=11.844

Did I do something wrong?

3 Replies
Posted 3 months ago

I think WolframAlpha has a limit on the number of characters that can make up any query.

Your problem as you have shown it takes 192 characters to enter into WolframAlpha and I think that might be almost twice the length that seems to be acceptable.

If I change your problem to be


then it immediately responds with a solution x=492, y=8, z=3.

Perhaps you can use this as an example and see if you can get a solution to your actual problem.

Sometimes if a problem takes too many characters to write it might be possible to solve one simpler problem and then use that solution as input to solve a second problem which gives you the desired answer.

If as a second problem I give WolframAlpha

solve 492=5*13+6*12+c*11+d*10+e*9+f*8+6*7+5*6+i*5+j*4+7*3+9*2 over the integers

and I ask it to use i as a variable instead of the square root of -1 then it immediately responds that there is no solution over the integers.

Please check all this very carefully to make certain that I have not made any mistake and have not misunderstood your problem.

Posted 3 months ago

Thanks!! I guess "e" is also a special value so I changed all variables; I also know these are single digits. site seems to like 11a as short form of a*11

solve 492-(65+72+42+30+21+18)=11a+10b+9c+8x+5y+4z,a<10,b<10,c<10,x<10,y<10,z<10

But Wolfram could still not solve it; perhaps I made a typo. I solved manually 5,6,6,3,6,4,6,5,6,8,7,9

Posted 3 months ago

It seems unusual that you are multiplying one of your variables by 11 and also working modulo 11. That would seem to allow any value for that variable.

I am not sure your problem is described precisely enough for me to know I am trying to solve the correct thing.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract