Interaction: Conjectures, Results, Myths - Computer Science and ...

courageouscellistΤεχνίτη Νοημοσύνη και Ρομποτική

29 Οκτ 2013 (πριν από 3 χρόνια και 8 μήνες)

65 εμφανίσεις

7 June 2005

CWI

1


Interaction:

Conjectures, Results, and Myths


Dina Goldin

Univ. of Connecticut, Brown University


http://www.cse.uconn.edu/~dqg



7 June 2005

CWI

2

Fundamental Questions
Underlying Theory of Computation

What is computation?


How do we model it?

7 June 2005

CWI

3

Shared Wisdom

(from undergraduate Theory of Computation courses)


computation
: finite transformation
of input to output

input
: finite size (e.g. string or
number)

closed system
: all input available

at start, all output generated at end


behavior
: functions, transformation of
input data to output data

Church
-
Turing thesis
: Turing
Machines capture this (algorithmic)
notion of computation

Mathematical worldview
:

All computable problems

are function
-
based.

7 June 2005

CWI

4

The Operating System
Conundrum

Real programs… often receive an unbounded amount of input over
time, and never "finish" their task. Turing machines do not model
such ongoing computation well.






[TM entry, Wikipedia]

If a computation
does not terminate,

it’s “useless”



but aren’t OS’s
useful??

7 June 2005

CWI

5


Rethinking the mathematical worldview


Historical perspective


Algorithmic vs. interactive computation


Wegner’s conjecture


Driving home from work


Persistent Turing Machines (PTMs)


PTM expressiveness


Sequential Interaction Thesis


The Myth of the Church
-
Turing Thesis


Future work


Outline

7 June 2005

CWI

6

“The theory of computability and non
-
computability [is] usually
referred to as the theory of recursive functions... the notion of TM has
been made central in the development."


Martin Davis,
Computability & Unsolvability
, 1958


“Of all undergraduate CS subjects, theoretical computer science has
changed the least over the decades.”


SIGACT News
, March 2004


“A TM can do anything that a computer can do.”


Michael Sipser,
Introduction to the Theory of Computation
, 1997

The Mathematical Worldview


7 June 2005

CWI

7

Rethinking Shared Wisdom:

(what do computers do?
)

computation
: finite
transformation of input to output

input
: finite
-
size (string or number)



closed system
: all input available at
start, all output generated at end


behavior
: functions, algorithmic
transformation of input data to
output data

Church
-
Turing thesis
: Turing
Machines capture this (algorithmic)
notion of computation

computation
: ongoing process which
performs a task or delivers a service


dynamically

generated stream of input
tokens (requests, percepts, messages)

open system
: later inputs depend on
earlier outputs and vice versa (I/O
entanglement, history dependence)

behavior
: processes, components,
control devices, reactive systems,
intelligent agents

Turing Machines do not capture this
(interactive) notion of computation

7 June 2005

CWI

8


Many interactive models


Reactive [MP] and embedded systems


Dataflow, I/O automata [Lynch], synchronous languages, finite/pushdown
automata over infinite words


Interaction games [Abramsky], online algorithms [Albers]


TM extensions: on
-
line Turing machines [Fischer], interactive Turing
machines [Goldreich]


Concurrency Theory


Focuses on
communication

(between concurrent agents/processes) rather
than computation [Milner]


Orthogonal

to the theory of computation and TMs.


What makes our approach unique?


Communication (I/O) is part of computation.


a paradigm change


Bridging the gap between concurrency theory (labeled transition systems)
and traditional TOC.


models borrow from both fields


Focus on expressiveness


rather than mere convenience of modeling

Modeling Interactive Computation

7 June 2005

CWI

9

Our Motivation

Wegner’s Conjecture:

Interaction is more powerful
than algorithms


[CACM’97]

7 June 2005

CWI

10

Example:

Driving home from work

Algorithmic input
: a description of the
world

(a static “map”)

Output
: a sequence of pairs of #s (time
-
series data)

-

for turning the wheel

-

for pressing gas/break

Similar to classic AI search/planning problems.

7 June 2005

CWI

11

Can you get the car

into my driveway
without running
over my kid?

7 June 2005

CWI

12

But
… in a real
-
world environment, the output depends
on every grain of sand in the road (
chaotic behavior
).

Can we possibly have a map that’s detailed enough?

Worse yet
… the domain is dynamic. The output
depends on weather conditions, and on other drivers and
pedestrians.

We can’t possibly be expected to predict that in advance!

Nevertheless

the problem is solvable!

Google “autonomous vehicle research”

Driving home from work (cont.)


?





7 June 2005

CWI

13

Driving home from work (cont.)

The problem is solvable interactively
.


Interactive input
: stream of video camera images, gathered
as we are driving

Output
: the desired time
-
series data, generated

as we are driving


similar to control systems, or online computation


A paradigm shift in the conceptualization of computational problem solving.

7 June 2005

CWI

14


Rethinking the mathematical worldview


Persistent Turing Machines (PTMs)


extending N3TM computations model


Persistent Stream Languages


examples


PTM expressiveness


Sequential Interaction Thesis


The Myth of the Church
-
Turing Thesis


Future work


Outline

7 June 2005

CWI

15


Three
-
tape Turing Machines
(N3TM)


s

-

current
state


w
1

-

contents of
input

tape


w
2

-

contents of
work

tape


w
3

-

contents of
output

tape


n
1

, n
2

, n
3

-

tape head posns




N3TM configurations:

input

work

output

S


Computation = a sequence of transitions between

configurations, from initial to halting.

7 June 2005

CWI

16

N3TM macrosteps




w
in
, w



Notation:

w
in

S
o

w

e

w
in

S
h

w’

w
out

M



|

< s
0
, w
in
, w,
e
, 1, 1, 1 >

< s
h
, w
in
, w’, w
out
, 1, 1, 1 >


w’, w
out



7 June 2005

CWI

17

Extending N3TM Computations



Dynamic stream semantics

-

Inputs are
streams
of
dynamically

generated tokens (strings).

-

For each input token, there is an N3TM macrostep generating the
corresponding output token.


Persistence (memory)

-

The contents
w

of the work tape at the beginning of each macrostep
is the
same

as at the end of the previous one.


in
1

S
0

e

e

S
h

out
1

w
1

in
1

in
2

S
0

w
1

e

S
h

out
2

w
2

in
2

...

7 June 2005

CWI

18


Persistent Stream Language

of a PTM: set of streams



Conductive stream semantics:

...

Persistent Turing Machine (PTM)

PTM: N3TM with persistent stream
-
based
computational semantics

PTM


memory

Environment

Interaction Stream


stream of inputs


stream of outputs

7 June 2005

CWI

19

Formal Definition

))}

'

(

(

'

,

'

,

w

M

PSL

w

w

w

w

o

i















s

(
Coinductive

definition, relative to N3TM
M

and memory
w
)

PSL(M(w))

= {


(
w
i
,
w
o
),
s





S

|
$
w


S
*:

PSL

=
{
PSL
(
M
) |
M

is a PTM}

7 June 2005

CWI

20

PTM Example


Answering Machine (AM)




f
AM
(
record Y
,
X
) = (
ok
,
XY
)



f
AM
(
erase
,
X
) = (
done
,
e
)



f
AM
(
playback
,
X
) = (
X
,
X
)




PSL(
AM
) contains:


(
record
hello
,

ok
), (
erase
,
done
) , (
record
Farhad
,
ok
),


(
record
Arbab
,

ok
) , (
playback
,

Farhad Arbab
), …




Sequential objects as PTMs


7 June 2005

CWI

21

More PTM Examples


PowerPoint Editor



Input: mouse movements, keyboard clicks



Output: refreshed view of presentation



Driving Agent

7 June 2005

CWI

22


At each step, output first bit of

previous

step.


inputs
in
1
; outputs
1


inputs

in
2
; outputs
1
st

bit of in
1


inputs
in
3
; outputs
1
st

bit of in
2



...



PSL(Latch) contains:





PTM as a Labeled Transition System


Latch has 3 states, meaning “contents of worktape”


The labels are input/output pairs, as in the interaction stream.


PTM Example: Latch

#

1

0

(1*,1)

(0*,1)

(0*,1)

(1*,0)

(1*,1)

(0*,0)

7 June 2005

CWI

23


Rethinking the mathematical worldview



Persistent Turing Machines (PTMs)


Interactive Transition Systems


Different notions of equivalence


Correspondence to PTMs


Sequential Interaction Thesis


The Myth of the Church
-
Turing Thesis


Future work

Outline

7 June 2005

CWI

24

Interactive Transition Systems

over
S



S

is set of
states



r

is
initial state (root)



m

is
transition relation

Required to be recursively enumerable

<
S, m, r

>

#

1

0

(1*,1)

(0*,1)

(0*,1)

(1*,0)

(1*,1)

(0*,0)

7 June 2005

CWI

25


Infinite sequences of input/output token
-
pairs
emanating from a particular ITS state



ISL(T),
the
interactive stream language
of an

ITS
T,

is the set of all such sequences emanating from
T
’s root.

Interactive Stream
Equivalence

T
1

=
ISL

T
2

if
ISL
(
T
1
) =
ISL
(
T
2
)


7 June 2005

CWI

26

ITS Isomorphism

1.

2.

Let
T
1
,
T
2

be ITSs



7 June 2005

CWI

27

ITS Bisimulation

Let

be ITSs,
i=1,2

is a (strong)
interactive bisimulation

if:

1.

2.

3.

Clause 2. with roles of
s

and
t

reversed

T
1

=
bisim

T
2
if
$

an interactive bisim. between them

R

is defined recursively, has greatest fixpoint semantics

7 June 2005

CWI

28

=
iso

=
bisim

=
ISL

Comparing Equivalence
Relations

Equivalent machines = same behavior

Equivalence classes = set of distinct behaviors

=
1

is
strictly finer

than =
2

if

(x =
1

y) implies (x =
2

y)

but not vice
-
versa

7 June 2005

CWI

29

From PTMs to ITSs

Reachable memories of a PTM
M
:




Set of words (work
-
tape contents)
w

encountered


after zero or more macrosteps.

 
reach
(
M
),
m
,

e 

ξ(M)











o

M

i

w

s

s

w

,

'

,


m



o

i

w

s

w

s

,

'

,

,

iff

where

ξ i
s a bijection between PTMs and ITSs

[I&C’04]

7 June 2005

CWI

30

Theorem
:

Proof
:

7 June 2005

CWI

31

PTMs

ITSs

=
ms

=
iso

=
bisim

=
ISL

=
PSL

PTMs vs. ITSs

Two representation of the same computational behavior

7 June 2005

CWI

32


Rethinking the mathematical worldview



Persistent Turing Machines (PTMs)


Interactive Transition Systems


PTM expressiveness


Infinite equivalence hierarchy


Equivalence hierarchy gap


Unbounded nondeterminism and divergence


Amnesic PTMs


It pays to be persistent


Sequential Interaction Thesis


Future work

Outline

7 June 2005

CWI

33

Infinite Equivalence Hierarchy


L
k
(
M
) = stream prefix language of PTM
M

set of prefixes of length


k for streams in
PSL
(
M
)

represents finite observations of M (testing equivalence)


L

(
M
) =
U
k

1

L
k
(
M
)



Corresponding
notions of equivalence
:


M
1

=
k

M
2

:
L
k
(
M
1
)

= L
k
(

M
2
)



M
1

=


M
2

:
L


(
M
1
)

= L


(

M
2
)


=1
is like Turing Machine equivalence


7 June 2005

CWI

34

Infinite Equivalence Hierarchy
(cont)

=
2

=
1

...

=


=
PSL

What is your
name?

A deterministic
machine

More equivalence classes = more distinct behaviors

7 June 2005

CWI

35

=
PSL

=


=
2

=
1

...

Equivalence Hierarchy Gap


Proof
: construct PTMs
M
1

and
M
2

where


L

(
M
1
) =
L


(
M
2
)

but
PSL
(
M
1
)



PSL
(
M
2
)


Note
: M
1

exhibits
unbounded nondeterminism


Unbounded nondeterminism
implies

divergence.
[I&C 2004]

7 June 2005

CWI

36

Proof Details




M1 produces output streams of the form 1*0
+


On 1st macrostep, initializes a persistent string
n

of
1
’s:


while true do


write ‘1’ on the work tape, move head to the right;


nondeterministically choose to exit loop or continue


The output at every macrostep is determined as follows:


if n > 0


then decrement n by 1 and output ‘1’;


else output ‘0’



M2 is the same, but also produces the stream 1*


M
1

, M
2

exhibit
unbounded non
-
determinism

7 June 2005

CWI

37

Divergent Computation

Theorem
: If a PTM M has unbounded
nondeterminism, then M diverges.

[I&C’04]


e

(
S
*, 1)

n = 0

n = 1

n = 2

n = 3

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 1)

(
S
*, 0)

...

(
S
*,
t
)

s
div

(
S
*,
t
)

...

M
1

7 June 2005

CWI

38

Amnesic PTM Computation:

stream
-
based but not persistent

))}

'

(

(

'

,

w

M

PSL

w

i





  
w
',
w
o
 



s

e

PTM
M

is
amnesic

if

PSL(M)



ASL

ASL

=
{
ASL
(
M
) |
M

is a PTM}

7 June 2005

CWI

39

Amnesic PTMs:

“half
-
way” between TMs and PTMs

Example: squaring machine (
out
i

= in
i
2
)

[Prasse & Rittgen]


Amnesic PTMs extend TMs with stream
-
based semantics.

At least as expressive as TMs


Unlike PTMs, they lack persistence.

in
1

S
0

e

e

S
h

out
1

w
1

in
1

in
2

S
0

e

e

S
h

out
2

w
2

in
2

...

7 June 2005

CWI

40

It Pays to be Persistent

ASL

PSL

Two arguments that PTMs are more expressive

than Amnesic PTMs:


1.
Collapse of the equivalence hierarchy.





2.
Smaller set of stream languages.




=

=
1

=
PSL

7 June 2005

CWI

41

Summary of Results
[I&C’04]

PTMs

ITSs

=

=


=
2

=
1

=
ms

=
iso

=
bisim

=
ISL

=
PSL

...

=
TM

7 June 2005

CWI

42


Rethinking the mathematical worldview



Persistent Turing Machines (PTMs)


Interactive Transition Systems


PTM expressiveness


Sequential Interaction


Sequential Interaction Thesis


Universal PTMs


Church
-
Turing Thesis revisited


Future work

Outline

7 June 2005

CWI

43

Sequential Interaction


Sequential interactive computation:



system continuously interacts with its environment

by alternately accepting an input string

and computing a corresponding output string.




Examples:

-
method invocations of an object instance

in an OO language

-
a C function with static variables

-
queries/updates to single
-
user databases

-
recurrent neural networks


-

control systems

-

online computation

-

transducers

-

dynamic algorithms

-

embedded systems

7 June 2005

CWI

44

Sequential Interaction Thesis


Universal PTM
: simulates any other PTM


Need additional input describing the PTM (only once)



Example
: simulating Answering Machine

(
simulate
AM
,
will
-
do
),

(
record
hello
,

ok
), (
erase
,
done
), (
record
Farhad
,
ok
),

(
record
Arbab
,

ok
), (
playback
,

Farhad Arbab
), …


Simulation of other sequential interactive systems is analogous.


Whenever there is an effective method for performing
sequential interactive computation, this computation

can be performed by a Persistent Turing Machine

7 June 2005

CWI

45

Origins of the Church
-
Turing Thesis Myth

A TM can do anything that a computer can do.



Based on several claims:

1.
A problem is
solvable

if there exists a Turing Machine

for computing it.

2.
A problem is
solvable

if it can be specified by an algorithm.

3.
Algorithms

are what computers do.


Each claim is correct in isolation

provided we understand the underlying assumptions


Together, they induce an incorrect conclusion

TMs = solvable problems = algorithms = computation

7 June 2005

CWI

46

Deconstructing the Turing Thesis Myth (1)



TMs = solvable problems



Assumes:

All computable problems are
function
-
based
.



Reasons
:


Theory of Computation started as a field of mathematics;
mathematical principles were adopted for the fundamental

notions of computation, identifying computability with the
computation of functions, as well as with Turing Machines.


The batch
-
based modus operandi of original computers did

not lend itself to other conceptualizations of computation.


7 June 2005

CWI

47

Deconstructing the Turing Thesis Myth (2)


solvable problems = algorithms



Assumes:

-
Algorithmic computation is also function based;

i.e., the computational role of an algorithm

is to transform input data to output data.


Reasons
:


Original (mathematical) meaning of “algorithms”


E.g. Euclid’s greatest common divisor algorithm


Original (Knuthian) meaning of “algorithms”



An algorithm has zero or more inputs, i.e., quantities which are

given to it initially before the algorithm begins.“

[Knuth’68]


7 June 2005

CWI

48

Deconstructing the Turing Thesis Myth (3)


algorithms = computation






Reasons
:


The ACM Curriculum

(1968): Adopted algorithms as the central
concept of CS without explicit agreement on the meaning of this term.


Textbooks
: When defining algorithms, the assumption of their closed
function
-
based nature was often left implicit, if not forgotten


An algorithm is a recipe, a set of instructions or the specifications
of a process for doing something. That something is usually solving
a problem of some sort
.”



[Rice&Rice’69]


An algorithm is a collection of simple instructions for carrying out
some task. Commonplace in everyday life, algorithms sometimes
are called procedures or recipes...”


[Sipser’97]

7 June 2005

CWI

49

Church
-
Turing Thesis Revisited



Church
-
Turing Thesis:


Whenever there is an effective method

for obtaining the values of a mathematical function,

the function can be computed by a Turing Machine


Common Reinterpretation (Strong Church
-
Turing Thesis)


A TM can do (compute) anything that a computer can do



The equivalence of the two is a widespread myth

the function
-
based behavior of algorithms does
not

capture all forms of computation


Turing himself would have denied it

in the same paper where he introduced what we now call Turing
Machines, he also introduced
choice machines,

as a distinct
model of computation

choice machines extend Turing Machines to interaction by
allowing a human operator to make choices during the
computation.

7 June 2005

CWI

50


Rethinking the mathematical worldview



Persistent Turing Machines (PTMs)


Interactive Transition Systems


PTM expressiveness


Sequential Interaction


Future work

Outline

7 June 2005

CWI

51


Theory of Sequential Interactiove Computation

This is a robust notion of computation, admitting
notions analogous to
computational complexity,
logic, and recursive functions



Where are the ports?
--

Multi
-
stream interaction

multi
-
stream interaction is more powerful than
sequential interaction

[Wegner’97]


Formalizing indirect interaction

direct interaction (via message passing) does not
capture all forms of multi
-
agent behaviors

Future Work: 3 conjectures

7 June 2005

CWI

52

Direct & Indirect Interaction

DIRECT INTERACTION: interaction via
message passing
.



Known as “communication” in concurrency theory.


ID of destination agent specified in the message.


INDIRECT INTERACTION: interaction via
persistent
,
observable

changes to the common environment.



Agents can affect each other without interacting directly, when one of them
makes changes to their environment that the other later observes.


Example
: multi
-
user document editing, stigmergy.

7 June 2005

CWI

53

Role of the Environment

in Indirect Interaction


The environment is the
medium

of communication.


It must be
changeable

and
observable
: when one agent
changes it, another can observe the change.


It must be
persistent
: change to it remain, so they can be
observed later.


It may posess
locality
: given an agent, parts of the
environment are accessible to it while others are not (may
be different parts for actuating & sensing).


May be very simple (Dining Philosophers example)

or complex (Foraging Ants example)

7 June 2005

CWI

54

Dining Philosophers


Classic problem in concurrency
and shared resources: define a
protocol for a ring
-
shaped
arrangement of processes
(philosophers) where no two
adjacent processes may execute
simultaneously.


Goal
: let the philosophers carry
on while avoiding starvation.


Starvation
: all philosophers
pick up one chopstick and wait
to pick up the other.


Mobile version
: philosophers
may leave table when sleepy, or
join at empty place when ready
to eat and think.

Indirect Interaction:

philosophers interact with neighbors
(persistent observable change to
environment = picking up and
putting down chopsticks).


Direct Interaction
:

philosophers interact with chopsticks
(modeled as simple processes).

7 June 2005

CWI

55

Foraging Ants


Classic problem in artificial life
and stigmergy.


Ants wander
randomly

looking for
sources of food.


If they find food, they leave
behind a
phermone trail

(or
reinforce existing one).


Or, if they find a phermone trail,
they follow it in search of food.


Achieves coordination without
centralization.


An example of
swarm computing
,
and of
emergent behavior.

Indirect Interaction:

ants interact with each other
(persistent observable change to
environment = phermone trails).


Direct Interaction
:

?

7 June 2005

CWI

56

Properties of Indirect Interaction (1)

Late binding of recipient
(anonymity)

Identity of the observer of given
state changes may be determined
by dynamic events occurring
after the change is made.

[mobile] The chopstick
X puts down will be
picked up either by X or
by who
-
ever happens to
be sitting next to X at
the time they get
hungry.

X’s pheromone trail
will be detected by
whoever happens to
wander past it.


Time decoupling (asynchrony)

There may be a delay between
the change and its observation,
whose duration may be
determined by dynamic events.

There may be a delay
after X puts down a
chopstick before it’s
picked up again; cannot
know when the neighbor
will get hungry.

There may be a delay
after X puts down
pheromone before it’s
detected; cannot know
when someone will
wander by to detect it.

Space Decoupling

Indirect interaction need not
imply co
-
location (for mobile
agents); first agent may leave
after making changes, second
arriving later.

[mobile] X may go
away after putting down
chopstick; when Y picks
it up, he interacts with X
without ever being in
the same location.

Ants who lay down
and pick up a
pheromone trail
usually do not actually
meet each other.

Dining Philosophers Foraging Ants

7 June 2005

CWI

57

Properties of Indirect Interaction (2)

Localization

Agents may be restricted to
make/ observe changes in only
a part of the shared space (that
is
local

to them).

A philosopher can
pick up / put down
only the chopsticks
next to him.

An ant can leave or
sense pheromones
only in its local
neighborhood.


Non
-
intentionality

Intent to communicate is not
required, nor awareness that
communication is occurring; agents
may simply be doing their own task.

X puts down
chopsticks because
he is done, NOT
because she wants
others to know that
they can eat.

X leaves pheromones
because he is
programmed to do
this when carrying
food, not out of
intent to notify
others.

Hybrid nature

The real world may serve as the
medium of indirect interaction; the
system will involve real
-
world
processes, and will be hybrid rather
than fully digital.

[analog] X will not
eat with dirty
chopsticks (where
the notion of
dirtiness is fuzzy).

Pheromones
evaporate over time.


Dining Philosophers Foraging Ants

7 June 2005

CWI

58

Ubiquity of Indirect Interaction


Social Biology
: Social insects living in colonies interact
indirectly by making changes to common structures (termite
piles) or through pheromones.


Operating Systems
: Processes exchange information via
semaphores

in shared memory


Programming Languages
:
Tuple spaces

in Linda enable
coordination by indirect interaction.


Anatomy
: Cells exchange information via
hormones

in the
blood stream.


Economics
: the
value

of stocks, bonds, and currency acts as
medium of interaction between buyers and sellers as they
negotiate prices.


7 June 2005

CWI

59

Formalizing Indirect Interaction


There is a need for a formalization of indirect
interaction that


models its properties explicitly, without the intermediate
protocol layer


directly reflects problem
semantics

(i.e. chopsticks are passive
objects, not active agents)


is domain
-
independent


allows for real world as medium of interaction


extends existing models of interaction (Persistent Turing
Machines)


Conjecture


decentralized coordination in multiagent systems of simple
agents
requires

indirect interaction (to provide asynchrony and
anonymity)

7 June 2005

CWI

60

References

http://www.cse.uconn.edu/~dqg/papers/

[Wegner’97]

Peter Wegner

Why Interaction is more Powerful than Algorithms

Communications of the ACM
, May 1997

[EGW’04]

Eugene Eberbach, Dina Goldin, Peter Wegner

Turing's Ideas and Models of Computation

book chapter, in
Alan Turing: Life and Legacy of a Great Thinker
, Springer
2004

[I&C’04]

Dina Goldin, Scott Smolka, Paul Attie, Elaine Sonderegger

Turing Machines, Transition Systems, and Interaction

Information & Computation Journal
, 2004

[GW’04]

Dina Goldin, Peter Wegner

The Church
-
Turing Thesis: Breaking the Myth

presented at CiE 2005, Amsterdam, June 2005

to be published in LNCS

7 June 2005

CWI

61


Questions?