22: The most important thing - Richard Buckland UNSW

The challenge: can we write a Sudoku solver in a single lecture?
What is a sudoku puzzle? Estimation revisited. how to solve a problem - difference between the approach of a master and a novice.
What is the most important thing?
Also: How to lie with statistics. hang gliding. easy as falling off a bike. algorithms and data structures.

Пікірлер: 39

  • @Popomcgo
    @Popomcgo10 жыл бұрын

    What a mouthy crowd. They should appreciate having such an awesome professor.

  • @spitball123
    @spitball12314 жыл бұрын

    "I won't stick it in if it's not legal!" Good idea!

  • @thought2007
    @thought20077 жыл бұрын

    12:30 - "The most important thing is working out what is the most important thing."

  • @miroslawmajewski316

    @miroslawmajewski316

    5 жыл бұрын

    tell me its not

  • @reitube2
    @reitube214 жыл бұрын

    man he's good! i have been watching Richard's video for a whole day. wish i can download it instead of on youtube...

  • @PlayCheez
    @PlayCheez11 жыл бұрын

    Jake, I had the same issue as you and was lucky enough to find a code sample (including islegal function). Google islegal buckland program The program compiles and works, though it doesn't seem to solve every puzzle, only puzzles which are very easy. I'm currently trying to figure out why. Love the videos, love the fact that I can actually now comprehend pointers and references. THANK YOU UNSW!

  • @Ramblingroundys
    @Ramblingroundys11 жыл бұрын

    My favorite number system in a language, it goes like this: 1, 2, many. Yep, that's all the numbers.

  • @Truthiness231
    @Truthiness23113 жыл бұрын

    @vladimirkovalev1990 What you're suggesting is in fact quite impossible (you're right to suspect that), but that's by far not the only way to solve a puzzle. The way I tend to solve the puzzle is using the same method a human would do it: have the program go through all blank pieces and check to see if there is enough information to solve it. Keep checking them and solving pieces that have info until you finish. If it can't be solved this way then a human can't solve it either.

  • @axelasdf
    @axelasdf13 жыл бұрын

    I'd use a deductive method to solve the puzzle. Start with nine times as many cells, with 1-9 repeating, counting each set of nine as the possible values for one cell and eliminate all impossible choices until only one remains.

  • @dylophosaurus
    @dylophosaurus12 жыл бұрын

    Amazing lecturer, Its a shame he's doing C, I'm having trouble with dynamic array of different objects in c++ (I know, I could use std::vector, but its for an assignment) this guy has such a passion and love for teaching, its awesome!

  • @shadow.banned
    @shadow.banned11 жыл бұрын

    Yeah, I really got into 21 BECAUSE of the high quality. I'm sort of immediately turned off with the low quality in this one. But I'll stick through it anyway nonetheless.

  • @constarrZ
    @constarrZ11 жыл бұрын

    Does anyone have the source for the worked out functions? I've been trying to program the isLegal() function and have been failing horribly, I got everything else worked out except that. The odd data structure we are using seems to complicate it instead of a multidimentional array. Maybe I'm just doing it wrong though, Feel free to message me to discuss or if you have the answer. Thanks! Btw, Great videos UNSW! This guy is great and fun to watch!

  • @looni3
    @looni314 жыл бұрын

    HOW DO ALGORITHM?

  • @axelasdf
    @axelasdf13 жыл бұрын

    @axelasdf I do think this idea may have some flaws.

  • @ramblinevilmushroom
    @ramblinevilmushroom14 жыл бұрын

    i noticed that some of these are in HQ while others arnt will they all eventually be HQ? i cant read alot of the things on the screen :(

  • @vladimirkovalev1990
    @vladimirkovalev199014 жыл бұрын

    can we actually solve sudoku in reasonable time using this algorithm? I have built a program myself using this algorithm and as soon as I did so it struck me that if we start with a sudoku that has got no solutions e.g. 1,1,......... we will have to try out ALL(!) of the 9^79 combinations to be sure that it really is unsolvable. Therefore, I believe on average will take ages for the offered algorithm to solve a problem. Please correct me if I am wrong.

  • @eduardczuwak8394

    @eduardczuwak8394

    5 жыл бұрын

    Ahoho! you are very wrong. 9*79 its all combination for empty sudoku with all degenerate possibility. (f.e if you have few same number "111234569"). Here you have only one solution with many defined cells.

  • @BryonLape
    @BryonLape5 жыл бұрын

    Why do his students talk so much? If I was in this class, I'd be smacking people.

  • @masterrigger98
    @masterrigger9812 жыл бұрын

    Great lecturer but the camera guy gets a fail on this!!! FOCUS!!!

  • @abhicalifornia
    @abhicalifornia6 жыл бұрын

    shhhhhhhhhh ...

  • @jpkfox
    @jpkfox10 жыл бұрын

    I do not understand why to teach pure C language as C++ is the advanced C and has all plus is more efficient. As Bjarne (creator of C++) says there is no benefit using C other than if you must do it like for example lack of C++ support. But if you start from the scratch a program there is no reason using C if you can use C++. Like here for example he must use #define s to define constants. In C++ it would be: const char MIN_VALUE = '1'; which is much better as there is compile time type checking. define s can give difficult bugs to trace. btw the latest C language does support const, which is good. But anyway in this video I think using #define is not a good idea.

  • @jpkfox

    @jpkfox

    10 жыл бұрын

    Linus, my dear Finnish fellow :). Wow he is radical there! :). Ok, I might agree that in some tasks there is no need to use C++. Like I am currently programming a Gomuko game engine, in engine I do not really use C++... i have no reason really to use it- just use C there. But when implementing the user interface I surely use C++. And like Bjarne said, it is not true necessary that C is faster. Things can be done actually faster in many cases with C++ than with C because C++ uses machine level optimization in certain situations where C does not. So in a User interface programming C++ can be more efficient and even faster. Also If you need to use arrays which needs to automatically resize themselves C++ is propably faster there because it optimizes things which C is not doing. Bjarne has spoken in which situations C++ is faster than C, there is a video about it. Also, can you give me an example where C is faster than C++? Maybe we can test that on our compilers to see if its true. My understanding is that there is not many situations where that is true.

  • @jpkfox

    @jpkfox

    10 жыл бұрын

    ***** I actually do tutoring, 5 years now. I think, like Bjarne also, that learning C has a danger of learning wrong programming habbits. I cannot prove am correct, but thats how I think currently. C++ makes more safe code imo, so I want to teach people who mostly do high level coding anyway to learn to make safe/reusable and easy to modify code. So imo its better to teach straight away C++ than C. But because C is a subset of C, it does not hurt teaching basics of C first. But when it comes how to do professional programs, the full program, then I prefer C++.

  • @jpkfox

    @jpkfox

    10 жыл бұрын

    ***** Faster? you mean the code runs faster with define? We can surely test that. I would guess its not faster... But sure, safety is more important anyway even if its faster. Can you show me a code example where define beats const, I ll double check it? No, I definitely think using define here is wrong, its not even a guestion about opinion here... I teach students its wrong! Well, you can disagree with me.... but I have my opinions:).

  • @jpkfox

    @jpkfox

    10 жыл бұрын

    ***** oh so you talking about that compiling the code is slower, then the actual run? I though you meant the program runs slower. But even if the compiling is a bit slower, I do not think its a significant issue/difference as there are not so many constants in a code.

  • @jpkfox

    @jpkfox

    10 жыл бұрын

    Ye but i was talking about the running the program itself, not the compilation process. After compiling the program you run the program. Then it does not matter if its define or const... they both are equally fast

  • @ravuthlong7783
    @ravuthlong778310 жыл бұрын

    um this was hard..

  • @mayankpant317
    @mayankpant3177 жыл бұрын

    why subtitles are not up to the mark?? kind of annoying

  • @fwily2580
    @fwily25802 жыл бұрын

    Waste of time. Blah, blah, blah. I’m sure he can program , but he wastes so much time. Then he wonders why people talk so much in his presence.