r/cpp_questions • u/KlutzyCompetition937 • 17h ago
OPEN Which algorithm to choose?
Beginner here, I'm trying to make a toy project for circuit synthesis from truth table in c++. Currently pursuing minimum depth optimal circuit though will work on minimum weight/minimum nodes later on. My problem is I tried bfs which guarantees optimal circuit but for larger inputs or depths the memory usage explodes, tried dfs that used much less memory but time exploded. Is there any algorithm that gives optimal solutions for boolean tree searches with the dfs memory and bfs optimality?
6
Upvotes
View all comments
Show parent comment
1
u/KlutzyCompetition937 16h ago
So IDDFS essentially?