LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   please help me do maths :) (https://www.linuxquestions.org/questions/general-10/please-help-me-do-maths-255915/)

darkRoom 11-17-2004 06:22 AM

please help me do maths :)
 
Hi
Its funny how you can completely avoid doing any maths despite programming everyday. Anyway i need to learn a bit of maths but its been a long time, can anyone explain how to calculate the sum below ?

N is any number entered.
E is the mathematical symbol 'sum of' (whats this sign called? it will aid future googling ;)

N
E (i+2)
i=1

Sorry about the formatting . . .

The problem is that i don't know what to do with the 'i' and what is this type of maths called so i can do a search and find resources, also does anyone know any good resources for boolean algebra ?

Thanking you all kindly :)

rjlee 11-17-2004 06:39 AM

The greek E-like letter you refer to is a sigma.

acid_kewpie 11-17-2004 08:18 AM

you mean what does it actually mean? it means the sum of all values of i+2 where i is between 1 and N

e.g. N = 4

answer is (1+2) + (2+2) + (3+2) + (4+2) = 3 + 4 + 5 + 6 = 18

darkRoom 11-17-2004 12:34 PM

Thanks acid_kewpie,

Perhaps with the answer i could of guessed that one, but i only had the sum and no answer.

Anyone with good links (boolean algebra, boolean logic, karnaugh maps) please feel free post :)

darkRoom 11-18-2004 10:05 AM

Maths tutorials are so bad, i got to get me a book. But in the meantime i got another one :)

n is any number and i don't understand the relevance of X0. Its newtons algorithm to calculate a square root. So if n = 4, answer = 16 but how to work the answer out ??

X0 = 1
Xi = 0.5 * (N / Xi-1 + Xi-1)

Thanks for the help :)

bakery2k 11-18-2004 10:09 AM

Quote:

Originally posted by darkRoom
How to work the answer out ??

X0 = 1
Xi = 0.5 * (N / Xi-1 + Xi-1)


Substitute for i.

X1 = 0.5 * (N / X0 + X0)
X2 = 0.5 * (N / X1 + X1)
...

darkRoom 11-18-2004 11:50 AM

I still don't get it, are you sure X2 is really neccessary to calculate the answer ?

gorzuate 11-19-2004 12:58 AM

In case you're curious, your first problem is a summation and is solved like this:

N
E(i + 2)
i = 1

breaks down into:
Code:

N      N
E(i) + E(2) = N(N+1)/2 + 2N
i = 1  i = 1

You could find summations in any Calculus book or by googling for summations:
http://www.google.com/search?q=summations



For your second problem, using 4 as an example isn't a good idea. It's better to use 2. Or 3. And then you can see that you indeed need to go all the way to X2 (in the case of 2) or X3 (in the case of 3).

floppywhopper 11-19-2004 02:23 AM

omg
this will be the second book I've recommended in as many days
maybe we should link to Hari's Book site
just kidding Mods

Never was that good at maths, my old maths teacher will confirm that. However during my accounting studies we had to use a text book even I could follow. it is ...
Business Maths and Statistics
by Peter Waxman
ISBN 0 7248 0138 3
pub by Prentice Hall

your first formula looked similar to one we use to calculate compounding interest.
Anyway I dont know whether you'll be able to buy it outside Australia, but you could try Amazon.

hope this helps
live long and prosper
floppy

Winno 11-19-2004 08:32 AM

With reference to Newton's method, it is iterative (repetitive, ie X2, X3, X4). The answer usually gets better and converges. But it's not failsafe. It fails when there's no answer or results diverge.

radostsguy 11-21-2004 12:18 AM

Re: please help me do maths :)
 
Quote:

Originally posted by darkRoom
Hi
Its funny how you can completely avoid doing any maths despite programming everyday. Anyway i need to learn a bit of maths but its been a long time, can anyone explain how to calculate the sum below ?

N is any number entered.
E is the mathematical symbol 'sum of' (whats this sign called? it will aid future googling ;)

N
E (i+2)
i=1

Sorry about the formatting . . .

The problem is that i don't know what to do with the 'i' and what is this type of maths called so i can do a search and find resources, also does anyone know any good resources for boolean algebra ?

Thanking you all kindly :)

The name of the Summation sign (your E) is the Greek Letter "Sigma". For those who don't know, it looks like the number 3 backwards, and all 4 arms straight lines.

Of course, when you get into Calculus, the Sigma becomes the Integration Sign. But whatever terrible things happen in your life caused by Calculus serves you right! :tisk:

radostsguy 03-15-2005 03:28 PM

Σ! There it is! In Windoze, you just need to install the Greek Alphabet, which is very easy. (Don't ask me hhow to do it in Linux, but I'm sure you know how!) Then it's the letter "B" on your English Language Keyboard.

PTrenholme 03-15-2005 04:43 PM

Re: please help me do maths :)
 
Quote:

Originally posted by darkRoom
Hi
Its funny how you can completely avoid doing any maths despite programming everyday.
...

You don't say which language you use for programming, but -- to pick a simple one -- what you're looking at is a "for" loop. In this case: (This is psudo-code, buut you should 'get it.')
Code:

Sum := 0
for i = 1..N
  Sum := Sum + i + 2
next
print Sum

For the other example:
Quote:

X0 = 1
Xi = 0.5 * (N / Xi-1 + Xi-1)
Code:

X := N/4
while (X != 1)
  Y := 0.5 * (N/(X - 1) + X-1)
    if  abs(X - Y) < 0.00001 break
  X := Y
next
print Y

Generally, most simple maths expressions are almost directly expressable in computer code.

(In fact, the APL computer language was designed as a mathematical language for stating proofs before it was implimented as a computer code. But that's off the subject here.)

Hope this helps.

jaz 03-15-2005 06:31 PM

maths?

radostsguy 03-16-2005 03:47 AM

Yeah! maths!

You know, that subject that is easy until one hits Differential Equations? :p

short101 03-18-2005 05:55 AM

Man, I thought compiling mplayer was hard. ;)

al_periodical 03-18-2005 08:46 AM

forgive me for being silly infront of you guys ,just for curiosity,
is there any way to prove that 1+1=2 with maths ?

it's fun reading posts in this thread,i'm interested in maths suddenly

Tux_Phoenix 03-18-2005 09:01 AM

Are you sure 1+1=2??? Well I know a math teacher that will argue that one.

ahh 03-18-2005 09:05 AM

Quote:

Originally posted by al_periodical
forgive me for being silly infront of you guys ,just for curiosity,
is there any way to prove that 1+1=2 with maths ?

I'm not a mathematician, so maybe someome can provide a proof, but I think this is more a case of definitions, or conventions.

Sometime way back people agreed that the word we use to mean a singular item is one.

This was good, but on its own it had limited usefulness, so some bright spark said why dont we call one and another one two?

So I think that by definition 1 + 1 = 2, because that is what two means.

al_periodical 03-18-2005 09:05 AM

eh ?
don't tell me it's 11 ?

al_periodical 03-18-2005 09:09 AM

Quote:

I'm not a mathematician, so maybe someome can provide a proof, but I think this is more a case of definitions, or conventions. Sometime way back people agreed that the word we use to mean a singular item is one. This was good, but on its own it had limited usefulness, so some bright spark said why dont we call one and another one two? So I think that by definition 1 + 1 = 2, because that is what two means.
we might have problems with 0 (which is a zero)

ahh 03-18-2005 09:17 AM

Quote:

Originally posted by al_periodical
we might have problems with 0 (which is a zero)
Well if I remember correctly, originally there was no 0. It was only when the current method of numbering (?is that a word?) was adopted that the 0 was used. It was basically a place holder between two other digits, or on its own, to show the space where nothing is.

But again it is really a definition, someone decided to call the absence of any items zero.

radostsguy 03-18-2005 09:26 AM

ahh. Yeah. I think you're right on that one!

al_periodical. Why would there be a problem with zero? At least not as far as addition and subtraction are concerned.

It's with multiplication and division that zero becomes a problem. Look at this:

2+x=6
2+y=6

Therefore, x=y, namely 4. Right?

But look at this:

0 / 2 = 0
0 / 3 = 0

Therefore 2 = 3! :p

The real beauty though is this:

If x is a finite number, the Limit of x / y as y approaches 0 is infinity! :D

:edit: ahh, you snuck one in on me! Mathematicians and physicists deferentiate between zero and non-existance! (Don't ask!)

al_periodical 03-18-2005 09:28 AM

it seems that some maths are best explain in words while the rest only in maths

vharishankar 03-18-2005 09:32 AM

Quote:

From Wikipedia
The first decimal zero was introduced by Indian mathematicians about 300. The first independent use of zero as a numeral is attributed to them. An early use of the zero by Brahmagupta dates to 628. He treated zero as a number and discussed operations involving this number. By this time (7th century) the concept had reached Cambodia, and it later spread to China and the Islamic world, from where it reached Europe in the 12th century.
http://en.wikipedia.org/wiki/Zero

radostsguy 03-18-2005 09:32 AM

deferentiate? Nice spelling radostsguy!

Differentiate!

radostsguy 03-18-2005 09:38 AM

Harishankar!

To put your signature a little differently:

"It's better to be thought a fool than to open your mouth and prove it!"

I did know that the concept of zero was missing in Europe for a long time. Think of the Roman Numerals - there isn't one for zero!

Boy, did this thread ever get busy all of a sudden! :D

al_periodical 03-18-2005 10:00 AM

thanks guys
i tried wikipedia with zero and Roman numeral,
i didn't expect zero was/is so problematic

jiml8 03-18-2005 07:11 PM

Quote:

N
E (i+2)
i=1
Is this really the equation you want to solve? It is trivial. It reduces to

(3+(N+2))*(N/2) = (5+N)*(N/2)

No iteration at all required to solve it.

amosf 03-21-2005 06:35 AM

1 + 1 = 10

alred 03-21-2005 06:44 AM

wow .......

that is maths sheds off it pretensions.i love that.

rjlee 04-10-2005 09:16 AM

Quote:

Originally posted by amosf
1 + 1 = 10
But only in Binary. As my lecturers used to say
Code:

1+1=2 for high values of 1
Just for fun, let's prove this in octal:
Code:

1.3 + 1.3 = 2.6 for exact values of 1.3
To one octal place:
1 + 1 = 3 (2.6 rounds to 3 because octal skips out digits 8 and 9)

Because in the real world, there are no exact numbers, and base 10 is just a convention :)

jschiwal 04-10-2005 10:31 AM

Why is everyone using 'Maths' instead of 'Math'?

But then it's been so long since I've been in school, maybe its the "new" new math. I had even forgotten how to calculate square roots. I didn't have a 3rd grade math book handy (who does), so I had to re-invent the wheel. If newton's approximation method interests you, you might like to see how the arithmetic for calculating square roots the regular way works!

You start out with a number A which is less then the right answer, which you get by looking at the number. In other words, your final answer should be some A+B. Well lets see what happens if you square these terms. You get (A^2 + 2AB + B^2). If you subtract A^2 from the original number N, you are left with (2AB + B^2). Factor out the B gives B(2A + B).
Let's rearrange it a little bit.

2A + B
x B
_______

So that's the part that I couldn't remember. Since we subtracted A^2 and then 2A+B, these terms equal some number squared, so we can continue on with the second step getting closer to the answer.

I am a bit fascinated by the Pythagoreans. They were not just a philosophy school, but more like a religious cult. One of their members revealed the secrets of of the octahedron to the outside world. He was stoned to death. A similar fate (drowning) awaited a member who discovered the existence of irrational numbers. This turned their entire existence on its head.

Anyway, this topic has prompted my to change my sig.

alred 04-10-2005 10:55 AM

Quote:

by rjlee
.......
.......
Because in the real world, there are no exact numbers, and base 10 is just a convention
.....
.....
forgive me for being silly infront of you and just for the fun of it ......

although i totally don't understand what you had done above , but i do know that it's a kind of maths that looks zulu for me.:p , and i trust you with that because there always be a way for you to "caculate" or to "define" when everything exist .
For someone like me , the more it looks zulu to me the more it is maths ,
so maybe you can explain to me what is zero or 0 in maths , what is 0 , zero not as a usage or "helping tool" to proof other , but simply a zero which does not exists ? if possible do it in a way that i can graps , if it not possible it still doesn't matter .:)

nothing much , just for the fun of it , hopes you don't get offended by my silly question ......

thanks in advance

jschiwal 04-11-2005 06:53 AM

That may be more of a historic question then a mathematical one. The Greeks didn't have the concept of zero begin a number, or of negative numbers. They worked out their mathematical proofs geometrically, and used rational numbers. That is their numbers were expressed as ratios. They didn't have a decimal notation. In the western world, the number 0 wasn't discovered until after the first crusades. The concept of zero came from India, and was adopted by the arabs. In the west, roman numerals were used for centuries after the east started using arabic numerals. This was by order of the Pope of Rome because business men and traders found it easier to fudge their books by altering one number into another. Imagine being in school and using Roman numerals for multiplication or addition.
Zero is the natural number with represents the absence of an object. Think of it as the 'no' number. There are 'no' apples or there are 'no' cookies. It is also an identity number when it comes to addition. M + 0 = M. This equation is known as the 'additive identity law'.
Division by zero is undefined. It doesn't make sense to say that you are dividing something into groups of zero.

Zero shows up 3 times in the 7 axioms developed during the 19th century.
4. For all n: n+0=n (additive identity law)
6. For all n, there is a number k such that n+k=0 (additive inverse law)
7. For all m,n, k, where k does not equal 0: if km = kn, then m = n (the cancellation law)
Although the mention in no. 7 is just to avoid division by zero.

Don't confuse zero with an empty set in set theory. The set {0} contains one member. The empty set {}, or NILL is represented by a similar symbol. A circle with a slash through it.

I hope this helps. I can't wait until you start pondering infinity.

alred 04-11-2005 08:50 AM

very well said and appreciate your trouble in answering my doubt .....

except for those maths part at the bottom which is my fault for not knowing any , all in all , i can graps what you are trying to tell me , thanks a lot .......

yup , as for the Infinity that you mentioned , it's still better than mentioning god or the inexplicable , if not we shall see a very different kind of stone pelting and drowning ..........


thanks again

rjlee 04-11-2005 01:03 PM

Quote:

Originally posted by jschiwal
Why is everyone using 'Maths' instead of 'Math'?
I am English, so I say “maths”, sort for “mathematics” (and use double-quotes rather than single ones).

Sorry if this is getting too off-topic!


All times are GMT -5. The time now is 04:31 PM.