wu :: forums
« wu :: forums - Adding signs to make 100 »

Welcome, Guest. Please Login or Register.
Nov 26th, 2024, 12:12pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Icarus, towr, william wu, SMQ, Eigenray, Grimbal, ThudnBlunder)
   Adding signs to make 100
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Adding signs to make 100  (Read 1605 times)
elway
Newbie
*





   


Posts: 9
Adding signs to make 100  
« on: Nov 30th, 2004, 1:21pm »
Quote Quote Modify Modify

Ok, Here is a set of numbers:
1  2  3  4  5  6  7  8  9  
You need to add plus and minus signs so that it equals 100. Here is one way to do it:
1+2+3-4+5+6+78+9=100
Can you help me find other ways?
« Last Edit: Dec 1st, 2004, 5:55pm by Icarus » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: This is driving me nuts!  
« Reply #1 on: Nov 30th, 2004, 2:55pm »
Quote Quote Modify Modify

here's two  
12+3+4+5-6-7+89 = 100
1+23-4+56+7+8+9 = 100
IP Logged

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





   


Posts: 9
Re: This is driving me nuts!  
« Reply #2 on: Nov 30th, 2004, 3:00pm »
Quote Quote Modify Modify

thnx, is there any more?
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: This is driving me nuts!  
« Reply #3 on: Nov 30th, 2004, 3:03pm »
Quote Quote Modify Modify

Here are some:
1+2+3-4+5+6+78+9
1+2+34-5+67-8+9
1+23-4+5+6+78-9
1+23-4+56+7+8+9
-1+2-3+4+5+6+78+9
12+3+4+5-6-7+89
12+3-4+5+67+8+9
12-3-4+5-6+7+89
123-4-5-6-7+8-9
123+45-67+8-9
123-45-67+89
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: This is driving me nuts!  
« Reply #4 on: Dec 1st, 2004, 1:07am »
Quote Quote Modify Modify

Although there are many, many more solutions, there are only 10 different types of solutions – w.r.t. how digits are partitioned into numbers:
 
1. 123, 45, 67, 89  
2. 123, 4, 5, 67, 89
3. 123, 45, 67, 8, 9    
4. 1, 2, 34, 5, 67, 8, 9
5. 1, 23, 4, 5, 6, 78, 9  
6. 1, 23, 4, 56, 7, 8, 9  
7. 12, 3, 4, 5, 6, 7, 89
8. 12, 3, 4, 5, 67, 8, 9
9. 123, 4, 5, 6, 7, 8, 9  
10. 1, 2, 3, 4, 5, 6, 78, 9  
 
All types but one (#2) were exemplified in previous posts. The remaining type has the following solution:
 
123 + 4 - 5 - 67 + 89 = 100
 
Another question: How many different types there exist if we reverse the order of digits?
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: This is driving me nuts!  
« Reply #5 on: Dec 1st, 2004, 12:22pm »
Quote Quote Modify Modify

1. 9 8 7 65 4 32 1
2. 9 8 76 5 4 3 2 1
3. 9 8 76 5 4 3 21
4. 9 8 76 5 43 2 1
5. 9 8 76 54 32 1
6. 98 7 6 5 4 3 2 1
7. 98 7 6 5 4 3 21
8. 98 76 54 3 21
IP Logged
elway
Newbie
*





   


Posts: 9
Re: Adding signs to make 100  
« Reply #6 on: Dec 3rd, 2004, 1:16pm »
Quote Quote Modify Modify

can someone tell me how u get those so quickly, and like show work or something.
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Adding signs to make 100  
« Reply #7 on: Dec 5th, 2004, 11:41pm »
Quote Quote Modify Modify

on Dec 3rd, 2004, 1:16pm, elway wrote:
can someone tell me how u get those so quickly, and like show work or something.

In my case, there wasn’t too much cleverness: I once wrote a program for another thread (much more difficult problem), and now I am using it from time to time to solve this kind of questions. So, if you wish, it was one-time cleverness.  Grin
 
To demonstrate, here’s a much tougher question:
 
With one additional constraint that the first number cannot be negative, find an ordering of digits 1 through 9 such that 100 cannot be achieved at all?

« Last Edit: Dec 5th, 2004, 11:41pm by Barukh » IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: Adding signs to make 100  
« Reply #8 on: Dec 6th, 2004, 8:01am »
Quote Quote Modify Modify

In my case it was a small program I wrote from scratch.
 
I can post it if you are interested.
IP Logged
krishna366
Newbie
*





   


Gender: male
Posts: 1
Re: Adding signs to make 100  
« Reply #9 on: May 14th, 2005, 5:19am »
Quote Quote Modify Modify

This question was asked to me in ORACLE interview. My answer
 
1+2+3+4+5+6+7+(8*9)
 
i started from back.... 8*9=72. so i still require 28. then suddenly i got a thought that for every odd number u will have (n - 1)/2 combinations in [ 1, n-1] which sum up to n. SO i wrote
 
sigma(1 to 7)+pi(8 * 9) [Ya u have to write all these to impress ur interviewer.........
IP Logged
Pages: 1  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