This question boils down to: If a polynomial time solution exists for a decision problem, is there also a polynomial time solution for the same problems optimization flavor?
Let's take the Traveling Salesman Problem for example:
TSP Decision Problem (NP-Complete):
Input: Graph G, Budget b
Output: Does a route exist in G with a distance of at most b? (true/false)
TSP Optimization Problem (NP-Hard):
Input: Graph G
Output: What route in G has the shortest distance?
If one could find a polynomial time solution for the TSP Decision Problem wouldn't they also have a polynomial time solution for the TSP Optimization Problem?
Why? Binary search.
You can run your polynomial time solution for the TSP Decision Problem on G over and over with an input for b that increases, e.g. {1, 2, 4, 8, 16, 32, 64, 128, 256, ...}, until the algorithm returns false. Then you decrease b and slowly hone in on the correct answer.
Is this logic correct?