Mathemat>>: Конечно, задача сильно усложняется и становится интереснее, если есть требование, чтобы решения были целыми. Хотя и здесь видна закономерность: положительные имеют вид 4к+1, 4к+2, 4к+3, 4к+4.
Yes with whole numbers the problem gets interesting.
Two players play the following game: the first player writes the letters A or B in a row as he wishes (from left to right, one after the other; one letter per move), and the second player, after each move of the first player, swaps any two of the letters written out or changes nothing (this also counts as a move). After both players have made 1999 moves each, the game is over. Can the second player play in such a way that any move by the first player results in a palindrome (i.e. a word that reads the same from left to right and from right to left)?
The answer is yes. The permutations must be made with an odd number of letters and starting with the third, so that each permutation respects the palindrome
The thought process is as follows: 1)A+AB=ABA=ABA. 2)AV+AV=AVAVAV=AVAVAV 3) ABHABAB+AB=ABABHAB=ABHABEA (the third A is moved to the end of the word) 4)AVHABABAB+AB=ABHABAB=ABHABABAB (move the first letter to the middle). etc.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Конечно, задача сильно усложняется и становится интереснее, если есть требование, чтобы решения были целыми. Хотя и здесь видна закономерность: положительные имеют вид 4к+1, 4к+2, 4к+3, 4к+4.
Yes with whole numbers the problem gets interesting.
Here are some more answers.
-1 3 5 24 46 -16560
-1 3 5 26 40 -15600
-1 3 5 28 36 -15120
-1 3 5 31 32 -14880
....
Can anyone find ALL the solutions ?
Может кто то может найти ВСЕ решения ?
I think this can only be possible if all solutions suddenly group into similar series.
Which in themselves are infinite, but can be described by "generators" as functions of natural k.
-1 3 5 26 40 -15600
-1 3 5 28 36 -15120
-1 3 5 31 32 -148802 avatara: I'm not going to contrast this thread with euroflood. Let it be exactly what it is - a more or less closed circle of interest.
Can the second player play in such a way that any move by the first player results in a palindrome (i.e. a word that reads the same from left to right and from right to left)?
To be continued. Such a greedy bastard...
The answer is yes. The permutations must be made with an odd number of letters and starting with the third, so that each permutation respects the palindrome
Ответ - да. Перестановки нужно совершать при нечетном количестве букв и начиная с третей, так чтобы при каждой перестановке соблюдался палиндром
It doesn't work that way.
Let's say it was
ABABA or BAAAB.
add BB first
ABABA + BB
BAAAB + AA → no
BAAAB + BB
BBAAABB + AA → no
BABABAB +BB
BBBAAABB +AA → no
The thought process is as follows:
1)A+AB=ABA=ABA.
2)AV+AV=AVAVAV=AVAVAV
3) ABHABAB+AB=ABABHAB=ABHABEA (the third A is moved to the end of the word)
4)AVHABABAB+AB=ABHABAB=ABHABABAB (move the first letter to the middle).
etc.
But it doesn't say swap the nearby (those in close proximity) two.
Но ведь не сказано что менять местами близлежайшие (те что в непосредственной близости) две.
in close proximity - not necessarily
but how to get a palindrome
BBAAABB + AA