Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

U have two numbers ..u must find a method to find a third number from this two numbers such that afterwards only the 3rd number is provided u should get back the first two number..One more thing to easy the work...the two numbers is in limit 0 to 255 .CAN ANY ONE????? eek

Thje third number shuld be a integer and it should be less than or equal to 256

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Sounds like cryptography. I can't understand however, why the last number could be 256. That isn't in the extended ascii, nor could it be held by a character (in computers).

You want a function that is one to one. What this means is that:

if f(a, b) = f(c, d) then a=c and b=d

Now you don't say that this function has to use all of it's range. That is, for every b in the result (the range) of the function, there is a y that gives you it:

For all b in Range, there exists an a in Domain such that f(a) = b.

This is called onto.

One such function that is 1-1 (one to one) but isn't onto is summation of primes:

f(a, b) = a + b, where a and b are primes.

I believe this is 1-1, but I don't think I can prove it. However, this is fairly hard to get the original values a and b out when you are given a number such as 12.

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Scratch that, summation of primes isn't 1-1. 11+5 = 16 and 13 + 3 = 16. How about summation of perfect squares?

Oh, and I just realized, there is no function f(a, b) that could be 1-1 and onto if the size of the less than the size of the domain squared. This is because there are a*b ways to put a and b together, but if the range isn't that size (which is your case here), there is no way for it to be 1-1.

*Last edited by Ricky (2006-01-21 06:04:26)*

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

But any answer for what i asked??is there any way???u can use and or opeartions also...thats is convetion t o binary and back all///

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Maybe I didn't explain it well. Have your function be the summation of perfect squares:

f(17) = 16 + 1

f(29) = 25 + 4

f(25) = 9 + 16

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

u think u dnt get what i mean.....we are given any two numbers between 0 and 256.From this two numbers we must obtain a 3rd number suc that afterwards we may be able to reproduce this two numbers from the single number..In wha u explained only i can be done to perfect square numbers...Guive a general one for all numbers

Offline

**irspow****Member**- Registered: 2005-11-24
- Posts: 457

How about this? I don't know if this is for a computer program or not, but I think that it can be adapted for any such situation.

a + (b/1000) = c

Any answer will produce a.b so you will know that the number before the decimal point is a and the number after the decimal is b. Is that the type of solution that you were looking for?

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,653

Also discussed here

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**irspow****Member**- Registered: 2005-11-24
- Posts: 457

Oh my God! Sorry. I didn't know that this was a forum wide discussion. Well atleast I came up with a reasonable answer. Although he must not have liked it because he is fishing for a different one here.

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

Is there any method by doing some combination of different AND OR operations or any such operations on the two numbers and later then doing some other steps to obtain the two numbers from the single number??

TRY it its very interseting..............

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Is there any method by doing some combination of different AND OR operations or any such operations on the two numbers and later then doing some other steps to obtain the two numbers from the single number??

soorejmg, no function exists, has ever existed, or will ever exist.

How about this? I don't know if this is for a computer program or not, but I think that it can be adapted for any such situation.

a + (b/1000) = c

Any answer will produce a.b

Sorry irspow, it can't be. There are a few reasons. The first, is that there is a limitation. a, b and c can only be from [0, 255]. That's because a, b, and c can only be 8 bits each. A float (decimal value number) is 8 bits as well, but it can only store just as many numbers as an 8 bit integer can.

Further more, 1000 can not be stored exactly in binary. So you will get rounding errors. It will be close, but not exact.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,653

Well, we have had fun with this one!

I now want to see soorejmg's solution

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

MathsIsFun wrote:

Well, we have had fun with this one!

I now want to see soorejmg's solution

HEy,,,u know something....i have been looking for some solution but i couldnt find one..So i asked u people....No one could...

BUt how com Ricky said such functiondnt exist or will come in future?!!!!!!!!How is he so sure??

SOmetimes if it comes?!!!

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

No soorejmg, that's not what I said. It will _NOT_ exist. There is _NO_ such function.

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

Ricky wrote:

No soorejmg, that's not what I said. It will _NOT_ exist. There is _NO_ such function.

PH nice I was totally disapointed....but how can u proove there i sno such funcvtojn?

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

These are fairly in depth things. I will try to explain it the best I can, but I won't be surprised if you don't understand. These topics take quite a while to fully grasp. If you want to look up more information for yourself, this is known as Set Theory and more specifically, the Pigeon Hole Principle. If you have any questions, just ask.

You have sets A and B. A is the domain, B is the range. Also keep in mind that |A| means the number of elements in set A. 1-1 means:

For all x∈A and all y∈A, if f(x)=f(y), then x=y.

What this basically means is that every domain value goes to one range value, and no two different domain values go to the same range value. Your function must be 1-1 to work, otherwise, you wouldn't be able to tell the first two numbers from the third.

An example of a non 1-1 function is f(x) = x^2. (-3)^2 = 3^2, but -3 ≠ 3. An example of a 1-1 function is f(x) = x. Because if f(x) = f(x), x = x, which is always true for any value x.

If a function is 1-1, than the number of values in the range has to be greater or equal to the number of values in the domain. |B| ≥ |A|

This is no problem. But you wish your function tho be onto:

For all b∈B, there exists an a∈A such that f(a) = b.

What this says is that for every single value in the range, there is some value in the domain which goes to it.

An example of a non onto function is (again) f(x) = x^2. There is no value in this function which goes to -1. f(x) = -1 just isn't possible. On the other hand, f(x) = x is onto. You can find any real value in the range.

If a function is onto, than the number of values in the domain must be greater than or equal to the number of values in the range. |A| ≥ |B|.

Put 1-1 and onto together, and you get |A| ≥ |B| and |B| ≥ |A|. This means that |A| = |B|. However, for you, your domain is 256*256 and your range is 256. 256*256 ≠ 256. Therefore, it is impossible to make a function that is 1-1 and onto.

*Last edited by Ricky (2006-01-22 04:09:16)*

Offline

**irspow****Member**- Registered: 2005-11-24
- Posts: 457

Very nice Ricky! Maybe you should teach math for a living. If you did not want to make any money anyway.

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Thanks irspow. That is certainly one of my options. I'm not quite sure what to do yet. At least I have a few years to decide.

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

Hey Ricky,ur way of explanation is very nice.....realy...u can be a good teacher .....

Let me ask some thing...here my funtion is f(x,y) and not individually f(x) and f(y) know?.i dont know really..i am asking...if we are looking that way ,i feel like something problem in the explanaion..dnt know if it is really...

so i think all the explantion has to be changed because there will be change in the number of elements in the domain and range all.am i coorect?

*Last edited by soorejmg (2006-01-23 04:44:10)*

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

You are correct, f(x, y) is different than f(x) and f(y), but so is the explanation.

Remember, I never named the sets I was talking about in my explanation. This is because it applies to every set and every function between those sets.

Let A = {(x, y) | x ∈ [0,255], y ∈ [0,255]}, the domain. A is a set of ordered points, just like those in your function. How many elements are in A? 255*255.

Let B = {z | z ∈ [0, 256]}, the range.

Now apply my previous post.

Good question, by the way.

Offline

**RickyOswaldIOW****Member**- Registered: 2005-11-18
- Posts: 212

Maybe I don't fully understand the question but:

1+2=3

Aloha Nui means Goodbye.

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

rickyoswaldiow, that only works for 3.

f(x, y) = x + y

f(x, y) = 15, what are x and y?

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,653

I am thinking about dice (because of another question on the forum): wouldn't it be the same as asking:

"I just threw two dice and the total was 8 ... what two dice did I throw?"

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

Ricky wrote:

You are correct, f(x, y) is different than f(x) and f(y), but so is the explanation.

Remember, I never named the sets I was talking about in my explanation. This is because it applies to every set and every function between those sets.

Let A = {(x, y) | x ∈ [0,255], y ∈ [0,255]}, the domain. A is a set of ordered points, just like those in your function. How many elements are in A? 255*255.

Let B = {z | z ∈ [0, 256]}, the range.

.

This one i understood.But not hat i asked.let A be the set above and B too.The connection between the domain and the range is through the function aplied on the domain set know?

This functions like onto etc etc(i have studied it earlier dnt remember) comes when the FUNCTION is applied to each indiviual member on domain.Here what is being done is the function is applied to two members of the set A.

so how can it be?? Dnt kow if i am wrong..

Offline

**soorejmg****Member**- Registered: 2006-01-20
- Posts: 24

what has happened to every onee???no on ehere?

Offline