Hypography Science Forums: How Do You Write A Algorithm? - Hypography Science Forums

Jump to content

Welcome! You are currently viewing the Hypography Science Forum as a guest. In order to participate in our science discussions, you should register now! Registration is free and you can use your Facebook login if you like.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How Do You Write A Algorithm? Rate Topic: -----

#1 User is offline   Clover 

  • Curious
  • Group: Members
  • Posts: 1
  • Joined: 04-October 11

Posted 04 October 2011 - 06:35 PM

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
Do not try to be different, just be good. To be good is different enough.
0

#2 User is offline   phillip1882 

  • Thinking
  • Group: Members
  • Posts: 421
  • Joined: 19-July 08

Posted 05 October 2011 - 07:02 AM

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))*26
subtract 110 from 6.
1*4*-104*26
multiply 1, 4, -104 and 26.
-10816
0

#3 User is offline   phillip1882 

  • Thinking
  • Group: Members
  • Posts: 421
  • Joined: 19-July 08

Posted 05 October 2011 - 07:10 AM

if you mean a computer algorithm, then...
a = 1
b = 2
c = 3
j = 10
k = 11
z = 26
print (a*(3+a)*((b*c) -(j*k)))*z*a
would be an example.
0

#4 User is offline   maddog 

  • Cybernetic Quantum Alchemist
  • Group: Members
  • Posts: 1,193
  • Joined: 06-January 05
  • LocationPittsburgh, PA

Posted 16 February 2012 - 03:30 PM

View PostClover, on 04 October 2011 - 06:35 PM, said:

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 an
algorithm may need a better example.

Say you have twelve suits on a rack and you want to know how many you
have that are double breasted with matching pants.

Showing you this algorithm [in pseudocode] is thus

get coat rack
for 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 set
are iteration functions that are mapped on the whole complex pane.

In case you do not know of complex arithmetic a brief intro
A complex number is Z = ax + iby where a, b are some constants, x, y
are your coordinates in a plane and i = sqrt(-1).

So an iteration function is for example Z = Z^2 + c where c is some
complex 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

This post has been edited by maddog: 16 February 2012 - 03:31 PM

"You can not solve a problem with the same mind that created it". - Albert Einstein
0

#5 User is offline   suresh kumawat 

  • Thinking
  • Group: Members
  • Posts: 25
  • Joined: 03-March 12
  • LocationJaipur

Posted 17 April 2012 - 10:49 PM

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.

This post has been edited by suresh kumawat: 17 April 2012 - 10:51 PM

0

#6 User is offline   7DSUSYstrings 

  • Thinking
  • Group: Members
  • Posts: 220
  • Joined: 14-August 08

Posted 19 April 2012 - 02:44 AM

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.codingmon...hp?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
Dr. Charbonneau
email me at drcharbonneau@live.com
See my work as it grows along with my group at:
http://www.jootbox.net76.net
or
http://www.jootbox.websitetoolbox.com

My time is limited online presently and I have to spend much there building the group. Access at the forum has the usual email verification.

"Anything that is truly great or inspiring is created in the mind of one individual laboring in freedom."
-Albert Einstein
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


View our Science Quizzes | Science links. About the Hypography Science Forums

Friends

We recommend these stellar sites:

PC Help Forum

ATL - Atlanta Computer Repair

Sponsors

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

When we launched in May 2000, we wanted to create a site to share science-related content of all kinds on the web. As time passed, our site turned into a pure science forum with lots of cool people.

So we kept the name Hypography and the cool science forum community - and aim to be a friendly place for discussion of science topics of all kinds.