Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Art of Computer Programming

Name: Anonymous 2011-07-01 6:32

Why u dont pray to this monument does AoCP not sound cool enough?

Name: Anonymous 2011-07-01 11:54

>>19
You technically could. But when you're using a set in math, you only care about the abstraction that the set provides, not how it would be implemented on a machine. It would be hilarious and irrelevant if, in the middle of a Topology paper, you said "By the way, our use of 'set' in this paper is understood to be implemented by a linked list."

I hate to do this, but the preface to the first edition of SICP explains it well:

Mathematics provides a framework for dealing precisely with notions of ``what is.'' Computation provides a framework for dealing precisely with notions of ``how to.''

>>20
I was talking about the mathematical abstraction, but I understand the point you're making. Sure, if you write that S = {4, 9, 2, 1}, there obviously is an 'order' there, which looks different than T = {1, 2, 4, 9}. Still, in a normal set, S = T, despite the fact that they look different. They only have to contain the same distinct elements to be equal. Why? Because it's the abstraction that is useful.

As far as the data structure goes: in, for example, Common Lisp, when you use a function that operates on a 'set' (this actually is just a cons pair), it obviously writes things somewhere in memory in a specific order. It's just that there's no guarantee that the order you specified or expected will be preserved in the result of the function. It's an abstraction built on a normal list (for the record, I've never found it to be terribly useful when writing code).

>>21
Not really, but an axiom of set theory (about a particular kind of set) is different than the general, intuitive 'idea' of a set itself. I hope you realize this. Is your goal in this to prove that mathematics is useless because it is 'based' on shaky foundations? That's not a sarcastic question.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List