Duke CPS 102 - Introduction to Discrete Mathematics

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Exemplification: Try out a problem or solution on small examples. Look for the patterns.Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Get The Problem Right!Slide 37Intuitive, But FalseVocabularize Self-ProofingKeep track of what you actually know – remember what you merely suspectSlide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Words To The WiseSlide 57The future belongs to the computer scientist who hasSlide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69Slide 70Slide 71Slide 72Slide 73Slide 74Slide 75Slide 76Slide 77Slide 78Slide 79COMPSCI 102Introduction to Discrete MathematicsBits of Wisdom on Solving Problems, Writing Proofs, and Enjoying the Pain: How to Succeed in This Class Lecture 3 (September 5, 2007)What did our brains evolve to do?What were our brains “intelligently designed” to do?What kind of meat did the Flying Spaghetti Monster put in our heads?Our brains did NOT evolve to do math!Over the last 30,000 years, our brains have stayed essentially the same!Our brains can perform only simple, concrete tasksAnd that’s how math should be approached!Draw simple picturesTry out small examples of the problem: What happens for n=1? n=2?Substitute concrete values for the variables: x=0, x=100, …ExpertNoviceThe better the problem solver, the less brain activity is evident. The real masters show almost no brain activity!Simple and to the pointTerry Tao (Fields Medalist, considered to be the best problem solver in the World)“I don’t have any magical ability…I look at the problem, and it looks like one I’ve already done. When nothing’s working out, then I think of a small trick that makes it a little better. I play with the problem, and after a while, I figure out what’s going on.”Use a lot of paper, or a board!!!Quick Test...Count the green squares…you will have three seconds…How many were there?Hats with Consecutive NumbersXYAlice BobAlice starts: …| X - Y | = 1Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI don’t know what my number is(round 1)Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI don’t know what my number is(round 2)Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI don’t know what my number is(round 3)Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI don’t know what my number is(round 4)…Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI know what my number is!!!!!!!!(round 251)Hats with Consecutive NumbersAlice BobAlice starts: …| X - Y | = 1 and X, Y > 0XYI know what my number is!!!!!!!!(round 252)Question: What are Alice and Bob’s numbers?Exemplification:Try out a problem or solution on small examples. Look for the patterns.Imagine Alice Knew Right AwayAlice BobXYI know what my number is!!!!!!!!Then X = 2 and Y = 1| X - Y | = 1 and X, Y > 0(round 1)If Alice knows in round 1, then X = 2 and Y = 1If Alice does not know in round 1, but Bob knows in round 2, then X = 1 and Y = 2If Bob does not know in round 2, but Alice knows in round 3, then X = 3 and Y = 2If Alice does not know in round 3, but Bob knows in round 4, then X = 2 and Y = 3If Bob does not know in round 250, but Alice knows in round 251, then X = 127 and Y = 126:Magnetsn magnets are clumpedWhen the clump is split up into n1 and n2 pieces, the energy spent is n1n2What’s the least amount of energy necessary to split the clump into single magnets?Exemplification:Try out a problem or solution on small examples. Look for the patterns.Two MagnetsTwo magnets are clumpedWhen the clump is split up into 1 and 1 pieces, the energy spent is 1What’s the least amount of energy necessary to split the clump into single magnets?Energy = 1Three MagnetsThree magnets are clumpedWhen the clump is split up into 2 and 1 pieces, the energy spent is 2What’s the least amount of energy necessary to split the clump into single magnets?Energy = 3Four MagnetsEnergy = 6411321Every time you split a magnet from m other magnets, you must spend m units of energyEvery magnet must be separated from n-1 other magnetsEnergy = n(n-1)/2A volunteer, pleaseRelaxI am just going to ask you a Microsoft interview questionFour guys want to cross a bridge that can only hold two people at one time. It is pitch dark and they only have one flashlight, so people must cross either alone or in pairs (bringing the flashlight). Their walking speeds allow them to cross in 1, 2, 5, and 10 minutes, respectively. Is it possible for them to all cross in 17 minutes?Get The Problem Right!Given any context you should double check that you read/heard it correctly!You should be able to repeat the problem back to the source and have them agree that you understand the issueFour guys want to cross a bridge that can only hold two people at one time. It is pitch dark and they only have one flashlight, so people must cross either alone or in pairs (bringing the flashlight). Their walking speeds allow them to cross in 1, 2, 5, and 10 minutes, respectively. Is it possible for them to all cross in 17 minutes?Intuitive, But False“10 + 1 + 5 + 1+ 2 = 19, so the four guys just can’t cross in 17 minutes”“Even if the fastest guy is the one to shuttle the others back and forth – you use at least 10 + 1 + 5 + 1 + 2 > 17 minutes”Vocabularize Self-ProofingAs you talk to yourself, make sure to tag assertions with phrases that denote degrees of convictionKeep track of what you actually know – remember what you merely suspect“10 + 1 + 5 + 1 + 2 = 19, so it would be weird if the four guys could cross in 17 minutes”“even if we use the fastest guy to shuttle the others, they take too long.”If it is possible, there must be more than one guy doing the return trips: it must be that someone gets deposited on one side and comes back for the return trip later!Suppose we leave 1 for a return trip later We start with 1 and X and then X returns Total time:Thus, we start with 1,2 go over and 2 comes back….2X1 2 5 101 2 5 101 2 5 10 5 10 2 11 2 5 10 5 10 2 11 2 5 10 5 102 5 102 111 2 5 10 5 102 5 102 111 2 5 10 5 102 5 1022 111 5 101 2 5


View Full Document

Duke CPS 102 - Introduction to Discrete Mathematics

Documents in this Course
Load more
Download Introduction to Discrete Mathematics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to Discrete Mathematics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to Discrete Mathematics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?