You are not logged in.
The sum of all the no. that can be formed using the digit
without repetition isOffline
Hi juantheron,
Did you mean
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Hi gAr
It seems so. Is there a way to compute it with a GF?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi anonimnystefy,
Why g.f for this?
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Hi gAr
I was just wondering,that's all.
Why do you multiply by (n-1)! ?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Start from small examples, you'll understand!
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Oh,ok.I got it now! Thanks for the solution and the clarification.Let's see if the OP will need explanation.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Glad that you got it.
Yes, we'll wait and see if that was the actual question.
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
I am too.
Asking again,do you think there is a GF solution?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Thanks friends but would you like to explain it to me
Offline
I'll leave this one for gAr to explain,because I don't how good I can explain it.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi all,
Well, I have no idea what GF is or what gAr did, but I wanted to see if I could get anywhere with this puzzle.
Firstly, I understand the problem to be this (paraphrased): Find the sum of all numbers with unique digits formed from the digits 0 to 9. I hope I'm right, otherwise LibertyBASIC worked all night for nothing.
The LibertyBASIC program I wrote is pretty raw, but it enabled me to spot a pattern. Then I transferred the idea to Excel and some sort of formula started to emerge. So I simplified it a bit more, put it back into LB (because of Excel's number length limitations) and got 19,829,418,676,096,455 as my final answer.
Last edited by phrontister (2012-05-05 20:59:08)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
GF-Generating Function
Did you check your answer against gAr's formula?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
I'm sorry, stefy, but my maths standard is only 4th-year high school and I don't understand gAr's formula, nor Generating Functions.
I think my answer may be close because of how I wrote my BASIC program, but I'm not sure. And it depends too on whether or not I've understood the problem correctly.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Which part of gAr's formula don't you understand?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Everything in the second set of brackets.
I don't know what this does:
Nor this:
I've seen that funny symbol in other posts but I've never tried to work out what it means.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Just looked at my watch...it's way past midnight! I'd better go to bed!
Catch you later.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi phrontister;
That is great way to try to come up with a formula. Experimental mathematics! But you might have made an error somewhere, for 10 I am getting, 22175999997782400.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Hi Bobby,
Yes, you're probably right. I was never happy with my result for 10. You'll see what I mean from my answer:
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
The answer may not agree but it sure is neat work.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Which of my answers are correct (if any)?
The answers to numbers 1 to 8 are the same in both my original LB program and the simplified formula.
I haven't run 9 & 10 in the original program because of the time factor...they take HOURS (I said that program was raw!)
Last edited by phrontister (2012-05-05 14:46:07)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
How did you get that for one?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
These are my LB programs for 1-, 2- and 3-digit numbers:
All the rest follow that strategy.
Here's the printout for 3:
Of course, I don't print that out during the normal calcs routine, as that would slow the process down to less than a crawl!
The program weeds out numbers with non-unique digits and sums the valid ones.
Sorry, but I have to go out now for a few hours.
Last edited by phrontister (2012-05-05 15:14:50)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi phrontister;
Looks like you and they are solving two different problems that is why the different answers. For instance if you have one number say 1. Its only permutation is 1 so the sum of the permutations is 1.
1 = 1
For two digit number say 12 then there are 2 permutations 12 and 21,
12 + 21 = 33
For three digit number say 123 we have 6 permutations 123, 132, 213,231, 312, 321,
123 +132 + 213 + 231 + 312 + 321 = 1332
That is how gAr is interpreting the problem.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Hi Bobby,
Doesn't gAr's first post mean that he's summing all permutations of a number containing only unique digits, that is n digits long? Is that what the effect of his absence of commas is? juantheron's contains no commas?
I guess gAr's formula makes it clear what he's doing, but like I said to stefy, I don't understand his formula...which is my fault, not his.
I'm summing all permutations of unique-digit numbers of any length, but maybe I'm wrong about the number length. I went that way because of juantheron's commas, but I may have misread the intent.
Are numbers with a leading zero ignored? I ignored them.
Also, I'm not sure why the problem says "without repetition". Don't the differently-notated digits indicate their uniqueness anyway? So is that just tautology, or does it add a different meaning?
Last edited by phrontister (2012-05-05 23:05:17)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline