Click here to Skip to main content
15,896,606 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Sounding off on the responses Pin
kalberts19-Mar-18 4:15
kalberts19-Mar-18 4:15 
GeneralRe: Sounding off on the responses Pin
PIEBALDconsult19-Mar-18 10:32
mvePIEBALDconsult19-Mar-18 10:32 
GeneralRe: Sounding off on the responses Pin
PIEBALDconsult20-Mar-18 10:49
mvePIEBALDconsult20-Mar-18 10:49 
GeneralRe: Sounding off on the responses Pin
W Balboos, GHB21-Mar-18 1:17
W Balboos, GHB21-Mar-18 1:17 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Fueled By Decaff19-Mar-18 3:23
Fueled By Decaff19-Mar-18 3:23 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 3:33
kalberts19-Mar-18 3:33 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 5:02
mvePIEBALDconsult19-Mar-18 5:02 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 5:57
kalberts19-Mar-18 5:57 
"When in doubt, use brute force" (attributed to Ken Thompson).

In the basic Algorithms course at the University (a long time ago Smile | :) ) we of course learned sorting algorithms - and learned that when sort a subsequence of say five or six numbers, managing a quicksort costs more administration than what you save. So, below 8 elements in a subsequence, you switch to a near-zero administration bubble sort. At least half of the students (myself as one) refused to take the professor's claim at face value, doing timing with quicksort (or other nlogn method) down to sorting even two elements. Surprise, surprise: The professor was right: With less than roughly 10 elements, no.brain bubble sort IS more efficient than the intellectually superior nlogn methods, if your goal is to get the job done.

I use similar reasoning in my backtracking Sudoku: In a few places I make "unneccesary" cheks, but managing the required data structures to suppress the checks would cost more resources than simply doing them. You shouldn't spend too much time on supressing a few checks taking 30 nanoseconds to execute! My solver handles all the games I have tried in less than five milliseconds. I was hoping for someone to dig up games that is not handled well by backtracking methods - but that seems to be more difficult than solving a Sudoku game Smile | :)

Do you still believe that "a backtracking approach is not appropriate to the challenge"? Is that because its simplicity is intellectualy inferior, or do you believe that it is less efficient (i.e. slower) than other methods?

I would be very curious to see an algorithmic encoding of these "logic" or "analythic" solution methods, strongly suspecting that the analysis required to analythically determine that "It is no use trying the value 3 in that square" would take far more resources than simply putting a 3 in there and see if all conditions are satisfied - even though some people condsider that intellectually inferior.

The difficulty is to have those guys using "logic" or "analythic" solutions come out of magician mode and explain how they know that a 4 rather than a 3 would be suitable in a given square. If they manage to explain it, it will turn out just as algorithmic as backtracking.
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 8:59
mvePIEBALDconsult19-Mar-18 8:59 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 5:21
Dezhi Zhao19-Mar-18 5:21 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 6:16
kalberts19-Mar-18 6:16 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 7:15
Dezhi Zhao19-Mar-18 7:15 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 8:33
kalberts19-Mar-18 8:33 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 9:21
Dezhi Zhao19-Mar-18 9:21 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 7:30
Dezhi Zhao19-Mar-18 7:30 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 9:18
kalberts19-Mar-18 9:18 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 9:35
Dezhi Zhao19-Mar-18 9:35 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 16:37
mvePIEBALDconsult19-Mar-18 16:37 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao20-Mar-18 3:06
Dezhi Zhao20-Mar-18 3:06 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 10:34
mvePIEBALDconsult19-Mar-18 10:34 
QuestionKid Sister Safe These Days... Pin
megaadam18-Mar-18 23:17
professionalmegaadam18-Mar-18 23:17 
AnswerRe: Kid Sister Safe These Days... Pin
OriginalGriff18-Mar-18 23:27
mveOriginalGriff18-Mar-18 23:27 
GeneralRe: Kid Sister Safe These Days... Pin
W Balboos, GHB19-Mar-18 3:54
W Balboos, GHB19-Mar-18 3:54 
GeneralWSO CCC OTD 2018-03-19 Pin
OriginalGriff18-Mar-18 23:02
mveOriginalGriff18-Mar-18 23:02 
GeneralRe: WSO CCC OTD 2018-03-19 Pin
A_Griffin18-Mar-18 23:10
A_Griffin18-Mar-18 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.