@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10



Comments:

<0> JBlitzen
<1> Pfft error
<2> aye - I explained a solution to it yesterday, but it was basically an exhasive search
<0> i fogot
<1> You Romanians give up too easily
<2> just by trimming the search space
<0> thx for your help
<1> pfft
<1> http://glocktalk.com/showthread.php?s=&threadid=550824&perpage=25&highlight=&pagenumber=1
<1> Read down to the first response
<1> Inclusive
<2> yeah, I skim read it earlier when you posted it
<1> That first response is outstanding
<1> I told error to try having you or someone else help him, Asriel, that maybe my approach was wrong or stupid
<2> I didn't read your response - was in the shower :)
<1> I meant to the thread



<2> I thought about it for a good 10 minutes yesteday and couldn't see any "simple" algorithm
<3> http://kdkaradio.com/play_window.php?audioType=Episode&audioId=70016
<1> Oh, his
<1> My suggestion was to first go through multiples
<1> 9, 8, 7, etc.
<1> And then maybe use recursion to work on the remainders
<1> So for 45, start with 9, 45 / 9 is 5, and that's it, so 9 5 * is the shortest you'll go
<2> possible, but there was no bound on the size of the input
<1> Sure, but then it'd just be
<1> 450
<1> Start with 9, 450 is 45
<4> get a job
<1> 9 * 9 is 81
<1> 450 - 81 is whatever
<1> So 9 9 * (whatever)
<2> yeah, I see where you're going
<1> Might end up like 9 9 * 9 * 4 +
<2> but then consider a prime number
<1> What about it
<1> 11
<1> 9 1 * 2 +
<0> not god
<1> Start with 9, it's in there once, leaves 2
<1> 9 1 * (samethingfor2)
<1> 2's in there once, so 2 +
<1> 9 1 * (2 +)
<1> Iterate through each possibility decrementing, one depth level at a time, stop at the short straw
<2> mmm
<1> Not exactly sure how it would differentiate between + and *
<1> Maybe if it finds a multiple of 1
<1> So 9 doesn't go into 7, 8 doesn't go into 7, 7 goes into 7 once
<1> In fact, my above example worked
<1> 9 1 * 2 +
<1> That's really
<1> 9 2 +
<1> 9 1 * is just 9
<1> So that's how you'd find the adds
<1> Say it's 21, 9 * 2 is 18, leaving a remainder of 3
<1> 3 * 1 is 3, and we know that's the identity, so drop the * 1
<1> 9 2 * 3 +
<1> I think that'd work
<1> At least, something along those lines
<1> But I really wasn't thinking in terms of data storage mechanisms
<0> :)
<1> His school notes had a lot of trees and stuff
<1> And to some extent, trees would be more relevant, since depth is easily conveyed
<2> trying to find a counterexample
<1> But I think the linear process I'm leaning toward is the nice one
<1> Haha, keep trying
<2> problem is proving it's the minimum
<5> i have one: JBlitzen is gaey
<1> Well, 40's a nice tough one
<1> 40 has, starting at 9 and working down to 1 and then 10, the following representations (of many more):
<1> 9 * 4 + 6
<1> 8 * 5
<1> 10 * 4
<0> 5 8 *
<1> I know, I'm using infix because I rock
<1> Character count's the same, anyway



<1> Now, that's an interesting example, because it's hard to figure out how to choose the second option of those three
<1> But we know that 9*4 leaves a remainder
<1> So with one p*** through for the first level of depth, 9*4 p***es, but contigently
<1> 8 * 5 p***es noncontingently
<1> 10 * 4 p***es noncontingently, but we already found one that works that's 5 characters, and 10 * 4 is 6
<1> And this is all setting aside the possibility that I correctly read his problem description
<1> Maybe he doesn't have to choose the best at all
<1> Maybe he just has to list all of them
<1> Or maybe he even just has to find one
<2> well, your method certainly generates "short" representations
<2> the problem I still have is it's tricky to formalise that it always generates the shorest
<2> er, shortest
<6> makfu0fu42fi
<1> Well
<7> He/She made as much sense as the actual Agatha Kristy
<1> Heh
<1> Maybe a data type representation would be relevant, here
<1> What about a 10 node tree
<1> Top node is your test, say, 81
<1> Its children are 1 through 10, or some subset thereof, representing the first element of each representation
<0> look a bit here ; http://thor.info.uaic.ro/~dlucanu/ap/ps&pdf/curs3.pdf
<0> page 28
<1> Then the next level is the next element of each representation
<1> So that, say, child 9 would have one node under it, 9
<1> And child 1 would have all sorts of nodes under it
<1> In fact, child 9 would have all sorts of nodes, too
<1> Because you could do 9 * 8 + 5, for instance
<1> Or whatever
<1> But, presumably, traversing one level at a time, you'd quickly find out that 9 * 9 is a canonical representation, and that no other representations at that depth are canonical
<1> Or whatever
<1> There's a lot of "or whatever" to this, but I think there's an answer lurking out there if someone was paying me enough to find it.
<1> This approach has the happy coincidence of involving a tree, just like his cl*** notes do.
<1> Anyway, I have to take off
<1> Roll that stuff around in your heads
<1> And remember
<0> expresion represented as trees
<1> Unlike Adobe Crashobat
<0> :)
<0> thx
<0> i't try the first one
<5> remember: listen to JBlitzen at your own peril
<5> he's considered smart only in texas
<4> heh
<1> And where's khan's solution
<1> Hmmm, nowhere
<1> Not surprising, for a gaey
<4> colors
<1> dunes
<7> They call you gaey, not gray JBlitzen
<1> Shut up, paki
<7> Ooh
<4> oooo
<1> Oh snap!
<5> that's only snapable in texas
<5> poor texas
<5> where idiots roam the streets in packs
<1> Yes, we call them "democrats".
<1> bbl
<5> only a republican would lie to your face like that
<5> there are no democrats in texas
<5> which explains its lack of educated people
<8> I need help! :)
<8> DWORD blah = GetLastError(); // sets blah to 0, from the debugger
<8> ImageList_Create( 16, 16, ILC_COLOR32, 1, 1 ); // tried just about every combination of arguments
<8> blah = GetLastError(); // sets blah to 8, not enough memory
<8> Whyyyyyy
<3> perhaps there was not enough memory
<8> For a single 16x16 image?
<3> haha
<8> Even if I give it a size of 0 it tells me there's not enough memory
<3> hm


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

Module truecrypt not found suse
Skuzi info
eviews c++
DJ Hemm
#skype
#AllNiteCafe
#linux
#MissKitten
#linux
JDK EM64 DOwnload



Home  |  disclaimer  |  contact  |  submit quotes