An uneasy problem with Arithmetic Sequences?
Difference between en3 and en4, changed 291 character(s)
Hi everyone,↵

today, I am stuck with a problem. I hope you can help me with it. I think this is a very interesting problem and I am not even sure there exists a deterministic solution to it. The problem is as follows:↵

"↵
Given n (n <= 1000, but O(n^3) is also fine) distinct integers, group them into sets of at least 4 elements, and each set is an Arithmetic Sequences. ↵
"↵
Example: ↵

Input: 1250, 3748, 6246, 8744, 2493, 4993, 7493, 9993, 2497, 4996, 7495, 9994, 2498, 4997, 7496, 9995, 2499, 4998, 7497, 9996↵

Output:↵

(1250, 3748, 6246, 8744),↵
(2493, 4993, 7493, 9993),↵
(2497, 4996, 7495, 9994),↵
(2498, 4997, 7496, 9995),↵
(2499, 4998, 7497, 9996)↵



(Assumption: For the given input, there always exists at least one solution that satisfies the constraints and no number is left)↵

I have spent hours working on this problem but unfortunately I cannot think of any ideas that will work well in general. What do you think?↵

Thank you.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English duckladydinh 2018-05-02 00:59:22 355
en6 English duckladydinh 2018-04-28 14:29:56 2 Tiny change: 'ces. \n"\nExample:' -> 'ces. \n"\n\nExample:'
en5 English duckladydinh 2018-04-28 14:28:41 113
en4 English duckladydinh 2018-04-28 14:25:50 291
en3 English duckladydinh 2018-04-28 14:05:25 2 Tiny change: 'ces. \n"\n(Assumpt' -> 'ces. \n"\n\n(Assumpt'
en2 English duckladydinh 2018-04-28 14:05:06 131
en1 English duckladydinh 2018-04-28 01:15:33 580 Initial revision (published)