Lecture 11 Presentation

Lecture 11 Presentation - 14:440:127 Introduction to...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
14:440:127 Introduction to Computers for Engineers Lecture 11 PLEASE TAKE LECTURE 11 NOTES AS YOU ENTER THE ROOM Lecturer: Blase E. Ur Recitation Instructor: Bo Jin Recitation Instructor: Cyrus Gerami Recitation Instructor: Vishnu Vijayakumar Recitation Instructor: Wen Yueh
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
14:440:127 Lecture 11 Sudoku Keep track of: where zeros are. Current position. Add 1 to the current spot If that puts us past 9, reset to 0 and move backwards If that works, move forward
Image of page 2
14:440:127 Lecture 11 Sudoku function p = sudokuiterativeshort(p) [zr zc] = find(p==0); pos = 1; while(pos<=length(zr)) p(zr(pos),zc(pos)) = p(zr(pos),zc(pos))+1; if(p(zr(pos),zc(pos))>9) p(zr(pos),zc(pos)) = 0; pos = pos - 1; elseif( sum(p(zr(pos),:)==p(zr(pos),zc(pos)))==1 & sum(p(:,zc(pos))==p(zr(pos),zc(pos)))==1 & sum(sum(p((3*(ceil(zr(pos)/3))-2):(3*(ceil(zr(pos)/3))), (3*(ceil(zc(pos)/3))-2):(3*(ceil(zc(pos)/3))))==p(zr(pos),zc(pos))))==1) pos = pos + 1; end end
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
14:440:127 Lecture 11 Depth First Search vs. Brute Force
Image of page 4
14:440:127 Lecture 11 Debugging
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
14:440:127 Lecture 11 One more thing with GUIs [f path] = uigetfile; %% now, [path f] is the full location of the file
Image of page 6
14:440:127 Lecture 11 Announcements Sudoku project- Grades, Why no partial credit? Problem Set 4- Tonight Project 3- will be posted soon Due Monday, November 30
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern