Symbolic Computing and Computability

advertisement
Capabilities of computing
systems
• Numeric and symbolic Computations
• A look at Computability theory
• Turing Machines
Objectives
• What is numeric computation
Popularity, applications
Limitations
• What is symbolic computation
• Is is theoretically possible to solve all
mathematical problems by computers?
An intoduction to the study of this
problem?
Numeric computation
• The earliest and most important application
– number cruching
• Virtually all applications that we come
across are numeric.
• Eg virtual reality.- High resolution, very fast
graphics with multimedia and specialized
input output devices. Encryption,
decryption/ Data bases
Need for more than numeric
computing
• Many mathematical tasks are dealt with in a
symbolic way by human beings.
eg. Simplify a polynomial
Solve equations
factorize polynomials
Similarly, computing pi to a large number
of decimal places, factorials of large numbers
would not fall within the range of numeric
data handled by a computer.
Symbolic Computing
Area dealing with a new type use of
computers in mathematics, science and
engineering.
Can enhance significantly the types of
problems humans can use computers for.
What is symbolic computing
• Solving problems expressed in terms of
`symbols’ or variables like x and y instead
of numeric values is called symbolic
computing
• Laborious tasks like expanding
(1 + x + 3y) 4 or solving (x 10 –1) can be
given to computers
Mathematica
•
•
•
•
•
•
•
It is a symbolic computing package.
Wolfram Research Inc.
http://www.wolfram.com/mathematica/
Some commands
N[expr,I] eg N[pi,250]
Factorial example: 200!
Simplify[expr], Factor[expr],
Solve[equation,unknown] (systems)
• Expand[expr], D[expr,x], Integrate[expr,x]
Implementation
• Some of these tasks are simple, and have a
simple interface to a numeric version of the
problem and its solution
• Some tasks are more difficult and require
techniques from artificial intelligence, using
symbolic logic and complicated searches.
An example
Solve[x2
– 3 = 0]
Curve
fitting
Linear
equation
x2 – 3 = 0
a=1,b=0,c=3Quadratic Compute
User
Equation
User
equation the two roots
Interface
Solver
+ 1.732
Display
+ 1.732
Results on
Cubic
screen
Plotting
equation
A model of a computing agent
1. Accepts input
2. Store and retrieve information
3. Can take actions according to
algorithmic instructions; actions
depend on present state of the
computing agent and the input
4. Produce output
Theory of computation
Early studies on formalizing proofs, before modern
computers.
Study of the nature of proofs.
Formalizing, validating and mechanizing proofs.
Many statements cannot be proved using a system.Led
to a study of the nature of computation itself.
Different models of computation and computing
agents.
Turing’s model – ingenious - captures the essence of
computing
A Turing machine
• A conceptual model
• An infinite tape , extending in both the
directions left and right.
• Tape divided into cells, each can contain a
symbol, from a finite set of symbols called
the alphabet.
• Special symbol b – blank, 1 , 0 and other
symbols, placeholders or markers.
The Turing Machine (cont’d)
• At any time only a finite number of cells
contain nonblank symbols.
• Tape holds input to a TM/ input must be a
finite string of nonblank symbols from the
alphabet (a finite set of symbols).
• TM writes its output to tape using same set
of symbols.
• Tape also serves as memory
TM (cont’d)
•
The TM has a `state’ at any time, which is one of
a finite set of states of a TM, labeled 1,2, ….k.
• Also, at a time, its `head’ is on a particular cell
and it can read that cell.
• Based on state and input read, it does three
things.
a. Writes a symbol to the cell (replacing if needed)
b. Go to new state
c. Move one cell left or right
Transitions or instructions
• A typical TM transition rule or instruction says:
If you are in state i and read symbol j
then
Write symbol k on tape, and
go to state s, and
move in direction d.
It is of the form (i,j,k,s,d)
(current state, input symbol, next symbol, next state, move)
A set of such instructions defines a TM.
TM
• TM starts from state 1.
• Finds an instruction to apply, for present
sate and input and applies the instruction.
• Repeats the above.
• If there is no instruction applicable, TM
halts.
• Assumption: For one state input pair, there
is at most one instruction applicable.
An example
A TM for converting 011 to 100
• (1,0,1,2,R)
• (1,1,1,2,R)
• (2,0,1,2,R)
• (2,1,0,2,R)
• (2,b,b,3,L)
s1….bb011bb….
s2….bb101bb….
s3….bb100bb….
s2…bb111bb….
s2…bb100bb….
Tm as a computing agent
• Satisfies all criteria.
• Can be built for all computable problems
- see later.
Can solve more than real or practical
computers, as infinite memory is there.
TM as an algorithm
• An algorithm:
1. Well ordered collection.
2. contains unambiguous and effectively
computable operations.
3. Halt in finite amount of time. (Problem)
For `correct input’ halts.
4. Produce an output.
TM
• TM starts from state 1.
• Finds an instruction to apply, for present
sate and input and applies the instruction.
• Repeats the above.
• If there is no instruction applicable, TM
halts.
• Assumption: For one state input pair, there
is at most one instruction applicable.
An example
A TM for converting 011 to 100
• (1,0,1,2,R)
• (1,1,1,2,R)
• (2,0,1,2,R)
• (2,1,0,2,R)
• (2,b,b,3,L)
s1….bb011bb….
s2….bb101bb….
s3….bb100bb….
s2…bb111bb….
s2…bb100bb….
Tm as a computing agent
• Satisfies all criteria.
• Can be built for all computable problems
- see later.
Can solve more than real or practical
computers, as infinite memory is there.
TM as an algorithm
• An algorithm:
1. Well ordered collection.
2. contains unambiguous and effectively
computable operations.
3. Halt in finite amount of time. (Problem)
For `correct input’ halts.
4. Produce an output.
Examples
• Bit inverter:
(1,0,1,1,R)
(1,1,0,1,R)
• A parity bit machine: (1,1,1,2,R)
(1,0,0,1,R)
(2,1,1,1,R)
(2,0,0,2,R) (1,b,1,3,R) (2,b,0,3,R)
An extra bit called odd parity bit is attached to each
string such that the number of 1’s in each string
becomes odd.
Turing machines and algorithms
•
•
•
•
•
Church Turing Thesis
Church (Lambda calculus)
Turing (Turing machines)
Showed that algorithms are equivalent
And unsolvability of problems.
TMs
• Popularity
• For describing algorithms
• For showing unsolvabilities
The Halting Problem of TMs
• Given a Turing machine M (encoded) and
an input I can it be decided whether the
Turing machine accepts or does not accept.
• --------------------------------------------------• (Special states accept)
• (Special states reject)
• Else loops
Not decidable
• If it is , T is a TM to do this task.
• Construct H to read <M> and run T on <M
M>.
• Reject if T accepts , accept if T rejects.
• Run H with <H> as input
• Contradiction – accepts if reject and reject if
accepts
• Hence no T exists.
Problems
• Find the output of the TM
(1,1,1,2,R) (1,0,0,2,R) (1,b,1,2,R) (2,0,0,2,R)
(2,1,0,1,R)
When run on the tape…. bbb1001bbbb…
• Describe the behaviour of a TM (1,1,1,1,R)
(1,0,0,2,L) (2,1,0,2,L) (2,b,1,3,L)
(3,b,b,1,R) on the input bbb101bbb
Solutions
• 10001 and halts
• Prints successively 1001, 10001, 100001,
and so on without halting
Problem
• Write a TM that begins on a tape containing
a single 1 and never halts but successively
displays the strings
• ..b1b…
• …010…
• 00100….
• And so on
Download
Related flashcards

Social groups

28 cards

Social groups

34 cards

User interfaces

40 cards

Create Flashcards