There are many numbers, all of them are distributed from 0 to 12. How to write a program on delphi-7 to identify a formula, an algorithm, a pattern in a sequence of numbers, using which you can find the remaining numbers that obey this pattern? Numbers are entered from the keyboard until the sequence of numbers is determined. And the following number is displayed in the text.
- This already smacks of the creation of artificial intelligence. PS In general, as far as I know, the generation of a pseudo-random number is a complex computational process that is performed by the processor specifications. So, Intel created a chipset for this: habrahabr.ru/post/128666 - AseN
- 6Nope, it smacks of undelivered labs with a taste of the session :-) - karmadro4
- one@ den555, decided to win at roulette? - avp
- For example, http://en.wikipedia.org/wiki/Polynomial_interpolation . - drdaeman
- Here, they change the text of the question (0 - 36 did not replace 0 - 12) and the comment becomes stupid, but you cannot edit it anymore (this is to @ HashCode). - avp
|
1 answer
In the promised case - no way. Absolutely nothing. But you can try to guess the algorithm from the existing ones.
- metodo first. Suppose that the numbers obey a formula, for example, n * a% b (where the percentage is the absolute value). In the course of entering numbers we are trying to pick up the coefficients. If for some of the formulas it is possible - then found. The disadvantage - you need to keep the base of formulas.
- second method. Graphic. It is banal to build a graph according to the given numbers, along the X axis we postpone the sequence number. We look at the graph, with a certain skill, you can guess the dependence. Then pick up the formula purposefully.
- third method. The graph is plotted on a plane, using pairs of numbers, like x, y coordinates or triples of numbers, then the third number is the color of the point. We look at the result. Some, not very good generators, immediately visible "patterns". Based on this, you can guess the coordinates of the points.
- The second method is not simpler than the first. Need to have a database of graphs?)))) - Yoharny Babai
- Yes, the mathematician should look at the chart. - karmadro4
- 2- Is there a random in pascal? <br/> - 7. Since the class of functions is not specified, without loss of generality, you can issue the next number from any step, moreover, any. - Yura Ivanov
|