HAL Id: hal-01323114
https://hal.archives-ouvertes.fr/hal-01323114
Submitted on 30 May 2016
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
On Mobile Agent Verifiable Problems
Evangelos Bampas, David Ilcinkas
To cite this version:
Evangelos Bampas, David Ilcinkas. On Mobile Agent Verifiable Problems. Latin American Theoretical
Informatics Symposium (LATIN 2016), Apr 2016, Ensenada, Mexico. pp.123-137,
�10.1007/978-3-662-49529-2_10�. �hal-01323114�
On Mobile Agent Veriable Problems
⋆
EvangelosBampasandDavidIl inkas
CNRS&Univ.Bordeaux,LaBRI,UMR5800,F-33400,Talen e,Fran e
{evangelos.bampas, david.il inkas}labri.fr
Abstra t. We onsiderde isionproblemsthataresolvedinadistributed fashionbysyn hronousmobileagentsoperatinginanunknown, anony-mousnetwork. Ea hagent hasa uniqueidentier and an input string andtheyhavetode ide olle tivelyapropertywhi hmayinvolvetheir inputstrings,the graphonwhi htheyare operating,and their parti -ularstartingpositions.Buildingonre entworkbyFraigniaudandPel [LATIN 2012, LNCS 7256, pp. 362374℄, we introdu e several natural new omputability lasses allowing for aner lassi ation ofproblems below
co
-MAV
orMAV
,the latterbeingthe lassof problemsthat are veriablewhentheagentsare providedwithanappropriate erti ate. Weprovidein lusionandseparationresultsamongallthese lasses.We alsodeterminetheir losure propertieswithrespe tto set-theoreti op-erations. Our main te hni al tool, whi h is of independent interest, is a new meta-proto ol that enables the exe ution of a possibly innite numberofmobileagentproto olsessentiallyinparallel,similarlytothe well-knowndovetailingte hniquefrom lassi al omputabilitytheory.1 Introdu tion
1.1 Context and motivation
The last few de ades have seen a surge of resear h interest in the dire tion
of studying omputability- and omplexity-theoreti aspe ts for various
mod-els of distributed omputing. Signi ant examples of this trend in lude the
investigation of unreliable failure dete tors [5,6℄, as well as wait-free hierar- hies [14℄.A morere entlineof work studiestheimpa tof randomizationand
non-determinisminwhat on ernsthe omputational apabilitiesofthe
LOCAL
model [9,12℄, as well as the impa tof identiers in the same model [10,11℄. A dierentapproa h onsidersthe hara terizationofproblemsthat anbesolved
under various notions of termination dete tion or various types of knowledge
aboutthenetworkinmessage-passingsystems[1,2,3,4,17℄.Finally,are entwork
fo uses on the omputationalpowerof teams of mobile agents[13℄. Ourwork
liesinthislatterdire tion.
⋆
ThisworkwaspartiallyfundedbytheANRproje tsDISPLEXITY
(ANR-11-BS02-014) andMACARON(ANR-13-JS02-002). Thisstudyhasbeen arried outinthe
frameoftheInvestmentsforthefutureProgrammeIdExBordeauxCPU (ANR-10-IDEX-03-02).
that fa ilitates several fundamental networking tasks in luding, among others, faulttoleran e,networkmanagement,anddataa quisition[15℄,andhasbeenof signi antinteresttothedistributed omputing ommunity(see,e.g.,there ent surveys[7,16℄).Assu h,itishighlypertinenttodevelopa omputabilitytheory for mobile agents, that lassies dierent problems a ording to their degree of(non-) omputability, insofarasweareinterestedinreally understandingthe omputational apabilitiesofgroupsofmobileagents.
Inthispaper,we onsideradistributedsysteminwhi h omputationis
per-formed by oneormoredeterministi mobile agents,operatingin an unknown,
anonymousnetwork.Ea hagenthasauniqueidentierandisprovidedwithan
inputstring,andtheyhaveto olle tivelyde ideapropertywhi hmayinvolve theirinputstrings,thegraphonwhi htheyareoperating,andtheirparti ular starting positions. One may argueabout theusefulnessof developingatheory spe i allyfor mobileagentde isionproblems.Webelievethat, apartfrom its inherenttheoreti alinterest,su hastudyisboundtoyieldintermediateresults, tools, intuitions, and te hniques that will proveuseful when one moveson to
onsider from a omputability/ omplexity point of view other, perhaps more
traditional,mobileagentproblems,su hasexploration,rendezvous,pattern for-mation,et .Onesu htoolis theproto olthat wedevelopinthis paper,whi h enablestheinterleavingoftheexe utionsofapossiblyinnitenumberofmobile agentproto ols.
1.2 Related work
In[13℄,FraigniaudandPel introdu edtwonatural omputability lasses,
MAD
andMAV
,aswellas their ounterpartsco
-MAD
andco
-MAV
. The lassMAD
, forMobileAgentDe idable,isthe lassofallmobile agentde isionproblems whi h anbede ided, i.e., for whi h there exists a mobile agent proto ol su h thatallagentsa eptinayesinstan e,whileatleastoneagentreje tsinano instan e.Ontheotherhand,the lassMAV
,forMobileAgentVeriable,isthe lassofallmobileagentde isionproblemswhi h anbeveried.Morepre isely, in ayes instan e, there existsa erti atesu hthat ifea hagentre eivesits dedi atedpie eofit,thenallagentsa ept,whereasinanoinstan e,forevery possible erti ate,atleastoneagentreje ts.Certi atesareforexampleuseful in appli ations in whi h repeated veri ations of some property are required. Fraigniaudand Pel proved in [13℄ thatMAD
is stri tly in ludedinMAV
, and theyexhibitedaproblemwhi his ompleteforMAV
underanappropriatenotion ofora leredu tion.In[8℄, Daset al. fo us on the omplexity ofdistributed veri ation, rather than on its omputability. In fa t, theirmodel diers in several aspe ts. First ofall,thenetworksinwhi hthemobileagentsoperatearenotanonymous,but ea hnodehasauniqueidentier.Thisgreatlyfa ilitatessymmetrybreaking,a
entral issuein anonymous networks. On theother hand though, thememory
of the mobile agentsis limited. Indeed, in [8℄, the authors study the minimal
MAD
s
MAV
MAV
s
co-MAV
s
co-MAV
co-MAD
MAD
teamsize
degree
degree
degree
γ
treesize
degree
γ
allempty
allempty
mineven
Fig.1. Containments between lasses below
MAV
andco
-MAV
with orresponding illustrativeproblems.ClassandproblemdenitionsaresummarizedinTables1and2 , respe tively.lassesofgraphproperties.Again,thestudiedpropertiesaredierentfromthe
ones studied here and in [13℄, sin e they do notdepend on themobile agents
ortheirstartingpositions.However,theymaydependonlabelsthatnodes an possessin additiontotheiruniqueidentiers.
1.3 Our ontributions
Weintrodu eseveralnewmobile agent omputability lasseswhi h playakey
roleinourendeavorforaner lassi ationofproblemsbelow
MAV
andco
-MAV
. The lassesMAD
s
andMAV
s
arestri tversionsofMAD
andMAV
, respe tively, inwhi hunanimityisrequiredinbothyesandnoinstan es.Furthermore,we onsiderthe lassco
-MAV
′
(andits ounterpart
MAV
′
)ofmobileagentde ision problemsthatadmita erti ateforno instan es,whileretainingthe
system-widea eptan eme hanismof
MAV
.Weperformathoroughinvestigationoftherelationshipsbetweenthenewly
introdu ed and pre-existing lasses. As a result, we obtain a omplete Venn
diagram (Figure 1) whi h illustrates the tight inter onne tions betweenthem. We take areto pla e naturalde isionproblems (in themobile agent ontext) in ea h of the onsidered lasses. Among other results, we obtain a ouple of fundamental,previouslyunknown,in lusionswhi h on ernpre-existing lasses:
MAD
⊆ co
-MAV
andco
-MAD
⊆ MAV
.We omplementourresultswitha ompletestudyofthe losurepropertiesof these lassesunder thestandardset-theoreti operationsof union,interse tion,
and omplement.Thevarious lassdenitions togetherwith the orresponding
losurepropertiesaresummarizedin Table1.
Themainte hni altoolthatwedevelopanduseinthepaperisanew meta-proto olthatenablestheexe utionofapossiblyinnitenumberofmobileagent proto olsessentiallyin parallel.This anbeseenasamobileagent omputing analogueofthewell-knowndovetailingte hniquefrom lassi alre ursiontheory.
sureproperties.Thenotation
yes
(resp.no
)meansthatallagentsa ept(resp.reje t). Similarly,yes
ı
(resp.no
Ù
)meansthatatleastoneagenta epts(resp.reje ts).Denition ClosureProperties
yesinstan es no instan es Union Interse . Compl.
MAD
s
(∀
erti ate:)yes
(∀
erti ate:)no
✓
✓
✓
MAD
(∀
erti ate:)yes
(∀
erti ate:)no
Ù
✗
✓
✗
co
-MAD
(∀
erti ate:)yes
ı
(∀
erti ate:)no
✓
✗
✗
MAV
s
∃
erti ate:yes
∀
erti ate:no
✓
✓
✗
co
-MAV
s
∀
erti ate:yes
∃
erti ate:no
✓
✓
✗
MAV
∃
erti ate:yes
∀
erti ate:no
Ù
✗
✓
✗
co
-MAV
∀
erti ate:yes
ı
∃
erti ate:no
✓
✗
✗
MAV
′
∃
erti ate:
yes
ı
∀
erti ate:no
✓
✓
✗
co
-MAV
′
∀
erti ate:
yes
∃
erti ate:no
Ù
✓
✓
✗
2 Preliminaries
Thegraphsin whi h themobile agentsoperateareundire ted, onne ted, and
anonymous. The edges in ident to ea h node
v
(ports) are assigned distin tlo al port numbers(also alledlabels)from
{1, . . . , d
v
}
,whered
v
isthedegree ofnodev
.Theportnumbersassignedtothesameedgeatitstwoendpointsdo nothavetobeinagreement.We onventionallyx abinaryalphabet
Σ = {0, 1}
.In viewofthe natural bije tion between binarystringsandN
whi h maps a stringto its rankin the quasi-lexi ographi order of strings(shorter stringspre ede longer strings,the rankoftheempty stringε
being0
),wewill o asionallytreatstringsand nat-uralnumbersinter hangeably.Ifx
andy
arestrings,thenhx, yi
standsfor any standarden odingas astringofthepairofstrings(x, y)
.If
x
isalist,then|x|
isthelengthofx
andx
i
isthei
-thelementofx
.Iff
is afun tionthat anbeappliedtotheelementsofx
,thenwewillusethenotationf (x) = f (x
1
), . . . , f (x
|x|
)
.Inthesamespirit, if
x
andy
areequal-lengthlists ofstrings,thenhx, yi
standsforthelisthx
1
, y
1
i , . . . ,
x
|x|
, y
|y|
.We denote by
Σ
0
1
the set of re ursivelyenumerable (or Turing-a eptable)de ision problems,
Π
0
1
= co
-Σ
0
1
, and∆
0
1
= Σ
0
1
∩ Π
0
1
.∆
0
1
is exa tly the set of Turing-de idableproblems.2.1 Mobile agent omputations
A mobile agent proto ol is modeled asadeterministi Turing ma hine. Mobile agents are modeled as instan es of amobile agent proto ol (i.e., opies of the orrespondingdeterministi Turingma hine)whi hmoveinanundire ted,
on-ne ted, anonymous graphwith port labels. Ea h mobile agent is provided
isunique. Theexe ution ofagroupof mobileagentson agraph
G
pro eedsin syn hronoussteps.Atthebeginningofea hstep,ea hagentisprovidedwithan additionalinputstring,whi h ontainsthefollowinginformation:(i)thedegree of the urrentnodeu
,(ii) theportlabelatu
throughwhi h theagentarrived atu
(orε
iftheagentisinitsrststepordidnotmoveinthepreviousstep),and (iii) the ongurationof allother agentswhi hare urrently onu
.Then, ea h agentperformsalo al omputationandeventuallyhaltsbya eptingor reje t-ing,oritmovesthroughoneoftheportsofu
,orremainsatthesamenode.We assumethatalllo al omputationstakethesametimeandthatedgetraversals areinstantaneous.Therefore,theexe utionis ompletelysyn hronous.Let
M
be a mobile agent proto ol,G
be a graph,id
be a list of distin tIDs,
s
bealist ofnodes ofG
, andx
bealist ofstringssu h that|id| = |s| =
|x| = k > 0
. We denote byM (id, G, s, x)
the exe ution ofk
opies ofM
, thei
-th opy starting on nodes
i
and re eiving as inputs the IDid
i
and the stringx
i
.Thetuple(id, G, s, x)
is alledtheimpli itinput.Similarly,wedenote byM (id, x; id, G, s, x)
thepersonal viewof theexe utionofM
ontheimpli it input, asexperien ed bytheagentwith IDid
andinputx
. Wedistinguish be-tweentheexpli it input(id, x)
,whi h isprovidedtotheagentat thebeginningof the exe ution, andthe impli it input, whi h may ormay not be dis overed
bytheagentinthe ourseoftheexe ution.
Givenanimpli it input,wewrite
M (id, x; id, G, s, x) = yes
(resp.no
)ifthe agentwithexpli itinput(id, x)
a epts(resp.reje ts)duringM (id, G, s, x)
. Fur-thermore,wewriteM (id, G, s, x) 7→ yes
(resp.no
),if∀i M (id
i
, x
i
; id, G, s, x) =
yes
(resp.no
), andM (id, G, s, x) 7→
ˆ
yes
(resp.ı
no
), if all agents halt and for somei M (id
i
, x
i
; id, G, s, x) = yes
(resp.no
).2.2 Mobile agentde isionproblems
Denition1 ([13℄). A mobile agent de ision problem on anonymous graphs
is a set
Π
of instan es(G, s, x)
, whereG
isa graph,s
is a non-empty list of nodesofG
,andx
isalist ofstringswith|x| = |s|
,whi hsatisesthe following losureproperty:ForeveryG
andforeveryautomorphismα
ofG
thatpreserves portnumbers,(G, s, x) ∈ Π
ifandonly if(G, α(s), x) ∈ Π
.1
Wewill referto instan es whi h belong to aproblem
Π
as yes instan es ofΠ
. Instan es that do not belong toΠ
will be alled no instan es ofΠ
.The omplement
Π
of amobile agentde isionproblemΠ
is theproblemΠ =
{(G, s, x) : |s| = |x|
and(G, s, x) 6∈ Π}
. 2Someexamplesof de isionproblems
areshownin Table2.
1
Notethat this losure propertyis synta ti ally dierent fromthe oneusedin[13℄ duetonotationaldieren es,butthetwoareequivalent.
2
Itiseasyto he kthatif
Π
isade isionproblem,thenΠ
alsosatisesthe losure propertyofDenition1.Therefore,Π
isalsoade isionproblem.ofthepaper.
alone
= {(G, s, x) : |s| = 1}
allempty
= {(G, s, x) : ∀i x
i
= ε}
consensus
= {(G, s, x) : ∀i, j x
i
= x
j
}
degree
= {(G, s, x) : ∀i ∃v d
v
= x
i
}
degree
γ
= {(G, s, x) : G
ontainsanodeofdegreeγ}
(forγ
≥ 1
)mineven
= {(G, s, x) : min
i
x
i
iseven}
path
= {(G, s, x) : G
isapath}
teamsize
= {(G, s, x) : ∀i x
i
= |s|}
treesize
= {(G, s, x) : ∀i G
isatreeofsizex
i
}
Denition2 ([13℄). A de ision problem
Π
is mobile agentde idable if thereexists a proto ol
M
su h that for all instan es(G, s, x)
: if(G, s, x) ∈ Π
then∀id M (id, G, s, x) 7→ yes
,whereasif(G, s, x) /
∈ Π
then∀id M (id, G, s, x) 7→
ı
no
. The lass ofallde idable problems isdenotedbyMAD
.Denition3 ([13℄). A de ision problem
Π
is mobile agentveriable if thereexists a proto ol
M
su h that for all instan es(G, s, x)
: If(G, s, x) ∈ Π
then∃y ∀id M (id, G, s, hx, yi) 7→ yes
,whereasif(G, s, x) /
∈ Π
then∀y ∀id M (id, G, s,
hx, yi) 7→
ı
no
.The lass of allveriable problems isdenotedbyMAV
.Whenthere is noroom for onfusion, wewill use theterm erti ate both for the string
y
provided to an agent and for the olle tion of erti atesy
providedto thegroupof agents.If weneedto distinguishbetweenthetwo,we will refer toy
as a erti ate ve tor. Finally, ifX
is a lass of mobile agent de isionproblems,thenco
-X
= {Π : Π ∈ X}
.Remark 1. Notethatin[13℄,onlyde idable(inthe lassi alsense)mobileagent de isionproblemsweretakeninto onsideration.Asaresult,itwasbydenition
the asethat
MAD
andMAV
werebothsubsetsof∆
0
1
. Forthepurposesof this work,wedonotimpose this onstraint.3 Mobile Agent De idability Classes
A problem
Π
is inco
-MAD
ifand only ifit an bede ided by amobile agent proto olinasensewhi hisdualtothat ofDenition 2:Iftheinstan eisinΠ
, then at least oneagent must a ept,whereasif theinstan e is notinΠ
, then allagentsmustreje t.Wewill onsideronemoresu hvariantintheformofthe stri t lassMAD
s
.Aproblembelongstothis lassifit anbesolvedinsu ha waythat everyagentalwaysoutputsthe orre tanswer.Denition4. Ade isionproblem
Π
isinMAD
s
ifandonlyifthereexistsa pro-to olM
su hthatforallinstan es(G, s, x)
:if(G, s, x) ∈ Π
then∀id M (id, G, s,
x) 7→ yes
,whereasif(G, s, x) /
∈ Π
then∀id M (id, G, s, x) 7→ no
.Bydenition,
MAD
s
isasubsetofbothMAD
andco
-MAD
andit iseasyto he kthatMAD
s
= co
-MAD
s
. Moreover,allof these lassesaresubsets of∆
0
1
, sin ea entralized algorithm,provided withan en oding of thegraphand the startingpositions,inputs,andIDsoftheagents, ansimulatethe orresponding mobile agent proto ol and de ide appropriately. As mentioned in [13℄,path
isan example of a mobile agent de ision problem whi h is in
∆
0
1
\ MAD
, sin e, intuitively, anagent annot distinguisha longpath from a y le. In fa t, this observationyieldspath
∈ ∆
0
1
\ (MAD ∪ co
-MAD)
.Anontrivialproblemin
MAD
s
istreesize
.Theproblemwasalreadyshownto beinMAD
in [13℄. Forthe strongerproperty thattreesize
∈ MAD
s
, weneeda modi ationoftheproto olgivenin [13℄.Proposition1.
treesize
∈ MAD
s
.Wenowshowthat
MAD
andco
-MAD
arestri t supersetsofMAD
s
.Proposition2.
allempty
∈ MAD \ MAD
s
andallempty
∈ co
-MAD
\ MAD
s
.As we mentioned,
MAD
s
is in luded in bothMAD
andco
-MAD
. In fa t,MAD
s
= MAD ∩ co
-MAD
.Westatethisasatheoremwithoutproof,sin eit an beobtainedasa orollaryofTheorems2and3,whi hwewillproveinSe tion5.Theorem1.
MAD
s
= MAD ∩ co
-MAD
.ByTheorem1,if
allempty
wasin ludedinco
-MAD
,wewouldobtainallempty
∈
MAD
s
,whi hweknowtobefalse.Thus,allempty
∈ co
/
-MAD
andweobtaina sep-arationbetweenMAD
andco
-MAD
.Symmetri ally,allempty
∈ co
-MAD
\ MAD
.4 Interleaving Multiple Mobile Agent Proto ols
Itisimportanttohaveatoolthatenablestheexe utionofseveralmobileagent proto olsonthesameinstan e,andthatalsopermitsthemobileagentstomake de isionsbased on theout omes ofthese exe utions.Forexample, ifonewere togiveadire t proofofTheorem1above,onewouldneedawayfortheagents to oordinateinordertoexe uteboththe
MAD
andtheco
-MAD
proto olfora parti ularproblem,andthen,basedontheout omeoftheseexe utions,togive aunanimous orre tanswer(inthespiritofMAD
s
).In lassi al omputing, the well known dovetailing te hniquea hieves this interleavingof dierent omputations.Classi aldovetailingpro eeds inphases: inphase
T
,therstT
stepsoftherstT
programsareexe uted.Atthispoint,an auxiliaryfun tionisexe uted,whi hde ides,basedontheseexe utions,whether to a ept,reje t,or ontinuewiththenextphase.Correspondingly,themobileagent meta-proto ol whi h we propose in this se tion, pro eeds in phases: in
phase
T
,theagentsexe utetherstT
stepsoftherstT
mobileagentproto olsand then de ide whether to a ept, reje t, or pro eed to the next phase. In
fun tion alo al de ider.
Still,itmayhappenthatoneormoreagentshaltasaresultofexe utingthe lo al de ider, while othersde ide to ontinue. Insu h a ase, theexe ution of theproto olsinthenextphase ouldbe orruptedbe ausethehaltedagentsno
longer follow theproto ol. However, these halted agents an now beregarded
as xed tokens and the meta-proto ol uses them in order to reate a map of
the graph.In fa t,this is done in su h awayas to ensurethat all non-halted agentsobtainnotonlythemapofthegraphbuta tuallyfull knowledgeofthe impli itinput.Basedonthisknowledge,ea hagentde idesirrevo ablywhether toa eptorreje tbymeansofase ondfun tion whi hisgivenasaparameter tothemeta-proto ol,andwhi hwe allaglobal de ider.
4.1 Ingredients of the meta-proto ol
Weproposeageneri meta-proto ol
P
N ,f,g
, whi h isparameterizedbyN , f, g
.The set
N
is a, possibly innite, re ursively enumerable set of mobile agentproto ols.Let
N
i
,i ≥ 0
,denote thei
-th proto ol insu h anenumeration.The fun tionsf
andg
are omputablefun tionswhi hrepresentlo al omputations withthefollowingspe i ations:Globalde ider:Thefun tion
f
mapspairs onsistingofanexpli itandan im-pli itinput,i.e.,tuplesoftheform(id, x; id, G, s, x)
,totheset{accept, reject}
. Inthis ase,wesaythatf
isaglobalde ider.Whenanagentexe utesf
,ithalts bya eptingorreje tinga ordingtotheout omeoff
.Lo alde ider:Thefun tion
g
takesasinputanexpli itinput(id, x)
andalist(H
1
, . . . , H
σ
)
of arbitrarylengthσ
, where ea hH
j
is thehistoryofthe partial exe ution ofN
j
(id, x; id, G, s, x)
for a ertain numberof steps and(id, G, s, x)
is an impli it input ommon for allhistoriesH
1
, . . . , H
σ
. The out ome ofg
is one of{accept, reject, continue}
. When an agent exe utesg
, it haltsin the orresponding stateifthe out omeisaccept
orreject
,otherwise it ontinues withouthalting.Iffor everyimpli it input
(id, G, s, x)
andfor everyT
0
, there exists aT ≥
T
0
and somei
su h that the lo al omputationg(id
i
, x
i
, H
1
, . . . , H
min(T,|N |)
)
returnseitheraccept
orreject
,whereea hH
j
isanen odingoftheexe ution ofN
j
(id
i
, x
i
; id, G, s, x)
forT
steps,thenwesaythatg
isalo al de iderforN
.Themeta-proto olusesthefollowingpro eduresCreate-MapandRdv:
Pro edureCreate-Map
(R)
:Anagentexe utesthispro edureonlywhenitisonanodewhi h ontainsatleastonehalted(oridle)agent.Startingfromthis node,andtreatingthehaltedagentasaxedmark,itattemptsto reateamap ofthegraphassumingthat thegraph ontainsatmost
R
nodes.Morepre isely, the agentrst reates a map onsisting in a singlenode orresponding to the markednoder
,withd
r
pendingedges with port numbersfrom1
tod
r
. Then, whilethereremainsomependingedgesandthereareatmostR
explorednodes,the agent explores somearbitrary pending edge as follows. The agent goes to
It then determines whether its urrentposition
v
orresponds to anode of itsmap, as follows: For everynode
w
in its map, it omputesa pathin the mapgoing from
w
tor
and follows the orrespondingsequen e of port numbersintheunknowngraph,startingfrom
v
.Ifitleadstothemarkednode,thenv = w
andtheagentupdatesitsmapbylinkingthependingedgesofu
andw
withthe appropriateportnumbers.Otherwise,itretra esitsstepsto omeba ktov
and testsanextnodew
.Ifallnodesturnoutto bedierentfromv
,thentheagentgoesba ktothemarkednodethrough
u
,andupdatesitsmapbyaddinganewnode orrespondingto
v
, linkedtou
,and withtheappropriatenumberofnew pendingedges.Attheendofthepro edure,theagenteitherhasa ompletemapof thegraph,orknowsthat thegraphhasmorethan
R
nodes.Thispro eduretakesat most
4R
4
steps.
Pro edure Rdv
(R, id)
: This pro edure guaranteesthat a group ofk
agentswhi h(a)knowthesameupperbound
R
onthenumberofnodesin thegraph,(b) havedistin t
id
's{id
1
, . . . , id
k
}
, and ( ) start exe uting Rdv(R, id
i
)
at the same time from dierent nodess
i
, will all meet ea h other after nite time.Moreover,ea h agent knows when it has met all other agents exe uting Rdv,
evenwithoutinitialknowledgeof
k
.TheRdvpro edureusesasasubroutinethefollowingExplore-Ball
pro- edure:An agentexe utingExplore-Ball
(R)
attempts toexplore theballofradius
R
around its starting nodes
i
, assuming an upper bound ofR
on themaximum degree of the graph. This is a hieved by having the agent try
ev-ery sequen e of length
R
of port numbers from the set{1, . . . , R}
, retra ing itsstepsba kwardafter ea h sequen eto returntos
i
.If aparti ularsequen e instru ts theagentto followaport numberthat does notexist at the urrent node(i.e.,theportnumberislargerthanthedegreeofthenode),thentheagent abortsthat sequen eandreturnstos
i
.Attemptingallpossiblesequen estakes at mostB(R) = 2R · R
R
steps. If an agent nishesearlier, it waits on
s
i
un-tilB(R)
steps are ompleted.Therefore, ateamof agentsthat startexe utingExplore-Ball
(R)
atthesametimefromdierentnodesaresyn hronizedandba kattheirstartingpositions after
B(R)
steps.Now,forea hbitof
id
i
,theRdvpro edureexe utesthefollowing:Ifthebit is0
,theagentwaitsats
i
forB(R)
stepsandthenexe utesExplore-Ball(R)
,whereas if the bit is
1
, the agent rst exe utes Explore-Ball(R)
and thenwaitsonitsstartingpositionfor
B(R)
steps.Afteritexhauststhebitsofid
i
,the agentexe utestwi eExplore-Ball(R)
.Thisguaranteesthat,ifthenumberof nodesisatmostR
,thenafter2 · (|id
i
| + 1) · B(R)
steps,ea hagenti
islo ated ats
i
andhasmetallotheragentsexe utingRdv.Notethataftereveryinteger multiple ofB(R)
steps,ea hagentislo atedat itsinitialnodes
i
.4.2 Des ription ofthe meta-proto ol
Themeta-proto ol
P
N ,f,g
worksinphases,whi h orrespondtoin reasingvaluesofapresumedupperbound
T
onthenumberofnodesin thegraph,thelengthno
yes
no
no
yes
yes
yes
no
complete map
of
nodes
Execute
Execute
Dovetail protocols
Attempt map construction
assuming #nodes
and
exchange info
update flags
input is received
idle until implicit
synch
synch
synch
n
≤ T
g
f
accompanied
cautious
∨
neutralized
mapseeker
T
≤ T
Rdv(n, id
i
)
accompanied
← false
Rdv(2T, id
i
)
mapseeker
cautious
← false
← false
T
← T + 1
T
← 1
neutralized
← false
Fig.2.High-levelow hartofthemeta-proto olofSe tion4.
saythatanagentisidleifitiswaitingindenitelyonitsstartingnodeforsome other agentto provideitwith theknowledgeof thefullimpli itinput. Wewill say that anagent isparti ipating ifit is nothaltedandnot idle. Notethat an agentmayhaltonlyasaresultofexe utingoneofthede iderfun tions
f
andg
. Inea h phaseT
,theagentsperformthefollowinga tions(seealsoFig.2):Sear hfornearbystartingpositionsandsetags.Ea hparti ipatingagent
i
rstexe utesRdv(2T, id
i
)
foratmost2(T + 1)B(2T )
steps.BydesignofRdv, thisguaranteesthat agenti
willexploreits2T
-neighborhoodatleaston eand, in parti ular,ifT ≥ |id
i
|
, then for ea h otherparti ipating agent,agenti
will exploreits2T
-neighborhoodatleaston ewiththatagentstayingonitsstarting node.If,inthepro ess,theagentmeetsanyagent,thenitsetsitsaccompanied
ag.Italsosetsitsneutralized
agiftheen ounteredagentisparti ipatingand it has alexi ographi ally largerID. If theen ountered agent is haltedor idle, theagentsetsitsmapseeker
ag.Finally,iftheagentndsanodewithdegree larger than2T
or ifthe length ofits ID is greater thanT
, it sets itscautious
ag.Allagentssyn hronizeatthispoint.Mapseekeragentsattemptto reate amap ofthegraph.Next,ea hagent
i
with themapseeker
agset movestoahaltedoridle agentwhi h ithasfound previously,whileexe utingRdvinthe urrentphase.Then,itattemptsto reate amapofthegraphbyexe utingCreate-Map(T )
andreturnstos
i
.Overall,this takesatmost4T
4
+ 4T
steps.Moreover,duringtheexe utionofCreate-Map ,
mapseeker
agents olle tstartingpositionandinputinformationfromallhaltedand idle agents that they en ounter. Meanwhile, non-
mapseeker
agents waitfor
4T
4
+ 4T
steps.All agentssyn hronizeat thispoint.
Sofar,wehavea hievedthat,if
T ≥ n
,wheren
isthenumberofnodesinG
, theneithernoagentisamapseeker
havingthefullmapofG
,orallparti ipatingagentshavethe
mapseeker
agset andtheyhavethefull mapofG
(Lemma1below).Ifall
mapseeker
agentshavethefullmapofG
andT ≥ n
,thenea hsu h agenti
exe utesRdv(n, id
i
)
, whi h guarantees that, nally, it is lo ated ats
i
Rdv pro edure,ea h
mapseeker
exe utesf
with full knowledgeof theimpli itinput(Lemma2).
Performdovetailing.Atthispoint,ifnoagentisa
mapseeker
havingthefull map ofG
, the agents exe ute ea h of the proto olsN
1
, . . . , N
min(T,|N |)
for at mostT
steps, and then retra e ba kward tos
i
(agentsare syn hronizedafter exe uting ea h proto ol). If any of these proto ols instru ts an agentto halt, theagentinsteadwaitsuntiltheT
-stepexe utionperiodhasnished,andthen returnstos
i
.Iftheagentdoesnothavethecautious
oraccompanied
agsset,it thenexe utesg(id, x, H
1
, . . . , H
min(T,|N |)
)
,whereH
j
isthehistoryoftheT
-step exe utionofN
j
withexpli itinput(id, x)
.Sin ethispro esstakesatmost2T
2
steps,allagentsthat donothaltasaresultofexe uting
g
aresyn hronizedat theendofthe urrentphase.Itisguaranteedthatthehistoriesfed tothelo al de iderg
orrespond to orre t exe utions of the orresponding proto ols for impli itinput(id, G, s, x)
,eventhoughsomeoftheagentsmay havehaltedor be omeidleinearlierphases(Lemma3andCorollary1).Neutralizedagentsbe omeidle.Finally,attheendofthephase,
neutralized
agents start waiting for the impli it input (i.e., they be ome idle), and when theyre eiveit(fromsomemapseeker
agent),theyexe utetheglobalde iderf
. Lemma1. In ea h phase, either all or none of the parti ipating agents (i.e., non-haltedandnon-idle)exe utef
.Lemma2. Anyagent that exe utes
f
has full knowledge of the impli it input(id, G, s, x)
.Lemma3. Ifanagent
i
exe utesg
duringphaseT
,thennootheragent's start-ingnodeisatdistan e2T
orlessfroms
i
.ByLemma3,weobtainfollowing orollary:
Corollary 1. Anyagent
i
thatexe utesg
hashistorieswhi h orrespondtothe orre thistoriesofN
j
(id
i
, x
i
; id, G, s, x)
forT
steps(1 ≤ j ≤ min(T, |N |)
),even thoughsomeof the agentsmayhave haltedorbe omeidleinearlier phases.Inviewof Corollary1, we anshow that allagentsterminate and, in fa t, theyallterminate ontheirrespe tivestartingnodes.
Lemma4. Let
f
be aglobal de ider andletg
be a lo al de ider forN
. Then, ea h agent halts under the exe utionP
N ,f,g
(id, G, s, x)
by exe uting eitherf
org
.Moreover,ea h agenti
halts onitsstarting nodes
i
.4.3 Appli ation of the meta-proto ol
Tosummarize, themeta-proto ol isageneri toolthat enablesusto interleave the exe utions of a possibly innite set of mobile agentproto ols. Eventually, ea hagenta eptsorreje ts,basedeitheronthehistoriesoftheexe utionsofa
oftheimpli itinput(bymeansoftheglobalde ider).
Weuse the meta-proto ol in order to pla e a parti ular problem in one of themobileagent omputability lassesofTable1.A ommonpartoftheproofs onsists in dening thelist of proto ols
N
and suitablede idersf
andg
, and in showingthatf
andg
indeed satisfytheglobal and lo alde iderproperties, respe tively.Thisisfollowedbyaparttailoredto ea h parti ularresult,whereweusethepropertiesof themeta-proto ol(Lemmas 14andCorollary1) and
theparti ulardenitions of
f
andg
, inorder toshowthatagentsthatexe uteP
N ,f,g
alwaysterminate in thedesired state.Thedesired stateis indi atedby the lassinwhi hwewishtopla etheproblem.Forexample,ifwewishtoshow thataproblemisinMAD
s
,wewillhavetoshowthatallagentsgivethe orre t answerforallimpli itinputs.5 Mobile Agent Veriability Classes
Denition5. Ade isionproblem
Π
isinMAV
s
ifandonlyifthereexistsa pro-to olM
su hthatforallinstan es(G, s, x)
:if(G, s, x) ∈ Π
then∃y ∀id M (id, G,
s, hx, yi) 7→ yes
,whereasif(G, s, x) /
∈ Π
then∀y ∀id M (id, G, s, hx, yi) 7→ no
.Bydenition,
MAV
s
⊆ MAV
. Moreover,MAV
⊆ Σ
0
1
, sin ea entralized al-gorithm an simulate theMAV
proto ol for all possible erti ate ve tors(by lassi aldovetailing)and a eptifit ndsa erti atefor whi h allagents a - ept.Bytaking omplements,weobtainaswellthatco
-MAV
s
⊆ co
-MAV
⊆ Π
0
1
. ThereexistseveralnontrivialproblemsinMAV
s
andco
-MAV
s
(Proposition3).Furthermore, we an show that
MAV
is a stri t superset ofMAV
s
and, as aorollary,
co
-MAV
isastri tsupersetofco
-MAV
s
(Proposition 4).Proposition3. Foranyxed
γ ≥ 1
,degree
γ
∈ MAV
s
.Furthermore,consensus
∈
co
-MAV
s
andalone
∈ co
-MAV
s
.Proposition4.
degree
∈ MAV \ (MAV
s
∪ co
-MAV
)
.Proposition 4 also separates
MAV
fromco
-MAV
. In order to separateΣ
0
1
from
MAV
andΠ
0
1
fromco
-MAV
, weobservethat theteamsize
problem, whi h is learlyin∆
0
1
= Σ
0
1
∩ Π
0
1
,isneitherinMAV
norinco
-MAV
.Proposition5.
teamsize
∈ ∆
0
1
\ (MAV ∪ co
-MAV)
.De ision problems with no erti ates In lassi al omputability, the
lass
Π
0
1
= co
-Σ
0
1
an be seen as the lass of problems that admit a no er-ti ate, i.e.:forno instan es,there existsa erti ate thatleadsto reje tion, whereasforyes instan es, no erti ate anleadtoreje tion. Inthis respe t,while
MAV
an ertainly be onsidered as the mobile agent analogue ofΣ
0
1
,co
-MAV
is not quite the analogueofΠ
0
1
. Problems inco
-MAV
indeed admit a no erti ate, but the a eptan e me hanismis reversed:for no instan es,deneandstudy
co
-MAV
′
,the lassofmobileagentproblemsthatadmitano
erti ate while retaining the
MAV
a eptan eme hanism,aswellas itsom-plement
MAV
′
.Wegivethedenition of
MAV
′
below.
Denition6. Ade isionproblem
Π
isinMAV
′
ifandonlyifthereexistsa pro-to ol
M
su hthatforallinstan es(G, s, x)
:if(G, s, x) ∈ Π
then∃y ∀id M (id, G,
s, hx, yi) 7→
ˆ
yes
,whereasif(G, s, x) /
∈ Π
then∀y ∀id M (id, G, s, hx, yi) 7→ no
.Bydenition,itholdsthat
MAV
s
⊆ MAV
′
and
co
-MAV
s
⊆ co
-MAV
′
.Toshow
MAV
′
= MAV
s
(andthusco
-MAV
′
= co
-
MAV
s
),weneedtoboosttheMAV
′
pro-to olsothattheagentsanswerunanimouslyeveninyesinstan es.Wea hieve thisbysupplyinganextra erti ate,whi hisinterpretedasthenumberofnodes ofthegraph.Thisenablestheagentstomeetandex hangeinformationinyes
instan es, and therefore rea h a unanimous de ision. The meta-proto ol from
Se tion 4 essentially provides for free the ne essary subroutines for meeting
andex hanginginformation.
Theorem2.
MAV
′
= MAV
s
and
co
-MAV
′
= co
-
MAV
s
.InviewofTheorem2,itfollowsthat
MAV
s
⊆ MAV ∩ co
-MAV
andco
-MAV
s
⊆
MAV
∩ co
-MAV
.WeseparateMAV
∩ co
-MAV
frombothofthese lasseswiththe problemmineven
:Proposition6.
mineven
∈ (MAV ∩ co
-MAV) \ (MAV
s
∪ co
-MAV
s
)
.Conne tions with the de idability lasses We explore the relationships
amongthede idability lassesofSe tion3andthe lassesdenedinthisse tion.
Fromthedenitions weknowthat
MAD
⊆ co
-MAV
′
, therefore,byTheorem 2,
MAD
⊆ co
-MAV
s
.Similarly,co
-MAD
⊆ MAV
s
.Therefore,sin eMAD
s
⊆ MAD ∩
co
-MAD
,wealsohavethatMAD
s
⊆ MAV
s
∩ co
-MAV
s
.WeshowinTheorem3that,infa t,
MAD
s
= MAV
s
∩ co
-MAV
s
.Furthermore,from the denitions and Theorem 2, we have
MAD
⊆ MAV ∩ co
-MAV
s
andco
-MAD
⊆ MAV
s
∩ co
-MAV
. We show that these a tually hold asequalities inTheorem4below.TheproofofTheorem3(resp.Theorem4)isbasedontrying
allpossible ombinationsof erti atesforthe
MAV
s
(resp.MAV
)andco
-MAV
s
proto ols.Here,weusethefullpowerofthemeta-proto olofSe tion4inorder tointerleaveandsyn hronizethisinnitenumberofexe utions.Theorem 3.
MAD
s
= MAV
s
∩ co
-MAV
s
.Theorem 4.
MAD
= MAV ∩ co
-MAV
s
andco
-MAD
= MAV
s
∩ co
-MAV
.Notethatitwasshownin[13℄that,ifwe onsiderde isionproblemsthatare de idable or veriableby asingle agent(thus givingrise to the lasses
MAD
1
andMAV
1
),thenitholdsthatMAD
1
= MAV
1
∩ co
-MAV
1
.Theorems3and4 an beseenasgeneralizationsofthatresulttomultiagent lasses.Proposition7. Forany xed
γ ≥ 1
,degree
γ
∈ MAV
s
\ co
-MAD
anddegree
γ
∈
co
-MAV
s
\ MAD
.In view of Theorem 4, Proposition 7 yields a separation between
MAV
s
and
co
-MAV
, asdegree
γ
∈ MAV
s
\ co
-MAV
,and aseparationbetweenco
-MAV
s
andMAV
,asdegree
γ
∈ co
-MAV
s
\ MAV
.By ombining the results of this se tion with the results of Se tion 3, we obtainapi tureoftherelationshipsamongthe lassesbelow
MAV
andco
-MAV
, asillustratedinFigure 1.Referen es
1. Boldi,P.,Vigna,S.:Anee tive hara terizationof omputabilityinanonymous networks.In:DISC2001.LNCS,vol.2180,pp.3347.Springer(2001)
2. Boldi, P., Vigna, S.: Universal dynami syn hronous self-stabilization. Distrib. Comput.15(3),137153(2002)
3. Chalopin,J.,Godard,E.,Métivier, Y.:Lo alterminationsanddistributed om-putability inanonymousnetworks.In:DISC 2008.LNCS,vol. 5218, pp. 4762. Springer(2008)
4. Chalopin,J.,Godard,E.,Métivier,Y.,Tel,G.:Abouttheterminationdete tion intheasyn hronousmessagepassingmodel.In:SOFSEM2007.LNCS,vol.4362, pp.200211.Springer(2007)
5. Chandra,T.D.,Hadzila os,V.,Toueg,S.:Theweakestfailuredete torforsolving onsensus.J.ACM43(4),685722(1996)
6. Chandra, T.D., Toueg, S.: Unreliable failure dete tors for reliable distributed systems.J.ACM43(2),225267(1996)
7. Das,S.:Mobileagentsindistributed omputing:Networkexploration.Bull.Eur. Asso .Theor.Comput.S i. EATCS109, 5469(2013)
8. Das S., Kutten S., LotkerZ.: Distributed veri ation using mobile agents. In: ICDCN2013.LNCS,vol7730,pp.330347.Springer(2013)
9. Fraigniaud, P.,Göös, M., Korman, A., Parter, M., Peleg, D.: Randomized dis-tributedde ision.Distrib.Comput.27(6),419434(2014)
10. Fraigniaud,P.,Göös,M.,Korman,A.,Suomela,J.:What anbede idedlo ally withoutidentiers?In:PODC2013.pp.157165.ACM(2013)
11. Fraigniaud, P.,Halldórsson,M.M.,Korman,A.:Ontheimpa tofidentierson lo alde ision.In:OPODIS2012.LNCS,vol.7702,pp.224238.Springer(2012) 12. Fraigniaud, P., Korman, A., Peleg, D.: Towards a omplexity theory for lo al
distributed omputing.J.ACM60(5), 35(2013)
13. Fraigniaud, P., Pel , A.: De idability lasses for mobile agents omputing. In: LATIN2012.LNCS,vol.7256,pp.362374.Springer(2012)
14. Herlihy,M.:Wait-freesyn hronization.ACMTrans.Program.Lang.Syst.13(1), 124149(1991)
15. Lange,D.B.,Oshima,M.:Sevengoodreasonsformobileagents.Commun.ACM 42(3),8889(1999)
16. Markou,E.:Identifyinghostilenodesinnetworksusingmobileagents.Bull.Eur. Asso .Theor.Comput.S i. EATCS108, 93129(2012)
17. Yamashita,M., Kameda,T.: Computingfun tionsonasyn hronousanonymous networks.Math.Syst.Theory29(4),331356(1996)