Search found 27 matches

by kwan3217
Wed Mar 13, 2013 9:21 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1185: "Ineffective Sorts"
Replies: 180
Views: 67178

Re: 1185: "Ineffective Sorts"

EDIT: Oh... I see what you're saying: you can't say "it will run in O(N) seconds." I agree. But he could have also said "it will run in O(N) time." I thought about writing time instead of seconds. It will run in O(N) seconds, as long as the unit used in sleep is seconds. O(N) ti...
by kwan3217
Wed Mar 13, 2013 8:57 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1185: "Ineffective Sorts"
Replies: 180
Views: 67178

Re: 1185: "Ineffective Sorts"

speising wrote:
kwan3217 wrote: It will work, and it will run in O(N) seconds where N is the maximum number in the list.

that's not the way the O notation works. it expresses complexity, not run time. lets just say it will take N seconds.


I knew someone would say that, and I wrote it anyway. Thanks for proving me right.
by kwan3217
Wed Mar 13, 2013 8:50 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1185: "Ineffective Sorts"
Replies: 180
Views: 67178

Re: 1185: "Ineffective Sorts"

There is also the infamous Sleep Sort, discovered by a user on 4chan's programming text board: http://dis.4chan.org/read/prog/1295544154 Man, am I a genius. Check out this sorting algorithm I just invented. #!/bin/bash function f() { sleep "$1" echo "$1" } while [ -n "$1&qu...
by kwan3217
Wed Dec 01, 2010 8:32 pm UTC
Forum: General
Topic: Boston or New York: Who wants an excuse to go to a museum?
Replies: 1
Views: 523

Boston or New York: Who wants an excuse to go to a museum?

When I was growing up, I lived in southern California and loved to visit the Museum of Science and Industry. One of my favorite exhibits was the Mathematica exhibit, sponsored by IBM and put together by Charles and Ray Eames. Problem is, when I saw it, I was much younger than I am now, and I didn't ...
by kwan3217
Mon Jan 07, 2008 5:44 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0367: "Fandom"
Replies: 158
Views: 26547

Re: "Fandom" Discussion

Gravel wants to RAISE YOUR TAXES and REPEAL the third law of thermodynamics. And why won't he say he's against murdering kittens? HUH?

Think of the kittens. Vote Vandole in 2008

(This message not sponsored by any candidate)
by kwan3217
Mon Jan 07, 2008 5:23 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0367: "Fandom"
Replies: 158
Views: 26547

Re: "Fandom" Discussion

by kwan3217
Mon Jan 07, 2008 5:14 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0367: "Fandom"
Replies: 158
Views: 26547

Re: "Fandom" Discussion

Oh man, just what we needed. Politics in xkcd.

Remember folks, vote Vandole for President 2008! He/she/it is Canadian! (or at least the location is Canada).
by kwan3217
Fri Dec 21, 2007 3:53 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0360: "Writers Strike"
Replies: 125
Views: 23261

Re: "Writers Strike" Discussion

I traditionally favor management in almost all strikes (why is a labor monopoly any better than any other kind of monopoly?) but in this case I wouldn't mind seeing the entire industry destroyed, so Support the Strikers! I already get most of my culture from Japan, anyway. If there were an animators...
by kwan3217
Fri Dec 14, 2007 3:57 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0356: "Nerd Sniping"
Replies: 376
Views: 173242

Re: "Nerd Sniping" Discussion

The biologist's solution: "Get... a... freaking... multimeter!" Signed, A biologist Multimeter is easy. The infinite grid of resistors might cost a bit more. Edit: Dagnabbit, about 47 people posted this before me. Howbout this: An infinite grid of ideal resistors costs even more than an i...
by kwan3217
Thu Dec 06, 2007 1:20 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0353: "Python"
Replies: 241
Views: 56957

Re: "Python" discussion

The only feature I know about Python (and Ruby, for that matter) is the "brainwash" function. Seriously, everywhere you go on the net, its "Try python, you'll like it, I promise!" "Everyone else is doing it!" "Join the cult!" Every language sucks. I happen to ...
by kwan3217
Tue Nov 20, 2007 9:47 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0346: "Diet Coke+Mentos"
Replies: 114
Views: 27657

Re: Discussion: Diet Coke+Mentos

Vandole for President 2008! I has a fan? (Also, the url points to the wrong place. It should be http://forums.xkcd.com/memberlist.php?mode=viewprofile&u=955 , not /profile.php ) Fixed now, and I'm pretty sure that it was right when I set it up originally. Also, I pretty much picked you at rando...
by kwan3217
Mon Nov 19, 2007 11:29 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0346: "Diet Coke+Mentos"
Replies: 114
Views: 27657

Re: Discussion: Diet Coke+Mentos

I was actually more reminded of http://xkcd.com/332/
by kwan3217
Wed Oct 10, 2007 4:06 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0327: "Exploits of a Mom"
Replies: 210
Views: 110043

Re: "Exploits of a Mom"

What does the ;-- at the end do?
by kwan3217
Mon Aug 20, 2007 9:18 pm UTC
Forum: Science
Topic: Destructive interference and the conservation of energy
Replies: 12
Views: 4037

Once upon a time, I studied optics. For four years. Anyway, one of the fun things we got to talk about (and make) are laser HR mirrors. These are just normal glass, coated with a few thin layers of some other transparent substance. When we learned about these, our teacher took us through all the E&a...
by kwan3217
Mon Aug 20, 2007 9:03 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0305: "Rule 34"
Replies: 196
Views: 114093

Coincidence? http://www.asofterworld.com/index.php?id=246 Two webcomics dealing with guitars and sexy on the same day, when neither are a recurring theme in either strip? Someone calculate the odds. [/size] Well, let's see. Since the event has happened, the probability of it happening is 100.000%+/...
by kwan3217
Tue Aug 14, 2007 9:08 pm UTC
Forum: Science
Topic: Redefine the metric system
Replies: 66
Views: 9991

What would I change? Simple. Make the meter 1/10 as long as it is now, and make a gram the mass of 1 (new) m^3=1(new)liter=1(old)liter of water. Since the mass system isn't really based on water anymore, just say that the kilogram artifact is exactly one new gram. This of course would propagate thro...
by kwan3217
Mon Aug 13, 2007 4:11 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0302: "Names"
Replies: 131
Views: 31561

I always just ask them how to spell their name.


"M-A-R-Y."

Also, how autobiographical is this? Did Randall get married? How come I wasn't invited?
by kwan3217
Sat Aug 11, 2007 6:08 pm UTC
Forum: Mathematics
Topic: Natural complements - C and S
Replies: 29
Views: 4165

Natural complements - C and S

I've been noticing something weird in the past year or so. More and more when I see two "complimentary" things, the name of one starts with C and the name of the other starts with S. In math, this is easy to understand, since they are based on the c osine and s ine functions. The weird thi...
by kwan3217
Tue Aug 07, 2007 6:08 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0299: "Aeris Dies"
Replies: 187
Views: 54765

I've always thought that Stick Guy is Randall, and that this was all semi-autobiographical. Presumably the more romantic/sad ones are, but the plain humourous ones could just be hey thats funny and I have a comic to do... That's kinda the entire point. If Maggie is real, this is very romantic/sad.
by kwan3217
Mon Aug 06, 2007 5:26 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0299: "Aeris Dies"
Replies: 187
Views: 54765

Is "maggie" a reference over my head, or just some name? If it's a reference, it's over my head as well... anyone what to make me feel stupid and point out what it's a reference to, or is it in fact just a random name like it seems? Same question... The first thing I thought of when I rea...
by kwan3217
Mon Jul 23, 2007 7:04 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0292: "Goto"
Replies: 157
Views: 45113

For anyone still paying attention... This will break your head: http://en.wikipedia.org/wiki/Duffs_device (only marginally related to goto, but more about another huge programming pet peeve: case label fall-through.) Case fall-through is only annoying because it is the default, but less likely case...
by kwan3217
Fri Jul 20, 2007 4:53 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0292: "Goto"
Replies: 157
Views: 45113

That reminds me of a block of code I translated from fortran to java once. Most of the code used gotos to emulate mormal loops and branches, but there was one block I could never figure out, so I ended up creating a goto emulator using case statement fallthrough: int iret=0; int LineNumber=100; //Wo...
by kwan3217
Wed Jul 11, 2007 11:07 pm UTC
Forum: Movies and TV Shows
Topic: FLATLAND: The Movie
Replies: 18
Views: 5509

Flatland has long since become public domain. It's at Wikisource
by kwan3217
Wed Jul 11, 2007 7:17 pm UTC
Forum: Movies and TV Shows
Topic: FLATLAND: The Movie
Replies: 18
Views: 5509

LOVED this book and am very excited about the movie. However, just from seeing the trailer, I have one MAJOR bone to pick. If there are only two(2) dimensions, how can they move on [i]on top[i/] of their background. That was one of the great things about the book. There is no ceiling or floor becau...
by kwan3217
Wed Jul 11, 2007 6:48 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 0287: "NP-Complete"
Replies: 191
Views: 37752

I notice that mine and several other solutions used recursion, while others used nested for loops. The nested for loop solution seems less general because you have to change the structure of the program (add another loop) if you want to consider another menu item. As everyone knows, anything done wi...
by kwan3217
Wed Jul 11, 2007 1:51 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0287: "NP-Complete"
Replies: 191
Views: 37752

Here's a recursive solution in Java which works (eventually) for any size of problem, so can I have the 50% tip? I included the sandwich in the list, not because I thought it was an appetizer, but because I was testing if the program was general, and forgot to take it out when I posted it. //In case...
by kwan3217
Wed Jul 11, 2007 1:47 am UTC
Forum: General
Topic: INTRO THREAD 2.0: INTRODUCE YOURSELF OR PERISH!
Replies: 2548
Views: 336539

Hey, I'm Kwan3217 (you can call me Kwan for short). I work for a major university laboratory, analyzing data from a satellite I helped build. Dream job.

Mostly I just want to post my solution to NP complete.

Go to advanced search