Lecture 11 Presentation

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

Info iconThis 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 LEASE TAKE LECTURE 11 NOTES 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
Background image of page 1

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

View Full DocumentRight 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
Background 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; (p(zr(pos),zc(pos))>9) 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(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
Background image of page 3

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

View Full DocumentRight Arrow Icon
14:440:127 Lecture 11 Depth First Search vs. Brute Force
Background image of page 4
14:440:127 Lecture 11 Debugging
Background image of page 5

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

View Full DocumentRight 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
Background image of page 6
14:440:127 Lecture 11 Announcements Sudoku project- Grades, Why no partial credit? Problem Set 4- Tonight
Background image of page 7

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

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

This note was uploaded on 01/11/2010 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Page1 / 27

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

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online