📅 2023-09-11 — Session: Enhanced Greedy Algorithm for Balance Adjustment
🕒 16:30–16:40
🏷️ Labels: Greedy Algorithm, Optimization, Function Redefinition, Algorithm Comparison
📂 Project: Dev
⭐ Priority: MEDIUM
Session Goal
The objective of this session was to improve the greedy algorithm approach for adjusting numerical balances, specifically targeting the reduction of differences between sums and final balances.
Key Activities
- Reflection on Greedy Algorithm Limitations: Discussed the inherent limitations of greedy algorithms in handling numerical differences and considered alternative methods for more precise tracking.
- Improvement Proposal: Suggested an enhancement to the greedy approach by identifying the smallest number whose sign change effectively reduces the difference.
- Error Handling: Addressed an execution environment issue by re-running the
saldos_sospechosos_mejoradofunction with a previous example. - Algorithm Comparison: Compared outputs from the greedy approach and an improved method against a brute force approach, highlighting discrepancies in results.
- Function Redefinition: Planned to redefine functions
saldos_sospechososandbrute_force_saldosfor accurate comparison.
Achievements
- Clarified the limitations of the greedy approach in optimization problems and identified potential alternative algorithms like dynamic programming and heuristic methods.
Pending Tasks
- Redefine the functions
saldos_sospechososandbrute_force_saldosfor further comparison in future sessions.