  A Physical layer Network Coding (PNC) scheme is proposed for the $K$-user
wireless Multiple Access Relay Channel (MARC), in which $K$ source nodes
transmit their messages to the destination node $D$ with the help of a relay
node $R.$ The proposed PNC scheme involves two transmission phases: (i) Phase 1
during which the source nodes transmit, the relay node and the destination node
receive and (ii) Phase 2 during which the source nodes and the relay node
transmit, and the destination node receives. At the end of Phase 1, the relay
node decodes the messages of the source nodes and during Phase 2 transmits a
many-to-one function of the decoded messages. Wireless networks in which the
relay node decodes, suffer from loss of diversity order if the decoder at the
destination is not chosen properly. A novel decoder is proposed for the PNC
scheme, which offers the maximum possible diversity order of $2,$ for a proper
choice of certain parameters and the network coding map. Specifically, the
network coding map used at the relay is chosen to be a $K$-dimensional Latin
Hypercube, in order to ensure the maximum diversity order of $2.$ Also, it is
shown that the proposed decoder can be implemented by a fast decoding
algorithm. Simulation results presented for the 3-user MARC show that the
proposed scheme offers a large gain over the existing scheme for the $K$-user
MARC.
