Optimal Sizing of Records when Divided Messages Can Be Stored in Records of Different Sizes

In many computer applications, messages of various lengths need to be stored efficiently. We examine the problem in which a fixed number of record lengths can be used to store messages. Whenever a message arrives it is stored in the smallest possible record that can contain the message. If the message length exceeds the largest record length, the message is divided into segments whose lengths are equal to the largest record length except for the final segment which may be smaller. Each segment is then stored in the smallest possible record. Furthermore, each record is accompanied by a header that contains overhead information. Using a nonlinear programming approach, an efficient algorithm is developed that finds the record lengths which minimize the expected space used to store a message. Numerical examples are presented and compared to those obtained in a previous work in which it was assumed that divided messages are stored in several records all of the same length.