Tuesday, October 25, 2011

Wrong Again

n is the number of variables. y is the number of seconds my algorithm took to solve 1000 problems with 4.24*n clauses. n^3 and n^2 are there to make me feel better because currently y happens to sit between them.

ny0.1n^30.1n^2
321983276.8102.4
403666400160
4876111059.2230.4
56123217561.6313.6
64250726214.4409.6
80713851200640
961846888473.6921.6


I tried to find a "least squares for dummies" web page but instead got this calculator, according to which my function could be n^2, n^3, n^4, or exponential.  Any of them can be made to fit the data.

What worries me is that my algorithm has been working on a problem of size n=150 for at least 36 hours and has not solved it yet.  If you extrapolate 36 hours per problem to 1000 problems, that number does not fit well in my little table, so perhaps y will blow right past n^3.



[1] http://people.hofstra.edu/Stefan_Waner/newgraph/regressionframes.html


---------------------------

Yeah all that is what I would have written.  Today I and a friend were bored at work so I asked him about least squares regression (I know, I know...) and we got into my description of "logarithmic number of exponential steps" and then he pointed out that it is not, in fact, cn*2^log(n) but actually more like cn*n^log(n).   Turns out that is a big fucking difference.  I believe that my algorithm is, or can be, polynomial time, but now I no longer have an upper bound.  Are those figures in my table exponential?  Could be.  As I probably wrote already, you can fit any equation you want to data using least squares.  SAT is a cruel mistress...the simplest of operations, like set intersection, can cause an explosion in the complexity of your representation of the problem.

In summary...I need to get a fucking life.  Seriously I'm sitting in my bedroom on a tuesday night and I can't think of anything to do.  I will probably just boot up my starcraft partition and play some games, idk.

Monday, October 24, 2011

Stopovers

Slowly out of line and drifting closer in your sights

My penultimate wedding trip is in November.  Penultimate at least of the ones scheduled.  We'll see what happens.  Told myself I would totally plan ahead this time.  You'd think that after ten of these trips I'd have it down.  Nope.  Its in only 2 or 3 weeks.  Fuck why is my little sister getting married already?  I haven't even fully broken in my new motorcycle yet and she's already into the next stage of life.  Everyone needs to slow the fuck down around here.  I think I've met the guy like...twice.  I guess thats what happens when...whatever.

So...yet another trip home, or whatever.  Its high time I started adding some actual vacation time into my vacations.  Sure, bumping around philly trying to chase down like 10 different groups of friends and trying to optimize my schedule for the most quality time and the fewest offended people is great and all but I wouldn't call it a vacation.  When I think vacation I'm more thinking wake up in a beach house with people that don't annoy you.

I originally budgeted over a week for this trip, but the idea of living out of a suitcase for that long, putting around in some shitty ass rental car from quiet drink at a bar to yet another quiet drink at a bar seems too exhausting this time.  Seriously, it seems like rental car companies specifically choose cars that no one wants to own.  I was in a piece of shit Fiat last time.  My mom loved it.  Also an old lady stopped me outside Borders to ask about it.  Horrible.  Anyway.

I kind of want to bundle something else into this trip, something, preferably, that is somewhere in between Philly and Seattle so I don't have to be on a commercial jet that long.  Still having to the deal with the fucking TSA though...I really hate that bullshit.  Every time I go through security I point directly at their full-frontal-nudity cancer machine and say "I'm not going through that; get someone to feel me up" and they still give me this confused look like they don't know what I'm talking about.  Really?  A guy in blue gloves is about to play with my balls and you have to play this game with me to rub it in?

But...since I am stuck with this shit, lets make the most of it.  Stop somewhere cool and do a mini-vacation on the way.  Obviously, only places between Seattle and Philly will help.  No need to make the damn airplane rides even longer, although I do wonder what its like to have a Mexican TSA agent play with your balls.  If he talks Spanish to me I might not mind so much.  Speaking of getting raped, stay out of Tennessee.  Anyway.

Here is a list of possible mini destinations:

Vegas
New Orleans
Austin, TX
Chicago
New York City

Yeah, everywhere else is in California and would take me out of the way.  Not sure what I would do in these places anyway...maybe just stay one night and try to find some couch surfers to hang out with?

In conclusion: fuck you John Pistole.

Today, in 3-SAT

This paper:

On the Average Similarity Degree between Solutions of
Random k-SAT and Random CSPs

by

Ke Xu and Wei Li

claim that other papers which I'm not bothering to read have established the bounds of the phase transition factor at 3.145 to 4.602.   What a pain in the ass.  I am going to use 4.24 for now to get a emperical data to extrapolate the runtime complexity of my algorithm in the average case.  This means, though, that in all this I am going to have to play with 2 variables when I eventually try to be thorough.

Lets see...for a problem with 64 variables...there are 64-choose-3, or 41,664 possible clauses.

How many problems are there which contain 4.24n or 271 clauses?  So...41664 choose 271:

2072331229310765793377672466034020417636278749137269154995246883568702527021961119330338444155265251631068024493999124533647240936284157676458720837336901229107673520873559441276388455770161315227519330469504702375894948548792917160195998669181535033528022164704312214959828265810771630039781426010241744128982277487082137761437258200076747922608614240395600874853517856787979122329993359135296560199897886389786705354539414437639886905745049531129463397610857195300866636502701516169406583772872284149712200483699807594302353726301355389836944568555083818470495508270586692266585517132868094261950528874724887787195704874995733241769392124448648812676324946824216985434343034624394856095456349420769250043520


Here is a more manageable number:

2.whatever * 10 ^ 708

And here is the fun part.  That number is wrong.  I forgot about negated literals.  Those are difficult to add in, but I think we can just multiply by 8.  Damn I just got a craving to play descent 3.  Anyway.  So...

333,312 possible clauses.  Damn!  Did I do this right?

2.4... * 10 ^ 953


Obviously saying that every variable must be represented will reduce that space.  Just thinking about calculating that is giving me a headache.


One variable missing

So you really have n = 63.  63 choose 3 = 39711.  (64 3)-(63 3) = 1953.  But there is one for each variable!  So its 64*((64 3)-(63 3)) = 124992 possible clauses that will be omitted...but not necessarily at the same time.  Shit.

If one variable is missing, you're down 1953 clauses and have only 331359.  How many problems exist for that variable missing?  (331359 choose 271) = 4.97... * 10^952.  And there are n of those cases.  And that is just when only one variable is missing.

Oh I did this wrong.  If you multiply 64 * (331359 choose 271) you get 3.18 * 10 ^ 954.  That is greater than the total number of possible problems I previously calculated.

It is probably because I failed to account for the times when more than one variable may be missing...I'm double counting most of the instances.

Also, I think I failed to account for the negated literals of the missing variable.  Yeah.  The math in this section is basically wrong.

Back to formula

So, now, actually, I just want to know how many there are.

((n choose 3) choose 4.24n)

((32 choose 3) choose 135) = 2.58105...*10^267.

((16 choose 3) choose 67) = hey it has a name!


6 octovigintillio.  Who bothers naming 10^80-ish?  Does that really come up a lot?


Anyway:

6022078479523219491126506063987820512839398152713862982670624142131867189974969798288000

I dont think that will fit in a long.  Wait!!! We can cheat more.  We can lower the factor as well.  Lets use 3.1 instead.

12 variables, and 3.1*12=37 clauses leads to:

1370125002560566889654596797962961206718960

Oh, yeah, a tredecillian.

I can generate one million of those problems in 281s.  Ok thats not happening, unless my constraints for problem generation reeeeally make a difference.

Oh shit, I did the math wrong again.  It needs to be this formula:

(((n choose 3)*8) choose 4.24n)

Keep forgetting about those damn negated literals.


In Summary

1) I am bad at math.

2) Every time I think about testing one of these algorithms it always devolves into trying to calculate the total possible number of problems you could have for a given number of variables.

3) I really need to get over the fact that a thousand or a million sample problems does not constitute a thorough representation of the problem space.

4) Lets go with the following generation parameters for n, m and count:

n= 32,48,64,80,96,112,128
m=4.24n
count=1000

Problems of size 125 take hours to complete, but I can in theory manage 500 or 1000 many ec2 instances.    Actually I could do more like 200 instances...idk.  Anyway.  This should be enough datapoints to see if the curve looks polynomial.

Least Squares Calculator

Friday, October 21, 2011

Low Side

What are the chances that two people would both have a rare make of sportbike?  I don't know, but it seems low to me.  A buddy of mine also got an Aprilia: a Tuono.  I got my Falco fixed.  We went riding along with a third friend who brought a vstrom...some kind of dual sport.  There is an on ramp to the highway right in front of my place, so when we started I hit it and took off.  The other two guys were not that interested in riding as fast as I wanted to, but it was still awesome.

We got out of Seattle and started hitting the twistys.  All of a sudden, our friend who'd seemed shy on the highway seemed more comfortable hitting the turns fast.  I was impressed.  I'm still getting used to the handling of my bike, and have put off installing the second seat for that reason.  I took one turn a hair too fast, learned my lesson, and took it easy.  We hit one turn that had a 20 m.p.h. warning sign on it which ended up being super wide and easy.  Then we hit a series of turns with no signs, that were super tight.  Technical, you could say.  Technical is the synonym of "difficult" that makes you sound like you know what you're talking about.  Try it sometime.  "Yeah, that haircut I did was really technical."  Anyway.  Flashback.

I was on my old bike, Katie the Kawasaki, heading west on 422 when I saw one blue sports car and a white sports car doing something stupid on the highway.  I don't remember much about how it started, but I think the blue one tried to pass the white one, and then the white one pulled a total and unecessary asshole move that caused the blue car to lose control.  It spun out directly in front of me.  The only good memory I have of that event is being on my bike and watching this blue car spin around its vertical axis in the middle of a highway.  Keep in mind that since I was on a bike, one tiny little nick from her tailspin could have easily ended my career as a human being.  There was a truck to my right, which pulled over enough to give me room so I didn't hit the blue car.  All three of us, the truck, me, and the blue car pulled over.  The white car was gone.  Probably some idiot in high school who wrongly thought he was a badass.  The driver of the blue car turned out to be some girl.  I was impressed.  I liked the way she drove.  I wanted to offer to buy her lunch at a nearby Wendy's so she could calm her nerves while I tried to get her number, but I was pretty shy back then and I think she might have been jailbait anyway.  I wrote a Road Ninja story about it short enough to fit inside an AOL Instant Messenger "Away Message" and left it at that.  The point of this story is the incredible surreal feeling I remember as I watched her car spin out directly in front of me, because I was watching something from an over-the-top movie happen in real life and without arena walls or even a real windshield.

I had the same feeling when I came around the unmarked, suprisingly tight turn and saw my friend with the Tuono rolling on the ground behind his bike.  The road went to the right.  His bike slid straight through the oncoming lane and he was following it.  I remember not being afraid for him at all--must have been obvious that it wasn't a serious wreck (although if a car had been in the other lane I would be writing about his funeral).  My chief concern was the limited visibility and the cars that would be coming around.  I stopped my bike near the centerline and looked around, trying to figure out a place to sit where I would be able to wave off cars in time.  Then I realized that my friend was completely in one of the lanes, and that I was unecessarily endangering myself, so I found a spot on the shoulder where I could still cover oncoming cars in the lane he was in.  He got the bike up, I turned around and parked nearby and eventually our friend who was in the lead realized he was alone and came back, and we had three bikes huddled against the guardrail of a very small shoulder.

Turns out, he took the turn too fast (obivously) which by the way accounts for more than 50% of motorcycle accidents.  He said he had it leaned all the way down to the peg, and then his food caught on the road or something, and then he went down.  This type of accident is called a low side, where you just kind of go down to the ground, and is the better of the two accidents.

We were surprised at how well the bike stood up.  My buddy saw sparks, but aside from cosmetic damage the only real problem we could see was the rear brake lever was twisted beyond operation.  Fortunately, it was disabled in the off position.  My buddy has chest armor but nothing but jeans down below.  It was mostly scrapes with him, except that the thumb on his clutch hand was injured too much to ride.  My buddy has some kind of insurance policy where they tow his bike for free.  We discovered that insurance policy is useless on a sunday afternoon when no one in the office picks up the phone.  Still, because he had this insurance policy, he was unwilling to pay to have his bike towed.  Suddenly we had an interesting planning problem: three motorcycles to move and only two to do it.  To make things interesting, the guy with the injured hand was heavier than both of us by at least 100 pounds, so putting him in the girl's seat* on either bike was not an option.  We ended up just summoning a car.  I rode my bike home, and then I rode his.

His bike rode a lot different.  The clutch engaged fast, it was more powerful, and the steering felt completely different, and it was more of an upright than a sportbike.  I also had no rear brake.  All of that led to enough discomfort to make me take the turns slower than my buddy was in his car.  Yeah...turns out you only need one good hand to drive something with four wheels.  Anyway.  As soon as we hit the highway I realized my chin strap was unsnapped.  We were so excited about the bike not being stolen despite being left on the side of the road for two hours, and I was so concerned about getting hypothermia from the chill in the air if we took too long, that I didn't even strap my helmet on before rolling out.  I discovered this while we were on the highway.  So here I was with no armor and I probably wouldn't even keep my helmet on if I high-sided.  I tried to do it one handed, but it turns out motorcycle helmet straps are very different than bras.  My buddy was in front of me in his car.  I had no easy way to signal him that we needed to pull over, and none of the spots I saw were good enough for me to get him to pull over in time.  Eventually he put his blinker on to take the exit for an even bigger highway, and I figured it was my last option.  I hit the throttle and bounced around, cutting him of and pulling over.  Unfortunately I still couldn't get my chin strap on because I couldn't get the bike into neutral to take my hand off the clutch.  I waved and tapped my helmet which I've heard is normally a warning for cops, but he got the idea that something was wrong with my helmet and stayed in his car.  I then fought with the stupid bike's transmission.  I let the clutch out a hair to engage first gear briefly, and then it finally let me switch to neutral.  Then we were good to go.  By the end of the day I was exhausted, and it took a while to warm up again, but I had plans with a lady friend so I just took a nap in my computer chair and turned the heat up in my car on my way to get her.

Riding with friends was awesome.  I'd like to do it again, preferably with a crew that is interested in riding faster.  The whole day I don't think I ever broke out of fourth gear.

Lots of people who ride sportbikes wrongly think they are badass because they do showy but useless stunts such as wheelies and stoppies.  I don't know if they would recognize true skill if they saw it, because it is not as flashy.  Something to keep in mind if you ever run from cops:  you may have only gotten away because they let you go.

In other news, I still don't have a good plan for testing my 3-SAT algorithm, but I have been methodically verifying that every community-made Arch linux image for EC2 is defective in some way.  This makes me sad because I like Arch, even though the thing that make me fall in love with it was the fact that it let me use the real Sun version of Java which Oracle has ironically withdrawn support for.  I am going to switch to the example EC2 image that Amazon provides for new developers.  I'll tell you one secret about Amazon:  their examples always work.






*technically, (and definitely in a perfect world,) both seats on a motorcycle are for girls.  The reason I call the back one the girl's seat, though, is because no guy wants to be there.

Wednesday, October 12, 2011

My State of SAT

Status.  This is where we are.  Still don't have a girlfriend.  Still don't really believe that my algorithm is polynomial for all cases of SAT.  Just got my motorcycle back from the shop.  And my apartment is a mess but I'm trying to have a party on saturday.

The algorithm still doesn't have a name.  I have been calling--its codename is angel, because thats what I happened to name the file, but the project also has files named things like Princess and Dutchess.  And it is actually called angel2, because angel() turned out to be super inefficient.  So...whatever.

The algorithm definitely runs in polynomial time for a non-empty subset of 3-SAT problems, and it is definitely correct for all of the SATLIB problems I tried it on, which is everything size 75 and under.  Yeah, I know, not that impressive, but I get really bored sitting around waiting for it, and I can't reboot into my starcraft partition* while my computer is churning away.

It is definitely not linear or sub-linear (sorry for the typo last time).  It has a runtime that rises quickly enough to make 125-variable problems take too long for my attention span.

Next:  Math vs Science.  My definition of math is that it is universal and irrefutable, like abstract geometry and...lets skip my opinions on math vs science.  Anyway, since I don't understand exactly why my algorithm is working and only have a fuzzy idea.  Trying to prove that it both a) solves all 3-sat instances and b) is polynomial-time for all 3-sat instances would be difficult, time consuming, and ultimately a waste of time in the likely event that I prove myself wrong, or, even worse, I never prove myself wrong and it becomes an unending time sink.

Instead, lets try a different direction.  I know that if I made a big "HEY GUYS I SOLVED P=NP" anouncement like all the other tools, people--well in reality they would laugh and ignore me but in theoretical land someone would read my paper that took forever to write because I used LaTeX and then send/publish an instance of 3-sat that breaks my algorithm.  Why don't I just try to find such an instace myself?  My algorithm is hardcoded to halt with a result of "EPIC FAIL" if it exceeds what I think are polynomial bounds.  If I can find an instance that causes it to do that, game over.

I have a rough idea of which values of n (number of variables) and m (number of clauses) are the most likely to break it;  the self-imposted polynomial safetys are based on log_2(n), so for all problems with n equal to exponents of 2, this safety feature will be the least lenient.  This is unfortunate, though, because n=32 is a waste of time (the algorithm solves it before getting to the interesting part) and n=128 takes like more than an hour, leaving n=64 the only one I feel like watching.  Admittely, for all I talk about how boring it is to watch, I should be getting a server that I can leave running.  That will happen as soon as I find the moving box that contains the hard drive with my AWS keys on them.  There is also a USB key...but that is also in a box.  Anyway.

Onto m (number of clauses).  A lot of google hits I'm getting for hard 3-sat problems all want to talk about this phase transition that happens around 4.24 (that is, where m = n * 4.24) or maybe 4.6 or some other number depending on the paper.  People are interested in this value because when you take random samples of instances, most of them are satisfiable with a factor < 4.24 and most are unsatisfiable with a factor > 4.24 and right around 4.24, its like, totally up for grabs.  Many papers have insisted that the hardest problems are at 4.24 (at least for DPLL and WALKSAT).  This conflicts with my own test data.  In fact, I belive that, for a given n, the hardest ones are unsatisfiable instances with the lowest factor possible and in which every variable is represented by at least one literal (otherwise, you are basically not using variables and it is technically a smaller problem).  While I was instrumenting my code for batch testing, I ran some tests.  Can you insert tables in this thing?  Hm I can insert a picture, a video, or something called a jump break.  ::sigh:: oh google, why can't you work kinda like Evan's blog but different in the exact way I'm picturing in my head but am too lazy to code?

Each "test" was a batch of 300 problems each with size n=64.  I varied the factor x, where m=x*n, and measured the entire user/kernel (not wall clock) time it took to measure the entire batch of 300.  Heh heh.  300.  Didn't even think of that until now.  That's awesome.  Yes, it was just these three hundred clauses, the honor guard of the expression false, which defended the free world from the Persians, and from idiots on the internet who argue which inherently wrong wall-clock-time method should be used to measure code, all of which would generate shitty results when they get bored and start watching The Guild during their test because they don't understand why Felicia Day is so popular.  Yes...these three clauses.  Oh heroic (v_69, v_42, !v_42)...you were the first to go!

Anyway.

Oh yeah, initial test results.  Fuck I wish I got paid to do this.

  • factor (# satisfiable, # unsatisfiable), time in seconds
  • 2.9 (0,300) 112s
  • 2.8 (0,300) 128s
  • 2.7 (1,299) 141s
  • 2.6 (oops) 167s
  • 2.5 (14,286) 195s
  • 2.4 (42,258) 238s
  • 2.3 (77,223) 265s
  • 2.2 (139,161) 314s
  • 2.1 (202,98) 272s
  • 2.0 (261,39) 180s
I believe that unsatisfiable instances with fewer clauses are more difficult to solve, and I believe that satisfiable instances are either always easier to solve than unsat ones, or simply easier to solve when m/n is less than 4.24.  Therefore I expected to see the time continue to increase and then start to decrease, which my single trial of incredibly tiny sample size does show.

I'm not ashamed that I researched in a vacuum (did not read much of other people's work) because I was doing this for fun and the part I enjoyed was inventing an algorithm on my own, however, now the vacuum part is coming back to bite me in the ass.  I can't read the super technical papers because understanding them depends on understanding all the papers they depend on (I mean, cite...) and none of the easy ones say anything terribly interesting.  And I think I'm reading drafts.  We have vocational schools that teach you how to cut hair or fix motorbikes.  Why can't there be one that covers all of the existing research on NP-Completeless focusing exclusively on 3-SAT and not even spending much time on k-SAT?

What are my next moves?  Realistically, I need to get an EC2 server (or some other computer than can run 24/7, but EC2 instances are better because it should always be the same hardware).  I need to come up with a thing to measure...either counts of a particular operation, or the sizes of sets or something, so I can stop relying on timing, which is machine dependant.

Next then, I supposed whatever I do will involve running shit-ton of 3-sat instances.  The number of possible instances for given values of n and m I believe is something like (n^3)!/( m!(n^3 - m!), where n^3 is way higher than m (not >> higher, just way higher).  How many should I run?  Enough to convince me, and other people, that it is worth the time to analyze this thing.

First off, what I've seen of solvable 3-sat instance generation is pathetic.  People pick a solution and then generate clauses that don't violate the solution.  There are some tricks people have done to make this process suck less, but it is basically worthless, especially given my hard-to-describe learnings that I...learned while staring at a hard-to-explain multi-dimensional reduction of 3-SAT constructed out of soap and bandaid boxes from 7-11.  Those corners man...the corners killed me.

If you are testing an algorithm I don't understand why you can't just generate a bunch of instances, and then see which ones are SAT ?  Once you have an alleged solution, its polynomial time...possibily even linear time to test the solution.  Well, anyway, testing SAT instances is out for now.  Besides, if we could prove than an algorithm can solve all UNSAT instances in polynomial time, it doesnt matter how long SAT instances take.  SAT instances can take until the end of this and any other unverse for all I care;  if you know that UNSAT is polynomial time, just stop your algorithm after it has exceeded polynomial time and declare the instance SAT.  In fact, once you do that, you can start manipulating the problem (start picking values for variables) and then asking your algorithm if it is still SAT.  Combine a polynomial number of such manipulations with your polynomial algorithm and now you have a polynomial algorithm to give you the solution for SAT instances.  Wow I think what I just wrote could be turned into a proof.  Anyway.

UNSAT.  Verifying that an instance is UNSAT may be difficult if you don't feel like printing out a minimal proof tree (I really don't).  However, I believe it is far easier to prove that my algorithm is correct than it is to prove why the hell it runs in polynomial time, so without loss of generality, lets assume that I have a girlfriend...oh that didn't work.  Fine then lets assume that my algorithm is correct.  I'll make it print out the proof later.

Here are some ideas about how to constrain the random samples to be as difficult as possible:
  • no tautologies, clauses with both a literal and its negation
  • no duplicate clauses
  • does not contain a "trivially unsat cluster" -- the group of eight possible distinct clauses over the same three variables
  • every(both) literal of every variable is expressed in at least one clause
The number of clauses, m, is also a constraint, but whether we choose a single value or use a distribution is its own topic.  Given my constraints, what is the smallest value of m/n for which UNSAT instances exist?  Does this ratio itself change as n grows?  Has someone already done this in a paper that I haven't yet found with google?  Such an instance may not be the most difficult, but it would be the most...interesting.  For now.

I could set up a search for such instance, and be found asleep at my desk bathed in the monitor light of a flickering screen with headphones blaring by a troupe of fellow associates asking me for an illegal and oddly shaped diskette, whom I follow to a club because the girl has a tattoo of a white rabbit.

Or I could just make some pretty graphs.

Ooh...here is another intersting test:  start with an empty set.  Randomly pick a clause based on n variables, add it to the set, and run angel2 on it.  Add another clause and run angel2 on it again.  Repeat by adding 1 randomly selected clause and running angel again until you get UNSAT.  Ok what would this accomplish...I'm not sure.  Well, actually you could continue adding clauses randomly until you've added all clauses, and record how long each instance takes to solve.  Then you would have a pretty graph!  You could turn this into sort of an exhaustive search...but you might be better off naming every gluon in the universe.  I have a pet gluon.  His name is Andy.  My preivous pet gluon Bernard ran off with some slutty quark and I never saw him again.






*I've gotten the impression that Microsoft employees do not appreciate me calling it that.  The truth hurts.

Monday, October 10, 2011

Grooveshark Fail




https://bbs.archlinux.org/viewtopic.php?id=59134

https://wiki.archlinux.org/index.php/Beginners_Guide#Configure_the_audio_card_with_alsamixer

https://wiki.archlinux.org/index.php/Allow_multiple_programs_to_play_sound_at_once#Troubleshooting

# pacman -S pulseaudio-alsa
 
sudo pacman -S lib32-libpulse
 sudo pacman -S lib32-alsa-plugins
 
https://wiki.archlinux.org/index.php/PulseAudio#Backend_Configuration 

Sunday, October 9, 2011

So...

I really just wanted to write this down somewhere:

1000 instances of n=64 takes up 7.9M.

So 1 million would take up about 7.71G.

And a million is just a tiny ass drop in the bucket.


Notes (or, how do I generate difficult instances of 3-sat?):

According to The State of SAT by Henry Kautz and Bart Selman, a 700 variable problem took a couple months of compute time back in...early 2000s?  Who doesn't date a paper?  This must be a draft.

Two existing (and boring) algorithms for SAT are:

http://en.wikipedia.org/wiki/WalkSAT

http://en.wikipedia.org/wiki/DPLL_algorithm

Problems arising from creating proof trees mentioned in The State of SAT give me hope--modifying my algorithm to produce the proof trees as it runs would be simple if I cared to do it, although the proof trees would not be minimal.

Ok...most of the rest of the paper is boring.  Looks like everyone thinks P != NP.



Oooh, finally, something about hard instance generation:

http://www.is.titech.ac.jp/~watanabe/gensat/

Shit.  Dead links.  Well, at least I know "something about a factorization problem."

Here is Hard Instances for 3-SAT by idk-who in an atrocias ps file intended for slides.  Still more people thinking hard is simply m=n*f

Perhaps what I should really do is measure running time affected by the constant factor X, where m=Xn.  Pretty graphs!  Yay!




Also checked out "Algorithsm for Random 3-SAT" by Abraham D. Flaxman, Microsoft Research.  It pointed me to Where the Really Hard Problems Are.

Saturday, October 8, 2011

Princess Leia

Guess I'm a dork for writing this down, but anyway...apparently there is a thing called Geek Girl Con going on.  A lady friend got me to go with her.  It was nearly half dudes.

This hot girl walked by twice wearing an awesome Leia costume (hairbuns, not bikini) and it had like a slit going up to her thigh.  The first time we made eye contact and I saw her smile and glance away.  What I instinctively read told me to avoid making a pass.  Still had this mindset...geekdom...girls drowning in men...hate being approached...and she's like one of two hot ones within the entire acre.  My friend thought differently though, and even told me I should chase after her, which is kind of an anathema to me.  By the time she had me convinced to like, run after Leia and ask her out by giving her my nonexistent business card, she was gone.

She said a lot of things that contradict the conventional wisdom.  Most people say never, ever give a girl your number (or card) because you should always get theirs, for reasons I don't care about.  I think I'm going to try it, though, at least with girls I wouldn't otherwise talk to.  Like a little drive by "hey I like your costume I'd love to hang out some time" or whatever my friend told me to say.    Finding the words to use is going to be difficult because what I'm actually saying is "you're hot and you're dressed like Leia; I want to be on top of you."  I'd prefer to use those exact words but after hearing what every female friend has said, plus a touch of experience...I know I can't.

Another interesting thing my friend told me is that in all the years of being what I say is the only female Magic The Gathering player (note: ladies, I do not play this game.  I am available for lame OKCupid dates with bitchy girls), she was only hit on 5 times.  I find that strange.  After all the stories of the insane attention geek girls get, stories of girls playing male characters and hiding their gender, how could one of them only get asked out 5 times in a matter of years?  And she's not ugly either.  Is it possible that despite showering them with unwanted attention, most of the guys don't go all the way towards making a move?  I don't know.

I just know that normally, when I think about hitting on a hot girl, I think of all the guys that have come before me with their pathetic attempts and shudder in disgust at the very idea that I will be counted among them.  Going after a girl like that makes me imagine a pile of slimy dogs covered in mud and shit, slithering over one another as they try to reach a single piece of steak that is dangling out of their reach.  I know that has been true in some places...my dance partner Kristal (yeah, with a fucking K...damn I wanted her)  got hit on like every week at the dance studio.  I'm not even kidding.  She was like a level 10 Approach-discourager.  She was so good at shooting down guys she made the Red Baron look like a rookie.

Perhaps its different in the geekier places of the world?  Perhaps I need to choose a new way of thinking about it.  And order business cards.  I've always prefered to meet girls the slow way...girls on the same team, with the same band, in the same class, drinking at the same parties or with the same friends.  Approaching cold seems like all the work and none of the fun, but I'm going to try it.  Like really try it.  Like right now I could...well my apartment is a mess (like there is not really anywhere to sit...or stand), but I could at least be getting a drink with Leia if I had not hesitated.  That's all the motivation I need for next time.

3 to the S to the A to the T, bitch

The move was horrific, and I wrote page of notes of things I wanted to mention in what I thought would be an epic post.  Too bad I'm too lazy to write an epic post.  It was bad, though.  Like so bad I'm kind of surprised all of my stuff even made it to the new place.  Anyway.

3-SAT.  Stop reading if you don't have some kind of math degree.  I mean, sure, you're welcome to continue, but don't blame me if you don't understand something and don't go thinking that I'm a big fucking nerd just because I can't stop trying to solve the biggest math problem in computer science.

I was bored at work one day...perhaps one day last...was it in a meeting?  I don't know.  I was just...sitting around.  Got another idea for 3 sat.  I was inspired by some random snippet I read on the web about how solving NP-Completeness would probably mean solving NP-Hardness, because you could just solve a polynomial number of NP-Complete problems in order to solve the NP-Hard one.  I don't really care about that;  NP-Hard can go fuck itself.  But it did lead to an interesting idea.

It was an idea that I pursued for at least two weeks, running into road blocks, coming up in new ideas...until I had enough of an idea to turn into code.  Then I kept daydreaming about it at work and going home to tweak it at night.

Aaaand it didn't work.  I tried over and over to make it work but I just couldn't get it to polynomial time.  In fact, some of my ideas for making it work better actually made it worse...far worse.  Like doing a polynomial number of reductions to 2-sat.  That bombed.  Then, while I was just messing around, I tried something that should not have worked at all, and it solved 3-sat faster than anything I've ever tried before.

I never did come up with a polynomial method of solving it...but I do appear to have invented an exponential operation that gets run a polynomial number of times.  Something like O(2^(log(n))-ish*.  I have no idea why it works.  It just does.

I've begun spot-checking the algorithm against a few instances in satlib but my heart is not really in it.  This is the high part of a 3-sat addiction, the part where I daydream about being famous and money and selling t-shirts that say "P=NP" on them.  What comes next is the moment I crash and realize my algorithm cannot solve all instances of 3-sat.  I hate that part.  It is the exact same feeling as hooking up with an amazing girl you want to keep and then getting a text about just being friends.

I suppose next up is more testing.  Instances with 125 variables are sort of right on the edge of my attention span.  Maybe I will spin off a map reduce job to solve every problem in satlib.  Maybe write a generator;  I don't know.  The problem space is too enormous, but maybe I will happen to generate an instance that will break my algorithm.  Right now it is programmed to print "FAIL" if it is unable to solve an instance before using up all log(n) of operations that I've alotted it.


*have not thoroughly analyzed the runtime yet...probably more like O(2^log(n) * n^c) or something.

Inspiration

-Lonely Island Michael Bolton / Jack Sparrow song
-Jack Black singing Rose on the Grey as a prank at American Idol
-that random picture that I probably lost


Tuesday, October 4, 2011

todo

write about horrific move

tron costume:

http://ellumiglow.blogspot.com/2010/12/how-to-make-your-own-tron-costume-made.html