There are two algorithms Algo1 and Algo2 for a problem of size n. Algo1 runs in( n^2) microsecond and Algo2 runs in \n(100 nlog n) microsecond. Algo1 can implementd using 4  houre of programmer time and needs 2 minutes of CPU time. on the other hand, Algo2 requires 15 houre of programmer time and 6 minutes of CPU time.If programmer are paid 20 dollars per houre and CPU time costs 50 dollars per minutes, how many times must a problem instance of size 500 be solved using Algo2 in order to justify its development cost?\n\n:)
203467
this is a math question, not a programming question.
10475
Without really going into formulae and calculations one can say that the answer for the first question is - a little less than one minute. For the second question - a little less than 60miles an hour.
182192
This is a bit difficult question cause it takes lots of factors like how many resources you have (or going to allocate for the project). Do you have a clearly defined scope of work?? System Design??? if you have answers for these then lets break to project in to phases like  feasibility study, requirement gathering, analysis, design, coding and implementation. Each phase break it in to smaller tasks like getting approvals, visiting different locations etc. \n\nNow estimate number of days your resources going to spend on each task depending on the level of experiance the resources have. Here you need consider their previous experience and keep gaps for paper work and other manual processors.\n\nOnce you arrive on total number of days, then it is easy, you calculate what is your man day cost and add your profit margin. Then multiple Man Days * charge per day, that is the price estimation and number of days is the time estimation. Make sure you have buffers in case of something goes wrong in a phase. Size of the buffer needs to justify and realistic.
368251
1.  The key here is to understand how far the two trains have traveled in total during the first 3 hours.  We are told that the two trains started 500 miles apart, and 3 hours later are now 80 miles apart.  Thus they traveled 420 miles in total. \n\nIf you let x represent the rate of speed that the Freight train is traveling, and x+20 represent the rate of speed that the Passenger train is traveling, you can set the following algebric equation:\n\n3 hrs * x mi/hr  + 3 hrs * ( 20 + x ) mi/hr = 420\n 3x + 60 + 3x = 420\n6x = 360\nx =60 mi/hr.\nx+20 = 80 mi/hr.\n\n2.  The key is too figure out the total number of employees needed to break even.  Regardless of how many employees you have, we are told that it costs $2000 per day to run the factory.  In addition to that  we are told that for each employee, we must pay him or her $300.  These are the total costs for the operation.\n\nOn the other hand, we are told that each employee can produce $500 in revenue each day.\n\nThus, we need to create an algebric equation where the total costs = the total revenue\n\nLet x represent the number of workers, and set up the following algebric equation:\n\nCosts = Revenue\n\n$2000 (Fixed Costs) + $300 * x (Variable Costs) = $500 * x\n\n2000 + 300x = 500x\n2000 = 200x\n10 = x\n\nYou will need 10 workers to break even, and the total gross value of ball bearings produced will be 10 * $500 or $5000.\n\nHope that I have cleared things up for you!
380637
First, we need to find the partial derivatives of cost with respect to length and width.\n\nC = 10LW + 640(1/W + 1/L)\ndC/dL = 10W - 640 * (1/L^2)\ndC/dW = 10L - 640 * (1/W^2)\n\nThe minimum of cost will occur where the above partial derivatives are equal to 0.\n\n10W - 640 * (1/L^2) = 0\n10W = 640 * (1/L^2)\nW(L^2) = 64\n\n10L - 640 * (1/W^2) = 0\n10L = 640 * (1/W^2)\nL(W^2) = 64\n\nSo we have 2 equations which both need to be true at minimum cost\n\nW(L^2) = 64 and L(W^2) = 64\nL = 64/(WL) and W = 64/(WL)\n\nSo W and L must be the same\n\nW(W^2) = W^3 = 64\nW = L = 4 meters\nH = 2 cubic meters / (4 * 4 square meters) = 0.125 meters\n\nNote that the given equation is correct, Gary needs to substitute\nhw = 2/l and hl = 2/w to get the final result...
541788
I wouldn't worry about an extra if eating up any extra CPU's.  Believe me, the difference would be negligible...\n\nIf you really want to speed up your code, do this:\nint x = 0;\nfor ( ; x < 6; x++ ) {\ndoWork();\n}\n\nx++;\nfor ( ; x < 10; x++ ) {\ndoWork();\n}\n\nthat's about as fast as it gets.  It's more code bloat, but it does prevent the extra if().
638603
if the question is how long would it take both? then the answer is 2.4 hrs.  \n\nx= number of hours worked\n\n(x/4) + (x/6) = 1\n\nsolve for x, least common denominator is 12\n\nso\n\n(3x/12) +(2x/12) = 1\n\n5x = 12\n\nx=12/5 = 2.4\n\n.4X60 = 24 mins\n\n2 hrs 24 mins
161778
spmdrumbass had the basic set up of the word problem right, he just had the terms backwards... it's 26^50 if you use just case insensitive letters.  It'd be 52^50 if it was case sensitive or (72+)^50 if typical alphanumeric and symbols are used.\n\n26^50 = 56,061,846,576,641,933,068,511,861,128,435,847,024,473,459,936,647,893,758,520,097,689,829,376 (about 10^70.7486649)\nand as spmdrumbass suggested, at a magnitude of 10 million calculations per second, that's 3.1536 x 10^10 calculations per year, so we're talking 0.3 x 10^60 years perhaps?  Even if the super computer did 10 billion of 10 trillion calculations per second... that'd still be well over 10^50 years.  I'm not even sure if I'm pronouncing this right, so here goes... that'd be well over a hexadecillion years. (10^51). (1000^16) x1000 (think of million, billion, trillion, quadrillion, quintrillion, etc)
363987
Best Answer - Chosen By Voters\n\nIf the question is how long would it take both, then the answer is 2.4 hrs. \n\nx= number of hours worked\n\n(x/4) + (x/6) = 1\n\nsolve for x, least common denominator is 12\n\nso\n\n(3x/12) +(2x/12) = 1\n\n5x = 12\n\nx=12/5 = 2.4\n\n.4X60 = 24 mins\n\n2 hrs 24 mins
535546
Everyone is working at the same time so add their work together like this:\n\n20pg/40m + 20pg/30m + 20pg/24m.\n\nReduce these down so you can get a common denominator and add them together:\n\n1pg/2m+ 2pg/3m + 5pg/6m = \n\n3pg/6m + 4pg/6m + 5pg/6m = 12pg/6m.\n\nThat's 2 pages a minute, or 20 pages in 10 minutes working together.
460998
***************\nQUESTION 1\n***************\nOn the first question, we first have to find the equation that we will be solving for.  \n\nAssume that x is one integer.\nWe know that x+1 is the other integer because they are consecutive.\n\nSo we now put the wording into an equation\n1/3(x + (x+1)) = x - 5\n\nNow we solve the equation\n1/3(2x + 1) = x - 5\n2/3x + 1/3 = x - 5\n16/3 = 1/3x\n16 = x\n17 = x + 1\n\nOur two integers are 16 and 17.\n\nNow we check our answer.\n1/3 of 33 = 11 & 16 - 5 = 11 We are good! :)\n\n\n***************\nQUESTION 2\n***************\nEvery hour, Amy and Randy together walked 3.6 + 4.2 km apart from each other.\n\n3.6 + 4.2 = 7.8\n\nSo, every hour they will be 7.8 more km apart from each other.  We only want 10 minutes though, and there are 60 minutes in an hour. To get how far apart they will be in 10 minutes, we take:\n7.8 * 10/60 = 1.3\n\nRandy and Amy will be 1.3 km apart after 10 minutes.\n\nWe are done! :)
60661
You need to look into "balanced trees". Check out any good algorithms book - my personal favourite is "Algorithms" by Robert Sedgewick.\n\nHope this helps!\n\n-----------\nEdit:\nBinary tree will not work as they have O(n) worst cases for maximum, minimum, search, insert and delete. These pathological cases are avoided by the rebalancing techniques used in balanced trees.
486364
I think the way to approach this is to minimize the number of remaining (that is, unused) hours to zero.\n\nJob B jobs must be multiple of 10, e.g. 10 jobs = 7 hours exactly (no remainder). \n\nJob C jobs must be multiple of 5, e.g. 5 jobs = 127 hours exactly (no remainder).\n\nUsing this approach, if you did 60 jobs B and 10 jobs C, the hours = 60 * .7 = 42 hours + 10 * 25.4 = 254 hours, total = 296 hours exactly (no remainder).\n\nThis would yield a revenue of $10,465.24 \n\nWrong!\n\nHmmm - (I'm doing this in Excel with columns labeled:\n# of B jobs, # of C jobs, B hours, C hours, total hours, $B/hr, $C/hr, $B, $C, $total; then keeping total hours <= 296, what is max $total)\n\nBest answers using Excel:\n# of B jobs, # of C jobs, B hours, C hours, total exact hours, $B/hr, $C/hr, $B, $C, $total\n\n0,11,0.000,279.4,279.400,$35.51 $35.33 $0.00 $9,871.20 $9,871.20 all C\n\n422,0,295.400,0,295.400,$35.51 $35.33 $10,489.65 $0.00 $10,489.65 all B\n\n386,1,270.200,25.4,295.600,$35.51 $35.33 $9,594.80 $897.38 $10,492.18 \n\n23,11,16.100,279.4,295.500,$35.51 $35.33 $571.71 $9,871.20 $10,442.91 \n\n350,2,245.000,50.8,295.800,$35.51 $35.33 $8,699.95 $1,794.76 $10,494.71 \n\n314,3,219.800,76.2,296.000,$35.51 $35.33 $7,805.10 $2,692.15 $10,497.24 optimum\n\n277,4,193.900,101.6,295.500,$35.51 $35.33 $6,885.39 $3,589.53 $10,474.92 \n\n241,5,168.700,127,295.700,$35.51 $35.33 $5,990.54 $4,486.91 $10,477.45 \n\n60,10,42.000,254,296.000,$35.51 $35.33 $1,491.42 $8,973.82 $10,465.24 \n\nLooks like 314 B jobs and 3 C jobs win!\n\nI'm not sure how to put this in an optimization formula...\n\nHope this helps!
545934
a) i +(1/3)(j-i)\n\n  b)  \n1-12 =>1-4 & 5-12\n\n... 1-4=>1 & 3-4\n.......3-4=>3 & 4\n\n...5-12=> 5-6 & 7-12\n......5-6=> 5 & 6\n......7-12=>7-8 & 9-12\n..........7-8=>7 & 8\n..........9-12=> 9 & 10-12\n...............10-12=>10 & 11-12\n....................11-12=>11 & 12\n\n c) 1/3 of the computations lead to a subset of the previous set\nwhich is 1/2 the size of the other subset which is lead to twice\nas often. So it averages out to the same number of\ncomputations as a conventional binary search.
40857
to test what is quicker create a giant table of data (cross join query is really good at making tons of entries fast) then run the query 100 times on a table of 100,000 entries. (some slow queries you wont need nearly this many entries)\n\nTake note of the execution time and run the other way. You can then tweak the code and see whats faster. I got a sproc that took 1:30 seconds to aggregate and massage a years worth of 15 minute data to run in 0:02 seconds using this method and a little persistance...\n\ngood luck
592286
teraflop\nA trillion floating point operations per second \n10 to the 12th power floating-point operations per second \n2 to the 40th power flops \n\nGHz\n1 billion cycles per second.\n\nEach computer instruction requires a fixed number of cycles, so the clock speed determines how many instructions per second the microprocessor can execute
530425
Let the number of locals be x,  and LD calls y.\n\nParental limits are\nx <= 30  and  y ......\n\nThe total time spent is 10x + 30y minutes, so you can write an inequality representing a need to spend at least 240 minutes on the phone.  I won't do that for you, but probably someone else already has!\n\nNo!  I see they haven't yet. I'm sure you can do it.