50
snick snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Snick snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

snick

snack

CPSC 121: Models of Computation2008/9 Winter Term 2

Proof Techniques

Steve Wolfman, based on notes by Patrice Belleville and others

1

Page 2: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

2

Page 3: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Learning Goals: “Pre-Class”

After the Ch 3 readings and lecture through slide “A New Proof Strategy ‘Antecedent Assumption’” of the next slide set, you should be able for each proof strategy below to: (1) identify the form of statement the strategy can prove and (2) sketch the structure of a proof that uses the strategy.

Strategies: constructive/non-constructive proofs of existence (“witness” proofs), disproof by counter-example, exhaustive proof, generalizing from the generic particular (“WLOG”), direct proof (“antecedent assumption”), proof by contradiction, and proof by cases.

Alternate names are listed for some techniques.3

Page 4: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Lecture “Prerequisites”

Reread Ch 2 and be able to solve any of the problems in that chapter.

Read Sections 3.1, Theorem 3.4.1 and pages 159-163 (“Representations of Integers”), 3.6, and 3.7.

Be able to solve (or at least outline the proof structure of) problems like: 3.1 2-16, 18-61 (20-23 are particularly relevant!), 3.4 #24-27, 29-30, and 49-53, and 3.6 #1-27 (19-20 are particularly relevant!).

Complete the open-book, untimed quiz on Vista that’s due after some lecture!

4

Page 5: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Learning Goals: In-Class

By the end of this unit, you should be able to:– Devise and attempt multiple different, appropriate

proof strategies—including all those listed in the “pre-class” learning goals plus use of logical equivalences, rules of inference, universal modus ponens/tollens, and predicate logic premises—for a given theorem.

– For theorems requiring only simple insights beyond strategic choices or for which the insight is given/hinted, additionally prove the theorem.

5

Page 6: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Quiz 7 Results

6

Page 7: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

7

Page 8: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Generalizing from the Generic Particular /Without Loss of Generality (WLOG)

Pattern to prove x D, R(x).

Pick some arbitrary x, but assume nothing about which x it is except that it’s drawn from D, and then prove R(x).

In other words, pick an x “without loss of generality”!

8

Page 9: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

WLOG Example: Wordy Hello World

Theorem: Every valid Java program is at least 30 letters long.

Problem: prove the theorem.

9

Page 10: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

WLOG Example: Wordy Hello World

Theorem: Every valid Java program is at least 30 letters long.

Proof: Without loss of generality, consider a valid Java program p.

p must contain some public class with a main method that’s public, static, and has void return type (a “feature” of a valid Java program).

The keywords required to do this (“public class public static void main”) are longer than 30 letters.

QED

10

Page 11: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Proof of Existence or “witness proofs”

Pattern to prove x D, R(x).

Prove R(x) for any particular x in D that’s convenient for you. Pick the one that makes your job easiest!

The x you use for your proof is the “witness” to the existential… it “testifies” that your existential is true.

11

Page 12: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Witness Proof Example: An Innocuous Change?

Theorem: a valid Java program remains valid when we replace some statement <stmt> in the program with { <stmt> ; }.

Problem: disprove the theorem.

Strategy: to disprove a theorem, prove its negation—there is a valid Java program that becomes invalid when we replace <stmt> in the program with { <stmt> ; }.

12The ; here is an empty statement, like: { x++; ; }

Page 13: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Which of these is the key part of the witness?

a.int foo() {

b. int x;

c. x = 10;

d. return x;}

e. None of these.

13

Page 14: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

More Practice: Always a Bigger Number

Prove that for any integer, there’s a larger integer.

Note: our proofs will frequently be purely in words now.Use predicate logic as you need it to clarify your thinking!

In pred logic, this is x Z, y Z, y > x.The order of the quantifiers is important!!

14

Page 15: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

More Practice: Always a Bigger Number

Prove that for any integer, there’s a larger integer.

Which strategy or strategies should we use?

a.Witness proof alone

b.WLOG with a witness proof inside

c.Without loss of generality, twice.

d.Witness proof, twice.

e.None of these15

Page 16: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Worked Problem: Always a Bigger Number

Prove that for any integer, there’s a larger integer.

Proof: Without loss of generality, let the first number x be an integer. Let the second number y be x + 1. Then, y = x + 1 > x. QED

The proof uses WLOG then witness.

16And… the predicate logic version makes that order obvious!

WLOG outside for x Z, witness inside for y Z.

Page 17: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

17

Page 18: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Using Predicate Logic Premises

What can you say if you know (rather than needing to prove) x D, P(x) or y E, Q(y)?

If you know x D, P(x), you can say for any d in D that P(d) is true. You can say P(d) is true for any particular d in D or for an arbitrary one.

If you know y E, Q(y), you can say that for some e in E, Q(e) is true, but you don’t know which one. So, assume nothing more about e than that it’s from E.

18

Page 19: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Using Propositional Logic Rules

Once you’ve stripped the quantifiers from the outside of predicate logic statements, every propositional logic rule of inference applies. (But as always, you must apply a prop logic rule to the whole statement.)

Use modus ponens, modus tollens, elimination, and all the rest!

19

Page 20: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

20

Page 21: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

A New Proof Strategy“Antecedent Assumption”

To prove p q:

Assume p.

Prove q.

You have then shown that q follows from p, that is, that p q, and you’re done.

Can you use this in predicate logic proofs?Of course you can, just like every other prop logic technique!

21

Page 22: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: Universality of NAND Gates

Theorem: If a circuit can be built from NOT gates and two-input AND, OR and XOR gates, then it can be built from NAND gates alone.

Problem: prove the theorem.

22

Page 23: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: Universality of NAND Gates

Opening steps:

(1) Without loss of generality, consider an arbitrary circuit.

(2) [Assume the antecedent.] Assume the circuit can be built from NOT gates and two-input AND, OR and XOR gates.

23

Page 24: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: Universality of NAND Gates

Insight: We can “rewrite” each of the gates in this circuit as a NAND gate. How?

AND OR XORNOT

Once you’ve shown this rewriting, you’ve proven the theorem.24

Page 25: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: Universality of NAND Gates

Which of these NAND gate configurations is equivalent to ~p?

e. None of these25

NANDp

NANDpT NANDp

F

NANDpq

a.

b.

c.

d.

Page 26: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: Universality of NAND Gates

Insight: Now that we can build NOT, can we rewrite the rest in terms of NAND and NOT?

AND OR XOR

Hint: Remember De Morgan’s?26

Page 27: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

27

Page 28: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Using Logical Equivalences

Every logical equivalence that we’ve learned applies to predicate logic statements.

For example, to prove ~x D, P(x), you can prove x D, ~P(x) and then convert it back with generalized De Morgan’s.

To prove x D, P(x) Q(x), you can prove x D, ~Q(x) ~P(x) and convert it back using the contrapositive rule.

28

Page 29: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Worked Problem: Even Squares

Theorem: If the square of an integer n is even, then n is even.

Problem: prove the theorem.

This is a tricky problem, unless you try some different approaches.

An approach may work with conditional statements is to try the contrapositive (which we know is logically equivalent to the original conditional).

29

Page 30: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Worked Problem: Even Squares

Theorem: If the square of an integer n is even, then n is even.

Approach:(1) Prove the contrapostive: If an integer n is odd, then its square is also odd.(2) Transform the result back into our theorem.

We can now focus on proving the contrapositive.

30

Page 31: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Worked Problem: Even Squares

Proof: Without loss of generality, let n be an integer. Assume n is odd.

We know (from Epp’s definition of “odd”) that n = 2k + 1 for some integer k.

n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1We know 2k2 + 2k is an integer (since k is an

integer and multiplication and addition are closed over the integers).

n2 is 2q+1 for some integer q; so, n2 is odd.Thus, if an integer n is odd, its square is odd.The contrapositive of this statement is also

true: if the square of an integer n is even, then n is even.

QED31

Page 32: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

32

Page 33: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

A New Proof Strategy“Proof by Contradiction”

To prove p:

Assume ~p.

Derive a contradiction.

You have then shown that there was something wrong (impossible) about assuming ~p; so, p must be true.

Can you use this in predicate logic proofs?Of course you can, just like every other prop logic technique!33

Page 34: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Example in Dialogue: Prove that Achilles is not Omnipotent

Achilles: I am omnipotent you know. Tortoise: Can you lift a mountain with your mind,

no matter how big?Achilles: Of course!Tortoise: Can you make a mountain out of nothing,

no matter how big?Achilles: Certainly!Tortoise: Can you make a mountain so big that

even you cannot lift it?Achilles: See if I invite you over for dinner again.

I stole the characters from Gödel, Escher, Bach.I stole the story from some sci-fi novel.

34

Page 35: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: 2 is Irrational

Note: a rational number can be expressed as a/b for some a Z, b Z+ with no common factor except 1.

Theorem: The 2 is an irrational number.Problem: prove the theorem.

This is a tricky problem to even start with. We know from the definition that we want to show 2 cannot be represented as a/b with the constraints given, but where does that get us?

Let’s try contradiction, instead.

35

Page 36: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Partly Worked Problem: 2 is Irrational

Theorem: The 2 is an irrational number.

Opening steps:

(1) Assume for contradiction that 2 is rational.

(2) Using our knowledge of rationals, we know 2 = a/b, where a Z, b Z+, and a and b have no common factor except 1. [But, we know nothing more about a and b!]

Next, play around with the formula 2 = a/band see where it takes you!

36

Page 37: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Promising Strategies?

We know that 2 = a/b.

Which of these feels like the most promising strategy?

a.Solve for a.

b.Solve for b.

c.Square both sides to ditch the radical.

d.Assume 2 is rational.

e.None of these is promising.37

Page 38: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Proof Scratchwork

a = b2

b = a/2

2 = a2/b2

a2 = 2b2

b2 = a2/2

b is a positive integer

a and b have no common factors

38Plus, blast from the past:

If the square of an integer is even, the integer is even.

Page 39: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Finishing the Proof

Assume for contradiction that 2 is rational.Then, 2 = a/b for a Z, b Z+, where a and b

have no common factor except 1.So, a2 = 2b2, and a2 is even.Since a2 is even, a is even (prev. proof).a = 2k for some integer k.b2 = a2/2 = (2k)2/2 = 2k2. b2 is even and so is b.Then, b and a share the factor 2. CONTRADICTION! QED (2 is irrational.)

39

Page 40: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

40

Page 41: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Strategies for Predicate Logic Proofs

Have lots of strategies on hand, and switch among them if you’re not making progress (as with prop logic!):

• Try using WLOG/witness approaches to strip the quantifiers

• Try antecedent assumption on conditionals• Try contradiction on the whole statement or as part of

other strategies• Work forward, playing around with what you can prove

from the premises• Work backward, considering what you’d need to reach

the conclusion• Play with the form of both premises and conclusions

using logical equivalencesFinally, disproving something is just proving its negation.41

Page 42: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

42

Page 43: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Problem: Generally Faster than Itself?

Let an algorithm be “generally faster” than another algorithm exactly when it’s faster for all n greater than some minimum n0.

Assume that no algorithms is faster than itself for any particular n.

Problem: Prove that no algorithm is generally faster than itself.

43

Page 44: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Problem: Mutually, Generally Faster?

Let an algorithm be “generally faster” than another algorithm exactly when it’s faster for all n greater than some minimum n0.

Assume that no two algorithms are faster than each other for any particular n.

Problem: Prove that if one algorithm is generally faster than a second, the second is not generally faster than the first.

44

Page 45: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Problem: Generally, Transitively Faster?

Continue with our previous assumptions about faster/generally faster.

Assume that our faster predicate is transitive (Faster(a1, a2, n) and Faster(a2, a3, n) implies Faster(a1, a3, n)).

Problem: Prove that if one algorithm is generally faster than a second, and if the second algorithm is generally faster than a third, then the first algorithm is also generally faster than the third.

45

Page 46: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Problem: Aliens Attack

Aliens hold the Earth hostage and demand that we help them get started proving:

x D, y E, z F, P(x) Q(y) R(x,z).

Problem: Propose four different, promising solution strategies that are each as complete as possible (given the available information) and could be used to address this theorem.

46This is why a Computer Scientist is always kept on hand at Area 51.That and the “use a computer virus to take out their shields” thing.

Page 47: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Outline

• Prereqs, Learning Goals, and Quiz Notes• Proof Strategies

– Generalizing from the Generic Particular (WLOG) &Proofs of Existence (Witness Proofs)

– Using Predicate Logic Premises & Propositional Logic Rules

– Antecedent Assumption (generalization of “direct proof”)

– Using Logical Equivalences– Proof by contradiction

• Strategies Summary• Problems and Discussion• Next Lecture Notes

47

Page 48: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Learning Goals: In-Class

By the start of class, you should be able to:– Devise and attempt multiple different,

appropriate proof strategies—including all those listed in the “pre-class” learning goals plus use of logical equivalences, rules of inference, universal modus ponens/tollens, and predicate premises—for a given theorem.

– For theorems requiring only simple insights beyond strategic choices or for which the insight is given/hinted, additionally prove the theorem.

48

Page 49: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Next Learning Goals: Pre-Class

We are mostly departing from the readings for next class to talk about a new kind of circuit on our way to a full computer: sequential circuits.

The pre-class goals are to be able to:– Trace the operation of a deterministic finite-state

automaton (represented as a diagram) on an input, including indicating whether the DFA accepts or rejects the input.

– Deduce the language accepted by a simple DFA after working through multiple example inputs.

Page 50: Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1

Next Lecture Prerequisites

Read Section 12.2 pages 745-747 and “Designing a Finite Automaton” on 752-754 (skipping part b of the examples). We’ll reread and revisit this later; focus on getting a strong intuitive sense of how DFAs work.

Solve problems like Exercise Set 12.2 #1, #12a-c, #13a-c, and #14-19a.

Complete the open-book, untimed quiz on Vista that was due before class.