flat assembler
Message board for the users of flat assembler.

 Index > Heap > Numerical oddities Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 24, 25, 26  Next
Author
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
kohlrak wrote:
When all else fails, put in actual numbers... If the case is ever false, all it takes is one situation. Arguing with alphabet soup will get you nowhere.
Kohlrak, that's not "alphabet soup" that's algebra if you aren't awared yet.
24 Mar 2010, 11:07
kohlrak

Joined: 21 Jul 2006
Posts: 1421
kohlrak
MHajduk wrote:
kohlrak wrote:
When all else fails, put in actual numbers... If the case is ever false, all it takes is one situation. Arguing with alphabet soup will get you nowhere.
Kohlrak, that's not "alphabet soup" that's algebra if you aren't awared yet.

Merely a metaphor.
24 Mar 2010, 11:10
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
kohlrak wrote:
MHajduk wrote:
kohlrak wrote:
When all else fails, put in actual numbers... If the case is ever false, all it takes is one situation. Arguing with alphabet soup will get you nowhere.
Kohlrak, that's not "alphabet soup" that's algebra if you aren't awared yet.

Merely a metaphor.
Yeah, let it be.
24 Mar 2010, 11:12
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
So, revolution, are you still sure that my and yours answers are the same? Did you read this post http://board.flatassembler.net/topic.php?p=112372#112372?

You tried to "prove" that a = b for every a, b but we only could prove this way that

|a - b| = |b - a|

what is obvious for every a and b but from this you can't conclude that a = b !
24 Mar 2010, 11:19
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
MHajduk: Nope. Hehe, it ain't that easy. You have changed the equation by adding the ||'s. It can be solved in a better way.
24 Mar 2010, 11:45
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
I haven't "changed" the equation, you can't just "forget" about the second power here:
Code:
`(a - c/2)^2 = (b - c/2)^2    `
and write
Code:
`a - c/2 = b - c/2    `
you can write only something like this:
Code:
`|a - c/2| = |b - c/2|    `
OK, if you want it a bit simpler, you can write also this way:
Code:
```             a + b = c
(a + b)(a - b) = c(a - b)
a^2 - b^2 = ca - cb
a^2 - ca = b^2 - cb
a^2 - ca + (c^2)/4 = b^2 - cb + (c^2)/4
(a - c/2)^2 = (b - c/2)^2
(a - b)^2 = (b - a)^2
(a - b)^2 = (-(a - b))^ 2
(a - b)^2 = (a - b)^2     (what, again, doesn't lead us to conclusion a = b !)
```

Last edited by MHajduk on 24 Mar 2010, 12:07; edited 1 time in total
24 Mar 2010, 11:54
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
You can't simply say: "sqrt(x^2) = |x|"

x=-3
x^2=9
sqrt(x^2)=|x| <---- your step is here.
x=3

It doesn't work like that. You follow a path that is not guaranteed.
24 Mar 2010, 12:05
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Man, you don't know mathematics! See this article in Wikipedia (definition of absolute value) http://en.wikipedia.org/wiki/Absolute_value

Wikipedia wrote:
Since the square-root notation without sign represents the positive square root,

which is sometimes even used as a definition of absolute value.
I only said that fault in your "reasoning" was when you "forget" about absolute value, hence any following conclusions were wrong.
24 Mar 2010, 12:11
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Your example should be solved this way:
Code:
```x = -3
x^2 = 9
sqrt(x^2) = sqrt(9)
|x| = 3
hence
x = 3 or x = -3    ```
24 Mar 2010, 12:16
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
I never showed any square-root notation.

But you are right, I don't know much about mathematics, but I don't think you are safe to assume the absolute value in the equations I showed. And when you see the answer you will also see why your assumption about adding || is not best.
24 Mar 2010, 12:19
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
MHajduk wrote:
Your example should be solved this way:
Code:
```x = -3
x^2 = 9
sqrt(x^2) = sqrt(9)
|x| = 3
hence
x = 3 or x = -3    ```
So that shows that assuming that "sqrt(x^2) = |x|" is not correct. Right?
24 Mar 2010, 12:20
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
I never showed any square-root notation.

But you are right, I don't know much about mathematics, but I don't think you are safe to assume the absolute value in the equations I showed. And when you see the answer you will also see why your assumption about adding || is not best.
Again, in my first post I showed where we could correct your reasoning to obtain (obvious) result. This "trick" with "silent cancelling" of the second power is very old and well known but, of course, is not allowed in maths.
24 Mar 2010, 12:22
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
MHajduk wrote:
This "trick" with "silent cancelling" of the second power is very old and well known but, of course, is not allowed in maths.
But it is allowed, and the answer, when you see it, will make it obvious. Try to think a little more about it. Your responses above are tantalising close to the solution. You just need to connect the dots.
24 Mar 2010, 12:25
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
MHajduk wrote:
Your example should be solved this way:
Code:
```x = -3
x^2 = 9
sqrt(x^2) = sqrt(9)
|x| = 3
hence
x = 3 or x = -3    ```
So that shows that assuming that "sqrt(x^2) = |x|" is not correct. Right?
No, sqrt(x^2) = |x| is true for all x.

Notice that if we transform equation we can widen the set of the solutions. We can't make transformations which may exclude some solutions of previous equations (as you tried to do with "cancelling" the second power).

Transformations presented above are correct because we widen the set of the possible solutions what is not wrong.

Let's denote above mentioned reasoning as a sequence of the implications (which are true):

1. x = - 3 => x^2 = 9

true, but we widen the set of the possible solutions from {-3} to {-3, 3}, this step is allowed (but not in the opposite direction)

2. x^2 = 9 => sqrt(x^2) = sqrt(9)

true, the set of the possible solutions {-3, 3}

3. sqrt(x^2) = sqrt(9) => |x| = 3

true, from the definition of the absolute value, set of possible solutions the same {-3, 3}

4. |x| = 3 => [(x = - 3) or (x = 3)]

true, again from the definition of the absolute value, set of possible solutions {-3, 3}

Because relation of the implication is transitive we can write that

• x = -3 => [(x = -3) or (x = 3)]

true, set of possible solutions {-3, 3}

We have an implication of the form

p => [p or q]

which is always true due to the properties of the implication.

Notice that (x = -3) or (x = 3) is equivalent to the fact that x belongs to the set {-3, 3}.

Well, what we obtain finally? We concluded that if x = -3 then x belongs to the set {-3, 3} what is absolutely true.
24 Mar 2010, 12:50
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
Sure, no problem, sqrt(x^2) = |x|. But I never showed the sqrt(x^2) notation, that was added by you.

24 Mar 2010, 12:56
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
Sure, no problem, sqrt(x^2) = |x|. But I never showed the sqrt(x^2) notation, that was added by you.

I used notation of the square root possible to denote only with the Latin letters.

sqrt = "square root" name of the function used in C
24 Mar 2010, 13:02
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
I am not disputing that sqrt = square root. The issue is that you gave the notation, not me. I fully accept that sqrt meant square root. The Wikipedia page you showed supports your notation as given, but it was added by you so your result is true based upon something you added. In a more formal logic setting this is known as a "strawman argument". Hehe, but it sounds harsh to accuse you of that. So instead we can say based upon your new equation, your result it correct. But it is also not really relevant, because it changed what I wrote, rather than fixing what I wrote. I need something that fixes the equations I wrote.
24 Mar 2010, 13:07
MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
I am not disputing that sqrt = square root. The issue is that you gave the notation, not me. I fully accept that sqrt meant square root. The Wikipedia page you showed supports your notation as given, but it was added by you so your result is true based upon something you added. In a more formal logic setting this is known as a "strawman argument". Hehe, but it sounds harsh to accuse you of that. So instead we can say based upon your new equation, your result it correct. But it is also not really relevant, because it changed what I wrote, rather than fixing what I wrote. I need something that fixes the equations I wrote.
I think you've just changed rules of the game. I was sure that we have to find where reasoning is wrong, not "fix" it. I've showed you how to correct your (improper) reasoning in two ways.
24 Mar 2010, 13:22
revolution
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 17279
revolution
I always just look for fixes, see the previous stuff. Admittedly I never explicitly stated it this time, so perhaps you have a rightful claim of a solution. So in that case I shall allow your result as a possible solution.

So now I formally correct my omission: Find a solution that fixes what I wrote. Where "fixes" means without introducing any new operations. MHajduk has already some good stuff that strongly hints at what the answer is.
24 Mar 2010, 13:27
Borsuc

Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Why don't you just expand the parantheses to obtain a second degree polynomial?

_________________
Previously known as The_Grey_Beast
24 Mar 2010, 13:58
 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 ... 11, 12, 13 ... 24, 25, 26  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