Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #101 20120430 23:45:25
Re: Generating FunctionsProcedural form? The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #102 20120430 23:48:35
Re: Generating FunctionsLoops and such. In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #103 20120430 23:50:12
Re: Generating FunctionsThere is no other way.At least not that I know of.But Maxima allows while loops. The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #104 20120430 23:51:23
Re: Generating FunctionsWhile loops are procedural. Why are you not using math commands to do math? In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #105 20120430 23:58:25
Re: Generating FunctionsWhat would you to sum those terms then? The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #106 20120501 00:03:45
Re: Generating FunctionsSum[x^k,k,1,6] yields In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #107 20120501 00:08:53
Re: Generating FunctionsCode:CombGF(list) := block([i, a, m, s], i = 1, m = 1, while i <= length(list) do [ a = get(list,i), s=sum(x^k/k!,k,1,i), m = m * s, delete(a,list,1), i = i + 1 ], print(m) ); Last edited by anonimnystefy (20120501 00:11:39) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #108 20120501 00:16:17
Re: Generating FunctionsYou do not need the while loop and you are jumping ahead. Let's get the OGF's down first. In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #109 20120501 00:18:58
Re: Generating FunctionsI want the function to do everything for me.I just have to input 6,6 instead of just 6 to get probability for 2 dice. The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #110 20120501 00:25:02
Re: Generating Functions
That is overkill. You make functions that do the minimum and use other commands on them. You do not try to make functions to do everything. Congratulations you just threw a die! To throw 2 you just go gf(1,6,6)^2 Simple, no need to make a function throw n die when you just have to square or cube or raise to the 10th power... I want you to work on creating a function gf that inputs the 3 parameters as I have indicated. In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #111 20120501 01:51:13
Re: Generating FunctionsThis code both compiles and runs,but doesn't give a good output: Code:CombGF(list) := block([i, a, m, s], i : 1, m : 1, while i <= length(list) do [ a : first(list), print(a), s : sum(x^k, k, 0, a), m : m * s, list:rest(list), i : i + 1 ], print(m) ); and the output for: Last edited by anonimnystefy (20120501 01:51:46) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #112 20120501 02:08:14
Re: Generating FunctionsDone it! Could you do a little test on the code: Code:CombEGF(list) := block([i, a, m, s], i : 1, m : 1, l : length(list), while i <= l do [ a : first(list), s : sum(x^k/k!, k, 0, a), m : m * s, list : rest(list), i : i + 1 ], m ); ©anonimnystefy 2012 Ordinary GF: Code:CombOGF(list) := block([i, a, m, s], i : 1, m : 1, l : length(list), while i <= l do [ a : first(list), s : sum(x^k, k, 0, a), m : m * s, list : rest(list), i : i + 1 ], m ); ©anonimnystefy 2012 The coefficient of OGF: Code:OGFcoeff(list,n) := ratcoeff(CombOGF(list),x^n); ©anonimnystefy 2012 The coefficient of EGF: Code:EGFcoeff(list,n) := ratcoeff(CombEGF(list),x^n)*n!; ©anonimnystefy 2012 Notice that I multiply by n! in the EGFcoeff function to get the final result immediately. Last edited by anonimnystefy (20120501 02:50:58) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #113 20120501 03:19:51
Re: Generating FunctionsHi; In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #114 20120501 03:24:18
Re: Generating FunctionsI did even more than that.The function CombOGF can create those generating functions. The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #115 20120501 03:40:32
Re: Generating FunctionsYou missed alot of what I am trying to say by sticking to the procedural In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #116 20120501 03:42:48
Re: Generating FunctionsBut this solution works.It is applicable in many situations. Last edited by anonimnystefy (20120501 03:42:59) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #117 20120501 03:47:32
Re: Generating FunctionsI understand that it is tough to do what I ask. Of the two people I taught neither could accomplish it. Perhaps you remember this: In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #118 20120501 03:49:15
Re: Generating FunctionsI do not remember that.Where is that from? The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #119 20120501 03:53:20
Re: Generating Functions
I think we have been lied to on every level by our masters. I was assured many times that that was standard knowledge.
I have the patience but do have I have the lifespan of several millenia? In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #120 20120501 03:57:31
Re: Generating FunctionsWell you have already live hundreds of millenia,so that won't be the problem.Let's get started if you want. The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #121 20120501 03:58:50
Re: Generating FunctionsShow me a full output of your best and most complicated example using your function. In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #122 20120501 04:25:40
Re: Generating FunctionsHi bobbym Code:list : [1,2,3,4,5,6,7,8,9,10,11,12,13]; CombOGF(list); Output; Code:[1,2,3,4,5,6,7,8,9,10,11,12,13] (%o74) (x+1)*(x^2+x+1)*(x^3+x^2+x+1)*(x^4+x^3+x^2+x+1)*(x^5+x^4+x^3+x^2+x+1)*(x^6+x^5+x^4+x^3+x^2+x+1)* (x^7+x^6+x^5+x^4+x^3+x^2+x+1)*(x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)*(x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)* (x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)*(x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)* (x^12+x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)* (x^13+x^12+x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #123 20120501 04:38:33
Re: Generating FunctionsOkay, how do you throw a die 4 times and get the probability of having the In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. #124 20120501 04:50:17
Re: Generating FunctionsHi bobbym Last edited by anonimnystefy (20120501 04:51:12) The limit operator is just an excuse for doing something you know you can't. “It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman “Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment #125 20120501 05:55:41
Re: Generating FunctionsThat is correct! Okay, then use yours. In mathematics, you don't understand things. You just get used to them. I have the result, but I do not yet know how to get it. All physicists, and a good many quite respectable mathematicians are contemptuous about proof. 