Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Posts:
822
Registered:
9/1/10


Re: MUSATOV´Ś PRIME (_time_) polynomial MACHINE
Posted:
Jan 28, 2013 1:28 AM


> On Jan 29, 8:56 pm, Martin <marty.musa...@gmail.com> > wrote: > > > 163271442811663332671343422782077124625231623012463249 > 266232788035497876598 0 > > 1 > > 6 2 ? 3 > > 3 3 > > 2 3 > > 7 7 > > 14 2 ? 7 > > 4 2^2 > > 28 2^2 ? 7 > > 11 > > 66 2 ? 3 ? 11 > > 33 3 ? 11 > > 32 2^5 > > 67 > > 134 2 ? 67 > > 34 2 ? 17 > > 2278 2 ? 17 ? 67 > A. Classic problem with a long and interesting > history. One of the > early problems shown to be NPComplete and therefore > one of the first > potentially capable of (over time) posing the P=NP? > B. Many many applications: > Placing data on multiple disks... > Job scheduling... > Packing advertisements in fixed length radio/TV > station breaks... > Storing a large collection of music or video or video > onto different > types of media... > C. Two versions: > 1. Online items arrive one at a time (in some order) > and each must be > first put in before considering the next > item...usatov > 2. Offline items are all given upfront... > The online version would seem more challenging... > When in fact, it is easy to convince ourselves an > online algorithm is > capable of (over time) always getting the optimal > solution... > Consider the following input: m small items of size > 1/b followed by... > M large items of size 1/b for any 0e0001... > The optimal solution is to... > Pack them in... > Pairs (ones M are all one large)... > This requires M bins... > The online algorithm knows what is coming down the > version pipe and > even how long the version pipe is S of or (for > instance) what it > should do with the first M small are... > If it... > Packs b of them in each bin it will be stuck when > these conduit half > arrivers come with M large items... > On the other hand if it computes one small are in > each bin in the > first half we can... > Just stop be the input right there in case the > algorithm would have > used twice as many bins as needed... > D. This ad hoc argument is NOW a proof... > We can turn this into be a formal proof and show the > following LOWER > BOUND: there exist inputs can force ANY online > binPacking algorithm > to be use at least 3/b times the optimal number of > bins... > PROOF: an important observation is because we (the > ally) can truncate > the input we always like, so the algorithm must > maintain its > guaranteed seed ratio AT ALL pointers during its > course... > Consider the input sequence: i1sequence of ms m are > all of size (1/b > e)... > Followed by... > Ibsequence of mlarge items of size (1/be)... > Learn t is consider the stating of... > The online algorithm after it has processed... > I1... > Suppose it has used b number of bins... > At... > This pointer the optimal solution uses M/to be in s > so if... > The online algorithm beats 3/b ratio it must > satisfy... > B/(M/b)... > 3/b==b/Mb/b(*)... > Consider the stating of... > The online algorithm after are all items have been > processed... > Since items are all new, items have come 1/by... > New bin created after the first to be in s will have > exactly one item > put in it... > (Some NPComplete items may go into the first two > bins)... > Since only the first two bins can have b items and > their mating bins > have 1 item each we see first... > Packing B... > M items will require at least (B... > Mb)... > Bins... > Again since the optimal at... > This stage is M bins... > The online algorithm must guarantee to seed (B... > Mb)... > 3M/bw simplifies to be... > B/Mb/b(**)... > But now we have leverage(*)... > (**)... > Thus NUMBERS OF online algorithms can be the > remaining 2 bins at the 3/ > b ratio... > We now show P VERSUS NP... > Simple capable online algorithms each uses at most > two or twice the optimal bins... > E. Next Fit: when processing the next items if it > fits in the same bin > as the last item... > Start any w bin only if does NOW... > Incredibly simple capable to be implements in (linear > time)... > Example: empty empty empty empty empty 0D... > 01 0b 03 07 0b 08... > Next fit also has a simple bestcase analysis... > Theorem: if M is the number of bins in the optimal > solution, the n... > Next fit always s come uses more than B... > M bins... > There exist sequences force... > Next fit to be use B... > Mto bins... > Proof: consider any two adjacent s bins... > The sum of items in these two bins must be 1 > otherwise... > Next fit would have rs come n of the first put all > the items of se > condition b2 into the first... > Thus to ta l occupied s... > Pace in (B1to be)... > Is 1... > The same holds for to beB3, etc.(...)... > Thus at most half the s... > Pace is wasted and so... > Next fit uses at most B... > M bins... > 2 for the lower bound consider the sequence in > wsi=0D... > For io2d and si=b/N for I even (Suppose N is > divisible by 3)... > The optimal puts are all 0D... > Items in... > Pairs using N/3 bins... > All small are fit in a single bins o the opt is > N/31... > Next fit will put 1 large 1 small are in each bin > requiring N/to > bins... > Lower Bound: oD... > 0D... > 0D... > B/N... > 0D... > 0D... > 0D... > B/N... > B1 to be B_{N/3} B_{N/31} empty empty empty empty > b/N b/N b/N b/ > N0D... > 0D... > 0D... > 0D... > B1 to be B_{N/b}... > F. First Fit: next fit can be easily improved rather > than checking... > Just the last bin we check are all previous bins to > be see if the next > item... > Will fit... > Start any online bin... > W bin only when does NOW... > Example Capable: empty empty empty empty 010D... > 0b 0b 030708... > First fit easy to capable implements in O(N^b)... > Time... > With proper data structures it can be implemented in > O(NlogN)... > Time... > Theorem: first fit always s come uses more than B... > M bins if M is the optimal... > Proof: at most to be any online bin bin can be more > than half empty > otherwise the NPComplete contents of these conduit > halffull bin > would be first... > Placed in the first... > Theorem: if M is the optimal number of bins... > The n first fit always s come uses more than 17M > bins... > On the other hand there are items sequences force it > to be use at > least 17/10(M1)... > Bins... > The upper bound proof is quite complex, completely > spliced... > We show a capable example forces... > First fit to be use 10/6 times optimal... > Consider the sequence 6M items of size 1/7 followed > by... > 6M items of size 1/b followed by... > 6M items of size 1/be... > Optimal strategy is to be... > Pack each bin with one from P = NP each group > requiring 6M bins... > When first fit is run it... > Packs are all small are first in 1 bin... > It the n... > Packs are all medium items but requires 6M/b=B... > M bins (Only b per bin fit)... > It the n requires 6M bins for the large items... > Thus into ta l first fit uses 10M bins empty empty > empty 1/7 1/7 1/71/ > b 1/71/71/71/be 1/71/be 1/be... > G. Best Fit: the third strategy... > Places the next item... > In the*tightest*spot... > Put it in the bin so smallest empty s... > Pace is left capable example 0b0D... > 0307010 b 08 empty empty empty 010D.... > 0b 0b 030708... > Also easy to capably implement in O(NlogN)... > Time... > Fortunately the generic good cases for first fit > etc.(...)... > Capably apply to be best fit also... > Best fit always s come uses more than 17 times > optimal... > Complete, complex, and spliced analysis is > submitted... > H. Offline Algorithms: if we can view the entire > sequence upfront... > We should expect to be do better.... > With exhaustive enumeration of course we can find the > optimum... > With even e offline bin... > Packing is NOW easy*if*we have rs come only a > polynomially amount to > be of time (NP?Complete)... > A challenge with online algorithms is... > Packing large items is challenging especially (a > language l) if they > occur late in the sequence... > We can circumvent... > This by*sorting* the input sequence: and... > Placing the large items first two with sorting we get > first fit > increasing and best fit increasing as offline analogs > of online FF and > BF... > With sorting the input sequence: best fit nears > 08070D... > 030b 0b 01... > Capably applying first fit increasing we get an > optimal 010b 0b > 0308070D... > Note the good cases require 10M bins as opposed at 2 > be 6M also do NOW > capably apply here... > When in fact, we show the following theorem... > Theorem: first fit increasing uses at most (3M1)... > /to bins if the optimal is M...usatov > I. First Fit Increasing: the version r of of FFDs > performance depends > on two technical observations... > 1Suppose the N items have been sorted in ascending > order of size s1sbs > N... > If the optimal... > Packing uses M bins... > The n are all bins in the FFD after M have items of > size=1/2b the > number of items FFD puts in bins after M is at most > M1... > Proof: of 1... > By compromising indicators: supposes I is the first > item to be first > put in bin M1 and si 1/b therefore we also have > s1sbsi11/b... > From p... > This it follows each of the first M bins has at most > b items each... > Claim... > The starting of FFD... > Just before si was.... > Placed as the following: the first few bins have > exactly 1 item to > remain to have b items... > If NOW the n there must be two bins... > Bx... > By with xy such.... > Bx has two items x1xb and... > By has 1 item y1... > Since x1 was put in earlier bin x1=y1... > Since xb was put in before six b=si... > Thus x1xb=y1si... > This capably implies si could have fit in... > By w our assumption... > Thus if si 1/b the n the first M bins must be > arranged so first J have > 1 item the next MJ have two items to be finish the > version r of we > now argue there are numerous ways to put all the > items in M bins the > assumption of optimality... > Numerous second items from ps 1sbsJ can be first put > in a single bin > if so FFD would have done it... > Because FFDs save data to be put any of the items > s_{J1}s_{i1} in to > be first J bins in any solution (including > optimal)... > There must be J bins do NOW compliment any item from > ps_{J1} > s_{i1}... > Thus are all these items must be complimented in > there mating MJ > bins... > Further there items b(MJ)... > Such items (because in FFD each of these MJ bins had > b items)... > If si1/b the n there are numerous ways of S... > It to be first... > Placed in any of these M bins it can fit in the first > J because > otherwise FFD would have done to it can go in there > mating MJ because > each of them already has two items of sizes 1/b... > Thus the optimal would require at least M1 bins! > So it must be si=1/b. > Proof of b: suppose there are items at least M > objects put in the > extrinsic space... > Since items are all fit in M bins we have rs come > um_{i=1} > ^Nsi=M...usatov > Suppose bin...J is filled with to ta l weight two > J... > Suppose the first M extra objects have rs come > izesx1xbxM...usatov > Because the items Packed by FFD in first M bins... > Plus the first M extra re subset to precede before > total we have > \sum_{i=1}^Nsi=\sum_{J=1}^MWJ\sum{J=1}^MxJ=\sum_{J=1 > }^M(WJxJ)... > WJxJ1 for each J otherwise FFD would put xJ in BJ... > Thus \sum_{i=1}^Nsi\sum_{J=1}^M1M... > This is possible because items are all s if it in M > bins... > So there must be only M1 items in the extrinsic > space... > Proof of theorem: there are items M1 extra items > each of size=1/b > thus there can be at most (M1)... > /b extrinsic space... > Thus the total number of bins... > Needed by FFDs (3M1)... > /b1B... > More complex, completely spliced... > Theorem: if M is the optimal number of bins... > The n FFD always s come uses > more than 11M/93 bins... > There are item sequences for w FFD uses 11M/9 bins > when 0=1 is inter > retractable wheresoever s come it... > Lends itself to be capably simple algorithms require > leveraged > analysis b... > You are given N items of size ss1sbs N... > All sizes are such 0si=1... > You have an infinitely capable supply of unit size > bins... > Go a list to be... > Pack the items in as few bins as possible capable > example: > ob0D...MUSATOV...MMM... > 0307010b08...> 2077 31 ? 67 > > 12462 2 ? 3 ? 31 ? 67 > > 6231 3 ? 31 ? 67 > > 6230 2 ? 5 ? 7 ? 89 > > 12463 11^2 ? 103 > > 24926 2 ? 7 ? 1783 > > 6232 2^3 ? 19 ? 41 > > 78803549 11^2 ? 103 ? 6323 > > 78765980 culmination sequence continuum infinite > termX * 6 > > > 1 TIMES 6 #1 > > XXXXXX / 2 > 6 DIVIDE 2 #2 > > XXX  1 > 3 PRIME MINUS 1 #3 > > XX (2BSTEP) + 1 > 2 REVERT 2 STEPS + 1 #4 > > XXXXXXX * 2 > 7 PRIME TIMES 2 #5 > > XXXXXXXXXXXXXX (3BSTEP) + 1 > 14 REVERT 3 STEPS + 1 #6 > > XXXX * (4BSTEP) + 1 > 4 TIMES (REVERT 2 STEPS) > > #7 > > XXXXXXXXXXXXXXXXXXXXXXXXXXXX  (2BSTEP + 5BSTEP) > 28 MINUS > > REVERT 2 STEPS, MINUS REVERT 3 STEPS #8 > > XXXXXXXXXXX > 11 PRIME #1 TIMES 6 > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXX 66 > > #2 DIVIDE 2 > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > 33 #3 MINUS 1 > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > 32 #4 REVERT 2 STEPS + 1 > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXX 67 > > PRIME #5 TIMES 2 > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX134 > > #6 REVERT THREE STEPS + 1 > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > 34 #7 TIMES (REVERT TWO STEPS) > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX2278 > > #8 MINUS REVERT TWO STEPS MINUS REVERT THREE STEPS > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX2077 > > #1 2PF REVERT: 4 STEPS #5=1PF REVERT #8, REVERT > #81=2PF > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX12462 > > #2 4PFS 1ST#1+1=1PF, 1ST#3=2PF, 1ST#8+1=3PF, > 2ND#5=4PF > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX6231 > > #3 3PFS 1ST$3=1PF, 1ST$8=2PF, 2ND$5=3PF > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX6230 > > #4 4Pfs 1ST&1+1=1PF, 1ST#3+1ST#4=2PF+3=3PF, > 2ND#5+1ST#5+1ST#6=4PF > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX12463 > > #5 2ND#1^2+5=1pf or 11^2 > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX24926 > > #6 2X2ND#1^2+5=1pf or 2x11^2 > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX6232 > > #7 1st#1+1PF^3, 1st#6+1st#7+1=2pf, > 1st#7+1st#8+1st#3=3pf or 2^3*19*41 > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX78803549 > > #8 11^2 ? 103 ? 6,323 > > > 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXX78765980 > > END.F@all errors: Maximum execution time of 30 > seconds exceeded in / > > > home/mathwaS6/public_html/arithmetic/numbers/primenum > ber/ > > primesfactory.php on line 116 > MUSATOV'? prime MÁQUINA polinómica (_time_) Publicado: 29 de xaneiro de 2012 21:56 Plain Text Responder
1632714428116633326713434227820771246252316230124632492662327880354978765980 1 6 2? 3 3 3 2 3 7 7 14 2? 7 4 2 ^ 2 28 2 ^ 2? 7 11 66 2? 3? 11 33 3? 11 32 2 ^ 5 67 134 2? 67 34 2? 17 2278 2? 17? 67 2077 31? 67 12,462 mil 2? 3? 31? 67 6.231 3? 31? 67 6230 2? 5? 7? 89 12,463 11 ^ 2? 103 24,926 2? 7? 1783 6232 2 ^ 3? 19? 41 78,803549 millions 11 ^ 2? 103? 6,323 78.765.980 culminar secuencia infinita continuidade termX * 6 1 6 veces # 1 divídese XXXXXX / 2 6 2 # 2 XXX  1 3 prime menos 1 # 3 XX (2BSTEP) + 1 2 2 Revert pasos + 1 # 4 XXXXXXX * 2 7 prime veces 2 º 5 xxxxxxxxxxxxxx (3BSTEP) + 1 14 Revert 3 pasos + 1 N º 6 XXXX * (4BSTEP) + 1 4 veces (Revert 2 etapas) # 7 XXXXXXXXXXXXXXXXXXXXXXXXXXXX  (+ 2BSTEP 5BSTEP) 28 MENOS Revert 2 pasos, menos Revert 3 Pasos # 8 XXXXXXXXXXX 11 Prime # 1 veces 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 66 N º 2 divide 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 33 # 3 menos 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 32 # 4 Revert 2 pasos + 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 67 Prime # 5 veces 2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX134 # 6 Revert tres pasos + 1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 34 # 7 veces (dúas etapas) Revert 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2278 # 8 menos dous pasos Revert menos tres pasos Revert 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2077 # 1 2PF Revert: 4 pasos # 5 = 1PF Revert # 8, Revert # 81 = 2PF 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX12462 # 2 4PFS 1 º # 1 +1 = 1PF, 1 º n º 3 = 2PF, 1 º # 8 +1 = 3PF, 2 º n º 5 = 4PF 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX6231 # 3 3PFS 1ST $ 3 = 1PF, 1 º $ 8 = 2PF, 2nd $ 5 = 3PF 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX6230 # 4 4Pfs 1 º e 1 +1 = 1PF, 1 º # 3 +1 ST # 4 = 2PF +3 = 3PF, 2 º # 5 +1 ST # 5 +1 ST # 6 = 4PF 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX12463 º 5 2 º n º 1 ^ 2 +5 = 1pF ou 11 ^ 2 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX24926 # 6 2X2ND # 1 ^ 2 +5 = 1pF ou 2x11 ^ 2 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX6232 # 7 1 # 1 +1 PF ^ 3, 1 º 6 +1 St # 7 +1 = 2PF, 1 º 7 1 ª N º 8 1 º # 3 = 3PF ou 2 ^ 3 * 19 * 41 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX78803549 # 8 11 ^ 2? 103? 6323 70XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX78765980 END.F @ os erros: tempo máximo de execución de 30 segundos superados / home/mathwaS6/public_html/arithmetic/numbers/primenumber / primesfactory.php na liña 116


Date

Subject

Author

1/29/12



1/29/12


adamk

3/5/12



3/5/12


adamk

1/28/13




