All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
A piece of pie (Posted on 2010-12-07) Difficulty: 4 of 5
Let N be defined by N=> 3*1*4*1*5*9*2, where each asterisk may be replaced by any basic arithmetic sign ( +, - ,* ,/) and => means that the result is obtained by calculating sequentially from left to right.
Examples: 3+1+4+1+5+9+2=>25; 3+1-4+1-5+9-2=>3; 3*1-4*1-5+9-2=>1 etc.

How many distinct positive integer results can be obtained?
What is the lowest positive integer that cannot be obtained?
What positive integer claims the highest quantity of distinct expressions?
Rem: No brackets allowed.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
piece of cake (solutions?) | Comment 1 of 5

A quick program finds 159 distinct positive integer results can be obtained.  The lowest positive integer which cannot be obtained as 35.  The positive integer with the greatest number of distinct empressions was 2.

There are clearly 4096 options (4**6) with the given integers as constants, and each of six operators having four options. After eliminating zero and negatives and results which were not whole integers, this left 1260 equations to tabulate.  Sorting these and counting gave the results above.

I need to double check these lists.  My method was to create six imbedded loops for the operators, with four values for each (addition, subtraction, multiplication, division), and then calculate each of the 4096 options left to right with the given digits from pi, and then sort the results, and finally to count.  I'll go back to check the coding and counting.


  Posted by ed bottemiller on 2010-12-07 18:53:38
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information