Lecture 11 Presentation

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

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

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

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

View Full Document
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
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

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

View Full Document
14:440:127 Lecture 11 Depth First Search vs. Brute Force
14:440:127 Lecture 11 Debugging

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

View Full Document
14:440:127 Lecture 11 One more thing with GUIs [f path] = uigetfile; %% now, [path f] is the full location of the file
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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern