who gets the credit

jonah2.0

Full Member
Joined
Apr 29, 2014
Messages
544
Related to this thread:

DISCLAIMER: Beer soaked rambling/opinion/observation/reckoning ahead. Read at your own risk. Not to be taken seriously. In no event shall the wandering math knight-errant Sir jonah in his inebriated state be liable to anyone for special, collateral, incidental, or consequential damages in connection with or arising out of the use of his beer (and tequila) powered views.

I am a controller for my company. Our CPA moved some numbers around but did not indicate what made up the amounts that he transferred. For instance, I have 23 amounts/numbers that add up to $6,137.35. He moved $5,802.95, which left $334.40 in the account. The problem is that he did not identify which of the 23 numbers made up the amount that he moved or the amount that remained. That's important because I need to identify the assets that apply to the totals and the only way to do that is to know which numbers make up the two totals. Other than trial and error, is there any way (a calculator or formula, perhaps) that you can scan a group of numbers and tell you which ones would add to make a certain total? I suspect trying to figure out which of the 23 make up the $334.40 would be easier than determining which of the 23 make up the $5,802.95. Any suggestions? The 23 numbers are shown below. Any help or suggestions would be well appreciated.

399.96
87.97
8.26
34.97
1,191.50
288.00
1,133.00
1,191.50
288.00
83.70
19.19
189.00
80.00
10.80
24.18
370.50
109.94
51.12
64.03
12.00
239.70
194.70
65.33
I find myself extremely curious as to what could have led to your dilemma. You could have just asked your CPA about it. Aren't controllers suppose to be CPAs themselves in order to ascend to the position of a controller? Or is this just a ****-and-bull story concocted to snow members here into working out your little puzzle?
At any rate, methinks you ought to include (or hire) Sir Dexter in your army of number crunchers or at the very least make him some sort of a consultant for his efforts.
 
Last edited by a moderator:
DISCLAIMER: Beer soaked rambling/opinion/observation/reckoning ahead. Read at your own risk. Not to be taken seriously. In no event shall the wandering math knight-errant Sir jonah in his inebriated state be liable to anyone for special, collateral, incidental, or consequential damages in connection with or arising out of the use of his beer (and tequila) powered views.
Sir Jonah, to give credit where it's due, twas Sir Ishuda
who first rode Rocinante to the rescue...by the time
Sir Dexter got there, the drawbridge had been raised:cool:
My apologies to Sir Ishuda for this inexcusable oversight.
 
DISCLAIMER: Beer soaked rambling/opinion/observation/reckoning ahead. Read at your own risk. Not to be taken seriously. In no event shall the wandering math knight-errant Sir jonah in his inebriated state be liable to anyone for special, collateral, incidental, or consequential damages in connection with or arising out of the use of his beer (and tequila) powered views.
Following works fine:

(arrange data in ascending order)
t = target = 33440
n = number of amounts < t
Step 1: loop to get data; multiply by 100; skip if > t; n = n + 1

n ends up to equal 18, the 18 amounts being:
826,1080,1200,1919,2418,3497,5112,6403,6533,8000,
8370,8797,10994,18900,19470,23970,28800,28800

Step 2: set up array a(n) ; transfer above to this array.

Perform loops examining each 2combo, each 3combo,
each 4combo, ..... , each (n-2)combo, each (n-1)combo.

Print the combo if = t

The subroutine for 4combo (as example) looks like:
c=4: m = n-c+1 : sum = s
loop a from 1 to m
loop b from a+1 to m+1
loop c from b+1 to m+2
loop d from c+1 to m+3
s = a(a) + a(b) + a(c) + a(d)
if s>t then get outta here!
if s<>t then next loop
print a(a),a(b),a(c),a(d)
nextloops

If c=8 then paydirt:
826,1080,1919,2418,3497,6533,8370,8797

However, this way ok for relatively low data sets;
Beautiful! Simply beautiful!
Methinks it should work for high data sets too.
Given that I have yet to write a program for this kind of a situation, could you perhaps indulge li'l ole me with an actual program using a simpler example?
 
However, this way ok for relatively low data sets;
with high sets, guess you'd need Dexter's exotic
sounding "Set Theory and Combinatorics" program.

What sounded exotic turned out to be erotic

And I thought we were seducing the equations reducing them to tears

Sir Wilmer, poke all the fun at me as your heart's content but somewhere I know I hold the key to a place where no man has gone before

Then someone said "McDonald's millions and millions served" this doesn't sound like a place where no man has gone before
 
Thanks Sir Denis.
Running a fever right now.
Keep hearing Jo Stafford's No Other Love in my head. Probably that last song syndrome.
Give feedback in a few days.
Too delirious from meds and booze right now.
 
Top