wu :: forums
« wu :: forums - find the function »

Welcome, Guest. Please Login or Register.
May 5th, 2024, 2:36pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Eigenray, Icarus, ThudnBlunder, towr, william wu, SMQ, Grimbal)
   find the function
« Previous topic | Next topic »
Pages: 1 2 3  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: find the function  (Read 4751 times)
srn437
Newbie
*



the dark lord rises again....

   


Posts: 1
Re: find the function  
« Reply #50 on: Sep 23rd, 2007, 9:13pm »
Quote Quote Modify Modify

copy actually, since cut won't work here. He also gave us an infinite amount of web sites, and out of an infinite amount of web sites, the probability of going to a specific one is zero(positive zero).
IP Logged
JiNbOtAk
Uberpuzzler
*****




Hana Hana No Mi

   


Gender: male
Posts: 1187
Re: find the function  
« Reply #51 on: Sep 23rd, 2007, 10:09pm »
Quote Quote Modify Modify

on Sep 23rd, 2007, 9:13pm, srn347 wrote:
copy actually, since cut won't work here. He also gave us an infinite amount of web sites, and out of an infinite amount of web sites, the probability of going to a specific one is zero(positive zero).

 
Wow, an infinite amount of websites, really ?  Roll Eyes
IP Logged

Quis custodiet ipsos custodes?
srn437
Newbie
*



the dark lord rises again....

   


Posts: 1
Re: find the function  
« Reply #52 on: Sep 23rd, 2007, 10:27pm »
Quote Quote Modify Modify

well, not all at the same time, but more web sites are created each day with no exponential decay, so after an eternity there will be. It is already seemingly infinite and going to be infinite. If you count search result pages, there are infinite since you can search for anything with infinite possibilities.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: find the function  
« Reply #53 on: Sep 23rd, 2007, 11:10pm »
Quote Quote Modify Modify

on Sep 23rd, 2007, 8:33pm, srn347 wrote:
Do you believe that the same God who gave us reason, purpose, and sense wants us to forgo their use?
Then why do you never display any sense or reason and does your only purpose seem to be holding on to your obstinate ignorance?
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
amstrad
Newbie
*





   


Gender: male
Posts: 10
Re: find the function  
« Reply #54 on: Sep 24th, 2007, 10:02am »
Quote Quote Modify Modify

How about this for f(n):
 

f(n) = (  (n%2)==0 ? -n/2 : 2*n )
 
if n is even f(n) is -n/2 else f(n) is 2n

 
Still working on g(q)...
IP Logged
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: find the function  
« Reply #55 on: Sep 24th, 2007, 10:11am »
Quote Quote Modify Modify

on Sep 24th, 2007, 10:02am, amstrad wrote:
How about this for f(n):
 

f(n) = (  (n%2)==0 ? -n/2 : 2*n )
 
if n is even f(n) is -n/2 else f(n) is 2n

Then f(f(4)) = 1, not -4...
IP Logged
amstrad
Newbie
*





   


Gender: male
Posts: 10
Re: find the function  
« Reply #56 on: Sep 24th, 2007, 12:53pm »
Quote Quote Modify Modify

on Sep 24th, 2007, 10:11am, pex wrote:

Then f(f(4)) = 1, not -4...

 
Yep doesn't work.
 
How about this (my coworker's solution, which I think really is correct):
 
hidden:

 
You need 4 states and a circle process to traverse them:  positive even, positive odd, negative even and negative odd.  The state transition goes like this:
 
po -> pe -> no -> ne -> po.......
 
f(n) =  
 po: n+1
 pe: -n+1
 no: n-1
 ne: -n-1
 

IP Logged
srn437
Newbie
*



the dark lord rises again....

   


Posts: 1
Re: find the function  
« Reply #57 on: Sep 24th, 2007, 7:13pm »
Quote Quote Modify Modify

Assuming zero stays zero since it is neither positive or negative(yet). Anyway, inspired by that answer, here is g. g(q)=
integer-           q-1+(1/q)
not integer-              write it in the representation q-1+1/q where q is an integer and get rid of the q-1.
« Last Edit: Sep 30th, 2007, 11:25am by srn437 » IP Logged
Whiskey Tango Foxtrot
Uberpuzzler
*****



Sorry Goose, it's time to buzz a tower.

   
Email

Gender: male
Posts: 1672
Re: find the function  
« Reply #58 on: Sep 24th, 2007, 8:20pm »
Quote Quote Modify Modify

on Sep 23rd, 2007, 8:33pm, srn347 wrote:
Do you believe that the same God who gave us reason, purpose, and sense wants us to forgo their use? if you ban me, that's what you'll be doing.

 
Another religious concept: I'm done with this sh*t.
IP Logged

"I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use." - Galileo Galilei
mikedagr8
Uberpuzzler
*****



A rich man is one who is content; not wealthy.

   


Gender: male
Posts: 1105
Re: find the function  
« Reply #59 on: Sep 24th, 2007, 8:27pm »
Quote Quote Modify Modify

Good call. Wink
IP Logged

"It's not that I'm correct, it's that you're just not correct, and so; I am right." - M.P.E.
amstrad
Newbie
*





   


Gender: male
Posts: 10
Re: find the function  
« Reply #60 on: Sep 25th, 2007, 6:46am »
Quote Quote Modify Modify

Here is my solution for g(q):
 

 
For q to be rational it is n/m for some integers n and m.
 
To mirror my solution for f(n), I make 4 states:
 
1) n is greater than m and n+m is even  (ge)
2) n is greater than m and n+m is odd   (go)
3) n is less than m and n+m is even     (le)
4) n is less than m and n+m is odd (lo)
 
again the cycle is ge->go->le->lo->ge.......
 
so g(n/m) =
if(ge) (n+1)/m
if(go) m/(n-1)
if(le) n/(m+1)
if(lo) (m-1)/n
 
it is important not to reduce your intermediate results
 
starting with 8 (or 8/1) you get 8->1/7->1/8->7->8....
starting with 21/5 you get 21/5->5/20->5/21->20/5->21/5...
 
 
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: find the function  
« Reply #61 on: Sep 25th, 2007, 7:22am »
Quote Quote Modify Modify

Hm... if you don't simplify your fractions, you are not working with rationals, but with pairs of integers.
You can not define a rational function that does
3/6 -> 5/3
2/4 -> 2/5
    and
1/2 -> 1/1
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: find the function  
« Reply #62 on: Sep 25th, 2007, 7:22am »
Quote Quote Modify Modify

on Sep 25th, 2007, 6:46am, amstrad wrote:
it is important not to reduce your intermediate results
That's a bit of a flaw then, because fractions keep the same value if you reduce them; they're the same number.
There are alternatives that don't have that problem.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
srn437
Newbie
*



the dark lord rises again....

   


Posts: 1
Re: find the function  
« Reply #63 on: Sep 25th, 2007, 5:00pm »
Quote Quote Modify Modify

A fraction can also have both sides be negative, thus reversing the inequality.
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: find the function  
« Reply #64 on: Sep 26th, 2007, 12:40am »
Quote Quote Modify Modify

sure.
IP Logged
srn437
Newbie
*



the dark lord rises again....

   


Posts: 1
Re: find the function  
« Reply #65 on: Sep 30th, 2007, 9:43pm »
Quote Quote Modify Modify

At least g was solved for.
IP Logged
RandomSam
Newbie
*





   


Gender: male
Posts: 20
Re: find the function  
« Reply #66 on: Oct 4th, 2007, 5:05pm »
Quote Quote Modify Modify

Based entirely on amstrad's post, how's this for rationals:
hidden:
For integers a and b
 
x>1, floor(x)    odd  : g(x) = x + 1
x>1, floor(x)    even: g(x) = (x - 1)-1
x<1, floor(x-1) odd  : g(x) = (x-1 + 1)-1
x<1, floor(x-1) even: g(x) = x-1 - 1
« Last Edit: Oct 4th, 2007, 5:07pm by RandomSam » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: find the function  
« Reply #67 on: Oct 5th, 2007, 1:33am »
Quote Quote Modify Modify

on Oct 4th, 2007, 5:05pm, RandomSam wrote:
Based entirely on amstrad's post, how's this for rationals:
hidden:
For integers a and b
 
x>1, floor(x)    odd  : g(x) = x + 1
x>1, floor(x)    even: g(x) = (x - 1)-1
x<1, floor(x-1) odd  : g(x) = (x-1 + 1)-1
x<1, floor(x-1) even: g(x) = x-1 - 1
Seems fairly good, although you probably want to check for the absolute value of x, and define what to do with 1.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
RandomSam
Newbie
*





   


Gender: male
Posts: 20
Re: find the function  
« Reply #68 on: Oct 5th, 2007, 8:22am »
Quote Quote Modify Modify

on Oct 5th, 2007, 1:33am, towr wrote:

Seems fairly good, although you probably want to check for the absolute value of x, and define what to do with 1.

oops...  Embarassed I meant to say "x is a positive rational" instead of defining a and b as integers, which aren't used in the rest of the solution!
IP Logged
Pages: 1 2 3  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board