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

Hash table

Name: Anonymous 2012-02-12 0:24

Is it ever possible to have a Hash table that can do get,put,remove @ O(1) for Strings?

calculating the hash for the String alone is O(n), is it not? [that's if you want to produce a good hash that won't collide all over the place]

Name: Anonymous 2012-03-18 13:50

>>39
In languages like C, it won't even work for a subset because the mappings aren't one to one.

Name: Anonymous 2012-03-18 13:50

>>40
You said that it wasn't a function, I pointed out that it obviously was. Now you're backpedaling saying that "it won't work in C", which wasn't even the fucking question in the first place.

Name: Anonymous 2012-03-18 13:51

>>42
It's not a function because the mappings aren't always one to one.

Name: Anonymous 2012-03-18 13:51

>>41
C doesn't change the definition of a subset you stupid piece of shit.

How many times do we have to go through this shit? Are you still trying to deny simple mathematical truth?

How can anyone this dumb even figure out how to post on the internet? It's like you failed every math course and had to take substandard programming courses instead.

Name: Anonymous 2012-03-18 13:53

>>42
It would only work if the mappings are one to one. However, for like the 8th time, the mappings aren't always one to one. The fact that you think they are just indicates to me that you've never actually written any kind of code in your entire life.

Name: Anonymous 2012-03-18 13:53

>>43
Jesus Christ you stupid piece of shit, look at the definition f(x) = 1, f is a function and it's not one to one.

You somehow confuse "function" with "injective function", no surprise there though, you're stupid as shit.

Name: Anonymous 2012-03-18 13:54

>>45
My god you fucking moron can't you read? It's not an injective function in your case but it's still a function.

You don't even know what a function is? You're so fucking retarded I can't believe it, how do you even figure out how to breathe?

Name: Anonymous 2012-03-18 13:55

>>44
You're right, C doesn't change the defintion of a subset. However, C's handling of booleans doesn impact the math defintion of a function.

Name: Anonymous 2012-03-18 13:56

>>48
Is that supposed to be does or doesn't? I'm amazed your stupid ass even managed to form something that looks a little bit like a sentence.

Name: Anonymous 2012-03-18 13:56

>>47
No, I can think of programming cases where it won't even be an injective function.

Name: Anonymous 2012-03-18 13:58

>>50
Can't you read you stupid piece of shit? I said it isn't an injective function, but it's still a function.

Now fuck off and revisit some basic mathematics.

Name: Anonymous 2012-03-18 13:59

>>51
Either way, I can think of like 3 cases where it's not a function. Learn more about structured programming you zero talent bitch.

Name: Anonymous 2012-03-18 14:00

>>20
Can't you just let it go? He proved you wrong, it's a function. Is it that hard to say "all right, I was wrong"? You seem to have some serious issues dude.

Name: Anonymous 2012-03-18 14:00

>>51
And in your case, I really think you need to shut up, and write some actual code.

Name: Anonymous 2012-03-18 14:03

>>52
Okay since you're obviously mentally challenged I will spoon feed you the information.

It's always a function since it outputs "true" only if the element in the set and "false" otherwise, since a set either contains an element or it doesn't it always has a value. Whether it is one to one doesn't matter, it's not a requirement to be a function.

Name: Anonymous 2012-03-18 14:03

>>53
No it isn't. Consider the following case you bitch.

int true = 3;
int false = 2;

And use that in an expression that tests for "true" or "false".

Name: Anonymous 2012-03-18 14:05

>>56
And again, that has nothing to do with the mathematical entity that is a function, try again you stupid piece of shit.

You always keep coming up with these broken situations which never apply to what you're talking about.

Or wait, you don't actually see how this doesn't apply to what we're talking about? Are you seriously this fucking dumb? You're such a fucking retard.

Name: Anonymous 2012-03-18 14:06

>>55
It's always a function since it outputs "true" only if the element in the set and "false" otherwise,

I have a set of unsigned integers. I make true = 3 and false equal = 2. Now I compare a set of data for equality. In this case your statement breaks down.

Name: Anonymous 2012-03-18 14:07

Every time I'm reminded how extremely poorly Kodak understand maths I just lose any respect I might have had for him.

Kodak, stick to programming, you seem to know a little bit of programming, but you keep getting schooled whenever it comes to math.

Name: Anonymous 2012-03-18 14:08

>>57
In such a case it wouldn't be a function. And by the way, the "broken situation" is taken from an optical flow algorithm that we use a my job.

Name: Anonymous 2012-03-18 14:10

>>59
You have zero clue as to what your talking about. I really think you need to learn how "booleans" in your loser languages like C work before you start applying some math model to them.

Name: Anonymous 2012-03-18 14:10

>>58
This isn't even remotely applicable.
You're so god damned confused.

Name: Anonymous 2012-03-18 14:12

>>62
Yes it is you non programming bitch.

Name: Anonymous 2012-03-18 14:12

>>58
So what you're saying is that the mathematical entity defined isn't a function because you might define some arbitrary names to some symbols in a programming language?

You're not just retarded, you're deluded.

Name: Anonymous 2012-03-18 14:14

>>63
No it isn't you stupid piece of shit, it has nothing to do with mathematics.

Keep trying to explain yourself though, it's slightly humorous and will continue to be, at least until it becomes tragic.

Name: Anonymous 2012-03-18 14:14

>>64
I think you need to study SICP.

Name: Anonymous 2012-03-18 14:15

>>66
Really, humor me, how would that be related?

Name: Anonymous 2012-03-18 14:16

>>65
Yes it does you dumbass. Now I see why you have no hope as a computer programmer. Man, I think you just need to shut up, step away from this BBS, and write some code.

Name: Anonymous 2012-03-18 14:17

>>56
Let me try to understand this Kodak, you define true to be 3 and false to be 2, your complaint is now that every comparison in C will fall outside of true and false?

In that case the function defined in >>18 applied on the comparisons would return false, since the results are outside of {true, false}, so it's still a function.

Name: Anonymous 2012-03-18 14:17

>>67
First, tell me, have you ever written a non trivial piece of code in your entire life? I bet not. Have you ever read knuth? I bet not.

Name: Anonymous 2012-03-18 14:18

>>68
Kodak, you're embarrassing yourself, keep going though, you're still funny.

Name: Anonymous 2012-03-18 14:19

I think this thread needs to start trading code or there is absolutely no value in it.

Name: Anonymous 2012-03-18 14:19

>>70
Define non-trivial, if you are still practicing text triangles our definitions might be different.

Name: Anonymous 2012-03-18 14:21

>>72
def f(x):
  return True if x in s else False


Oh look, it's a mathematical function as well as a FIOC function!

Name: Anonymous 2012-03-18 14:21

>>69
And what happens if these values change? Or better yet, what happens, if I define "true" and "false" over a range of values?

Name: Anonymous 2012-03-18 14:23

>>75
The domain of the function changes, but it always just returns a single value, so it's still a function.

Name: Anonymous 2012-03-18 14:23

>>73
Non-trivial as in implementing paxos algorithm.

Name: Anonymous 2012-03-18 14:24

>>77
Did that at NASA, is that all you've got?

Name: Anonymous 2012-03-18 14:25

>>76
Yeah, in this case, it's possible to have 4 and 5 map to "true", and then later one, have 5 map to "false".

Name: Anonymous 2012-03-18 14:27

>>75
The mathematical entity were talking about is a function of the filter set, so if you change the filter set you end up with an entirely different function, but it always returns either true or false.

If you defined it to be a "range" it would always return false in your case cause a comparison in C never returns a range.

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