Large-scale sensor networks impose energy and communication constraints, thus it is difficult to collect data from each individual sensor node and process it at the sink. In this paper, we propose an efficient data-collection scheme that can be used for event monitoring or network-wide diagnosis. Our scheme relies on the well-known representation of data