SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 18th, 2004, 2:39 pm

This may be too easy, but:Using ONLY the numbers 1, 5, 6 and 7 (and using each one ONLY ONCE), make a formula that equals 21.You can do any operation you like, but only use those numbers. You CAN NOT stick the numbers together, e.g. sticking 1 and 5 together to get 15 is NOT allowed.
 
User avatar
Ri
Posts: 92
Joined: November 7th, 2003, 10:37 am

Creating a 21

March 18th, 2004, 3:13 pm

Is allowed?
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 18th, 2004, 4:29 pm

Not the answer I was looking for, but it works!There is another solution.
 
User avatar
nsande
Posts: 323
Joined: January 9th, 2002, 11:00 am

Creating a 21

March 18th, 2004, 6:19 pm

QuoteOriginally posted by: ArrowayThis may be too easy, but:Using ONLY the numbers 1, 5, 6 and 7 (and using each one ONLY ONCE), make a formula that equals 21.You can do any operation you like, but only use those numbers. You CAN NOT stick the numbers together, e.g. sticking 1 and 5 together to get 15 is NOT allowed.You said any operation so here is one suggestion21=6*7/(Int(ln(5))+1)Int is the integer part and ln is the natural logarithm.Regards,Niclas
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 18th, 2004, 6:48 pm

I don't know if "Int" is an operation, but I'm lenient, so sure that counts. There is still another way...
 
User avatar
NE1
Posts: 88
Joined: August 5th, 2002, 11:36 pm

Creating a 21

March 18th, 2004, 7:44 pm

QuoteOriginally posted by: ArrowayI don't know if "Int" is an operation, but I'm lenient, so sure that counts. There is still another way...If one can use the Int operation and therefore relaxing the rules by a whole lotthen one can also do ceiling(6/5) = ceiling(1.2) = 2so ( ceiling(6/5)+1 )*7 = 21 too. Here ceiling is an operator that rounds a decimal number upward.
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 18th, 2004, 7:50 pm

Sure you get credit too!But there is a MUCH cleaner (and more exact) way...
Last edited by Arroway on March 17th, 2004, 11:00 pm, edited 1 time in total.
 
User avatar
quantie
Posts: 907
Joined: October 18th, 2001, 8:47 am

Creating a 21

March 18th, 2004, 9:07 pm

QuoteOriginally posted by: ArrowaySure you get credit too!But there is a MUCH cleaner (and more exact) way...Okay what operators are there in your answer? Surely they are not restricted to { +,-, * , / , ^}
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 18th, 2004, 9:30 pm

Yup, you can do it with the set of operators that includes add, subtract, multiply and divide.
 
User avatar
QwertyYuiop
Posts: 36
Joined: October 10th, 2003, 7:39 pm

Creating a 21

March 18th, 2004, 9:44 pm

5+6+7-1 == 21 in octal...
 
User avatar
ob
Posts: 5
Joined: June 8th, 2003, 9:56 pm

Creating a 21

March 18th, 2004, 10:46 pm

Arroway,I got the "clean" solution using only four basic arithmetic operations:6 / (1 - 5/7) = 21
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 19th, 2004, 1:49 am

ob is the winner!!!
 
User avatar
marajesh
Posts: 15
Joined: July 14th, 2002, 3:00 am

Creating a 21

March 19th, 2004, 4:33 pm

can U do 7 *6/+(sqrt(5-1))
 
User avatar
Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

Creating a 21

March 19th, 2004, 4:47 pm

While I am lenient, I don't know if that one qualifies. The reason is that square root is equivalent to raising to the one half power. Obviously you need a one and a two to do that. Maybe squares and square roots are operators in and of themselves, as opposed to "just" being powers, but that's something we can all vote on...
 
User avatar
quantie
Posts: 907
Joined: October 18th, 2001, 8:47 am

Creating a 21

March 19th, 2004, 5:55 pm

QuoteOriginally posted by: ArrowayWhile I am lenient, I don't know if that one qualifies. The reason is that square root is equivalent to raising to the one half power. Obviously you need a one and a two to do that. Maybe squares and square roots are operators in and of themselves, as opposed to "just" being powers, but that's something we can all vote on...okay lets change the problem to 22 I've got three answers here!
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On