Delay-tolerant networks (DTNs) are sparse mobile ad hoc networks in which there is typically no complete path between the source and destination. Multicast and anycast are important group communication paradigms for numerous DTN applications. For example, multicast is used to disseminate real-time traffic information reporting and software patch to multiple devices, and anycast is used for resource discovery and information exchange in emergency or crisis situation. While multicast and anycast have been studied extensively in the context of the Internet and Mobile Ad-Hoc Networks (MANETs), efficient multicast and anycast in DTNs are significantly different and challenging problems due to frequent partitions and intermittent connectivity among nodes. In this paper, we propose single-copy routing strategies for multicast and anycast based on the multi-hop delivery probabilities. Multicast employs a dynamic tree branching technique that allows routing paths to be efficiently shared among multicast destinations. Anycast selects relay nodes based on social distances to anycast group members. It balances the trade-off between a short path to the closest, single group member and a longer path to the area where many other group members reside. That is, it optimises both the efficiency and robustness of message delivery. Through extensive simulation studies using a real-world mobility trace, we show that our schemes achieve a high delivery ratio, low delay, and low (or comparable) transmission cost compared to other group communication strategies.