The distribution of social assistance in Indonesia faces challenges such as inaccurate recipient data, overlapping programs, and limitations of traditional data management systems that lead to inaccurate targeting of aid. This study proposes a social assistance distribution optimization system using the Greedy algorithm that assesses recipient priorities based on economic conditions, number of family members, location, and urgency of needs with certain weights to produce objective rankings. This system is implemented in a JavaScript-based web application without external frameworks, making it lightweight and easily accessible. Simulations with 20 prospective recipients and a quota of 10 slots and validation with a dataset of 10,000 entries show that the Greedy algorithm produces identical results to Dynamic Programming but is much faster (669 times faster). In terms of complexity, this algorithm has O(n log n) time and O(n) space, and meets the requirements of the Greedy Choice Property and Optimal Substructure, making it a practical and efficient solution for managing large-scale social assistance distribution in Indonesia.
Copyrights © 2026