# Does "naked set" method always solve a sudoku?

Is always possible to solve a sudoku (that has a unique solution) using only naked pair/triple/quad methods? If not, what about using naked set and hidden set methods combined togheter? I need to know it because I would like to use those methods in a c++ software and I don't wanna use "guessing" because it costs too much in terms of calculations. Is there a solving method that allows me to solve sudokus without guessing?

• what's the reason for the downvotes? Aug 27, 2020 at 18:49
• IDK but my method is to eliminate impossibility and follow through certainty, with recursion and backtracking. So when placing a number, if the resulting elimination leaves another cell with a single possibility, I digress to follow that through immediately. I do this when placing the given starting numbers, and for simple puzzles that's all that is needed, the puzzle is solved without going to the next stage: choose cells with the least options and try them all, using the same algorithm. This worked for Project Euler #96 and Puzzling.SE problems like #97391 and others, and is quick. Aug 27, 2020 at 19:09
• Yes, the sudoku has a single and unique solution Aug 27, 2020 at 19:17
• Pretty sure no. Check out Andrew Stuart's interactive solver which annotates steps (based on "human techniques"). Attached wiki gives example puzzles where many of the more complicated techniques are apparently needed. sudokuwiki.org/sudoku.htm Aug 28, 2020 at 1:09
• Just as you mention, each of the techniques you allow only uses a 'reasonable' (polynomial) amount of time. Sudoku are known to be NP-complete, so no known polynomial-time method can solve the worst cases. At a standard 3x3 size, though, modern computers should have no trouble with the backtracking if you only want a solution. Aug 28, 2020 at 18:52