Grad Students Only - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Grad Students Only

Description:

BB(n) Function. Equivalence of Classes of Automata ... 11/5/09. CSc-140, Week 8. 5. BB(n) is not-computable. BB(12) 6*409640964096...40964 166 times! ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 20
Provided by: daveh5
Category:
Tags: bb | grad | students

less

Transcript and Presenter's Notes

Title: Grad Students Only


1
Grad Students Only
  • Please see me after class about project
  • Integration Paper
  • 5 topics to me by next week, paper due before
    final
  • Sample Topics (see web site for more samples)
  • Programming Languages
  • Construction of Hardware Automata
  • Protocol Design
  • A.I.
  • Microprocessors
  • 2 pages ½ page (12 pt. font, double-spaced)
  • MS Word (submit via email)

2
8b "Busy Beaver" Problem Variations on Basic
Turing Machine 10.1,10.2,10.3
  • BB(n) Function
  • Equivalence of Classes of Automata
  • Simulation of One Type of T.M. by Another
  • Multiple Tracks on Tape
  • Multi-Tape T.M.
  • 2-Dimensional "Tape"
  • Non-Deterministic T.M.

3
BB on Simulator
  • Run BB(2), BB(3), BB(4), BB(5)
  • http//cs.union.edu/csc140

4
BB(n) Function
  • BB(1) 1
  • BB(2) 4
  • BB(3) 6
  • BB(4) 13
  • BB(5) ? 4,098
  • BB(6) ? 95,524,079

Note There are 63,403,380,965,376 possible
5-state BB machines and 232,218,265,089,212,000
possible 6-state BB machines. We must run each
one for millions or billions or zillions of steps
to see how many 1s are on the tape if and when
it halts
5
BB(n) is not-computable
  • BB(12) ? 640964096409640964 166 times!
  • Proof is beyond the scope of this course

6
Equivalence of Classes of Automata
  • Added features do not change power of class of
    machines if they can be simulated on
    single-track, single-head machine

7
Simulation of One Type of T.M. by Another
  • If simulated machine halts, so does the
    simulation
  • If simulated machine never halts, neither does
    the simulation

8
Multiple Tracks on Tape
  • Simulate multiple tracks on a one-track T.M.
  • The Trick
  • Define new symbols consisting of ordered pairs
    (triples, etc.) of symbols from cells on
    multi-track machine

9
Multi-Tape T.M.
  • Multi-Tracks for each tape. Extra tracks for
    keeping track of each read/write head
  • Note that we have to scan the tracks to find the
    pointer to the appropriate tape
  • Could use some sort of marker indicating leftmost
    and rightmost visited cell thus far
  • Note also how SLOW this simulation will be...

10
Multiple Tapes allow "addressable" memory
  • If we wanted to solve a problem such as, say, z
    x y
  • Put x on one tape, y on second tape
  • Answer on third tape

11
2-Dimensional "Tape" page 261-62
  • Move Left, Right, Up, Down
  • Simulate with 2-track machine which keeps track
    of tape symbols of simulated machine together
    with "address" (1,2) or (10,-3), say.
  • Since address may be arbitrarily large, need to
    use delimiters to separate "cells" of simulated
    machine
  • could use (1,2) beneath simulated symbol--book
    uses 12
  • if at (1,2) and told to move R, need to find
    (1,3)
  • if (1,3) cell doesnt exist already, create it...
  • Note how LONG it takes to simulate simple moves

12
Deterministic Simulation of Non-Deterministic
T.M.
  • List all possible current configurations on
    separate tapes (adding new "tapes" as you go)
  • Simulate on 2-dimensional tape
  • Each tape will represent current config. of 1
    choice
  • Determine maximum number of choices for any one
    move, count in this number base (on a separate
    tape) where each digit indicates which choice of
    move at each stage in simulation
  • All possible 1-move simulations first...
  • Talk about SSSLLLLOOOOWWWWW

13
In-Class ExerciseExercise 10.2.5 page 262
  • Precursor to "Universal" Turing Machine
  • Work in groups of 2 or 3
  • See example on next slide (peeking OK)
  • First 2 groups done, put on board

14
Action of Simulator
  • To simulate ?(q7,a)(q4,b,L)

15
TM Simulator (Darius Version)Ignoring symbol on
top track
qi/?,L
?(qi,) (qj,,L)
State for j0
0
?/q0,S
qi/?,L
?/qn,S
qi/?,L
qi/?,L
?/q1S
n
qi/?,L
1
State for j1
?/qn-1,S
?/q2,S
n-1
2

Same "j" states for moves Right. Problem More
than 6 states
16
TM Simulator (Nikhil Version)Ignoring Symbol on
Top Track
?(qi,) (qj,,L)
qi/qj,L
increment new location
?/q0,R
qn/qn1,R
qn1/qn,L
decrement old location
q0/?,L
2 More States for moves Right and we're done!
17
In-Class ExerciseSpecific Example
  • Original TM QA,B, ?0,1 let 0 represent
    blank
  • ?(A,0)(B,0,L) ?(A,1)(A,1,R)
  • ?(B,0)(A,1,R) ?(B,1)(A,1,L)
  • Simulator Q p0,pL,pR,pL',pR' ? (0,A),
    (0,B), (0,?), (1,A), (1,B), (1,?)
  • ?(p0,(0,A))(pL,(0,B),L) ?(p0,(1,A))(pR,(1,A),R)
  • ?(p0,(0,B))(pR,(1,A),R) ?(p0,(1,B))(pL,(1,A),L)
  • ?(pL,(0,?))(pL',(0,A),R) ?(pL,(0,A),R)(pL',(0,B
    ),R)
  • ?(pL,(1,?))(pL',(1,A),R) ?(pL,(1,A),R)(pL',(1,B
    ),R)
  • ?(pL',(0,B))(pL,(0,A),L) ?(pL',(0,A),L)(p0,(0,
    ?),L)
  • ?(pL',(1,B))(pL,(1,A),L) ?(pL',(1,A),L)(p0,(1,
    ?),L)
  • Repeat previous 4 lines for pR and pR' (moving
    opposite directions)

18
In-Class ExerciseGeneral Answer (1 of 2)
  • The simulator uses a two-track tape.
  • The simulated tape on top, and the state of the
    simulated machine underneath.
  • You only need one state (call it p0) to simulate
    ?(qi,b)(qj,e,R) for any change of states and
    symbols.
  • However, to simulate the move ?(qi,b)(qj,e,R)
    the simulator cannot simply ?(p0,(b,qi))(p0,(e,qj
    ),R) since that would put the R/W head of the
    simulator over the correct cell but leave the
    simulated state under the wrong cell.

19
In-Class ExerciseGeneral Answer (2 of 2)
  • Hence we need additional states to "move" the
    state of the simulated machine under the R/W
    head.
  • Something like ?(p0,(b,qi))(pR,(e,qj),R), then
    pR would go back and pick up the simulated state
    before returning to state p0.
  • Similarly, ?(p0,(b,qi))(pL,(e,qj),L) for
    ?(qi,b)(qj,e,L).
  • To copy the state of the simulated machine,
    decrement the spot it is coming from, increment
    the spot it is going to--continue until the from
    spot is decremented down past first state to
    blank. (q8? q7? q6? q5?q4?q3?q2?q1?q0?blank)
  • Note that the simulator must have all states of
    the simulated machine as part of its (lower-half)
    tape alphabet.
Write a Comment
User Comments (0)
About PowerShow.com