SlideShare uma empresa Scribd logo
1 de 25
Class 14:
                           Modeling
                           Computers
            Monday’s
            class will
            meet in Rice
            Hall Bagel
            Shop Area


cs1120 Fall 2011
David Evans
23 September 2011
Plan
Modeling Computers
Turing’s Model
Programming Turing Machines




                              2
What makes a
good model?



                        Copernicus


                     F = GM1M2 / R2
           Ptolomy       Newton

                                      3
How should we model a Computer?
                                                               Turing invented the
                  Colossus (1944)
                                                               model we’ll use today
                                                               in 1936. What
                                                               “computer” was he
                                                               modeling?

                                                           Cray-1 (1976)




Apollo Guidance
Computer (1969)




                                                                           Palm Pre (2009)
                                                      Apple II (1977)        Flickr: louisvolant




                  Honeywell Kitchen Computer (1969)                                                4
“Computers” before WWII




                          5
Mechanical Computing




                       6
Modeling Computers
Input
  Without it, we can’t describe a problem
Output
  Without it, we can’t get an answer
Processing
  Need some way of getting from the input to the
   output
  Memory: Need to keep track of what we are doing


                                                    7
Modeling Input



                                                     Punch Cards




Altair BASIC Paper Tape, 1976




                           Engelbart’s mouse and keypad
                                                                   8
Turing’s Model
  “Computing is normally done by
  writing certain symbols on
  paper. We may suppose this
  paper is divided into squares like
  a child’s arithmetic book.”

  Alan Turing, On computable
  numbers, with an application to the
  Entscheidungsproblem, 1936

                                        9
Modeling Pencil and Paper


                         ...                                   ...
                               #   C   S   S   A   7   2   3




                      How long should the tape be?

Infinitely long! We are modeling a computer, not
building one. Our model should not have silly practical
limitations (like a real computer does).
                                                                     10
Modeling Output
Blinking lights are
  cool, but hard to
  model
Use the tape: output
  is what is written
  on the tape at the
  end
                       Connection Machine CM-5, 1993



                                                       11
Modeling Processing (Brains)

                   Look at the
                   current state of
                   the computation

                   Follow simple
                   rules about what
                   to do next


                                      12
Modeling Processing
Evaluation Rules
  Given an input on our tape, how do we evaluate to
    produce the output
What do we need:
  Read what is on the tape at the current square
  Move the tape one square in either direction
  Write into the current square
        0   0   1   1   0   0   1   0   0   0

                Is that enough to model a computer?
                                                      13
Modeling Processing
Read, write and move is not enough
We also need to keep track of what we are
  doing:
  How do we know whether to read, write or move at
   each step?
  How do we know when we’re done?
What do we need for this?


                                                     14
Finite State Machines

         0       1
                            0

Start        1          2

                  1
         #

                 HALT

                                15
Hmmm…maybe we don’t need those
    infinite tapes after all?
            not a   (            not a
            paren                paren

Start          1           2
        )
                     )
              #            What if the
                           next input symbol
ERROR               HALT   is ( in state 2?


                                               16
How many states do we need?
            not a   (              not a
            paren                  paren
                                            not a
Start          1           2                paren
                               (
        )
                     )
                           )
                                        3       not a
                                                paren
              #
                                            (
ERROR               HALT                        4
                                    )
                                                    (
                                                    17
Finite State Machine
There are lots of things we can’t compute
  with only a finite number of states
Solutions:
  “Infinite” State Machine
    Hard to define, draw, and reason about
  Add an infinite tape to the Finite State
   Machine

                                             18
Modeling Processing (Brains)
            Follow simple rules
        Remember what you are doing


              “For the present I shall only
              say that the justification lies
              in the fact that the human
              memory is necessarily
              limited.”         Alan Turing

                                            19
FSM + Infinite Tape
Start:
   FSM in Start State
   Input on Infinite Tape
   Pointer to start of input
Step:
   Read one input symbol from tape
   Write symbol on tape, and move L or R one square
   Follow transition rule from current state
Finish:
   Transition to halt state


                                                      20
Turing’s Model: Turing Machine
...   #   1   0      1    1   0     1   1    1    0    1    1    0    1       1    1    #    ...
                  Infinite Tape: Finite set of symbols, one in each square
                                 Can read/write one square each step


      Start               Input: #                                           Controller:
                                                      Input: 1               Limited (finite)
                          Write: #
                                                      Write: 0               number of states
                          Move:
                                                      Move:
                 1
                                                                             Follow rules based
                                            2         Input: 0
                                                                             on current state
                                                                             and read symbol
                                                      Write: #
      Input: 1           Input: 0                     Move: Halt             Write one square
      Write: 1           Write: 0                                            each step, move
      Move:              Move:
                                                             3
                                                                             left or right or
                                                                             halt, change state

                                                                                                  21
Take on faith for now: we will argue this more convincingly near the end of the course!


       Church-Turing Thesis
All mechanical computers are
  equally powerful (except for
  practical limits like memory
  size, time, display, energy, etc.)                            Alonzo Church, 1903-1995
Some Turing machine can simulate
  any mechanical computer
Any computer that can simulate a
  Turing machine, can simulate
  any mechanical computer
                                                                 Alan Turing, 1912-1954    22
Turing Machine Summary
Model Input, Output, and Scratch Memory
 Infinite tape, divided into discrete squares
 Each square can contain a single symbol from
     a finite alphabet
Model Processing
 Finite State Machine
     Keep track of a finite state (in your head)
     Follow transition rules:
       next state = f(current state, input symbol)

                                                     23
Monday’s class will
Example   meet in Rice Hall
          Bagel Shop Area




                                24
Charge
PS4 Posted Today, due Monday 3 October
Exam 1: out October 7, due October 12
  Covers:
     Problem Sets 1-4 including PS Comments
     Course Book Chapters 1-6
     Classes 1-18

Monday’s class in Rice Hall

                                              25

Mais conteúdo relacionado

Semelhante a Class 14: Modeling Computers

(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivityNico Ludwig
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Shu Shin
 
Use-Case is Everything
Use-Case is EverythingUse-Case is Everything
Use-Case is EverythingChinmay V S
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlangMirko Bonadei
 
arduino
arduinoarduino
arduinomurbz
 
C Best and Worst Practices in Embedded
C Best and Worst Practices in EmbeddedC Best and Worst Practices in Embedded
C Best and Worst Practices in EmbeddedGlobalLogic Ukraine
 
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "S
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "SHow I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "S
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "SBrandon Liu
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivityNico Ludwig
 
modeling computing
modeling computingmodeling computing
modeling computingRajendran
 
Turing Goes to Church
Turing Goes to ChurchTuring Goes to Church
Turing Goes to ChurchSteve Poling
 
GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationMithi Sevilla
 
Computers_Then_Now_Tomorrow
Computers_Then_Now_TomorrowComputers_Then_Now_Tomorrow
Computers_Then_Now_TomorrowEyob Alemu
 
28c3 in 15
28c3 in 1528c3 in 15
28c3 in 15antitree
 

Semelhante a Class 14: Modeling Computers (20)

(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivity
 
Killer Bugs From Outer Space
Killer Bugs From Outer SpaceKiller Bugs From Outer Space
Killer Bugs From Outer Space
 
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...Uccn1003  -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
 
Use-Case is Everything
Use-Case is EverythingUse-Case is Everything
Use-Case is Everything
 
CS.15.Turing.pdf
CS.15.Turing.pdfCS.15.Turing.pdf
CS.15.Turing.pdf
 
Win#23 it
Win#23 itWin#23 it
Win#23 it
 
Software development
Software developmentSoftware development
Software development
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
 
arduino
arduinoarduino
arduino
 
C Best and Worst Practices in Embedded
C Best and Worst Practices in EmbeddedC Best and Worst Practices in Embedded
C Best and Worst Practices in Embedded
 
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "S
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "SHow I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "S
How I Sped up Complex Matrix-Vector Multiplication: Finding Intel MKL's "S
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivity
 
modeling computing
modeling computingmodeling computing
modeling computing
 
Chapter#4
Chapter#4Chapter#4
Chapter#4
 
Turing Goes to Church
Turing Goes to ChurchTuring Goes to Church
Turing Goes to Church
 
GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair Presentation
 
Computers_Then_Now_Tomorrow
Computers_Then_Now_TomorrowComputers_Then_Now_Tomorrow
Computers_Then_Now_Tomorrow
 
The walking 0xDEAD
The walking 0xDEADThe walking 0xDEAD
The walking 0xDEAD
 
Ll printer guide
Ll   printer guideLl   printer guide
Ll printer guide
 
28c3 in 15
28c3 in 1528c3 in 15
28c3 in 15
 

Mais de David Evans

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!David Evans
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksDavid Evans
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeDavid Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in BitcoinDavid Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm ConfirmationsDavid Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting TransactionsDavid Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in ParadiseDavid Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining EconomicsDavid Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More ParanoidDavid Evans
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key SignaturesDavid Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to CryptographyDavid Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?David Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the MassesDavid Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of ReserveDavid Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinDavid Evans
 

Mais de David Evans (20)

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 

Class 14: Modeling Computers

  • 1. Class 14: Modeling Computers Monday’s class will meet in Rice Hall Bagel Shop Area cs1120 Fall 2011 David Evans 23 September 2011
  • 3. What makes a good model? Copernicus F = GM1M2 / R2 Ptolomy Newton 3
  • 4. How should we model a Computer? Turing invented the Colossus (1944) model we’ll use today in 1936. What “computer” was he modeling? Cray-1 (1976) Apollo Guidance Computer (1969) Palm Pre (2009) Apple II (1977) Flickr: louisvolant Honeywell Kitchen Computer (1969) 4
  • 7. Modeling Computers Input Without it, we can’t describe a problem Output Without it, we can’t get an answer Processing Need some way of getting from the input to the output Memory: Need to keep track of what we are doing 7
  • 8. Modeling Input Punch Cards Altair BASIC Paper Tape, 1976 Engelbart’s mouse and keypad 8
  • 9. Turing’s Model “Computing is normally done by writing certain symbols on paper. We may suppose this paper is divided into squares like a child’s arithmetic book.” Alan Turing, On computable numbers, with an application to the Entscheidungsproblem, 1936 9
  • 10. Modeling Pencil and Paper ... ... # C S S A 7 2 3 How long should the tape be? Infinitely long! We are modeling a computer, not building one. Our model should not have silly practical limitations (like a real computer does). 10
  • 11. Modeling Output Blinking lights are cool, but hard to model Use the tape: output is what is written on the tape at the end Connection Machine CM-5, 1993 11
  • 12. Modeling Processing (Brains) Look at the current state of the computation Follow simple rules about what to do next 12
  • 13. Modeling Processing Evaluation Rules Given an input on our tape, how do we evaluate to produce the output What do we need: Read what is on the tape at the current square Move the tape one square in either direction Write into the current square 0 0 1 1 0 0 1 0 0 0 Is that enough to model a computer? 13
  • 14. Modeling Processing Read, write and move is not enough We also need to keep track of what we are doing: How do we know whether to read, write or move at each step? How do we know when we’re done? What do we need for this? 14
  • 15. Finite State Machines 0 1 0 Start 1 2 1 # HALT 15
  • 16. Hmmm…maybe we don’t need those infinite tapes after all? not a ( not a paren paren Start 1 2 ) ) # What if the next input symbol ERROR HALT is ( in state 2? 16
  • 17. How many states do we need? not a ( not a paren paren not a Start 1 2 paren ( ) ) ) 3 not a paren # ( ERROR HALT 4 ) ( 17
  • 18. Finite State Machine There are lots of things we can’t compute with only a finite number of states Solutions: “Infinite” State Machine Hard to define, draw, and reason about Add an infinite tape to the Finite State Machine 18
  • 19. Modeling Processing (Brains) Follow simple rules Remember what you are doing “For the present I shall only say that the justification lies in the fact that the human memory is necessarily limited.” Alan Turing 19
  • 20. FSM + Infinite Tape Start: FSM in Start State Input on Infinite Tape Pointer to start of input Step: Read one input symbol from tape Write symbol on tape, and move L or R one square Follow transition rule from current state Finish: Transition to halt state 20
  • 21. Turing’s Model: Turing Machine ... # 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 # ... Infinite Tape: Finite set of symbols, one in each square Can read/write one square each step Start Input: # Controller: Input: 1 Limited (finite) Write: # Write: 0 number of states Move: Move: 1 Follow rules based 2 Input: 0 on current state and read symbol Write: # Input: 1 Input: 0 Move: Halt Write one square Write: 1 Write: 0 each step, move Move: Move: 3 left or right or halt, change state 21
  • 22. Take on faith for now: we will argue this more convincingly near the end of the course! Church-Turing Thesis All mechanical computers are equally powerful (except for practical limits like memory size, time, display, energy, etc.) Alonzo Church, 1903-1995 Some Turing machine can simulate any mechanical computer Any computer that can simulate a Turing machine, can simulate any mechanical computer Alan Turing, 1912-1954 22
  • 23. Turing Machine Summary Model Input, Output, and Scratch Memory Infinite tape, divided into discrete squares Each square can contain a single symbol from a finite alphabet Model Processing Finite State Machine Keep track of a finite state (in your head) Follow transition rules: next state = f(current state, input symbol) 23
  • 24. Monday’s class will Example meet in Rice Hall Bagel Shop Area 24
  • 25. Charge PS4 Posted Today, due Monday 3 October Exam 1: out October 7, due October 12 Covers: Problem Sets 1-4 including PS Comments Course Book Chapters 1-6 Classes 1-18 Monday’s class in Rice Hall 25