Computer Science Canada

f(x) == f(10x)

Author:  octopi [ Sun Dec 07, 2003 10:13 pm ]
Post subject:  f(x) == f(10x)

100 bits for someone who solves the following problem:

Find a function f(x), where f(x) is equal to f(10x) for all values of x,
The varible x must be used in the function.

example of how not to do it:
f(x) = 4
f(x) can't be 4 (because, the result would be 4 for all values of x), and x is not used in the function.

f(x) = 4+x-x
NO, because when simplified you get 4, cheap bastards.


Good luck.

Any cheapory in your anwsers will result in me not giving you bits...aka stupid anwser thats not right. but I didn't cover above in my examples of how not to do it.
(like, f(x)= 0x, or f(x)= x^0)

Author:  Mazer [ Mon Dec 08, 2003 9:16 am ]
Post subject:  Re: f(x) == f(10x)

octopi wrote:
f(x)= 0x


crap!!! now i have to come up with something else! Evil or Very Mad

Author:  McKenzie [ Mon Dec 08, 2003 10:05 am ]
Post subject: 

code:

int f(int x)
{
     while(x % 10 == 0)
          x = x / 10;
     return x;
}

Author:  Tony [ Mon Dec 08, 2003 10:13 am ]
Post subject: 

Laughing

wait Confused Is the question about a math function or a programming function Thinking

btw, McKenzie - since when do you have those billion bits?
and for that matter... where did half of my bits go? Thinking

Author:  McKenzie [ Mon Dec 08, 2003 10:36 am ]
Post subject: 

I think it is supposed to be a math question. I thought a compsci answer was better Wink bits...what bits?

Author:  Tony [ Mon Dec 08, 2003 10:41 am ]
Post subject: 

McKenzie wrote:
bits...what bits?


Thinking umm... can Andy create bits now that he's a mod Thinking

*Tony takes out his sniper rifle and goes to investigate* Sniper

Author:  Blade [ Mon Dec 08, 2003 1:20 pm ]
Post subject: 

wow, how quickly topics get changed around from the initial equation..

Author:  Andy [ Mon Dec 08, 2003 7:29 pm ]
Post subject: 

f(x)=[1/x]

take off the top bar of the square bracket. that is actually a mathematical operator, it means the largest integer smaller than the number contained.... heh that works... but only for integral values of x

Author:  AsianSensation [ Mon Dec 08, 2003 7:33 pm ]
Post subject: 

actually that one works for every single number except for 1 itself.

[1/1] = 1, [1/10] = 0

Author:  Andy [ Mon Dec 08, 2003 7:40 pm ]
Post subject: 

dope!

fine [1/x+1]

Author:  AsianSensation [ Mon Dec 08, 2003 7:42 pm ]
Post subject: 

nope, still another fault.

[1/(-10 + 1)] = -1, [1/(-1 + 1)] = undefined

still not every single number.

Author:  Andy [ Mon Dec 08, 2003 8:48 pm ]
Post subject: 

okok i think i actually got it...
f(x)=[(x-(|x|/x))/x]

how about that?

Author:  Mazer [ Mon Dec 08, 2003 9:07 pm ]
Post subject: 

hey dodge, besides the fact that f(x) != f(10x) with your function, what is f(0)?

Author:  Andy [ Mon Dec 08, 2003 9:20 pm ]
Post subject: 

yes it does equal... sub in any value... and undefined=undefined rite?

Author:  Mazer [ Mon Dec 08, 2003 9:41 pm ]
Post subject: 

uh... as we all know, i really suck at math, so feel free to point out my stupidity if i do something that seems incredibly n00bishly stupid.

WW wrote:
f(x)=[(x-(|x|/x))/x]


f(5) = (5 - (|5|/5))/5
= (5 - 1) / 5
= 4/5
= 0.8

right?

f(50) = (50 - (|50|/50))/50
= (50 - 1)/50
= 49/50
= 0.98

Author:  Andy [ Mon Dec 08, 2003 10:30 pm ]
Post subject: 

dodge_tomahawk wrote:
f(x)=[1/x]

take off the top bar of the square bracket. that is actually a mathematical operator, it means the largest integer smaller than the number contained.... heh that works... but only for integral values of x


it was from my previous quote... the [] withought the top bar of the bracket was intended

Author:  rizzix [ Mon Dec 08, 2003 11:14 pm ]
Post subject: 

allright i give up.. whats the answer?

Author:  bugzpodder [ Mon Dec 08, 2003 11:18 pm ]
Post subject: 

f(x)=|x|/x with f(0) arbitrary
or you can obviously define your own functions
for example we can make an arbitrary function in the interval [a,10a] where f(a)=f(2a) and then we are define f for all reals by a translation + horizontal stretch by a factor of 10^n

Author:  bugzpodder [ Mon Dec 08, 2003 11:24 pm ]
Post subject: 

and since the original question did not specifically state the domain of x, we could let x simply be positive integers and one could use the number theoritical function to obtain
f(x)=phi(10x)/x, where phi is defined as Euler's Totient Function
http://mathworld.wolfram.com/TotientFunction.html

Author:  PaddyLong [ Tue Dec 09, 2003 12:08 am ]
Post subject: 

dodge_tomahawk wrote:
yes it does equal... sub in any value... and undefined=undefined rite?


... well, isn't that kind of like saying the root of -5 is the same as the root of -1 ? ....

Author:  Andy [ Tue Dec 09, 2003 11:53 am ]
Post subject: 

noooo... sqrt(-5)=sqrt(5)i
sqrt(-3)=sqrt(3)i

Author:  PaddyLong [ Tue Dec 09, 2003 11:59 am ]
Post subject: 

yes, I know... but roots of negative numbers are undefined in the real number system...

Author:  Andy [ Tue Dec 09, 2003 12:48 pm ]
Post subject: 

when i said undefined i meant undefined... in all number systems

Author:  PaddyLong [ Tue Dec 09, 2003 4:11 pm ]
Post subject: 

kk 8)

Author:  bugzpodder [ Thu Dec 11, 2003 10:01 am ]
Post subject: 

so where are my bits? Wink


: