Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.

Slides:



Advertisements
Similar presentations
Using Matrices in Real Life
Advertisements

Advanced Piloting Cruise Plot.
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 11: Structure and Union Types Problem Solving & Program Design.
Chapter 3: Top-Down Design with Functions Problem Solving & Program Design in C Sixth Edition By Jeri R. Hanly & Elliot B. Koffman.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 10 second questions
Reductions Complexity ©D.Moshkovitz.
Chapter 11: Models of Computation
ABC Technology Project
3 Logic The Study of What’s True or False or Somewhere in Between.
VOORBLAD.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
Addition 1’s to 20.
25 seconds left…...
Slippery Slope
Januar MDMDFSSMDMDFSSS
Week 1.
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
1 Unit 1 Kinematics Chapter 1 Day
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
How Cells Obtain Energy from Food
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
CpSc 3220 Designing a Database
1 Complexity ©D.Moshkovitz Cryptography Where Complexity Finally Comes In Handy…
Chapter 11 Theory of Computation. © 2005 Pearson Addison-Wesley. All rights reserved 11-2 Chapter 11: Theory of Computation 11.1 Functions and Their Computation.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Chapter.
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Chapter 12: Theory of Computation
Chapter 12: Theory of Computation
Chapter 11 Theory of Computation © 2007 Pearson Addison-Wesley.
Ch. 11 Theory of Computation
Chapter 12: Theory of Computation
Presentation transcript:

Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear

Copyright © 2012 Pearson Education, Inc. 0-2 Chapter 12: Theory of Computation 12.1 Functions and Their Computation 12.2 Turing Machines 12.3 Universal Programming Languages 12.4 A Noncomputable Function 12.5 Complexity of Problems 12.6 Public-Key Cryptography

Copyright © 2012 Pearson Education, Inc. 0-3 Functions Function: A correspondence between a collection of possible input values and a collection of possible output values so that each possible input is assigned a single output

Copyright © 2012 Pearson Education, Inc. 0-4 Functions (continued) Computing a function: Determining the output value associated with a given set of input values Noncomputable function: A function that cannot be computed by any algorithm

Copyright © 2012 Pearson Education, Inc. 0-5 Figure 12.1 An attempt to display the function that converts measurements in yards into meters

Copyright © 2012 Pearson Education, Inc. 0-6 Figure 12.2 The components of a Turing machine

Copyright © 2012 Pearson Education, Inc. 0-7 Turing Machine Operation Inputs at each step –State –Value at current tape position Actions at each step –Write a value at current tape position –Move read/write head –Change state

Copyright © 2012 Pearson Education, Inc. 0-8 Figure 12.3 A Turing machine for incrementing a value

Copyright © 2012 Pearson Education, Inc. 0-9 Church-Turing Thesis The functions that are computable by a Turing machine are exactly the functions that can be computed by any algorithmic means.

Copyright © 2012 Pearson Education, Inc Universal Programming Language A language with which a solution to any computable function can be expressed –Examples: “Bare Bones” and most popular programming languages

Copyright © 2012 Pearson Education, Inc The Bare Bones Language Bare Bones is a simple, yet universal language. Statements –clear name; –incr name; –decr name; –while name not 0 do; … end ;

Copyright © 2012 Pearson Education, Inc Figure 12.4 A Bare Bones program for computing X x Y

Copyright © 2012 Pearson Education, Inc Figure 12.5 A Bare Bones implementation of the instruction “copy Today to Tomorrow”

Copyright © 2012 Pearson Education, Inc The Halting Problem Given the encoded version of any program, return 1 if the program is self-terminating, or 0 if the program is not.

Copyright © 2012 Pearson Education, Inc Figure 12.6 Testing a program for self-termination

Copyright © 2012 Pearson Education, Inc Figure 12.7 Proving the unsolvability of the halting program

Copyright © 2012 Pearson Education, Inc Complexity of Problems Time Complexity: The number of instruction executions required –Unless otherwise noted, “complexity” means “time complexity.” A problem is in class O(f(n)) if it can be solved by an algorithm in  (f(n)). A problem is in class  (f(n)) if the best algorithm to solve it is in class  (f(n)).

Copyright © 2012 Pearson Education, Inc Figure 12.8 A procedure MergeLists for merging two lists

Copyright © 2012 Pearson Education, Inc Figure 12.9 The merge sort algorithm implemented as a procedure MergeSort

Copyright © 2012 Pearson Education, Inc Figure The hierarchy of problems generated by the merge sort algorithm

Copyright © 2012 Pearson Education, Inc Figure Graphs of the mathematical expressions n, lg n, n lg n, and n 2

Copyright © 2012 Pearson Education, Inc P versus NP Class P: All problems in any class  (f(n)), where f(n) is a polynomial Class NP: All problems that can be solved by a nondeterministic algorithm in polynomial time Nondeterministic algorithm = an “algorithm” whose steps may not be uniquely and completely determined by the process state Whether the class NP is bigger than class P is currently unknown.

Copyright © 2012 Pearson Education, Inc Figure A graphic summation of the problem classification

Copyright © 2012 Pearson Education, Inc Public-Key Cryptography Key: A value used to encrypt or decrypt a message –Public key: Used to encrypt messages –Private key: Used to decrypt messages RSA: A popular public key cryptographic algorithm –Relies on the (presumed) intractability of the problem of factoring large numbers

Copyright © 2012 Pearson Education, Inc Encrypting the Message Encrypting keys: n = 91 and e = two = 23 ten 23 e = 23 5 = 6,436,343 6,436,343 ÷ 91 has a remainder of 4 4 ten = 100 two Therefore, encrypted version of is 100.

Copyright © 2012 Pearson Education, Inc Decrypting the Message 100 Decrypting keys: d = 29, n = two = 4 ten 4 d = 4 29 = 288,230,376,151,711, ,230,376,151,711,744 ÷ 91 has a remainder of ten = two Therefore, decrypted version of 100 is

Copyright © 2012 Pearson Education, Inc Figure Public key cryptography

Copyright © 2012 Pearson Education, Inc Figure Establishing an RSA public key encryption system