Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (kainui):

In mod n we can make an algorithm that gives us a new number. What value does x need to be to make this algorithm give unique results?

OpenStudy (kainui):

f is the algorithm acting on a*b*c and it takes each of the numbers in any order. \[f(a*b*c)=(a+x)*b*c+(c+x)*b+(b+x)\]

OpenStudy (kainui):

Other examples using the algorithm: \[f(a*b*c)=(a+x)*b*c+(b+x)*c+(c+x)\] \[f(a*b)=(a+x)*b+(b+x)\]

OpenStudy (ikram002p):

what does this mean ? "we can make an algorithm that gives us a new number. "

OpenStudy (kainui):

Just that we are applying these rules. So suppose we have 12, we can factor it into 4*3 and do the algorithm on it as (4+x)*3+(3+x) or we can factor it as 2*2*3 and get (2+x)*2*3+(3+x)*2+(2+x) and either way will give us the same answer. =)

OpenStudy (kainui):

I don't know if that sounds too complicated or confusing, but the answer is simple haha.

OpenStudy (ikram002p):

well not complicated i only i don't understand the question xD

OpenStudy (ikram002p):

like what is the algorithm ? what is the unique number (or what does it represent ) finally what are a,b,c,... in mod n represent

OpenStudy (ikram002p):

wait i mean new instead of unique

OpenStudy (kainui):

a, b, and c are all integers, but we could have any number of integers. What the algorithm does is it takes any amount of integers, takes one at random adds x to it, and then multiplies that sum by the rest of the numbers. Then it takes an unused number and repeats this until it runs out of numbers. So another way to write the algorithm is start with these integers \[\Large n_1, n_2, n_3,... n_i\] then picking one at random (like 3rd one why not ) we get the first term as this: \[\Large (n_3+x)*(n_1n_2n_4 \cdots n_i)+\] The next term repeats this with another random number, so the next term could be the first one: \[\large (n_3+x)*(n_1n_2n_4 \cdots n_i)+ (n_1+x)*(n_2n_4 \cdots n_i)+ \cdots\] until eventually you run out.

OpenStudy (freckles):

\[f(a_1 \cdot a_2 \cdot a_3 \cdot a_4 \cdots a_n) \\ =(a_1+x) \cdot a_2 \cdot a_3 \cdot a_4 \cdots a_n+(a_2+x) \cdot a_3 \cdot a_4 \cdots a_n +(a_3+x) \cdot a_4 \cdots a_n + \\ +(a_n+x)\] So is what we are looking at?

OpenStudy (kainui):

Yep, that's one way to look at it. But we can also do the terms out of order or even several terms at the same time! =D \[\Large f(a_1*a_2*a_3) = (a_1*a_3+x)*a_2+(a_2+x)\]

OpenStudy (kainui):

Seems ridiculous right? Hahaha

OpenStudy (freckles):

so you are saying for this algorithm x=12 works and you are looking for a set of values that do not work?

OpenStudy (kainui):

No, all values work all the time. What's the value of x that makes this algorithm work correctly for all values?

OpenStudy (freckles):

doesn't your first sentence before the question say it works for all values?

OpenStudy (ikram002p):

x=1 ? xD randomly

OpenStudy (kainui):

When I said the cases for 12 @freckles notice that there's an x in there. That's what we have to figure out, what are all the possible values of x. 12 was not equal to x, what I was saying there was we had a_1 and a_2 equal to 4 and 3 or a_1 to a_3 equal to 2,2, and 3.

OpenStudy (kainui):

@ikram002p Hahaha there are multiple right answers, but you have to prove it's true. =P

OpenStudy (ikram002p):

was only wanna see black swan view :3 like checking out values that works and thats not but now i understand it =)

OpenStudy (freckles):

I still don't get it so we have f(12)=15+4x Like I don't get what x is suppose to be here

OpenStudy (kainui):

x is a constant that makes it so no matter how you decide to do the algorithm, it will always give the same result.

OpenStudy (kainui):

f(12)=15+4x is only one way to do the algorithm

OpenStudy (freckles):

f(4)=f(2*2)=(2+x)*2+(2+x)=6+3x So do we want to find for example when f(4)=f(12)?

OpenStudy (kainui):

No, look back at the very beginning where I do several examples again of alternate ways of doing the algorithm. I think if I say much more I'll give it away.

OpenStudy (ikram002p):

ok for f(a,b)=(a-x)b+(b-x) =(b-x)a+(a-x) ab-xb+b-x=ab-ax+a-x b(x-1)=a(x-1) hmmm lol i have condition on a,b which sounds not right

OpenStudy (kainui):

Here are three different ways of doing the algorithm, notice I changed the order of picking, for the first I picked a, c, b and the second one I picked a,b,c. We could also have picked more than one at a time, so a*c, b which I have also added below \[f(a*b*c)=(a+x)*b*c+(c+x)*b+(b+x)\]\[f(a*b*c)=(a+x)*b*c+(b+x)*c+(c+x)\]\[f(a*b*c)=(a*c+x)*b+(b+x)\]

OpenStudy (kainui):

Hehehe. =) There is one trick I'll give you that might help you to figure it out. f(a)=f(a*1) That must be true for the algorithm to work, otherwise you will be able to repeat the algorithm infinitely and get different results. =P

OpenStudy (ikram002p):

:P

OpenStudy (ikram002p):

im not getting idea lol @Kainui rust already holds in xD

OpenStudy (ikram002p):

ok i should think of it out of algebra

OpenStudy (kainui):

You're actually both on the right track haha, it's sort of weird to explain but once you see the answer it should make sense.

OpenStudy (freckles):

"Just that we are applying these rules. So suppose we have 12, we can factor it into 4*3 and do the algorithm on it as (4+x)*3+(3+x) or we can factor it as 2*2*3 and get (2+x)*2*3+(3+x)*2+(2+x) and either way will give us the same answer. =) " so f(4*3)=15+4x and f(2*2*3)=20+9x so f(12) doesn't have a unique representation for all x but 15+4x=20+9x when x=-1

OpenStudy (freckles):

it has unique representation when x=-1 is what I meant to say

OpenStudy (kainui):

"b(x-1)=a(x-1) hmmm lol i have condition on a,b which sounds not right " @ikram002p you were right about this, notice you were just using -x instead of +x like @freckles so really you both are at the same answer. =)

OpenStudy (ikram002p):

:O i used ur first comment hmm

OpenStudy (kainui):

So you're both right, you've found one possible value for x. Haha yeah I changed it to make it harder. =P

OpenStudy (freckles):

1 mod n lol

OpenStudy (freckles):

-1 mod n

OpenStudy (kainui):

So what is n when x=6?

OpenStudy (freckles):

is it 5 since 6-5=1

OpenStudy (ikram002p):

n=a*b*c..... ?

OpenStudy (freckles):

x mod n means x+kn where k is an integer right

OpenStudy (kainui):

@freckles is right, that is one possible answer, but there's one more possibility it could be.

OpenStudy (freckles):

6 mod 1 ?

OpenStudy (kainui):

Ok here's my solution: \[\Large f(a)=f(a*1) \\ \Large f(a) = (a+x) \\ \Large f(a*1)=(a+x)*1+(1+x) \\ \Large 1+x \equiv 0 \mod n \\ \Large \therefore x = n+1 \text{ or } x =n-1\]

OpenStudy (ikram002p):

so x= 1 or -1 :P

OpenStudy (ikram002p):

ok tgat was nice

OpenStudy (kainui):

Yeah, for the integers the +1 doesn't work however, and if you look at it, -1 version is the telescoping series!

OpenStudy (kainui):

In other words, the algorithm is simply this: \[\Large f(n)=n-1\]

OpenStudy (ikram002p):

hmmm i wonder how u keep say such smart stuff :P

OpenStudy (kainui):

lol I have too much free time XD

OpenStudy (kainui):

This all came from back when we were looking at factorial bases, remember how each "digits" place held only a factorial number of digits? I noticed it had the same property as 1000-1=999 where each previous place was filled except each one had a factorial in it. So to show mathematically what I mean: \[1000-1 = (10-1)*10*10+(10-1)*10+(10-1)=999\] or with factorials: \[\small 5!-1 = (4-1)*3*2*1+(3-1)*2*1+(2-1)*1 = 3*3!+2*2!+1!\]

OpenStudy (ikram002p):

oh yes i remember now !!!

OpenStudy (ikram002p):

do you have any cool stuff with ur factorial base ? i would like to see

OpenStudy (kainui):

Nope, nothing really past that I think other than the repeating decimal representation of e which you already know about. =P

OpenStudy (ikram002p):

oh :O ok

OpenStudy (kainui):

But if you have any ideas, I think there's some thing with factorials that this might relate to in finding primes, I forget though what it's called.

OpenStudy (kainui):

Like n!-1 has a lot of primes for it, I don't know much past that hmm \[\Large n!-1 = \sum_{i=1}^{n-1}i*i!\]

OpenStudy (ikram002p):

humming

OpenStudy (ikram002p):

i think i'll sleep now lol 11:49 pm :P

OpenStudy (ikram002p):

gn

OpenStudy (kainui):

Awww I just found it, Wilson's Theorem. Alright goodnight.

OpenStudy (ikram002p):

welson is like this (n-1)!=-1 mod n

OpenStudy (ikram002p):

oh wait i remember ur proof :P ok

OpenStudy (kainui):

My proof? I don't know what you mean

OpenStudy (ikram002p):

there was a question when u showed factorial base for first time (caaling it ur proof since its original work) however i remember when u typed these stuff

OpenStudy (kainui):

Oh ok I see. I don't remember what all I said exactly, but I remember this much at least lol. Anyways I think this is a fun way to play around with numbers, I don't know if it's really useful or not but it is interesting and unexpected.

OpenStudy (kainui):

@freckles you still there?

OpenStudy (freckles):

Sorry I abandoned you guys.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!