flat assembler
Message board for the users of flat assembler.

 Index > Heap > Simple math problem/question Goto page Previous  1, 2, 3  Next
Author
Overflowz

Joined: 03 Sep 2010
Posts: 1046
Overflowz
Actually.. let's take this example bit more deeper.
6:2(2+1)
6:2*3
3*3=9
Actually, first should be division because it's first action and second is multiplication..
let's try something like this:
6
------- and sum is 1.
2(2+1)

and second one:
6
-- * (2+1) here sum is 9.
2
I think this example is similar like second one. Because, 6 is divided to 2 first and then multiplied by (2+1)=3. These nails makes people to think deeper but it's equal to 6:2*3 which equals to 9. Maybe this is math mistake ? I'm really stuck.. Is this theory true ?.. Let me know what you think.
17 May 2011, 11:58
JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
I am wandering how you can write 2 pages of comments on problem, that even does not exists???
The solution is simple and even my 4 class daughter can solve it.

0. In the algebra the multiplication sign is '.' and it is commonly omitted. In arithmetic some countries uses "x". In programming it is "*" because of better readability. But the operation is one. There is no different multiplications for the different signs.

1. The brackets have highest priority, so it is safe to solve them in order to make the problem simpler.
The equivalent expression is: 6/2*3

2. The priority of multiplication and division are the same.
(if you think different, you are using different mathematics from the commonly accepted and it is normal to get different results)
In the case when two operations have the same priority, the operations must be processed from left to write.

So, 6/2*3 = 9 and every other result (as I already said) is legal, but in some different mathematics.

17 May 2011, 12:23
Enko

Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
JohnFound wrote:
I am wandering how you can write 2 pages of comments on problem, that even does not exists???
The solution is simple and even my 4 class daughter can solve it.

0. In the algebra the multiplication sign is '.' and it is commonly omitted. In arithmetic some countries uses "x". In programming it is "*" because of better readability. But the operation is one. There is no different multiplications for the different signs.

1. The brackets have highest priority, so it is safe to solve them in order to make the problem simpler.
The equivalent expression is: 6/2*3

2. The priority of multiplication and division are the same.
(if you think different, you are using different mathematics from the commonly accepted and it is normal to get different results)
In the case when two operations have the same priority, the operations must be processed from left to write.

So, 6/2*3 = 9 and every other result (as I already said) is legal, but in some different mathematics.

As I remember, the division sign is ":" and not /
you can write:
6
- or 6:2
2

on paper, normally you wouldnt write 6/2

so, the problem here is really stupid. Becouse we all know how to resolve it, but what we coudn-t know, it what it means on the calculator.

it could be
6
----------
2(2+1)

or

6
-(2+1)
2

Becouse depending on the model of the calc, they interpret diferently the "implied multiplication", this way, in some of them, you dont need to write extra brackets.
17 May 2011, 13:19
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Enko wrote:
As I remember, the division sign is ":" and not /.
For English speaking countries, "/" is by far the most common symbol for division. Wikipedia says that ":" is used in some non-English speaking countries, so that's were the confusion arises from.
19 May 2011, 01:36
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
@Tyler ÷ and /
19 May 2011, 01:48
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
typedef wrote:
@Tyler ÷ and /
Who uses ÷ after 4th grade? I don't know know about you, but I was actually discouraged from using it after we learned fractions. I can guess why: it's an inefficient symbol and easily confused with + when you're sloppy (as most mathematicians are).
19 May 2011, 01:53
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
well... your 4th grade and mine were different... (I bet you are older than me)
19 May 2011, 02:47
neville

Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Enko wrote:
Becouse depending on the model of the calc, they interpret diferently the "implied multiplication", this way, in some of them, you dont need to write extra brackets.
There should be no different interpretation of any multiplication, whether implied or explicit.
If you enter 6/2(2+1) into ANY calculator and it produces a result which is not 9, then it is just WRONG! And it should be given a firmware upgrade to fix the bug

_________________
FAMOS - the first memory operating system
19 May 2011, 06:31
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
typedef wrote:
well... your 4th grade and mine were different... (I bet you are older than me)
17
19 May 2011, 19:54
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Tyler wrote:
typedef wrote:
well... your 4th grade and mine were different... (I bet you are older than me)
17

19
OK. I'm older than you then....

Two years difference.. I see why...

PS: So you are still in high school right?
20 May 2011, 01:39
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
I didn't see this until now, so I'm going to respond to it anyway.

typedef wrote:
What happened to PEMDAS ?
I see ppl going crazy ?

Can you all do this :

Given F: 2, X: 2
-----------------------------------------------------------
Simplify: F( POW(2,X) + SQRT(100) + XF )
You really wanna play that game? Simplify d^2/dx^2(gamma(x^2)).

Or, assuming proof questions are okay: Prove x^2-x is even for all odd x. Let a number be defined as "odd" if and only if it can be written in the form 2k+1, where k is an integer.
20 May 2011, 14:55
JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Tyler wrote:
Prove x^2-x is even for all odd x.

IMHO, x^2-x is even for every integer x, not only for the odd numbers.
20 May 2011, 16:48
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
did you know?......odd numbers are odd?......:
20 May 2011, 17:12
Tyler

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
JohnFound wrote:
Tyler wrote:
Prove x^2-x is even for all odd x.

IMHO, x^2-x is even for every integer x, not only for the odd numbers.
It is, but if you can prove it's even for one parity, it's trivial to prove it for the other. Proving it for the other is just a waste of time, so I left it out.
20 May 2011, 17:14
LocoDelAssembly

Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
(x^2)-x = [(2k+1)^2] - (2k+1)
= (2k+1)(2k+1) - (2k+1)
= 2k(2k+1) + (2k+1) - (2k+1)
= 4k^2 + 2k
= 2(2k^2 + k)

Since whatever the k number is the number will always be multiple of two, then the expression will invariably resolve to an even number for any k belonging to the integer set.

I hope my participation here wasn't unwanted (hey, you can still prove this by induction!)
20 May 2011, 17:32
gabiz_ro

Joined: 20 Feb 2010
Posts: 67
gabiz_ro
Like someone says:
The brackets have highest priority, so it is safe to solve them in order to make the problem simpler.
But also who is tied to brackets: (hope you understand)
6:2(2+1)=6:2(3)=6:6 (because of brackets) =1 final answer
20 May 2011, 17:36
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
first time seeing a colon as a division sign...lol
20 May 2011, 17:46
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
x^2 - x = x(x - 1)

If x ∈ Z is even, i.e. x = 2m for some m ∈ Z then

x(x - 1) = 2m(2m - 1)

and the whole product is divisible by 2, i.e. even, what we denote 2|x(x - 1).

If x ∈ Z is odd, then x = 2m + 1 for some m ∈ Z and

x(x - 1) = (2m + 1)(2m + 1 - 1) = (2m + 1)2m

Again, we have 2|x(x - 1).

Hence 2|x(x - 1) for every x ∈ Z, i.e. x(x - 1) is even for every x ∈ Z.

P.S. By Z we denote set of the integer numbers.
20 May 2011, 18:37
Enko

Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
typedef wrote:
first time seeing a colon as a division sign...lol

It´s used in many non-Anglophone countries.

Becouse: ÷ is much easier simplified as : and note /

But this is only valid in primary school... in high school, the only one used is ------- representing the division as fraction.
20 May 2011, 19:43
JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Enko wrote:
But this is only valid in primary school... in high school, the only one used is ------- representing the division as fraction.

And "/" sign is "single line version" of "-----", for use in simple, one line expressions.
20 May 2011, 20:20
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsCompiler InternalsIDE DevelopmentOS ConstructionNon-x86 architecturesHigh Level LanguagesProgramming Language DesignProjects and IdeasExamples and Tutorials Other----------------FeedbackHeapTest Area
Goto page Previous  1, 2, 3  Next

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou can attach files in this forumYou can download files in this forum