An interesting approximate problem

Правка en1, от wannared, 2017-11-15 16:37:21

You have to design A keyboard with 63 Keys. 3 rows and 21 columns. Keys are [A-Z], [a-z], [0-9], and [space]

Given a string of length 105 you have to arrange the keys in keyboard in a way that it minimizes the total distance travelled by the finger.

Total distance travelled by finger is: Assume your finger is initially at [1, 1], now you will type each characters from 1 finger, if your finger is at [x, y] and you moves it to [z, w] the distance travelled by finger is |x - z| + |y - w| (Manhattan distance)

To me the problem is very interesting, Any ideas what sort of algorithms are good for such approximation tasks.

Problem Link: 3rd task from Here

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский wannared 2017-11-15 16:37:21 802 Initial revision (published)