<![CDATA[Programmer's Town - Algorithms]]>
http://www.progtown.com/
Mon, 19 Dec 2016 19:58:00 +0000PunBB<![CDATA[]]>
http://www.progtown.com/topic2046893-view.html
There is a task: to generate which is completely filled by words and jobs. How it is possible to make it? I puzzle some days and so, and , but except stupid search comes nothing. Search - until then while proper words on the necessary positions with the necessary arrows (the following from jobs) casually will not be allocated. But it is necessary to connect here any logic to delete hindering words, to try to add new etc. happens in that place that if we put two words vertically nearby not the fact that we across will have operating words, same on all horizontals of our words they should appear... In general, a head around, I can not invent the adequate decision. Can prompt though something?]]>Mon, 19 Dec 2016 19:58:00 +0000http://www.progtown.com/topic2046893-view.html<![CDATA[Classification and probability theory]]>
http://www.progtown.com/topic2047003-classification-and-probability-theory.html
Long not to tell I will try to invent the task and to adapt for it. Assume I predict the list from 5 books which will be bought by the user with the greatest probability. In total books of 24 possible. I have a model which on features of the user gives the forecast, it not bad works, but does not consider change of popularity of books in due course. And it is considerable. Assume I was trained on 06 month 2015 and I should make the forecast for 06 months 2016. For some user the forecast is received: [0.00273501 0.00273501 0.21609817 0.00411186 0.00925567 0.1917159 0.04742743 0.00293886 0.00331788 0.01592568 0.00443959 0.00344877 0.04274225 0.01281825 0.00274041 0.01408142 0.00274985 0.12125014 0.01134686 0.00730866 0.00296034 0.10991038 0.04232292 0.12561873] Number of a position in an array it also is the book. Further it is sorted and undertakes 5 with the greatest probabilities. But not an essence. In 15 year there was a following amount of books [1 0 3878 5 2347 40 531 226 131 0 0 46 2709 61 3 22 7 279 4248 183 7 5488 5513 10163] In 16 year this amount changed [0 0 6731 9 1872 8 211 216 152 290 33 956 1205 245 4 19 8 2933 4684 152 3 5082 8147 9031] And I would like to make correction of the forecast for value of change of popularity. For example, the third book almost twice grew on popularity. It would Seem it is necessary to divide an amount in 16 year for 15 year and to increase by probabilities of the forecast. But it is impossible so to do. Since for 6th book coefficient turns out unfairly big (40/8). I.e. it is necessary also total number somehow to consider. A question as it do?]]>Mon, 19 Dec 2016 08:28:00 +0000http://www.progtown.com/topic2047003-classification-and-probability-theory.html<![CDATA[Algorithm of sifting of the wrong data]]>
http://www.progtown.com/topic2047004-algorithm-of-sifting-of-the-wrong-data.html
There are certain sensors transferring measurements through a certain interval of time t +-x seconds. Results of measurement well enough can be described by curves. Though sensor transfer from place to place or generally its switch-off for some time is possible. In the course of the analysis of results it was clarified that sensors sometimes "say lies" thus the data much more often or less often. It would be desirable to eliminate the wrong data. But that that too difficult turns out. Thought the data, and after to discard that quit on value and an interval. But thus the saltus of the data "disappears" at sensor control/switching-off transfer. That is again it is necessary on this variant that that to mold. Or nevertheless it does not turn out easier?]]>Sat, 17 Dec 2016 13:06:00 +0000http://www.progtown.com/topic2047004-algorithm-of-sifting-of-the-wrong-data.html<![CDATA[2]]>
http://www.progtown.com/topic2047005-2.html
Greetings if it is still interesting to you max (x, y) = 0.5 (x + y + abs (x - y)) min (x, y) = 0.5 (x + y - abs (x - y))]]>Fri, 16 Dec 2016 04:13:00 +0000http://www.progtown.com/topic2047005-2.html<![CDATA[How apply ?]]>
http://www.progtown.com/topic2047006-how-apply.html
I basically well understand, how works Bitcoin. In last year/months it is a lot of news how the technology is applied by the different organizations, like banking join. And here here I at all do not understand it. What for it how they apply it and than it is better than the normal central server? There after all it is explicit not . Interests from the algorithmic point of view and to understand, how this can be applied in projects.]]>Wed, 14 Dec 2016 07:47:00 +0000http://www.progtown.com/topic2047006-how-apply.html<![CDATA[]]>
http://www.progtown.com/topic2046894-view.html
Prompt, who understood, how it is fulfilled]]>Sun, 11 Dec 2016 22:05:00 +0000http://www.progtown.com/topic2046894-view.html<![CDATA[The search algorithm of all cycles in the column]]>
http://www.progtown.com/topic2047007-the-search-algorithm-of-all-cycles-in-the-column.html
The directional graph is given, set structurally i.e. the peak can contain references to other peaks. It is necessary to find all cycles in the column. What it is possible to look at this subject?]]>Thu, 08 Dec 2016 07:26:00 +0000http://www.progtown.com/topic2047007-the-search-algorithm-of-all-cycles-in-the-column.html<![CDATA[Algorithm of Flojda for search]]>
http://www.progtown.com/topic2043848-algorithm-of-flojda-for-search.html
Esteemed in , in an Internet here but I do not catch up as it works. An example here from the link 60> 50> 40> 30> 20> 10> 40 why such phrase For example here is written: when tortoise comes to 40 hare is at 20 inside the loop.then they both meet at 20. When a turtle on 40, a hare after all on 20 why it is written then they both meet at 20 and Now send tortoise back to first node in the list. Let them both iterate at same speed (one node per step) then I how much understood we should send a turtle on start, when identical values. That is if both the turtle and a hare were on 20 yes, we send a turtle on start. It would be healthy, if someone the code on or]]>Sat, 26 Nov 2016 13:46:00 +0000http://www.progtown.com/topic2043848-algorithm-of-flojda-for-search.html<![CDATA[Point hit in a circuit]]>
http://www.progtown.com/topic2043849-point-hit-in-a-circuit.html
Is available N points at which bypass the closed circuit is formed. It is necessary to learn, whether the given point in this circuit gets or remains outside. It is desirable without trigonometry, and other long calculations since it will be fulfilled on the microcontroller.]]>Mon, 21 Nov 2016 04:14:00 +0000http://www.progtown.com/topic2043849-point-hit-in-a-circuit.html<![CDATA[Recommendatory systems]]>
http://www.progtown.com/topic2043850-recommendatory-systems.html
Colleagues, can advise the book on collaborative filtering. It is desirable with examples and the code on Python or R. Also it is desirable more less deep immersing in a subject, SVD ++, RBM, etc.]]>Thu, 10 Nov 2016 03:11:00 +0000http://www.progtown.com/topic2043850-recommendatory-systems.html<![CDATA[]]>
http://www.progtown.com/topic2043631-view.html
There is coordinate system XY, there is a cubic spline in this coordinate system on a x axis. Under some conditions, coordinates of points defining curvature, it turns out that to one coordinate X corresponds two or more coordinates Y. Coordinates of points defining curvature change smoothly. By what criterion, without building a curve, to define the moment when there are two or more points Y on one X?]]>Wed, 09 Nov 2016 12:02:00 +0000http://www.progtown.com/topic2043631-view.html<![CDATA[Modeling of mechanical systems]]>
http://www.progtown.com/topic2043851-modeling-of-mechanical-systems.html
All greetings! Prompt where it is possible to esteem about programming of mechanical systems (it is desirable With ++). In my case is 2D, specific mechanisms with a heap of parameters, nodes, communications and /. On the one hand - it would not be desirable to invent a bicycle, but usage of special packets or indirect libraries too does not approach. Thanks]]>Tue, 08 Nov 2016 15:05:00 +0000http://www.progtown.com/topic2043851-modeling-of-mechanical-systems.html<![CDATA[Problem of the adjacent coins (The Adjacent Coins Problem)]]>
http://www.progtown.com/topic2043852-problem-of-the-adjacent-coins-the-adjacent-coins-problem.html
The description and the correct implementation here. There is a task, to correct the variant offered more low changing no more than three lines. On a test dial-up where for example A [] = {0, 0}, the correct implementation produces 0, that that more low - 1. Help to rectify an error. public int solution (int [] A) {//n length of the array int n = A.Length; int result = 0;//Calculate the number of consecutive identical ones, for both sides for (int i = 0; i <n - 1; i ++)//why n - 1 {if (A [i] == A [i + 1]) result = result + 1;}//Calculate max delta int r = 0; for (int i = 0; i <n; i ++) {//count: current delta int count = 0; if (i> 0) {if (A [i - 1]! = A [i]) count = count + 1; else count = count - 1;} if (i <n - 1) {if (A [i + 1]! = A [i]) count = count + 1; else count = count - 1;} r = Math. Max (r, count);}//max]]>Mon, 07 Nov 2016 19:26:00 +0000http://www.progtown.com/topic2043852-problem-of-the-adjacent-coins-the-adjacent-coins-problem.html<![CDATA[Prediction of allocation of players in places]]>
http://www.progtown.com/topic2043853-prediction-of-allocation-of-players-in-places.html
Hello. We present that at us is N players with certain indexes of skill P 1... N. We admit that probability to win first place in tournament at the player n = P n / SUMM (P 1... N). Well, that is the probability of a victory is equal to specific skill of the player concerning all group. We admit that in case of a victory (1st place) there is nobody the player n, the probability to take the second place is arranged similarly (only now from an estimation n th player is thrown out). That is remained N - 1 players divide 2nd place the same as all group divided the first. And so to the end, to the last place. It is necessary to receive the table where in each cell there will be a probability of a place for this or that player. Here calculation for three players with ability 50, 30 and 20 accordingly. It is possible to note that the total on each line and a column is equal to unit (that logically and is necessary). Players 1 2 3 Skill 50 30 20 1 place 0,5 0,3 0,2 2 place 0,339285714 0,375 0,285714286 3 place 0,160714286 0,325 0,514285714 Algorithm which I calculated these values, in the front sorts out all variants and considers total probabilities. For 3 players it still where did not go, but for tens we receive very not sickly rows and swaps. It seems to me, in the games theory should be either ready, or the similar decision of the given problem.]]>Sun, 06 Nov 2016 10:28:00 +0000http://www.progtown.com/topic2043853-prediction-of-allocation-of-players-in-places.html<![CDATA[To create unique identifiers for pair elements]]>
http://www.progtown.com/topic2043854-to-create-unique-identifiers-for-pair-elements.html
There are elements, each of which has a unique identifier (in the elementary case - their address in storage). It is required to create the identifier for pair elements but so that its value did not depend on the order in which they undertake. It would be possible to use XOR, but there is a probability that its value coincides with other pair. And if to blind identifiers instead of by means of OR the result will depend on the order.]]>Sun, 06 Nov 2016 07:45:00 +0000http://www.progtown.com/topic2043854-to-create-unique-identifiers-for-pair-elements.html