|
|
|
|
|
by VLM
4536 days ago
|
|
"most efficiently" Stop doing that and its a lot more fun. It annoys me when a PE problem is specifically designed to make it impossible if you do it the "wrong" way. Most PE problems allow crazy solution strategies. The bad ones only have the one true way that is computationally feasible. A few posts up someone liked problem 267. I would pick random numbers, run them, then keep the winner and make n-1 new random numbers for round 2 and keep running rounds of multiple threads until bored, remembering the best result so far. Yes, that is not a very smart way to solve the problem, but its a very fun way to exercise the heck out of your knowledge of threads in some new language. Or you could make an insane thousand thread pipeline and hope for convergence. Or a thousand processes on a parallel cluster pipelined together. Could I write my random processor using BASH to baby sit a bunch of octave instances? Newtons method at least at first glance would be too easy. Could I solve it graphically, literally, by graphing some results and doing image manipulation and analysis of the generated graphic file to obtain the numerical result and feeding back for more "zoom" detail? Totally ridiculous unless the whole point is some weird computer vision project. Given an emulator for a IBM1620 mini-mainframe from the 60s, could I write a perl script that output random Fortran-II test runs for the emulated mini-mainframe to compile and process and then another perl script to eat the virtual "printer" output of the mini-mainframe to get random run results? Problem 267 looks like a fun one to solve the wrong way. This is the unfortunate part of PE becoming popular at interviews. First of all it surely has nothing remotely to do with almost all programming jobs, secondly, "having fun while doing crazy things" is probably not the ideal IT department mission statement or employee selection criteria (although it would explain some things I've seen over the years...) The proper tool for 99% or so of PE problems isn't a programming language anyway, its octave/mathematica/parigp. So its not too far out of the spirit to try crazy stuff. |
|