I've finally gotten around to reading Accelerated C++ by Andrew Koenig and
Barbara Moo. There's a lot of good stuff in what I've read so far. Even
though it is _very_ basic, they present some concepts I have not
encountered elsewhere, or explain ones I have encountered in ways that add
to my understanding. There are a few points of style with which I take
issue, such as not consistently using braces around the body of an if or
loop, etc.
There is one point, however, I have to take exception too. They assert that
"...the number of elements in [0, rows) is obvious(i.e., rows -0, or rows)
but the number of elements in [1,rows[ is less so." If you agree with
these authors, please turn off the computer and reflect for a moment on
your preschool and kindergarden years. Hold up your hand and look at your
fingers. Remember? "One", "two", "three"....? ;-)
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell 27 1806
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:Xf********************@speakeasy.net... There is one point, however, I have to take exception too. They assert that "...the number of elements in [0, rows) is obvious(i.e., rows -0, or rows) but the number of elements in [1,rows[ is less so." If you agree with these authors, please turn off the computer and reflect for a moment on your preschool and kindergarden years. Hold up your hand and look at your fingers. Remember? "One", "two", "three"....? ;-)
Indeed -- People form bad habits early.
If you are in the habit of representing ranges by storing the first and last
element of the range, our experience from years of teaching is that you are
much more likely to run into trouble than you are if you form the habit of
representing ranges by storing the first and one past the last element.
Moreover, once you graduate from ranges of integers to ranges of iterators,
you no longer have a choice in the matter, because there is no way to
represent an empty range if you insist on referring to the last element
rather than one past the last.
Andrew Koenig wrote: fingers. Remember? "One", "two", "three"....? ;-)
Indeed -- People form bad habits early.
If you are in the habit of representing ranges by storing the first and last element of the range, our experience from years of teaching is that you are much more likely to run into trouble than you are if you form the habit of representing ranges by storing the first and one past the last element.
Moreover, once you graduate from ranges of integers to ranges of iterators, you no longer have a choice in the matter, because there is no way to represent an empty range if you insist on referring to the last element rather than one past the last.
I don't disagree with what you're saying. I've never thought about the issue
from that perspective. I simply accepted that C and hence C++ works that
way because it's more consistent with the hardware representation. I know
I can get pretty disoriented if I start working with Mathematica after a
long period of exclusively working with C++. Mathematica starts indexing
at 1, sort of. The zeroth element of a List is 'List'.
I was really commenting on the impact that counting from 0 has on our
thinking. I worked with vectors an matrices for years in mathematics
before I started working with computers. Now the idea of indexing from 1
seems a bit foreign. I sometimes wonder if mathematics will every recover
from computer science.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:Xf********************@speakeasy.net... I've finally gotten around to reading Accelerated C++ by Andrew Koenig and Barbara Moo. There's a lot of good stuff in what I've read so far. Even though it is _very_ basic, they present some concepts I have not encountered elsewhere, or explain ones I have encountered in ways that add to my understanding.
One comment that I've come across many times is that it's hard going for
beginners, i.e., not basic enough, though I don't know what level it's
aimed at. I have not actually read it. The bookshops here don't have it.
They prefer to stock "Learn C++ in 30 seconds", or whatever it's called.
DW
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:GO********************@speakeasy.net... I've never thought about the issue from that perspective. I simply accepted that C and hence C++ works that way because it's more consistent with the hardware representation.
Neither have I. And I was quite impressed by the representation of an empty
range by [n, n). The book shows some fundametal but easy-to-ignore points.
--
ES Kim
"David White" <no@email.provided> wrote in message
news:lR*****************@nasal.pacific.net.au... One comment that I've come across many times is that it's hard going for beginners, i.e., not basic enough, though I don't know what level it's aimed at. I have not actually read it. The bookshops here don't have it. They prefer to stock "Learn C++ in 30 seconds", or whatever it's called.
Accelerated C++ covers more material in its 320 pages than many 1000-page
introductory books. It does so by not dwelling on unimportant details and
avoiding needless repetition. As a result, you have to read it thoroughly:
You can't just open it at random and expect that you'll be able to
understand whatever you see without first having read what precedes it.
On the other hand, if you do take the time to read it thoroughly, I believe
you will learn more in less time than if you were to use a more conventional
book. The reason is that one of its organizing principles is "Teach the
most useful ideas first." That is, at each point in the book, we present
the idea that we think will add the most to your programming skills beyond
what you have already learned up to that point.
Who is the intended audience? Someone who already has some programming
experience (not necessarily a lot), and who can figure out the mechanics of
writing and running C++ programs. I know that several people are using it
as textbooks in introductory college computer-science courses. It would
also be well suited for software developers who have never used C++ but who
have programmed in other languages.
I think it might even be useful for a complete novice, provided that there
was someone around to help as needed. I think it's a little steep for
self-study by a nonprogrammer.
"ES Kim" <no@spam.mail> wrote in message
news:cm**********@news1.kornet.net... "Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:GO********************@speakeasy.net... I've never thought about the issue from that perspective. I simply accepted that C and hence C++ works that way because it's more consistent with the hardware representation.
Neither have I. And I was quite impressed by the representation of an empty range by [n, n). The book shows some fundametal but easy-to-ignore points.
I find that notation to be rather silly. Something more like [] would be
better, in my opinion, except that of course we're dealing with takng that
representation and applying it to something real (assuming you can call C++
"real" :-)).
What does [n,n) mean, if translated into everyday language? It's the range
of integers starting at and including n, up to but NOT including n. Umm...
what??? The first part says to include n, and the second says to not
include n. Very weird.
It's obvious, as a programer, how that representation can be implemented in,
for example, a for loop. But it's no different, really, from saying
something like [100,-5]. That's just as "emtpy" as [n,n), isn't it?
Just my $0.02 (and as valueless as that is).
-Howard
Howard wrote: "ES Kim" <no@spam.mail> wrote in message news:cm**********@news1.kornet.net... "Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:GO********************@speakeasy.net... I've never thought about the issue from that perspective. I simply accepted that C and hence C++ works that way because it's more consistent with the hardware representation.
Neither have I. And I was quite impressed by the representation of an empty range by [n, n). The book shows some fundametal but easy-to-ignore points.
I find that notation to be rather silly. Something more like [] would be better, in my opinion, except that of course we're dealing with takng that representation and applying it to something real (assuming you can call C++ "real" :-)). What does [n,n) mean, if translated into everyday language? It's the range of integers starting at and including n, up to but NOT including n. Umm... what??? The first part says to include n, and the second says to not include n. Very weird. It's obvious, as a programer, how that representation can be implemented in, for example, a for loop. But it's no different, really, from saying something like [100,-5]. That's just as "emtpy" as [n,n), isn't it?
Just my $0.02 (and as valueless as that is).
-Howard
It's really standard mathematical notation for a set. There's nothing novel
to me in the notation itself. What I found a bit amusing was the idea that
it is easier to determine the number of elements in the set {0,1,2,...,n-1}
than in the set {1,2,3,...,n}.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
Andrew Koenig wrote: I think it might even be useful for a complete novice, provided that there was someone around to help as needed. I think it's a little steep for self-study by a nonprogrammer.
I'm finding that it is fairly 'self-contained'. That is, it makes very few
assumptions about prior programming knowledge, and presents every necessary
concept as appropriate. Though it presents the material at a basic level,
it doesn't condescend to the reader. It also presents - as I previously
indicated - some ideas I haven't encountered elsewhere. I'm certainly
getting more from the book than simply a review of the material covered in
TC++PL(SE).
I suspect the hardest part of working through the book for a person with
little programming experience would be the challenge of figuring out the
mechanics of working with the particular implementation. IDE's can add a
lot of distracting content to even the simplest of programs, and the
g++(for example) command line interface is not what I would call intuitive.
Of course they could use Emacs... :o vi? My own opinion is that a person
would be well served by fetching Cygwin - or installing an operating system
- and learning to work with their compiler from the command line. I'd
suggest TextPad (ShareWare) as an editor if they are restricted to a
Windows environment.
One advantage I got from using KDevelop when I started programming in C++ is
that it created my header/source file pairs in a useful way.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
"Howard" <al*****@hotmail.com> wrote in message
news:8d*******************@bgtnsc05-news.ops.worldnet.att.net... I find that notation to be rather silly. Something more like [] would be better, in my opinion, except that of course we're dealing with takng that representation and applying it to something real (assuming you can call C++ "real" :-)). What does [n,n) mean, if translated into everyday language? It's the range of integers starting at and including n, up to but NOT including n. Umm... what??? The first part says to include n, and the second says to not include n. Very weird.
The notation has many years of usage in mathematics. I didn't invent it.
It's obvious, as a programer, how that representation can be implemented in, for example, a for loop. But it's no different, really, from saying something like [100,-5]. That's just as "emtpy" as [n,n), isn't it?
Yes it is. However, the number of elements in [m,n) is n-m; the number of
elements in [m,n] is n+1-m (assuming zero in both cases if the count is
negative). The "+1" is the source of untold off-by-one errors in programs.
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:H-********************@speakeasy.net... Howard wrote:
"ES Kim" <no@spam.mail> wrote in message news:cm**********@news1.kornet.net... "Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:GO********************@speakeasy.net...
I've never thought about the issue from that perspective. I simply accepted that C and hence C++ works that way because it's more consistent with the hardware representation.
Neither have I. And I was quite impressed by the representation of an empty range by [n, n). The book shows some fundametal but easy-to-ignore points.
I find that notation to be rather silly. Something more like [] would be better, in my opinion, except that of course we're dealing with takng that representation and applying it to something real (assuming you can call C++ "real" :-)). What does [n,n) mean, if translated into everyday language? It's the range of integers starting at and including n, up to but NOT including n. Umm... what??? The first part says to include n, and the second says to not include n. Very weird. It's obvious, as a programer, how that representation can be implemented in, for example, a for loop. But it's no different, really, from saying something like [100,-5]. That's just as "emtpy" as [n,n), isn't it?
Just my $0.02 (and as valueless as that is).
-Howard
It's really standard mathematical notation for a set. There's nothing novel to me in the notation itself. What I found a bit amusing was the idea that it is easier to determine the number of elements in the set {0,1,2,...,n-1} than in the set {1,2,3,...,n}. --
Actually, as you've just shown, sets us curly bracket notation. And, the
notation for an empty set is {}, not [n,n).
All I'm saying is that it's incredibly odd to use this specific instance of
the notation: [n,n), because the left square bracket here explicitly means
to include the number following it (n), and the right paren just as
explicitly states to NOT include the number to its left (n). So... the
notation contradicts itself. Undoubtedly, it's convenient to say [n,n) in
order to construct a programming model from the mathematical model, and
maybe it's even commonly used (although I sure don't recall seeing it in my
degree studies), but there's no way to deny that this *particular* use of
the notation is self-contradictory.
-Howard
Howard wrote: Actually, as you've just shown, sets us curly bracket notation. And, the notation for an empty set is {}, not [n,n).
There are multiple forms of notation for sets. To say sets use curly
brackets does not exclude the use of the use of square brackets and
parentheses. The latter is commonly used in analysis (the Calculus).
All I'm saying is that it's incredibly odd to use this specific instance of the notation: [n,n), because the left square bracket here explicitly means to include the number following it (n), and the right paren just as explicitly states to NOT include the number to its left (n). So... the notation contradicts itself.
Ok, now I understand what you were getting at. I agree that it seems a bit
odd. OTOH, it does follow naturally from the notation, and seems to
communicate something of meaning. I'd argue that it actually says more
than simply [n,n) = {}; It says we are talking about an empty range
located (beginning) at n. It's kind of like the empty string used in
regular expressions such as the empty string at the beginning of a word.
Undoubtedly, it's convenient to say [n,n) in order to construct a programming model from the mathematical model, and maybe it's even commonly used (although I sure don't recall seeing it in my degree studies), but there's no way to deny that this *particular* use of the notation is self-contradictory.
-Howard
Well..., it really depends on the subtelties of your definitions. There is
always the escape of defining the special case to mean such and such, e.g.,
x^0===1. I would argue that [n,n) is a degenerate case which
reasonably /suggests/ [n,n)==={}. But we're heading off topic.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
Steven T. Hatton wrote: Howard wrote:
[...]
See what you can make of this: http://mathworld.wolfram.com/Interval.html
I haven't formed a conclusive opinion as to whether they address the case of
[n,n).
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
In article <tf********************@speakeasy.net>,
Steven T. Hatton <su******@setidava.kushan.aa> wrote: Steven T. Hatton wrote:
Howard wrote: [...]
See what you can make of this:
http://mathworld.wolfram.com/Interval.html
I haven't formed a conclusive opinion as to whether they address the case of [n,n).
It's called a "half-open" or "half-closed" interval. A half-open
interval has very good properties, especially on the integers.
Especially that the union of the two intervals:
[a,b) U [b,c)
is also a half-open interval: [a,c)
See: http://mathworld.wolfram.com/Half-ClosedInterval.html
--
Mark Ping em****@soda.CSUA.Berkeley.EDU
E. Mark Ping wrote: In article <tf********************@speakeasy.net>, Steven T. Hatton <su******@setidava.kushan.aa> wrote:Steven T. Hatton wrote:
Howard wrote: [...]
See what you can make of this:
http://mathworld.wolfram.com/Interval.html
I haven't formed a conclusive opinion as to whether they address the case of [n,n).
It's called a "half-open" or "half-closed" interval. A half-open interval has very good properties, especially on the integers. Especially that the union of the two intervals:
[a,b) U [b,c)
is also a half-open interval: [a,c)
See: http://mathworld.wolfram.com/Half-ClosedInterval.html
We are specifically interested in the case of [a,a) i.e., [a,b) where b = a.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
"Howard" <al*****@hotmail.com> wrote in message
news:As*******************@bgtnsc05-news.ops.worldnet.att.net... All I'm saying is that it's incredibly odd to use this specific instance of the notation: [n,n), because the left square bracket here explicitly means to include the number following it (n), and the right paren just as explicitly states to NOT include the number to its left (n). So... the notation contradicts itself. Undoubtedly, it's convenient to say [n,n) in order to construct a programming model from the mathematical model, and maybe it's even commonly used (although I sure don't recall seeing it in my degree studies), but there's no way to deny that this *particular* use of the notation is self-contradictory.
Either that or your notion of what the notation represents should be
adjusted.
Here's another way to look at it: For all integers m, n, the notation "[m,
n)" is the ascending sequence of integer values k, with the property that m
<= k and k < n. Now the contradiction vanishes.
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:tf********************@speakeasy.net... See what you can make of this:
http://mathworld.wolfram.com/Interval.html
It talks about real numbers, not integers, but is relvant aside from that.
Note that there are lots of issues, such as compactness, that apply to reals
but not to integers.
I haven't formed a conclusive opinion as to whether they address the case of [n,n).
They do, by saying that treating the empty set as an integral makes a bunch
of other properties equivalent. By implication, they could choose to define
the notion of interval to exclude the empty set, but they feel it is more
useful to do otherwise.
In article <Qc********************@speakeasy.net>,
Steven T. Hatton <su******@setidava.kushan.aa> wrote: E. Mark Ping wrote: Especially that the union of the two intervals:
[a,b) U [b,c)
is also a half-open interval: [a,c)
See: http://mathworld.wolfram.com/Half-ClosedInterval.html
We are specifically interested in the case of [a,a) i.e., [a,b) where b = a.
My apologies for being too terse. I've never seen standard
nomenclature for [a,a), but it makes sense in this case to define it
as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
Similarly, 0! is commenly defined as 1 becuase it's most useful with
that definition in combinatorics, but AFAIK it's not a universally
accepted definition.
--
Mark Ping em****@soda.CSUA.Berkeley.EDU
E. Mark Ping wrote: My apologies for being too terse. I've never seen standard nomenclature for [a,a), but it makes sense in this case to define it as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
Similarly, 0! is commenly defined as 1 becuase it's most useful with that definition in combinatorics, but AFAIK it's not a universally accepted definition.
I have a serious reservation about accepting the idea of [a,a) = {}. After
thinking it over, it seems to me that [a,a) carries more information than
{}. In order for [a,a) = {} to be true, [a,a) = [b,b) where a != b; I'm
not sure I'm willing to accept that proposition. In particular, I'm not
sure I'm willing to extend it to the concept of indexing of memory
locations.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
In article <1v********************@speakeasy.net>,
Steven T. Hatton <su******@setidava.kushan.aa> wrote: E. Mark Ping wrote:
My apologies for being too terse. I've never seen standard nomenclature for [a,a), but it makes sense in this case to define it as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
Similarly, 0! is commenly defined as 1 becuase it's most useful with that definition in combinatorics, but AFAIK it's not a universally accepted definition.
I have a serious reservation about accepting the idea of [a,a) = {}. After thinking it over, it seems to me that [a,a) carries more information than {}.
Well of course it does. 0! carries more information that 1.
In order for [a,a) = {} to be true, [a,a) = [b,b) where a != b; I'm not sure I'm willing to accept that proposition.
I don't know why not. Note the equivalence:
[a,a) U [a,b) = [a,b)
[b,b) U [a,b) = [a,b)
Definining [a,a) = {} is just as useful as defining 0! = 1.
In particular, I'm not sure I'm willing to extend it to the concept of indexing of memory locations.
Why not?
while (p!=q)
{
*p++ = *q++;
}
Is meaningful for p and q even if p==q at the beginning of the loop.
--
Mark Ping em****@soda.CSUA.Berkeley.EDU
E. Mark Ping wrote: In article <1v********************@speakeasy.net>, Steven T. Hatton <su******@setidava.kushan.aa> wrote:E. Mark Ping wrote:
My apologies for being too terse. I've never seen standard nomenclature for [a,a), but it makes sense in this case to define it as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
Similarly, 0! is commenly defined as 1 becuase it's most useful with that definition in combinatorics, but AFAIK it's not a universally accepted definition.
I have a serious reservation about accepting the idea of [a,a) = {}. After thinking it over, it seems to me that [a,a) carries more information than {}.
Well of course it does. 0! carries more information that 1.
In order for [a,a) = {} to be true, [a,a) = [b,b) where a != b; I'm not sure I'm willing to accept that proposition.
I don't know why not. Note the equivalence:
[a,a) U [a,b) = [a,b) [b,b) U [a,b) = [a,b)
Definining [a,a) = {} is just as useful as defining 0! = 1.
In particular, I'm not sure I'm willing to extend it to the concept of indexing of memory locations.
Why not?
while (p!=q) { *p++ = *q++; }
Is meaningful for p and q even if p==q at the beginning of the loop.
If I am discussing a finite range of indices [0,n) and choose some index m
such that 0 < m < n, I can write [m,m) to signify an empty sequence
beginning at m. Hence I can indicate the mth element with the notation
[m,m+1). If I assume [m,m) = [p,p) where p!=m, I am in effect saying
[m,m+1) = [p,p+1) which is false.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
Dave Townsend wrote: "E. Mark Ping" <em****@soda.csua.berkeley.edu> wrote in message
Okay, that makes sense that [a,a) != [b,b) but that just means that [a,a) != {}. It's not the empty set, it's /an/ empty /sequence/, starting at a. That's how it's used typically anyway.
Surely [a,a) == [b,b) = {} in the same way that {1} ^ { 2 } = {} = {duck } ^ { fox },etc , ie, any number of expression may evaluate to the empty set, even if the expressions have little relationship with each other.
I don't know what you mean here. The point I was making, and which Mark
seems to agree with is that [a,a) != [b,b).
I'm not following why this is such a big deal, the notation [) makes perfect sense when dealing with ranges, as Andrew Koenig pointed out.
I marked the thread OT because I didn't find the topic overly relevant to
the general topic of C++, but it seemed to be something others were
interested in. I agree that the notation works for ranges, and calling
[a,a) the empty sequence (or interval) beginning at /a/ makes sense. It is
actually a fairly useful concept. For example, the notation \< in Emacs
regular expression syntax denotes the empty string at the beginning of a
word. My point was one of mathematical rigor. I don't believe Accelerated
C++ actually says [a,a) denotes the empty /set/. That wording arose in the
context of this discussion.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:K5********************@speakeasy.net... I don't know what you mean here. The point I was making, and which Mark seems to agree with is that [a,a) != [b,b).
The question is whether you want to talk about equality of ranges in terms
of their bounds, or in terms of the elements they represent. Both ways of
viewing ranges are useful in different contexts, so it's a matter of choice.
The usual mathematical usage is to talk about ranges solely in terms of
their elements, because there are other ways of talking about the bounds if
that's what you want. So the usual usage is to note that, for example, [3,
3) and [5, 5) are two different representations of the empty set. The
representations are different, but they represent the same set.
Andrew Koenig wrote: "Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:K5********************@speakeasy.net...
I don't know what you mean here. The point I was making, and which Mark seems to agree with is that [a,a) != [b,b). The question is whether you want to talk about equality of ranges in terms of their bounds, or in terms of the elements they represent. Both ways of viewing ranges are useful in different contexts, so it's a matter of choice.
Understood. The ultimate test of a mathematical proposition is consistency
with the axioms assumed. Unfortunately, much of mathematical literature is
not as clear about fundamental assumptions as it should be. I have
discovered that, not infrequently, mathematicians tend to operate on the
basis of preconceived and nebulous foundations, deriving from these
foundations what I hold to be axiomatic, or assuming things which I derive
to be axiomatic.
The usual mathematical usage is to talk about ranges solely in terms of their elements, because there are other ways of talking about the bounds if that's what you want. So the usual usage is to note that, for example, [3, 3) and [5, 5) are two different representations of the empty set. The representations are different, but they represent the same set.
I will have to leave my opinion unformed on this matter since I don't have
time to investigate a sufficient number of resources to form a conclusion.
I certainly will grant that defining [a,a) === {} is likely to be
consistent with a substantial mathematical theory. I find attempting to
represent such expressions in software to be an interesting exercise. For
example, what is it that we are actually saying is 'empty'? The set of
indices, or the set of things to which these indices refer?
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell em****@soda.csua.berkeley.edu (E. Mark Ping) wrote in message news:<cm***********@agate.berkeley.edu>... In article <Qc********************@speakeasy.net>, Steven T. Hatton <su******@setidava.kushan.aa> wrote:E. Mark Ping wrote: Especially that the union of the two intervals:
[a,b) U [b,c)
is also a half-open interval: [a,c)
See: http://mathworld.wolfram.com/Half-ClosedInterval.html We are specifically interested in the case of [a,a) i.e., [a,b) where b = a.
My apologies for being too terse. I've never seen standard nomenclature for [a,a), but it makes sense in this case to define it as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
The nomenclature is quite trivial actually. You start with endowing R
with a topology, ie specifying which sets are open. In the standard
topology, sets (a,b), a<=b, (a,a) "denoting" empty set (same as
0.9999.... denotes 1). These sets are well and constructively defined
based on the aximos reals and set theoretic operations: we take two
ordered points a,b, consdier set {x| a<=x<=b} and then define (a,b) =
{x| a<=x<=b}\{a, b}. Existence of such x follows from the
Dedekind-completeness (continuity) axiom.
Now, first, we see that (a,a) = {}, simply by construction.
Furthermore, we introduce "nomenclature"
[a,b) = {a} U (a,b) = [a] U (a,b),
and
[a,b] = [a,b) U {b}
which implies that [a,a) = {a}, as (a,a) = {}, and that {a} = [a, a]. Similarly, 0! is commenly defined as 1 becuase it's most useful with that definition in combinatorics, but AFAIK it's not a universally accepted definition.
Well, x! is a manning from naturals. You can simply extend it to
nonnegatives.
d
Andre Dajd wrote: em****@soda.csua.berkeley.edu (E. Mark Ping) wrote in message news:<cm***********@agate.berkeley.edu>... In article <Qc********************@speakeasy.net>, Steven T. Hatton <su******@setidava.kushan.aa> wrote: >E. Mark Ping wrote: >> Especially that the union of the two intervals: >> >> [a,b) U [b,c) >> >> is also a half-open interval: [a,c) >> >> See: http://mathworld.wolfram.com/Half-ClosedInterval.html
>We are specifically interested in the case of [a,a) i.e., [a,b) where >b = a.
My apologies for being too terse. I've never seen standard nomenclature for [a,a), but it makes sense in this case to define it as the empty set, since that means the union property holds:
[a,a) U [a,b) = [a,b)
The nomenclature is quite trivial actually. You start with endowing R with a topology, ie specifying which sets are open. In the standard topology, sets (a,b), a<=b, (a,a) "denoting" empty set (same as 0.9999.... denotes 1). These sets are well and constructively defined based on the aximos reals and set theoretic operations: we take two ordered points a,b, consdier set {x| a<=x<=b} and then define (a,b) = {x| a<=x<=b}\{a, b}. Existence of such x follows from the Dedekind-completeness (continuity) axiom.
Now, first, we see that (a,a) = {}, simply by construction.
Furthermore, we introduce "nomenclature"
[a,b) = {a} U (a,b) = [a] U (a,b),
and
[a,b] = [a,b) U {b}
which implies that [a,a) = {a}, as (a,a) = {}, and that {a} = [a, a].
My caution in accepting this is that it seems to neglect the concept of
position. There are two approaches to describing tensors which I believe
are relevant to this discussion. One approach is to talk about vectors as
simply the n-tuples of ordered sets which remain invariant under
transformations of coordinates. Another approach maintains that a tensor
is a function of position, and hence it is not meaningful to discuss them
without reference to the location in space where their components are
evaluated.
I can accept that mathematicians do use the definitions you are using to
construct dominant theories. That doesn't mean that other equally
successfull axioms cannot be posited as the foundations of a consistent and
useful theory.
Just as a simple example involving memory addressing, consider the
alternative approaches available for determining the equivalence of two
ranges. We could define the ranges using objects like this:
class range{
float* _lb;
float* _ub;
public:
range(float* lb_, float* ub_):_lb(lb_), _ub(ub_){}
//... populate with data
bool operator==(const range& r){
if(_ub - _lb != r._ub - r._lb) {
throw std::domain_error("comparing incongruent ranges");
}
float* p = _lb;
float* pr = r._lb;
while(p < _ub) {
if(*p++ != *pr++) {return false;}
}
return true;
}
};
Alternatively we could write the equivalence operator as follows:
bool operator==(const range& r){ return (_ub == _lb && r._ub == r._lb); }
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:<xv********************@speakeasy.net>... Andre Dajd wrote:
[snip] My caution in accepting this is that it seems to neglect the concept of position. There are two approaches to describing tensors which I believe are relevant to this discussion. One approach is to talk about vectors as simply the n-tuples of ordered sets which remain invariant under transformations of coordinates. Another approach maintains that a tensor is a function of position, and hence it is not meaningful to discuss them without reference to the location in space where their components are evaluated.
I can accept that mathematicians do use the definitions you are using to construct dominant theories. That doesn't mean that other equally successfull axioms cannot be posited as the foundations of a consistent and useful theory.
Sure they can. What are talking about here are vector spaces (in
which tensors are defined) and affine spaces. The latter differs from
the former, effectively, by removing "0", ie loosing the notion of
"beginning", hence making only the notion of "difference" = "relative
position" meaningful. This is simply a different object from "vector
space", having specific properties and useful in corresponding fields. http://mathworld.wolfram.com/AffineSpace.html
So, one should only be clear what he is talking about and then there
will be no ambiguities
:)
d
Andre Dajd wrote: "Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:<xv********************@speakeasy.net>... Andre Dajd wrote: [snip] My caution in accepting this is that it seems to neglect the concept of position. There are two approaches to describing tensors which I believe are relevant to this discussion. One approach is to talk about vectors as simply the n-tuples of ordered sets which remain invariant under transformations of coordinates. Another approach maintains that a tensor is a function of position, and hence it is not meaningful to discuss them without reference to the location in space where their components are evaluated.
I can accept that mathematicians do use the definitions you are using to construct dominant theories. That doesn't mean that other equally successfull axioms cannot be posited as the foundations of a consistent and useful theory.
Sure they can. What are talking about here are vector spaces (in which tensors are defined) and affine spaces. The latter differs from the former, effectively, by removing "0", ie loosing the notion of "beginning", hence making only the notion of "difference" = "relative position" meaningful. This is simply a different object from "vector space", having specific properties and useful in corresponding fields.
http://mathworld.wolfram.com/AffineSpace.html
So, one should only be clear what he is talking about and then there will be no ambiguities
:)
d
No. I'm talking about a vector being defined as an n-valued function of the
coordinate system.
--
"If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true." - Bertrand
Russell This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Simon Wittber |
last post by:
LGT is a lightweight wrapper over pygame and PyOpenGL which simplifies
2D sprite creation, translation, scaling, rotation and animation for
those...
|
by: Magic1812 |
last post by:
Magic Software invites you to join us this coming Tuesday (January
13th, 2004) at 12:00 EDT / 17:00 GMT for
a FREE live Webinar:
Title:...
|
by: Magic1812 |
last post by:
Magic Software invites you to join us this coming Tuesday (January
13th, 2004) at 12:00 EDT / 17:00 GMT for
a FREE live Webinar:
Title:...
|
by: Joe Van Dyk |
last post by:
This is my answer to problem 5-10 from Accelerated C++. I'd appreciate
any comments (regarding style, efficiency, standards, etc) you fellows...
|
by: Adam |
last post by:
In my MYISAM table I have an index (Index_A) on 2 fields (Field_A,
Field_B). There are millions of rows in the table. The cardinality of
Index_A...
|
by: Egor Shipovalov |
last post by:
I'm implementing paging through search results using cursors. Is there a
better way to know total number of rows under a cursor than running a...
|
by: jeff |
last post by:
i am using ms access as my database
i can successfully delete a single record from a table using :
targetRow.Delete()
Try...
|
by: Pete |
last post by:
Is anyone familiar with this book?
Exercise 6-1 of Accelerated C++ asks us to reimplement the frame() and hcat()
operations using iterators. ...
|
by: nekiv90 |
last post by:
Greetings,
How can 'rows read' from a DB2 CALL statement incur so many reads? I
would expect it to be zero.
Could someone enlighten me on...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
| | |