Clover Posted October 5, 2011 Report Posted October 5, 2011 So, I know algorithms are very complicated and such, but if you would take the time, can you please give me a step by step way to make an algorithm for this problem. I'm not sure which version you need, an algebraic one or one with numbers so I'll put both. (a(3+a)(bc - jk)za(1(1+3)(2*3) - (10*11)) (26*1) <p> =) Thanks for anyone who takes the time! ~Clover Quote
phillip1882 Posted October 5, 2011 Report Posted October 5, 2011 an algorithm is simply a series of steps to achieve a particular goal.(1(1+3)((2*3) - (10*11)) (26*1)add 1 and 3, multiply 2 and 3, multiply 10 and 11, multiply 26 and 1.(1*4*(6 - 110))*26subtract 110 from 6.1*4*-104*26multiply 1, 4, -104 and 26.-10816 Quote
phillip1882 Posted October 5, 2011 Report Posted October 5, 2011 if you mean a computer algorithm, then...a = 1b = 2c = 3j = 10k = 11z = 26print (a*(3+a)*((b*c) -(j*k)))*z*awould be an example. Quote
maddog Posted February 17, 2012 Report Posted February 17, 2012 (edited) So, I know algorithms are very complicated and such, but if you would take the time, can you please give me a step by step way to make an algorithm for this problem. I'm not sure which version you need, an algebraic one or one with numbers so I'll put both. (a(3+a)(bc - jk)za(1(1+3)(2*3) - (10*11)) (26*1)Clover, An algorithm for above example as philip1882 showed you is trivial. So analgorithm may need a better example. Say you have twelve suits on a rack and you want to know how many youhave that are double breasted with matching pants. Showing you this algorithm [in pseudocode] is thus get coat rackfor each hanger in rack- if contents of hanger is suit then-- if contents of hanger has pants--- if contents of hanger that is suit of type "double breasted" then--- if contents of hanger that is suit "match" contents of hanger that is pants then---- incr count by 1 print count Now this is Not code of any language. One could though by defining a few things write an actual program in any language. Only increment our counter if what is found on each hanger is a suit,that is double breasted and that has pants that match. Another example is a fractal. Fractals such as the Mandlebrot setare iteration functions that are mapped on the whole complex pane. In case you do not know of complex arithmetic a brief introA complex number is Z = ax + iby where a, b are some constants, x, yare your coordinates in a plane and i = sqrt(-1). So an iteration function is for example Z = Z^2 + c where c is somecomplex constant say (a, b ) or c = a + ib. You then plot this for the whole complex plane. You get a Mandlebrot set. I will leave this as an exercise for you to work out an algorithm in pseudocode. maddog Edited February 17, 2012 by maddog Quote
suresh123 Posted April 18, 2012 Report Posted April 18, 2012 (edited) Thanks friends for discussing such nice algorithms,please discuss some more maths related algorithm as maths involves in every field of science,would you like to discuss probability worksheet or probability related problems. Edited April 18, 2012 by suresh kumawat Quote
7DSUSYstrings Posted April 19, 2012 Report Posted April 19, 2012 An algorhythm is a generic "method" one will use to design the code for a task. It would be advisable, though, to knoiw your chosen compiler first, prior to even pseudocode, because C/C++ is very different than say Pascal or Basic. http://www.codingmonkeys.com/index.php?action=forum I just put this link for another query, but you can find a lot of Basic compilers here. I think I placed a link there once to Delphi 7 PE, but Borland no longer supports it largely because Borlsnd is no more. I'm saying this because D7 has so many math routines that any Delphi version makes life easy for math guys. EBasic or IWBasic have floor and ceil routines that allow for integration routines, summation. So does Delphi. Delphi has string variables and converters and allow extremely long floats. An algebraist's dream Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.