To reduce a memory use amount required upon calculation of an assignment problem.SOLUTION: A
data processing apparatus according to the present invention has: a storage unit 11 for storing either of a flow matrix and a
distance matrix of an assignment problem having an
evaluation function represented by using matrix operation of the flow matrix and the
distance matrix; and a
processing unit 12 for selecting a first element and a second element among a plurality of elements assigned to a plurality of allocation destinations, reading out either of first matrix elements as the flow matrix and the
distance matrix which respectively correspond to the first element and the second element from the storage unit 11, generating, based on the first element and the second element, a second
matrix element as the other pattern matrix of the flow matrix and the distance matrix, calculating, by using the first
matrix element and the second
matrix element, a change amount of a value of the
evaluation function obtained when the allocation change of changing the allocation destination of the first element or the second element is caused, determining, based on the change amount, whether or not the allocation change is allowed, and updating allocation states if it is determined that the allocation change is allowed.SELECTED DRAWING: Figure 4