Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in. #101 2012-04-30 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #102 2012-04-30 23:48:35
Re: Generating FunctionsLoops and such. In mathematics, you don't understand things. You just get used to them. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #103 2012-04-30 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #104 2012-04-30 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #105 2012-04-30 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #106 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #107 2012-05-01 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 (2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #108 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #109 2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #110 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #111 2012-05-01 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 (2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #112 2012-05-01 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 (2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #113 2012-05-01 03:19:51
Re: Generating FunctionsHi; In mathematics, you don't understand things. You just get used to them. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #114 2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #115 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #116 2012-05-01 03:42:48
Re: Generating FunctionsBut this solution works.It is applicable in many situations. Last edited by anonimnystefy (2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #117 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #118 2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #119 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #120 2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #121 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #122 2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #123 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. #124 2012-05-01 04:50:17
Re: Generating FunctionsHi bobbym Last edited by anonimnystefy (2012-05-01 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 “A secret's worth depends on the people from whom it must be kept.” ― Carlos Ruiz Zafón #125 2012-05-01 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. 90% of mathematicians do not understand 90% of currently published mathematics. I am willing to wager that over 75% of the new words that appeared were nothing more than spelling errors that caught on. |