Author |
Topic: 1,4,16,64... (Read 1474 times) |
|
ketanb
Newbie
Gender:
Posts: 6
|
|
1,4,16,64...
« on: Oct 24th, 2005, 6:57am » |
Quote Modify
|
Hi many of us will be knowing the following problem: one has to measure weights using a weight balance.Using how many minimum number of weights One can measure all the values from 1,2,3... N provided: 1 it is allowed to put the weights only in one pan of the balance 2 it is allowed to put wts in both the pans answer for part 1 is 1,2,4,8... answer for part 2 is 1,3,9,27...(check it) now here is part 3:: in above in 1 we used only " +" while in second we used "+" aswell as"-" ex: 7 =4+2+1... if 1 =9-3+1...if 2 now we use one more operator namely hash "#" QUESTION IS :: DEFINE RULE FOR "#" SO THAT USING ONLY 1,4,16,64,256.... AND OPERATORS "+, -, #" ONE IS ABLE TO DERIVE ALL NUMBERS EX: 1=1 2=? 3=4-1 4=4 THEN 4#1=2: we define like this.. so Q is find relation for "a#b" .....NOTE THAT a#b is defined only if a,b are powers of 4 that is a#b#c is not defined provided a#b itself is not power of 4(obv)
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: 1,4,16,64...
« Reply #1 on: Oct 24th, 2005, 7:26am » |
Quote Modify
|
hidden: | I'll define # as [sqrt] alternatively, if it has to be a binary operator, I'll define a # b as [sqrt]b this reduces 1, 4, 16, 64, 256 ... back to 1, 2, 4, 8, 16 ... And we could already solve that with just + |
|
« Last Edit: Oct 24th, 2005, 7:26am by towr » |
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: 1,4,16,64...
« Reply #2 on: Oct 24th, 2005, 8:25am » |
Quote Modify
|
I would define # = +2* 1 = 1 2 = #1 = +2*1 3 = 4-1 4 = 4 5 = 5+1 6 = 4#1 = 4+2*1 7 = #4-1 = +2*4-1 8 = #4 = +2*4 9 = #4+1 = +2*4+1 10 = #4#1 = +2*4+2*1 11 = 16-4-1 etc...
|
|
IP Logged |
|
|
|
ketanb
Newbie
Gender:
Posts: 6
|
|
Re: 1,4,16,64...
« Reply #3 on: Oct 24th, 2005, 9:09am » |
Quote Modify
|
sorry i forgot to mention one condition # is a function (of a AND b) such that a#b is defined for a>b and is inbetween a and b
|
|
IP Logged |
|
|
|
ChunkTug
Full Member
Gender:
Posts: 166
|
|
Re: 1,4,16,64...
« Reply #4 on: Oct 24th, 2005, 9:28am » |
Quote Modify
|
How about a#b = b+log4(a) then we can get rid of '+' and '-'
|
« Last Edit: Oct 24th, 2005, 9:31am by ChunkTug » |
IP Logged |
|
|
|
Barukh
Uberpuzzler
Gender:
Posts: 2276
|
|
Re: 1,4,16,64...
« Reply #5 on: Oct 24th, 2005, 9:36am » |
Quote Modify
|
...or a#b = [sqrt](ab)?
|
|
IP Logged |
|
|
|
ketanb
Newbie
Gender:
Posts: 6
|
@Chunktug how will u make nos like 40, 50.. some nos close to 64 by using ur formula? remember that u have to minimize the no of numbers used as stated in the first two versions of the problem @Barukh how will u make 22? using 1,4,16,64 only? u cant use 256 here(if possible)'coz 64itself is greater than 22 like in our 1st 2 problems to make wt say 41 u can use only 1,3,9,27,81 i have attached my answer:
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: 1,4,16,64...
« Reply #7 on: Oct 25th, 2005, 2:32am » |
Quote Modify
|
on Oct 25th, 2005, 1:04am, ketanb wrote:@Chunktug how will u make nos like 40, 50.. some nos close to 64 by using ur formula? remember that u have to minimize the no of numbers used as stated in the first two versions of the problem |
| He only ever needs to use two numbers. say, 1 and 4n-1 4n-1#1 = 1 + log4 4n-1 = 1 + n-1= n But I guess that's not what you mean.
|
« Last Edit: Oct 25th, 2005, 2:41am by towr » |
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
ketanb
Newbie
Gender:
Posts: 6
|
|
Re: 1,4,16,64...
« Reply #8 on: Oct 25th, 2005, 7:04am » |
Quote Modify
|
yes one can do that way but note that while doing this to express "n" u need number which is nth in the sequencing which is>> the least number r such that4^r>n as i said to weigh 41 u can go to 81 but not 243(just comparison) because then in that case ur count of wts becomes 1,3,9,27,81,243=6 while u can work out just with 1st 5 wts in second case
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: 1,4,16,64...
« Reply #9 on: Oct 25th, 2005, 7:30am » |
Quote Modify
|
I assume an implicit condition is that you can not use any one number 1,4,16,... more than once? Under the new conditions, I can adjust my solution: a#b = a-2*b (or more precisely max(a-2*b,b+1) to meet the range conditions, even though I never use it where the max makes a difference). Evaluation is always left to right. 1 = 1 2 = 4#1 3 = 4-1 4 = 4 5 = 4+1 6 = 16#4#1 7 = 16#4-1 8 = 16#4 9 = 16#4+1 10 = 16-4#1 (i.e. (16-4)#1) 11 = 16-4-1 12 = 16-4 13 = 16-4+1 14 = 16#1 15 = 16-1 16 = 16 17 = 16+1 18 = 16+4#1 (i.e. (16+4)#1) etc... But I come to think that if ( and ) are allowed, there must be much better solutions.
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: 1,4,16,64...
« Reply #10 on: Oct 25th, 2005, 7:39am » |
Quote Modify
|
PS: I realize there evem is a simple physical device that implements this formula. It is a standard 2-sided scale, but with one arm (on the negative side) extending further and hosting an additonal tray at twice the distance. There is one tray on the + side and 2 on the - side. ____________|______ | | ^ | /_\ /_\ . /_\
|
« Last Edit: Oct 25th, 2005, 7:40am by Grimbal » |
IP Logged |
|
|
|
ketanb
Newbie
Gender:
Posts: 6
|
|
Re: 1,4,16,64...
« Reply #11 on: Oct 26th, 2005, 1:25am » |
Quote Modify
|
@grimbal yes that is a solution provided a#b#c is allowed but i u read the problem i have stated that its not allowed
|
|
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: 1,4,16,64...
« Reply #12 on: Oct 26th, 2005, 3:45pm » |
Quote Modify
|
Damn! You're right. I'll have to think of something else. Are brackets allowed? If not, how is the priority? is a#b+c#d = (a#b)+(c#d), ((a#b)+c)#d or (a#(b+c))#d) ? i.e does it have lower, equal or higher priority than +, (provided the arguments could be made equal to a power of 2)?
|
|
IP Logged |
|
|
|
ketanb
Newbie
Gender:
Posts: 6
|
to be frank i had not thought of that any ways i am attaching my answer here
|
|
IP Logged |
|
|
|
|