# listmat: From cost matrix to list of feasible assignments. In OSDR: Finds an Optimal System of Distinct Representatives

## Description

Transforms the cost matrix of the assignment problem in the corresponding list of suitable applicants for each job.

## Usage

 `1` ```listmat(x) ```

## Arguments

 `x` A cost matrix where entry (i,j) is the cost of assigning job i to applicant j.

## Details

In statistical matching problems the input is usually the cost matrix while in assignment problems is the list of assignable elements. Functions `matlist` and `listmat` go back and forth these two representations of the input.

## Value

A list of suitable applicants. The i^{th} element of the list contains the suitable applicants for job i. These are all applicants with finite assignment cost. Note that if the cost matrix contains finite non zero values there is a loss of information in the transformation.

## Author(s)

Massimo Cannas <massimo.cannas@unica.it>

See `matlist`, the reverse function.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```# a list of feasible applicants for five jobs M1<-c("A","B","C") M2<-c("A","C") M3<-c("B") M4<-c("A","C") M5<-c("A","D") M <-list(M1,M2,M3,M4,M5) M # list --> cost matrix m <- listmat(M) # cost matrix --> list l <- matlist(m) ```