tag:blogger.com,1999:blog-3382199152068943986.comments2017-10-13T21:04:11.175-07:00Kelvin's DomainKelvinnoreply@blogger.comBlogger30125tag:blogger.com,1999:blog-3382199152068943986.post-31644043091707622232013-07-06T03:53:45.211-07:002013-07-06T03:53:45.211-07:00I have a question:
GBP 1.62650 USD
USD 0.61482 GB...I have a question:<br /><br />GBP 1.62650 USD<br />USD 0.61482 GBP<br /><br />1 * 1.62650 * 0.61482 = 1.00000473<br /><br />so there is an arbitrage 'cycle': GBP, USD, GBP? <br /><br />Am I missing something?George Moschovitishttps://www.blogger.com/profile/04736280934738427219noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-87981478276981597042013-01-01T07:07:26.274-08:002013-01-01T07:07:26.274-08:00Kind of helpful but I need more examples!Kind of helpful but I need more examples!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-59028959861844207412012-12-17T12:32:22.894-08:002012-12-17T12:32:22.894-08:00The example transaction cost used was 1/10th of a ...The example transaction cost used was 1/10th of a basis point.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-70161513018726138732012-12-11T14:46:28.638-08:002012-12-11T14:46:28.638-08:00Minor comment: 1 basis point = 0.01%, not 0.00001Minor comment: 1 basis point = 0.01%, not 0.00001Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-6937589794778948912012-09-09T13:39:12.353-07:002012-09-09T13:39:12.353-07:00Sure, feel free to use the code. If you could prov...Sure, feel free to use the code. If you could provide attribution in the form of a link to this post, that would be great :)Kelvinhttps://www.blogger.com/profile/17337673894188021165noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-22934974259160336762012-08-27T23:43:04.869-07:002012-08-27T23:43:04.869-07:00Any chance you'd share this code? It looks li...Any chance you'd share this code? It looks like something I could use in a ruby project I'm working on. Thanksbc@pg62.comhttp://pg62.comnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-89785945210882831122012-08-01T18:18:53.043-07:002012-08-01T18:18:53.043-07:00niceniceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-19851672266991982622012-05-05T07:48:38.940-07:002012-05-05T07:48:38.940-07:00A clueless crossword is like a regular crossword. ...A clueless crossword is like a regular crossword. It consists of a grid of black and white squares. To<br />solve the puzzle you must enter letters into the white squares so that you have valid words going<br />across and down. However, unlike a regular crossword there are no clues. Instead, each white<br />square is marked with a number from 1 to 26. A number always refers to the same letter. To solve<br />the puzzle you must associate each number in the puzzle with an unique letter in the alphabet so<br />that the letters spell out English words.<br />Now consider the following pseudo code:<br />Module solveCrossword(partialSolution)<br />{<br />If (isSolution(partialSolution))<br />{<br />printSolution(partialSolution)<br />return True<br />}<br />Else {<br />Let possibleCandidates = getPossibleCandidates(partialSolution)<br />For (each element in possibleCandidates)<br />{<br />addToEnd(element, partialSolution)<br />if (solveCrossword(partialSolution) = True)<br />{<br />return True<br />}<br />removeLast(partialSolution)<br />}<br />}<br />return False<br />}<br />(a) Describe how you would represent the partial solution. Give an example.<br />(b) Describe at least two heuristics that could be used to solve the clueless crossword.<br />(c) Using the heuristics, write pseudocode for the modules isSolution and getPossibleCandidates.<br />These modules should use the representation that you described in Part (a). State any<br />assumptions you may make. You may assume that there exists the following Module:<br />Module inDictionary(word)<br />which would return True if the given word is in the English Dictionary, and otherwise returns<br />False.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-28593495617096394892011-12-10T11:57:42.424-08:002011-12-10T11:57:42.424-08:00Thanks alot for this post. Really! I was trying to...Thanks alot for this post. Really! I was trying to understand the problem, but i think facebook text was not enough for me. Thanks alot. You article helped me understand the problem.dandyhttp://google.comnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-57125192481879419772011-11-19T17:17:41.994-08:002011-11-19T17:17:41.994-08:00An interesting wrinkle... The coded solution does...An interesting wrinkle... The coded solution does not work if using Bob or Carol as the first person to check. If Bob is used to start he will be assigned to group1, Carol will be assigned to group2 and then Bob will NOT be checked because he's been visited and the program execution will end.<br /><br />How can we guarantee a full traversal?Jeffhttp://jeffslutz.comnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-73142428383399045862011-08-25T09:17:23.263-07:002011-08-25T09:17:23.263-07:00nice articlenice articleAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-3074195486402080662011-08-02T22:47:42.343-07:002011-08-02T22:47:42.343-07:00You refer to the cost of a previous event as
incl...You refer to the cost of a previous event as<br /><br />include = events[i-1][2]<br /><br />But the code does not update events[i-1][2] with profitIlovecodinghttps://www.blogger.com/profile/11954207956149548801noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-39195311938490908532011-07-10T00:37:02.001-07:002011-07-10T00:37:02.001-07:00what about the events that finish as well as start...what about the events that finish as well as start later than the finish time of i .. These should also be considered in compatible[i] set .Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-7010688615738223342011-05-24T13:18:36.290-07:002011-05-24T13:18:36.290-07:00I couldn't understand "Love Thy Neighbors...I couldn't understand "Love Thy Neighbors" part.<br />I can't see how you extended the algorithm for k nearest neighbors.<br />Can you please explain in pseudo code or java code ?Prateekhttps://www.blogger.com/profile/06159187510547318609noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-1711248064143364472011-05-05T18:10:57.984-07:002011-05-05T18:10:57.984-07:00Are you sure this solution is correct? I think it ...Are you sure this solution is correct? I think it doesn't take into account the possibility of a very heavy very and very inexpensive item. Let's say you want to throw out 15 kg. you have two possible items:<br />1, which weighs 5 kg and costs 20<br />2, which weighs 1200 kg and costs 1<br /><br />Doesn't your solution throw out 3 5kg ones instead of one 1200 kg one?Maciekhttp://www.wp.plnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-45103974494887340792011-04-23T15:03:21.957-07:002011-04-23T15:03:21.957-07:00I think my solution is simpler. Maybe I'm miss...I think my solution is simpler. Maybe I'm missing something though.<br /><br /><br /> @group_two, @group_one = [], []<br /> <br /> def insert_into_groups(accuser, liar)<br /> puts "Accuser: #{accuser}, Liar: #{liar}"<br /> if @group_one.include?(accuser)<br /> @group_two << liar<br /> elsif @group_one.include?(liar)<br /> @group_two << accuser <br /> elsif @group_two.include?(accuser)<br /> @group_one << liar<br /> elsif @group_two.include?(liar)<br /> @group_one << accuser<br /> else<br /> @group_one << accuser<br /> @group_two << liar<br /> end<br /> <br /> p @group_one <br /> p "\n"<br /> p @group_two<br /> p "\n"<br /> end<br /> <br /> current_person = ''<br /> File.open(ARGV[0]).each_with_index do |line, i|<br /> if i == 0<br /> total = line.to_i<br /> next<br /> end<br /> <br /> person, number = line.split(" ")<br /> if number.to_i > 0<br /> current_person = person<br /> puts "Current person: #{person}"<br /> else<br /> insert_into_groups(current_person, person)<br /> end<br /> <br /> end<br /> <br /> <br /> <br /> puts [@group_two.uniq.size, @group_one.uniq.size].sort.reverse.join(' ')Mischahttp://themomorohoax.comnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-80926226851552980882011-04-15T11:44:26.345-07:002011-04-15T11:44:26.345-07:00Further optimisation is possible by a divisor tree...Further optimisation is possible by a divisor tree. An edge goes from node x to node y if x | y. If y \ x = d and d * x <= y you don't need to care about y so you can reduce the state space.jakabhttps://www.blogger.com/profile/05253761302338617822noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-5047609688549264082011-04-15T11:38:05.237-07:002011-04-15T11:38:05.237-07:00You don't need to take the weight limit into t...You don't need to take the weight limit into the gcd. It still works that way. So you can boost your algorithm when the gcd of weights(not 1) and the limit is relative prime.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-33053522451957317072011-03-19T00:53:43.417-07:002011-03-19T00:53:43.417-07:00I am getting $15,000 as the answer.
events[i-1][...I am getting $15,000 as the answer. <br /><br />events[i-1][2] should events[i][2], I guess.Gandhihttps://www.blogger.com/profile/09977644790258467525noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-92136735871238063942011-03-08T09:09:34.074-08:002011-03-08T09:09:34.074-08:00Thank you for the well-written and informative pos...Thank you for the well-written and informative post.<br /><br />@Roja, it looks good when you apply to Facebook if you've solved their puzzles, but they won't be actively pursuing you if you solve Liar, Liar.Lynnnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-45622696611071777492011-03-04T12:16:52.137-08:002011-03-04T12:16:52.137-08:00O(n log(n)), since insertion is log(n) and searchi...O(n log(n)), since insertion is log(n) and searching the closest point in somethine like log(n)billy.bragahttps://www.blogger.com/profile/11391773038343941901noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-84917157073580021912011-02-15T07:01:52.853-08:002011-02-15T07:01:52.853-08:00Hi,
Is there any possible to get job in facebook...Hi,<br /><br /> Is there any possible to get job in facebook if we solve any one puzzle ? Thanksrojahttps://www.blogger.com/profile/11845588226203894007noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-10323537863394970852011-02-14T21:21:47.360-08:002011-02-14T21:21:47.360-08:00since every node of graph is a string (instead of ...since every node of graph is a string (instead of integer), this makes task little inefficient. in 'C' language, to build a graph from given data i will be using 'string comparison' function everytime there is a name in input. If i use hash function, even one collision is enough to lead me to wrong answer and there is no mapping function in C. How do i solve this graph building thing, any idea on that? ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-60888307616646068042011-02-10T12:24:45.450-08:002011-02-10T12:24:45.450-08:00The Facebook problem specification explicitly says...The Facebook problem specification explicitly says there will always be a solution and thus you do not need, for the purpose of their exercise, need to handle the case where the graph is not fully connected.<br /><br />One annoying thing is that the Facebook submissions robot does not indicate whether your solution failed due to an incorrect result or due to timing out because your solution was too slow. I get that they don't want to reveal too much, but "it timed out" versus "it exited with non-zero exit status" versus "it gave the wrong output" seems like it might be useful without giving away too much. :)Stephenhttp://mavjop.com/noreply@blogger.comtag:blogger.com,1999:blog-3382199152068943986.post-51176262853704114252011-02-07T19:01:14.622-08:002011-02-07T19:01:14.622-08:00Hi,
That was a nice and clean explanation. T...Hi, <br /><br /> That was a nice and clean explanation. Thank you very much!!kaushiknoreply@blogger.com