Citation
Template Matching with the Frechet Distance Metric

Material Information

Title:
Template Matching with the Frechet Distance Metric
Creator:
Accisano, Paul W
Place of Publication:
[Gainesville, Fla.]
Florida
Publisher:
University of Florida
Publication Date:
Language:
english
Physical Description:
1 online resource (70 p.)

Thesis/Dissertation Information

Degree:
Doctorate ( Ph.D.)
Degree Grantor:
University of Florida
Degree Disciplines:
Computer Engineering
Computer and Information Science and Engineering
Committee Chair:
UNGOR,ALPER
Committee Co-Chair:
SAHNI,SARTAJ KUMAR
Committee Members:
SITHARAM,MEERA
RANGARAJAN,ANAND
HAGER,WILLIAM WARD
Graduation Date:
5/2/2015

Subjects

Subjects / Keywords:
Algorithms ( jstor )
Approximation ( jstor )
Computational geometry ( jstor )
Cylinders ( jstor )
Distance functions ( jstor )
Dogs ( jstor )
Polygons ( jstor )
Polynomials ( jstor )
Vertices ( jstor )
Walking ( jstor )
Computer and Information Science and Engineering -- Dissertations, Academic -- UF
geometry
Genre:
bibliography ( marcgt )
theses ( marcgt )
government publication (state, provincial, terriorial, dependent) ( marcgt )
born-digital ( sobekcm )
Electronic Thesis or Dissertation
Computer Engineering thesis, Ph.D.

Notes

Abstract:
In this dissertation, we explore the general idea of reconstructing data according to a template, using the popular Frechet distance metric to grade the similarity of the reconstructed data to the template. Specifically, we focus on a following problem: Let P be a polygonal curve in Rd of length n, and S be a point-set of size k. We consider the problem of finding a polygonal curve Q on S the such Frechet distance from P is less than a given epsilon. This problem has been explored in the literature and several variants have been solved. In particular, there are four main variants, depending on whether or not it is required to visit all points (Subset vs All-Points) and whether or not points may be visited more than once (Unique vs Non-unique). Under the discrete Frechet distance, all four of these variants are solved. However, under the standard, continuous Frechet distance, only the Non-unique Subset version is solved. We explore the remaining three variants and show that they are all NP-complete, and give an approximation algorithm Non-unique All-Points version that runs in O(nk2) time. We also show how this problem can be solved if we are allowed to apply an given set of affine transformations, as well as how the problem changes if the points given are imprecise. ( en )
General Note:
In the series University of Florida Digital Collections.
General Note:
Includes vita.
Bibliography:
Includes bibliographical references.
Source of Description:
Description based on online resource; title from PDF title page.
Source of Description:
This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Thesis:
Thesis (Ph.D.)--University of Florida, 2015.
Local:
Adviser: UNGOR,ALPER.
Local:
Co-adviser: SAHNI,SARTAJ KUMAR.
Statement of Responsibility:
by Paul W Accisano.

Record Information

Source Institution:
UFRGP
Rights Management:
Copyright Accisano, Paul W. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.
Classification:
LD1780 2015 ( lcc )

Downloads

This item has the following downloads:


Full Text

PAGE 1

TEMPLATEMATCHINGWITHTHEFR ECHETDISTANCEMETRIC By PAULW.ACCISANO ADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOL OFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENT OFTHEREQUIREMENTSFORTHEDEGREEOF DOCTOROFPHILOSOPHY UNIVERSITYOFFLORIDA 2015

PAGE 2

c 2015PaulW.Accisano 2

PAGE 3

ACKNOWLEDGMENTS Iwouldliketoexpressmyimmensegratitudetomyadvisor,Prof.Alper Ung or, forhisexcellentguidanceandwisdom.Mythanksalsogoesouttotherestofmy supervisorycommittee,tomyfriends,andnallytomyparents,fortheirunending support. 3

PAGE 4

TABLEOFCONTENTS page ACKNOWLEDGMENTS..................................3 LISTOFFIGURES.....................................6 ABSTRACT.........................................7 CHAPTER 1INTRODUCTION...................................8 1.1Fr echetDistance................................8 1.2Problem.....................................9 1.3Contribution...................................9 1.4Outline......................................10 2BACKGROUND...................................13 2.1TheFr echetDistanceProblem........................13 2.2DiscreteFr echetDistance...........................14 2.3Fr echetDistanceforSurfaces.........................15 2.4MapMatching..................................16 2.5CurveSimplication..............................17 2.6HomotopicFr echetDistance.........................18 2.7ImprecisePointsandWeightedRegions...................18 2.8OtherResults..................................19 3HARDNESSRESULTS...............................20 3.1Preliminaries..................................20 3.2RestrictedSatisabilityProblem........................21 3.3Non-UniqueAll-PointsReduction.......................21 3.3.1SeparationGadget...........................22 3.3.2SeparationCorners...........................25 3.3.3Construction..............................26 3.3.4SpaceComplexity...........................28 3.3.5Result..................................29 3.4UniqueSubsetReduction...........................30 3.4.1PropertiesofSeparationCorners,Revisited.............31 3.4.2Construction:VariableSection....................32 3.4.3Construction:ClauseSection.....................33 3.4.4Result..................................34 4APPROXIMATIONALGORITHM..........................36 4.1Preliminaries..................................36 4

PAGE 5

4.2RestrictedProblem...............................37 4.3SubsetAlgorithmOverview..........................37 4.4NS-CompliantAlgorithm............................38 4.5ApproximationProof..............................41 5CPSMUNDERTRANSFORMATIONS.......................44 5.1Motivation....................................44 5.2Preliminaries..................................46 5.3PreviousWork.................................47 5.3.1Maheshwari'sAlgorithm........................47 5.3.2Wenk'sAlgorithm............................47 5.4ExactAlgorithmsfortheTCPSM.......................49 5.4.1ContinuousSubsetversions......................49 5.4.2DiscreteSubsetandAll-pointsversions...............50 5.5ApproximationAlgorithms...........................52 5.5.13-ApproximationforContinuousAll-PointsTCPSM.........52 5.5.2+ " -Approximation..........................54 6IMPRECISION....................................56 6.1Motivation....................................56 6.2Preliminaries..................................56 6.3CIPSMProblem................................56 6.4DiscreteCIPSMProblem...........................58 7IMPLEMENTATION.................................60 7.1DesignandStatistics..............................60 7.2Usage......................................61 8CONCLUSION....................................62 8.1CPSMdistancewithspeedlimits.......................62 8.2HomotopicCPSM...............................62 8.3ApproximationAlgorithms...........................62 8.4CIPSMwithanImpreciseGivenCurve....................63 REFERENCES.......................................64 BIOGRAPHICALSKETCH................................70 5

PAGE 6

LISTOFFIGURES Figure page 1-1AninstanceoftheCPSMproblemanditssolution.................12 3-1Theseparationgadget,stepbystep.........................22 3-2Apartialconstructionforaformulawith12clauses,showingthegadgetfora singlevariable.....................................24 3-3Aseparationcornerfor =3 = 4 ,withvariouspropertieshighlighted......25 3-4AcompletedconstructionfortheContinuousAll-pointsNon-uniqueCPSM, giventheformula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z ...28 3-5SwitchpointsinSeparationCornerchains.....................32 3-6Thevariablesectionoftheconstructionforaformulawiththreevariables,with asamplecurvecorrespondingtotheassignment TRUE , TRUE , FALSE isshown.32 3-7Aclauseloopfortheclause x _ y _ z .......................34 3-8AcompletedconstructionfortheContinuousSubsetUniqueCPSM,giventhe formula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z .........35 4-1Demonstrationofthetightnessoftheapproximationbound...........43 5-1AninstanceoftheTCPSManditssolution.....................45 6-1Aseparationcornerwithasingleimprecisepointinsteadoftwocornerpoints.57 6-2AcompletedconstructionfortheContinuousSubsetNon-uniqueCIPSM,given theformula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z .......58 6

PAGE 7

AbstractofDissertationPresentedtotheGraduateSchool oftheUniversityofFloridainPartialFulllmentofthe RequirementsfortheDegreeofDoctorofPhilosophy TEMPLATEMATCHINGWITHTHEFR ECHETDISTANCEMETRIC By PaulW.Accisano May2015 Chair:Alper Ung or Major:ComputerEngineering Inthisdissertation,weexplorethegeneralideaofreconstructingdataaccording toatemplate,usingthepopularFr echetdistancemetrictogradethesimilarityofthe reconstructeddatatothetemplate.Specically,wefocusonthefollowingproblem:Let P beapolygonalcurvein R d oflength n ,and S beapoint-setofsize k .Weconsiderthe problemofndingapolygonalcurve Q on S suchthattheFr echetdistancefrom P is lessthanagiven " .Thisproblemhasbeenexploredintheliteratureandseveralvariants havebeensolved.Inparticular,therearefourmainvariants,dependingonwhetheror notitisrequiredtovisitallpointsSubsetvsAll-Pointsandwhetherornotpointsmay bevisitedmorethanonceUniquevsNon-unique.Underthe discrete Fr echetdistance, allfourofthesevariantsaresolved.However,underthestandard,continuousFr echet distance,onlytheNon-uniqueSubsetversionissolved.Weexploretheremainingthree variantsandshowthattheyareallNP-complete,andgiveanapproximationalgorithm fortheNon-uniqueAll-Pointsversion.Wealsoshowhowthisproblemcanbesolvedif weareallowedtoapplyagivensetofafnetransformations,aswellashowtheproblem changesifthepointsgivenareimprecise. 7

PAGE 8

CHAPTER1 INTRODUCTION “Canthispictureofafacebematchedinadatabase?”“Doesthisimagecontain text?”“DotheseGPSpointsmatchthisroadmap?”Allofthesequestionsareshape matchingproblems,aclassofproblemsubiquitousinmanyeldsofscienceand engineering.Writtensignaturerecognition[64,73],nano-scaleself-assembly[56], andevenagriculturalsorting[65]arejustafewofthecountlessplacesinwhichthis fundamentalproblemarises. Inmanyshapematchingapplications,theshapestobematchedarefullydened, andtheproblemconsistssolelyofdetermininghowsimilarthetwoshapesare. Sometimes,however,theshapestobematchedmaybeonlypartiallydened,and theproblemtakesonanotherdimension.Insteadofsimplydeterminingthedegree ofsimilarity,wecanaskhowbesttocompleteapartiallydescribedshapesothatits similaritytoagiventemplateismaximized.Inthisthesis,wefocusonapartial-input versionoftheclassiccurvesimilarityproblem.Insteadofbeinggiventwocurves,weare givenonlyonecurveandasetofpotentialvertices.Thegoalistocompletethispartial inputbyconstructinganotherpolygonalcurveusingthegivenverticesinsuchawayas tomaximizesimilaritytotherstcurve. 1.1Fr echetDistance Beforetheproblemcanbeformallydened,agoodmetricisrequiredtoformalize theintuitiveconceptof“similarity.”Amongthemanymetricsthathavebeenconsidered, Fr echetdistancehasemergedasapopularandpowerfulchoice.Shapematching withFr echetdistancehasbeenappliedinmanydifferentelds,includinghandwriting recognition[68],proteinstructurealignment[55],andvehicletracking[20]. SinceourmetricofchoiceisFr echetdistance,webeginwithapopular,intuitive descriptionoftheconcept.Themetaphorofapersonwalkingadogisoftenused,with thedogwalkingalongonecurveanditsownerwalkingalongtheother.TheFr echet 8

PAGE 9

distancebetweenthetwocurvesisthelengthofthesmallestleashthatwouldallow boththepersonandthedogtoreachtheendoftheirrespectivecurveswithoutever backtrackingorlettinggooftheleash.Ifaveryshortleashissufcient,thenthecurves areverysimilar.Butifalongerleashisrequired,thenthecurvesareverydifferent. 1.2Problem Wecanextendthedogwalkingmetaphortoourproblemwheretheinputisonly partiallydened.Supposeourdogownerwantstowalkhisdogwhilewalkingdowna pathinagivenpark.Theextremelycuriousandterritorialdogwantstosnifformark everysinglelandmarkalongthepath,runningdirectlyfromonetothenext.Mindful oftheirdog'sinclinations,theownergoesshoppingforaleashlongenoughtoallow thedogtohaveitswaywithoutpullingtheowneroffthepath.Foragivenpathandset oflandmarks,willaleashofagivenlengthbesufcient?Unfortunatelyforownersof territorialdogs,weshowthatthisversionoftheproblemisNP-complete. Weformallydeneourproblemasfollows.Givenapolygonalcurve P ofsize n and apointset S ofsize k ,weseektondapolygonalcurve Q whoseverticesaremembers of S suchthattheFr echetdistancefrom P isminimized.Werefertothisproblemasthe Curve/PointSetMatchingCPSMproblem.Figure5-1showsanexampleinstance. Thereareseveralvariationsofthisproblem.Inthedog-walkingmetaphorabove, wehavetherestrictionthattheverticesof Q are exactly S ;inotherwords,everypoint of S isvisitedby Q .However,wecanalsoconsiderthecasewhereonlyasubsetof S maybevisited.Whetherornotpointsin S areallowedtobevisitedmorethanonce constitutesanothervariation.Wecanalsoconsidertheproblemunderothermetrics, suchasthediscreteFr echetdistance,whichmeasuresdistanceonlyatthecurve verticesinsteadofatallpointsalongthecurves. 1.3Contribution Intheprevioussection,eightdifferentversionsoftheCPSMproblemwere described.Oftheeight,vehavebeensolvedintheliterature,butthreehaveremained 9

PAGE 10

openuntilnow.Inthisthesis,weshowthattheremainingthreeareallNP-complete. Table5-1showstheeightvariationsoftheproblem,withourresultsstarred. DiscreteContinuous SubsetUnique NP-C[72]NP-C* Non-Unique P[72]P[61] All-PointsUnique NP-C[72]NP-C* Non-Unique P[72]NP-C* Table1-1.EightversionsoftheCPSMproblemandtheircomplexityclasses. Furthermore,wepresentanalgorithmforarestrictedversionoftheAll-Points Non-uniqueversion,andshowthatitservesasa3-approximationtotheunrestricted problem.Wealsoshowthat,undercertaincircumstances,theresultreturnedbythis algorithmcanbeconrmedasoptimal.Ouralgorithmrunsin O nk 2 time,where n is thelengthofthegivencurveand k isthesizeofthepointset. Wealsoexaminetheproblemunderimprecision.Weshowthatwhenthepoint setismadeimprecisebyanon-zeroerrorfactor,allversionsoftheproblembecome NP-complete.Wethenexamineasimpliedmodelofimprecisionwhichallowssome versionstobecomepolynomialtimesolvable. 1.4Outline Thestructureofthisdissertationisasfollows.First,inChapter2,wewillreview theliteraturesurroundingthisproblem,highlightingrecentdevelopmentsintheareaof Fr echetdistance-basedproblems.Then,inChapter3,wewillexaminethreeversionsof theCurve/PointSetMatchingproblemandshowthattheyareNP-complete.InChapter 4,wewilldevelopanalgorithmtosolvearestrictedcaseoftheAll-PointsNon-Unique ContinuousversionoftheCPSMproblem.Wewillalsoshowthatthealgorithmserves asa3-approximationtotheunrestrictedcase.Then,inChapter5,wewillexaminethe problemwhenthepointsetisallowedtobetransformedbyanarbitrarysetofafne transforms,andpresentalgorithmstosolveanumberofversions.InChapter6,we 10

PAGE 11

willexaminetheCPSMproblemwhensubjectedtoimprecision,andpresentresults ondifferentimprecisemodels.Finally,inChapter7,wedetailanimplementationofthe algorithmsdiscussed. 11

PAGE 12

" Figure1-1.AninstanceoftheCPSMproblemanditssolution. 12

PAGE 13

CHAPTER2 BACKGROUND TheCPSMproblem,atitscore,isacurvereconstructionproblem.Wearegiven anunorderedsetofpoints,andweseektoconnectthosepointsinameaningfulway. Curvereconstructionisaverywell-studiedproblem[37],andmanypowerfulalgorithms havebeendevelopedtoaddressit,suchastheCRUSTalgorithm[15].However,inmost curvereconstructionresults,thecurveis self-described inthatnootherinputisgiven beyondthepointset.Typicalcurvereconstructionmethodsmakesomeassumptions aboutthenatureofthecurveandattempttotthedataaccordingly,usingtechniques suchasmovingleast-squarestting[58][46],Delaunaytriangulations[38][39],and TravelingSalesperson-basedmethods[14]. Theproblemwithreconstructingself-describedcurvesisthatthepointsetmust beverylargetogetanaccurateresult.However,ifitisknownthattheconstructed curveshouldresembleagiventemplatecurve,wecanmakedowithfarfewerpoints. Tomeasuretheresemblancetothetemplate,weemploythepopularFr echetdistance metric,rstdenedbyMauriceFr echetin1906[47].Sinceitsdevelopment,Fr echet distancehasproventobeapowerfulmetricandaninterestingresearchtopic,and recentyearshaveseenmanyFr echetdistanceresults.Inthischapter,wegiveasurvey ofrecentdevelopmentsinthiseld. 2.1TheFr echetDistanceProblem TherstefcientalgorithmtocomputetheFr echetdistancebetweentwocurves isduetoAltandGodau[11,49].Usingtheso-called free-spacediagram ,theygave an O nm timealgorithmtodeterminewhethertwopolygonalcurvesoflength n and m werewithinFr echetdistance " ofeachother.Thisresultwasextendedtocomputethe exactFr echetdistancebyapplyingthetechniqueofparametricsearchtothedecision versionoftheproblem,yieldingan O nm log nm algorithm.Theparametricsearch technique,whichhasfounduseinmanyotherFr echet-basedproblems,wasitself 13

PAGE 14

renedin[69].Har-PeledandRaichel[52]alsogavearandomizedalgorithmforthe Fr echetdistanceproblemthatmatchesAltandGodau's O nm log nm runningtime, butwithouttheuseofparametricsearch. Findingasubquadraticalgorithmforthedecisionversionproblemhasbeena long-standingopenproblem,andithasbeenspeculatedthattheproblemis3SUM-hard [48][7].Theproblemwasshowntohavean n log n lowerboundbyBuchin[23]. Recently,Buchinetal.[24]developedrandomizedalgorithmstosolvetheoptimization versionin O nm loglog nm 2 inthewordRAMmodeland O nm p log n loglog n 3 = 2 on apointermachine,castingdoubtonthe3SUM-hardnessofthedecisionversion.Very recently,Bringmann[21]showedthatnostronglysubquadraticthatis, O n + m 2 )]TJ/F26 7.9701 Tf 6.587 0 Td [( for any > 0 algorithmforFr echetdistancecanexistunlesstheStrongExponentialTime Hypothesisfails.Thismakesitextremelyunlikelythatsuchanalgorithmexists. However,betteralgorithmshavebeendevelopedforvarious“realistic”classes ofcurves.Driemeletal.[41]gavea + " approximationalgorithmforcomputing Fr echetdistancebetweencurvesthatrunsin O cn =" + cn log n timeforcurvesthatare c -packed .Acurveis c -packedifthetotallengthofthecurveinsideanyballisbounded by c timestheradiusoftheball. MostFr echetdistanceresultsareforpolygonalcurves.However,Rote[66]showed thattheFr echetdistancebetweenpiecewisesmoothcurvescanbecomputed,provided thatthepiecesaresufcientlywell-behaved.Theygaveanalgorithmtosolvethe decisionversionoftheproblemin O nm ,andusedparametricsearchtosolvethe optimizationversionin O nm log nm time. 2.2DiscreteFr echetDistance EiterandMannila[44]introducedtheconceptofdiscreteFr echetdistance,also calledthe coupling distance.UnlikethecontinuousFr echetdistance,discreteFr echet distancetakesintoaccountdistancesonlyatthecurvevertices.EiterandMannila showedthatthediscreteFr echetdistanceisanupperboundforthecontinuousFr echet 14

PAGE 15

distance,andthatthedifferenceisboundedbythelengthofthelongestedgein eitheroftheinputcurves.Theyalsogavean O nm timealgorithmtocomputethe discreteFr echetdistanceexactly.Thisalgorithmremainedthemostefcientwayof computingthediscreteFr echetdistanceuntil2012,whenAgarwaletal.[3]nally brokethequadraticbarrierandgavean O nm loglog n = log n algorithm.Justaswith thecontinuousversion,thisproblemalsohasan n log n lowerbound[23],and nostronglysubquadradicalgorithmcanexistunlesstheStrongExponentialTime Hypothesisfails[21].Betteralgorithmsforrestrictedclassesofcurvesalsoexist[16]. 2.3Fr echetDistanceforSurfaces ThedenitionofFr echetdistanceextendseasilytosurfacesandhigherdimensional spaces.However,computingtheFr echetdistanceforhigherdimensionshasprovento beextremelychallenging.Infact,theproblemofdecidingwhethertwo k -dimensional surfaceshaveFr echetdistancelessthanagivenvalueisnotevenknowntobe decidablewhen k 2 .Godaushowedin[50]thattheproblemisNP-hardwhenthe givensurfacesaretriangulated.Later,AltandBuchin[8,9]showedthattheFr echet distancebetweentriangulatedsurfacesis uppersemi-computable ,thatis,there existsacomputablefunctionthatcanapproximatetheFr echetdistancebetween twotriangulatedsurfacestowithinany "> 0 .Thisshowsthatthedecisionversion isrecursivelyenumerable.Beyondthis,nothingisknownaboutthecomplexityofthe problem,andtherearenoknownapproximationalgorithms. However,thereareresultsforsomerestrictedclassesofsurfaces.In[27],Buchin etal.presentedapolynomialtimealgorithmtodecidewhethertwosimplepolygons haveFr echetdistancelessthanagivenvalue.Theiralgorithmrunsintime O nT nm , where T n isthetimenecessarytomultiplytwo n by n matrices.Later,thisresultwas extendedtogiveapolynomialtimealgorithmforsimplepolygonswithoneholeeach [25].However,inthesamepaper,itwasalsoshownthattheproblemisNP-hardfor polygonswithmorethanonehole,self-intersectingpolygons,and2Dterrains.Cooket 15

PAGE 16

al.showedthattheFr echetdistancebetweentriangulatedsurfaceswhosedualgraphs areacycliccanbecomputedinpolynomialtimeifthenumberoftriangulationedgesin oneofthesurfacesisxed.Theygaveanalgorithmthatrunsin O m 2 k n 3 k +1 log nk , where k isthenumberoftriangulationedgesintherstsurface.Later,theyalsoshowed [34]thattheFr echetdistanceproblemcanbesolvedinpolynomialtimeforacertain classofsurfacestermed foldedpolygons . 2.4MapMatching Altetal.alsoexploredtheproblemofdetermininghowtotranslateacurvesoas tominimizetheFr echetdistancefromanothercurve.Theypresentedanalgorithmthat runsin O nm 3 n + m 2 log n + m .Theyalsopresentedanapproximationalgorithm withasmallerrunningtime.MosigandClausen[63]consideredthesameproblem underthediscreteFr echetdistancemetric,givinganapproximationalgorithmthatruns intime O n 2 m 2 .Recently,deBergandCook[35]proposedanalternativeapproach,by deningavariationoftheFr echetdistancecalledthe direction-based Fr echetdistance thatcomparesdirectioninsteadofdistance.Theyshowedthatthismetriccanbe computedmuchfasterthanoptimaltranslations,andgaveanalgorithmthatcomputesit in O nm log nm time. Altetal.[6]consideredtheproblemofndingapathinagraphwithminimum Fr echetdistancefromagivencurve.Theygaveanalgorithmforthedecisionversion ofthisproblemthatrunsintime O nm log nm log n ,where n isthecomplexityof thegraphand m isthelengthofthegivencurve.Thisalgorithmwasrenedand implementedin[71].ThesameproblemwasalsoexploredbyChenetal.[31],who appliedthesametechniquesusedin[41]toobtainanapproximationalgorithmfor c -packedcurvesandgraphs.Later,Maheshwari[61]consideredtherelatedproblemof ndingacurveonagivenpointsetwhoseFr echetdistancefromanothergivencurveis lessthanagivenvalue.ThisistheCPSMproblemthatwediscussinthisdissertation. Theversiondiscussedin[61]istheNon-uniqueSubsetContinuousversion,anditwas 16

PAGE 17

showntobesolvablein O nk 2 time,where n isthelengthofthecurveand k isthesize ofthepointset.Thissolutionprovidesafasterruntimethanthemuchmorecomplex algorithmin[6]whenappliedtothespecialcaseofacompletegraph.Later,Wylieand Zhu[72]exploredthediscreteversionsoftheCPSMproblem,showingthattheUnique versionswereNP-completeandtheNon-uniqueversionswerebothsolvablein O nk time. 2.5CurveSimplication AmajorareaofexplorationforFr echetdistancehasbeencurvesimplication, orresilienceagainstoutliers.Aspartoftheirinitialworkin[11],AltandGodaualso exploredtheproblemofpartialcurvematching,wherethegoalistodetermineif thereisasubcurveofoneofthetwoinputcurvesthatiswithinagivenFr echet distanceoftheotherinputcurve.Thedecisionversionwassolvedin[11]withan O nm log nm algorithm,whichthenusedparametricsearchtosolvetheoptimization versionin O nm log 2 nm .ThisresultwasimprovedbyMaheshwari[60]to O nm and O nm log nm usingnewdatastructures.Agarwaletal.[4]presentedanear-lineartime approximationalgorithmforthisproblemaswell. Sheretteexaminedthesameproblemforsimplepolygons,buildingonthework in[27],andpresentedanalgorithmthatrunsin O n 3 m log nm .In[26]Buchinetal. consideredtheproblemofallowingbothcurvestobesimplied,wherethegoalistond maximallengthsubcurvesofthegivencurvesthathaveFr echetdistancelessthana givenvalue.Theypresentedan O nm n + m log nm algorithmtosolvethisproblem underthe L 1 and L 1 norms. Inarelatedproblem,[40],DremielandHar-Peledintroducedtheconceptof “short-cut”Fr echetdistance,denedastheminimumFr echetdistanceoverall possibleorder-preservingconcatenationsofsubcurves.Theygaveaconstantfactor approximationalgorithmtocomputethisdistancethatrunsinnearlineartime.De Carufeletal.lookedatthesameproblemfromadifferentperspective,bytryingto 17

PAGE 18

maximizethelengthofthesubcurvesthatarepreservedorminimizethelengthofthe subcurvesthatareexcluded.Theypresenta + " approximationalgorithmforthis problemthatrunsin O n 3 =" log n =" time. 2.6HomotopicFr echetDistance Chambersetal.[29][30]introducedtheideaofthe homotopic Fr echetdistance,in whichthe“leash”inthedog-walkingmetaphorcannotpassthroughcertainobstacles. Theypresentedan O nm log nm k +log k log mn log mnk algorithmtodetermine thehomotopicFr echetdistance,where n and m arethelengthsofthecurvesand k isthetotalnumberofverticesintheobstacles.Later,Har-Peledetal.gavean O log n -approximationalgorithmforcomputingthehomotopicFr echetdistance betweencurvesthatlieontheboundaryofatopologicaldisk.Theirapproximation algorithmrunsin O n 6 log n timeforthecontinuousFr echetdistance,and O n 3 log n timeforthediscreteFr echetdistance.Interestingly,thisproblemisnotevenknowntobe inNP. 2.7ImprecisePointsandWeightedRegions Aninterestingdirectionfortheproblemistoconsiderthecasewherethecurve verticesaregivenasimprecisepoints.ThisideawasexploredbyAhnetal.in[5], wheretheypresentedan O O d 2 n 2 m 2 log 2 nm timealgorithmtocomputethediscrete Fr echetdistancebetweencurveswhoseverticesaremodeledafter d -dimensional balls.Forthespecialcaseof d =2 ,theygaveanimprovedalgorithmrunningin O nm log 2 nm + m 2 + n 2 log nm time.Theyalsogavean O dmn approximation algorithm. Anotherinterestingideaistheconceptofweightedregions.CheungandDaescu [32]exploredtheproblemofndingtheFr echetdistancebetweentwocurvesina weightedregionwithtwovariations.Inonevariation,thedistancebetweentwopoints wastheweightedlengthofthelinesegmentjoiningthem.Intheother,thedistanceis 18

PAGE 19

thelengthoftheshortestpath.Theygave + " factorapproximationalgorithmsfor bothvariations. 2.8OtherResults Fr echetdistanceanditsvariantshavebeenappliedtomanyotherproblems[54] [18][22][36][67].ManyotherdistancemetricsbasedonorcloselyrelatedtoFr echet distanceexist,suchasisotopicFr echetdistance[28],geodesicwidth[51][33],dynamic timewarping[43],averagediscreteFr echetdistance[62],multiple-curveFr echet distance[42][13],andFr echetdistancewithspeedlimits[59]. 19

PAGE 20

CHAPTER3 HARDNESSRESULTS Inthischapter,weshowthattheUniqueSubset,theUniqueAll-Points,andthe Non-uniqueAll-PointsversionsoftheCPSMproblemareallNP-complete.First,we describetherestricted3SATproblemfromwhichourreductionsareobtained.Then,we giveasummaryofthemainideabehindbothreductionsanddescribethemaingadget thatwillbeused.Finally,wegivethefullconstructionsindetail.Someoftheseresults havebeenpublishedin[1]. 3.1Preliminaries Giventwocurves P , Q :[0,1] ! R d ,the Fr echetdistance between P and Q is denedas F P , Q =inf , max t 2 [0,1] k P t , Q t k ,where , :[0,1] ! [0,1] rangeoverallcontinuousnon-decreasingsurjectivefunctions[45].Wemakeuseoftwo commonlynotedobservations: Observation3.1. Endpointrule: Givenfourpoints a , b , c , d 2 R d ,if k ac k " and k bd k " ,then F ab , cd " . Observation3.2. Concatenationrule: Let P 1 , P 2 , Q 1 ,and Q 2 befourcurvesin R d with F P 1 , Q 1 " and F P 2 , Q 2 " .Iftheendingpointof P 1 resp. Q 1 isthesame asthestartingpointof P 2 resp. Q 2 then F P 1 + P 2 , Q 1 + Q 2 " ,where + denotes concatenation. Foragivenapoint p 2 R d andarealnumber "> 0 ,let B p , " f q 2 R d : k pq k " denotethe ball ofradius " centeredat p ,where kk denotesEuclideandistance.Given alinesegment L R d ,let C L , " S p 2 L B p , " denotethe cylinder ofradius " around L .Notethatanecessaryconditionfortwopolygonalcurves P and Q tohaveFr echet distancelessthan " isthattheverticesof Q mustallliewithinthecylinderofsome segmentof P . 20

PAGE 21

3.2RestrictedSatisabilityProblem OurNP-completenessresultsarebothobtainedviaareductionfromarestricted versionofthewell-known3SATproblem.The3SATproblemtakesasinputaboolean formulawithclausesofsize3,andaskswhetherthereexistsanassignmenttothe variablesthatmakestheformulaevaluatetoTRUE.Ifwerestricttheinputtoformulasin whicheachliteraloccursexactlytwice,theproblembecomesthe,B2-SATproblem. Thismayseemtobearatherextremerestriction,and,indeed,formulasofthistype withlessthan20clausesarealwayssatisable.However,despitethisrestriction,the problemwasshowntobeNP-completein[19],andanexampleofanunsatisable formulawith20clauseswaspresented. Inordertosimplifyourreductions,wemakethefurtherrestrictionthatnotwo clauseshavetwoliteralsincommon.Inotherwords,werestricttheinputtoformulasin whichthefunctionthatmapseachliteraltothepairofclausesitappearsinisinjective. Foranyformulathatviolatesthisassumption,anequivalent,compliantformulacan easilybeconstructedbysplittingtheviolatingclausesusingthe“balancedenforcers” describedin[19].Wethereforeassumeformulastohavethispropertyfortheremainder ofthethesis. Observation3.3. The,B2-SATproblemremainsNP-completeevenunderthe restrictionthatnotwoclauseshavetwoliteralsincommon. 3.3Non-UniqueAll-PointsReduction Inthissection,wegivethereductionfrom,B2-SATtotheNon-UniqueAll-Points ContinuousversionoftheCPSMproblem.Let beaformulagivenasinputtothe ,B2-SATproblem.Weconstructapolygonalcurve P andapointset S suchthat is satisableifandonlyifthereexistsapolygonalcurve Q whoseverticesareexactly S withFr echetdistanceatmost " from P . First,weconstructagadgetconsistingofcomponentsof P and S thatwillforceany algorithmtochoosebetweentwopossiblepolygonalpaths.Thegadgetisconstructed 21

PAGE 22

a b c d aThetwodashedcurves aretheonlypossible curveson S withFr echet distanceatmost1from thegivensolidcurve. bMorecornershavebeen added.Thetwointerior pointsareonlyreachable ondifferentcurve possibilities. cAllexceptoneofthetwo interiorpointsare covered,regardlessof whichpathischosen. Notethat representsa pointatwhichpointsof P andpointsof S coincide. Figure3-1.Theseparationgadget,stepbystep. insuchawaythatthesetwochoicesaretheonlypossiblepolygonalpathsalongthe gadget'scomponentof S withFr echetdistanceatmost " from P .Then,wecreatea seriesofpointsin S torepresenttheclausesin ,onepointforeachclause.Foreach variable,agadgetwillbeplacedthatgoesthroughfourpoints,whichrepresentthe fourclausesinwhichthevariableappears.Thegadgetwillbeplacedsuchthatonly theclausesinwhichthevariable'spositiveornegativeinstancesoccurarereachable, butnotboth.Oncethishasbeendoneforeachvariablein ,anypolygonalcurve Q whoseverticesareexactly S with F P , Q " willcorrespondtoanassignmentto thevariablesof inwhicheveryclauseissatised,thusmakingtheformulaevaluate toTRUE.Furthermore,ifnosuchcurveexists,thentherecanbenosuchsatisfying assignmentfor . 3.3.1SeparationGadget Webeginthedescriptionofourmaingadgetwithanexample,whichwelater generalize.ConsidertheprobleminstanceshowninFigure3-1a,with S = f a , b , c , d g .It 22

PAGE 23

isclearthattheanswertothisinstanceis“no”;nopolygonalcurveon S with F P , Q " canvisitboth b and c .However,supposethis P and S werepartofalargerproblem instance.Thensupposethatothersegmentsof P comewithin " of b and c .Theanswer totheprobleminstanceisnolongersoobvious.Evenifbothpointscannotbereached thersttimetheyareencountered,itispossiblethatwhicheverpointwasskipped couldbecoveredinthefuture.Thiscreatesthefundamentaldifcultythatleadstoour reduction. Figure3-1bshowsanextensionofthepreviousconguration,withmorecorners, allsymmetricallythesameastherst.Notehowwehavenotincreasedthenumberof options;therearestillonlytwopossiblepathstotake.Wecanaddasmanyofthese cornersaswelikewithoutbreakingthisproperty,aslongastheyallbendinthesame direction. Thecornerpointsmustbeplacedverypreciselytoensuretheaboveproperties hold.Becausetheirpositionissoconstrained,usingthemtorepresentelementsof inourconstructionwouldbedifcult.Ateachcorner,thetwopathpossibilitiesalternate betweentheboundaryofthecylindersandtheinterior.AsshowninFigure3-1b,extra pointsinthecylinderinteriorarestillonlyvisiblefromtheotherinteriorpoints,and thereforewecanaddasmanyaswelikewithoutaffectingthepathpossibilities.Thus, byextendingthesegmentsbetweenthecorners,wecancreatelargeregionsinwhich wecanplacepointsthatareonlyreachablealongoneofthetwopossibilities.These pointswillrepresentclausesinourconstruction. Thereisstillaproblemtobeaddressed;asmorecornersareadded,morepoints arecreatedthatwouldbeskippedbythechosenpath.Wewouldliketocreatea constructionthatforcesachoiceamongonlythepointsinthecylinderinteriorsand thatensuresallthecornerpointswillbevisitedregardlessofwhichpathischosen.To accomplishthis,afterthelastcornerofthegadget,wecanhave P loopbackaround 23

PAGE 24

x x x x Figure3-2.Apartialconstructionforaformulawith12clauses,showingthegadgetfora singlevariable. alongtheouteredge,coveringallthecornerpointswithoutcoveringanyoftheinterior pointsFigure3-1c. Figure3-2showsanexampleusageofthegadget.Thepointsinthecylinder interiorsrepresenttheclausesinwhichthevariableappears.Onlyonesetofclause points,eithertheclausesinwhichthepositiveornegativeliteralsappear,canbe reached.However,allthecornerpointswillalwaysbecovered.Thefullconstruction willincludeoneofthesegadgetsforeveryvariable,witheachonepassingthroughthe pointscorrespondingtoclausescontainingthevariable'spositiveandnegativeliterals. 24

PAGE 25

3.3.2SeparationCorners Sofar,ourcornerconstructshaveonlybeenshownwithrightangles.However,this willnotbesufcientforthefullconstruction.Wenowgivethefullspecicationsofthe cornerconstructs,grantingthemtheexibilitytobendatanynon-acuteangle .Wecall thesecompletedconstructs separationcorners .Eachseparationcornerconsistsoftwo componentsof P withfourandthreesegmentsrespectively,aswellasfourpointsof S . Figure3-3showsthefullseparationcornerconstruction.Thetwocomponentsof P are A , B , C , D , E ,whichwerefertoasthe forwardpath ,and F , G , H , I ,whichwereferto asthe returnpath .Thefourpointsof S are G , H , K ,and L . A E J F B C D L K G H Figure3-3.Aseparationcornerfor =3 = 4 ,withvariouspropertieshighlighted. Thegadgetislaidoutsuchthatthefollowingpropertieshold: AB , CD ,and JH resp. BC , DE ,and GF areparallelandseparatedbyexactly 2 " . L resp. K isexactly " awayfrom B resp. D andoccursonthelinebetween BC and DE resp. AB and CD . G , H , K ,and L areallcollinear. Thelinethroughmidpointsof AJ and EF passesthrough C . 25

PAGE 26

Thelastpropertyisenforcedsothatanypointsof S incylindersbefore AB are notvisibletoanypointsincylindersafter DE ,thusensuringthatexternalpointscannot breakthepropertiesofthecorner.Usingsimplegeometry,theexactmeasurementsof thegadgetcanbederivedfromthepropertieslistedabove.Thefollowinglistspecies theexactlengthsandanglesofthegadget,referringtothelabelsinFigure3-3. ABC = JHL = = 2 AB = DE = )]TJ/F22 11.9552 Tf 11.955 0 Td [(cos csc BC = CD = GF = JH =2csc HG =+cos sec = 2 Notethatthesemeasurementsimplyacertaincompactness;aninnitestripalong AB ofthickness 14 " issufcienttocontainallpointsofthestructure,includingthe cylinders,forany . 3.3.3Construction Webeginbyaddinganinitialsetofpointsto S whichwerefertoas“clausepoints” C 1 ,..., C n ,oneforeachclausein .Wepositionthesepointssothattheylieonacircle, equallyspaced.Wethenperformthefollowingprocedureforeachvariable v i in , buildingtheconstructionincrementally.Let x and y betheclausesinwhichthepositive literalsof v i occur,and z and w betheclausesinwhichthenegativeliteralsoccur.We beginbypositioningaseparationcornersothattheextensionofthelastsegmentofthe forwardpathpassesthrough C x and C y .Anextrapoint,whichwerefertoasasplitpoint, isaddedontheboundaryoftherstforwardpathsegmenttoallowthesplittingofthe twopossiblepaths.Fromthere,boththeforwardandreturnpathsareextendedthrough theclausering,withtheforwardpathcrossingthrough C x and C y . Ontheoppositeside,outsidetheconvexhullofallpointsin S sofar,another separationcornerisadded,bendingthepathtoward C z C w .Moreseparationcorners,all 26

PAGE 27

bendinginthesamedirection,areaddedasneededuntilonecanbeplacedsuchthat theforwardpathpassesthrough C z and C w .Notethattheremustbeanoddnumberof separationcornersinordertoensurethat C x , C y and C w , C z arereachableondifferent curvepossibilities.Oncethepathshavebeenextendedthroughtheclauseringand outsidetheconvexhull,anothersplitpointisaddedontheboundarytocollapsethe curvepossibilities.Finally,theforwardpathislinkedtothereturnpath,andthejointis addedto S .Attheendofthereturnpath,moresegmentsof P areadded,witheach jointbeingaddedto S ,inordertomovetothenextvariable'sclausepoints.Toavoid interferingwithpreviouslyplacedgadgets,weplaceallnewsegmentsandpoints outsidetheconvexhullofallpreviouslyplacedpointsin S .Figure3-2showsapartial constructionuptotherstclause,while3-4showsacompletedconstructionfora simplerformula.Thelowerrightclausepointrepresentstherstclause,andthesecond, third,andfourthfollowcounterclockwise. Toensureourconstructionisalwayspossible,wemustenforcecertainproperties. First,thecircleonwhichtheclausepointsareplacedmusthavearadiusofatleast n 2 " . Letthe clausestrip alongclauses i and j denotetheregionwithin 7 " oftheline C i C j . Ourchoiceofradiusensuresthat,iftwoclausestripsareparallel,separationcorners placedinsidewillnotinterferewitheachother. Wealsorequirethat,withtheexceptionofthosedirectlyadjacenttoclausepoints, allseparationcornersareplacedentirelyoutsideallstripsalongallclausepairs,soas nottoblockfuturepieces.Thoseseparationcornersthatareadjacenttoclausepoints willlieentirelyinsidethecorrespondingclausestrip,butmustbeplacedoutsideallother clausestrips.Notethatthisisalwayspossible;beyond O n 3 unitsfromthecenterof theclausering,noclausestripintersectsanyother.Stripsofdifferentangleswillgrow furtherandfurtherapart,creatingregionsofarbitrarysizebetweenthem.Wediscuss thisfurtherinthenextsection. 27

PAGE 28

1 2 3 4 Figure3-4.AcompletedconstructionfortheContinuousAll-pointsNon-uniqueCPSM, giventheformula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z 3.3.4SpaceComplexity Givenitsintricacy,thequestionofhowmuchspacetheconstructionusesmustbe addressed.Inthissubsection,weexaminejusthowmuchspaceisrequiredtotthe entireconstruction. Onecauseofconcernisthat,althoughseparationcornerscanalwaystintoan innitestripofwidth 14 " ,thelinelengthsrequiredgotoinnityas goesto .This raisestheconcernthatshallowanglesmaybenecessary,andthattherequiredspace couldexplode.Fortunately,thatisnotthecase.Toshowthis,wewillshowthatthe constructioncanbecompletedusingonlyseparationcornerswith = 2 5 = 6 . Separationcornerswiththispropertycanbeentirelycontainedinsideaballofradius 9 " . Thepurposeofseparationcornersintheconstructionistoallowthecurvetobend whentravelingfromoneclausestriptothenext,eitherbetweenclausesorbetweenthe 28

PAGE 29

trueandfalseportionsofaclause.Foragiventransfer,let bethedifferencebetween thetwoclausestrips.Assumewithoutlossofgeneralitythat = 2 3 = 2 ;ifitisn't, wecansimplyentertheclausestripfromtheoppositesite. Withthisrestriction,exactlythreeseparationcornersarealwayssufcientto transferfromoneclausestriptothenext.If = = 2 ,thethreeseparationcornerswould havetobeattheirshallowest; =5 = 6 .If =3 = 2 ,thentheseparationcornerswould beattheirsharpest; = = 2 .Thus,allclausestripsareaccessible. Aspreviouslystated,beyond n 3 unitsfromthecenteroftheconstruction,noclause stripintersectsanyother,andregionsofarbitraryspaceopenupthefurtheronegoes. Becauseofthis,therewillalwaysberoomtoplacethenextseriesofseparationcorners. Sincethereareonlyaconstantnumberofseparationcornerstobeplaced,andsince eachtakesup O " space,thethicknessoftheringenclosingallseparationcornersfor agivenseriesis O " .Therefore,thespaceisdominatedbytheoriginalrequirementof being O n 3 unitsfromthecenter. 3.3.5Result Lemma1. Thereexistsapolygonalpath Q on S with F P , Q " thatvisitseverypoint in S ifandonlyif issatisable. Proof. Fortheforwarddirection,assume hasasatisfyingassignment.Itiseasytosee thatourconstructionalwayshasapolygonalpath Q on S with F P , Q " thatwillvisit everynon-clausepoint;separationcornersareconstructedspecicallytoensurethis. If hasasatisfyingassignment,thenoneofthetwopathpossibilitiesineachvariable constructwillcovertheclausepointscorrespondingtotheclausessatisedbythat variable,resultinginallclausepointsbeingvisited. Forthebackwarddirection,let Q beapolygonalpathwhoseverticesareexactly S with F P , Q " .Byconstructingeachvariableconstructcompletelyoutside theconvexhullofallpreviouslyplacedpointsof S ,wehaveensuredthatany Q with F P , Q " mustfollowthepathwehavelaidout.Eachvariableconstructforcesa 29

PAGE 30

choicebetweentwopaths,representingatrueorfalsevalueforthatvariable.Since Q visitseachclausepoint,thepathtakenineachvariableconstructrepresentsan assignmenttothevariablesthatsatises . Aspreviouslyshown,theconstructionisofpolynomialsize.Thisleadstothe followingresult. Theorem3.1. TheNon-uniqueAll-pointsContinuousCPSMProblemisNP-complete. Intheconstruction,theonlypointsthatoccurmorethanoncearetheclausepoints andtheinnerseparationcornerpoints.Inalloccurrencesofbothcases,thenextpointis alwaysreachablefromthepreviouspoint.Thus,forthisclassofprobleminstances,any solutiontotheNon-uniqueversionofthisproblemcanbeconvertedtoasolutiontothe Uniqueversionbysimplyskippingthepointsthathavealreadybeenvisited.Thisshows thatthesamereductionappliestotheUniqueversion. Corollary1. TheUniqueAll-pointsContinuousCPSMProblemisNP-complete. 3.4UniqueSubsetReduction Inthissection,wegivethereductionfrom,B2-SATtotheUniqueSubset ContinuousversionoftheCPSMproblem.Acurveis vertex-unique ifithasnoshared vertices.Let beaformulagivenasinputtothe,B2-SATproblem.Weconstructa polygonalcurve P andapointset S suchthat issatisableifandonlyifthereexists vertex-uniquepolygonalcurve Q withFr echetdistanceatmost " from P . Thisreductionmakesuseoftheseparationcornergadgetdevelopedintheprevious reduction.However,sincethegoalandrestrictionshavechanged,thereductionis considerablydifferent.Inthepreviousreduction,theclausegadgetswererelatively xed,andthevariablegadgetswerebuiltaroundthem.Inthisreduction,itwillbethe opposite:theclauseswillbebuiltaroundthevariables.Justasbefore,variableswillbe representedwithseparationcorners,andanassignmenttoavariablewillcorrespond tooneofthetwopossiblepathsthroughit.However,unlikethepreviousreduction,the clauseswillalsoberepresentedwithseparationcorners. 30

PAGE 31

Wewillrstcreateaseriessmallchains,eachconsistingoftwoseparationcorners, laidouthorizontally.Thesechainswillrepresentthevariablesof ,andthefourcorner pointsusedintheseparationcornerswillrepresentthefourliteralinstancesofthe variable.Then,wewillcreateaseparationcornerloopforeachclause.However, insteadofallowingbothpossiblepaths,wewillforceoneofthetwotobechosen. Then,attheendoftheloop,wewillmakethechosenpathendina“deadend”that willnotallowthepathtocontinue.Theloopwillbearrangedsothattheliteralpoints correspondingtotheliteralsusedintheclauseprovideanopportunityforthecurveto “changetracks”andavoidthedeadend.Sincepointscannotbeusedmorethanonce, aliteralpointwillonlybeavailableforusetochangetracksifitwasnotalreadyusedin theinitialvariableassignmentpath.Thus,thereexistsapaththatcantraversetheentire curveifandonlyif hasasatisfyingassignment. 3.4.1PropertiesofSeparationCorners,Revisited Inthepreviousreduction,thereturnpathoftheseparationcornergadgetwas necessarytoensurethatmissedcornerpoints,whichdidnotcorrespondtoclauses, werealwaysvisitedbyeitherpathpossibility.Sinceitisnolongernecessarytovisit everypoint,thisportionofthegadgetcanbedropped,andwecandealonlywiththe forwardpath. Itwasnotedthatextrapointsincylinderinteriorsdonotdisruptthetwo-path propertyofseparationcorners.Conversely,extrapointsonthecylinderboundaries doallowthecurvetoswitchbetweenpaths.Figure3-5showsanexampleofthis. Ordinarily,therewouldonlybetwopathpossibilities,andoncetherstcornerpointis decided,thecurveisfullydetermineduntiltheendoftheloop.However,anextrapoint onthecylinderboundaryallowsthecurveto“changetracks”totheotherpathpossibility. Ofcourse,thiscanonlybedoneiftheextrapointhasnotalreadybeenvisitedinanother partofthecurve.Wewillusethispropertywhenconstructingtheclausesectionofthe construction. 31

PAGE 32

aNormally,oncethecurvestartsdownonepath,changingtotheotherisimpossible. bAnextrapointonthecylinderboundaryallowsthecurvetostartononepathandswitchto theothermidway. Figure3-5.SwitchpointsinSeparationCornerchains 3.4.2Construction:VariableSection Theconstructioniscomposedoftwosections:oneforthevariablesandonefor theclauses.Webeginwiththevariablesection.Theconstructionstartswithaset ofseparationcornersforeachvariablelaidoutasinFigure3-6,creatingtwopath alternativesforeachvariable.Thetwopathpossibilitieswillcorrespondtotrueorfalse assignmentsforthatvariable.Notethatinordertotraversethispartoftheconstruction, x x x x y y y y z z z z Figure3-6.Thevariablesectionoftheconstructionforaformulawiththreevariables, withasamplecurvecorrespondingtotheassignment TRUE , TRUE , FALSE is shown. 32

PAGE 33

eithertheinneroroutercornerpoints must bevisited.Werefertothesepointsasliteral points,astheywillrepresenttheliteralsof .Theoutercornerpointsofeachvariable constructwillbereferredtoasthepositive-points,andtheinnercornerpointswillbethe negative-points. Thepurposeofthevariablesectionisto“useup”theliteralpointscorresponding towhichevertrue/falsevalueis not assignedtothevariable,leavingthepoints correspondingtotheactualvariablevalueforlaterusebytheclausesection.Figure 3-6showshowanassignmenttothevariablesof mapstoatraversalofthevariable sectionintheconstruction.VariablesassignedtoTRUEtaketheinnerpath,leavingthe outerpointsavailableforuselater,whilevariablesassignedtoFALSEtaketheouter path,leavingtheinnerpointsavailable. 3.4.3Construction:ClauseSection Wethencreatetheclausesectionoftheconstruction,appendingittothevariable section.Webeginbyaddingaseparationcornerloop.However,weleaveoutoneofthe twocornerpointsintherstseparationcorner.Thiswillforcethecurvetopickaspecic possibilityandremovetheoptiontopicktheother.Then,weplacemoreseparation corners,arrangingtheloopsothatthethreeliteralpointscorrespondingtotheclause's literalsareexactlyonthecylinderboundariesofthesegments.Oncethisisdone,we removeanotherpointfromthenextseparationcornerintheloopcorrespondingtothe paththatwasforcedearlier,creatingadeadend.Theonlywaytoproceedwillbeto useoneoftheliteralpointstochangetracksbeforethedeadendisreached.Ifnoliteral pointisavailableforuse,thentheclauseisnotsatisedandtherewillbenowayforthe curvetoproceedwhilemaintainingtheappropriateFr echetdistance. Figure3-7demonstratesasingleclauseloop.Notehowtherstandlastseparation cornersoftheclauselooparemissingacornerpoint.Sincethecorrespondingliteral pointsarealreadyused,thereisnoplacetoswitch,andthesolidcurvecannotcontinue becauseofthemissingpointattheend.However,ifthevariable y ischangedtobe 33

PAGE 34

x y z Figure3-7.Aclauseloopfortheclause x _ y _ z . FALSEinsteadofTRUE,thisfreesupthecorrespondingliteralpointtobeusedbythe clauseloop,soitcanescapethedeadend.Thedashedcurveshowsthisconguration. Thisprocessisthenrepeatedforeveryclause,withadeadendseparationcorner betweeneachclauseloop.Thefullconstructionisthereforeonlytraversableifevery clauseloophasapointatwhichitcanswitchtracks,whichcorrespondstoasatisfying assignment.Figure3-8showsacompletedconstruction. 3.4.4Result Lemma2. Thereexistsavertex-uniquepolygonalpath Q on S with F P , Q " ifand onlyif issatisable. Proof. Fortheforwarddirection,assume hasasatisfyingassignment.Thevariable portionoftheconstructionalwayshasavertex-uniquepolygonalpath Q on S with F P , Q " ;assumeeachvariablegadgetischosenaccordingtothesatisfying assignment.Theneachclauseloopwillhaveatleastoneliteralpointthatcanbeused tochangetracksbeforeitsdeadendisreached.Afterallclauseloopshavebeen traversed,theresultingpathwillhaveFr echetdistancelessthan " fromP. Forthebackwarddirection,assume doesnothaveasatisfyingassignment.Then, nomatterhowtheinitialvariableportionoftheconstructionistraversed,therewillbe 34

PAGE 35

x y z Figure3-8.AcompletedconstructionfortheContinuousSubsetUniqueCPSM,given theformula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z atleastoneclauseloopwhichwillnotbeabletouseanyliteralpointitpasses.Once theendoftheclauseloopisreached,therewillbenowaytocontinuethepathwithout increasingtheFr echetdistancefrom P beyond " . Thevariablesectioncontainstwoseparationcornersforeachvariable,andthe clausesectioncontainssixseparationcornersforeachclause,sotheconstructionis clearlyofpolynomialsize.Thisleadstothefollowingresult. Theorem3.2. TheUniqueSubsetContinuousCPSMProblemisNP-complete. 35

PAGE 36

CHAPTER4 APPROXIMATIONALGORITHM Inthischapter,weconsidertheoptimizationversionoftheContinuousNon-Unique All-PointsCPSManddetailapolynomialtimeapproximationalgorithmforit.Todoso, wedevelopanexactalgorithmforarestrictedversionoftheproblem,whichalsoserves asa3-approximationtotheunrestrictedversion.Wealsoshowthat,ifthereturned solutionsatisescertainconditions,itcanbeguaranteedtobetheoptimalsolution. 4.1Preliminaries Inadditiontotheconceptsintroducedpreviously,weintroducethefollowing notation.Wenotethatmuchofthisnotationwasintroducedin[61],butwehavealtered someconcepts. Letthecontinuousfunction P :[0,1] ! R d representacurvein R d .Giventwo points u , v 2 P ,weusethenotation u v if u occursbefore v onatraversalof P .The relation isdenedanalogously. Let P beapolygonalcurvecomposedof n segmentsin R d ,denotedby P 1 , P 2 ,..., P n . Wedenotethecylinders C P i , " as C i .Forconvenience,wedene C 0 and C n +1 tobe the " -ballsaroundthestartandendpointof P .Theset S i isdenedas S C i .Finally, foragivensegment P i andapoint s ,wedenotetherstandlastpointsof P i thatare within " of s as L " i s and R " i s ,respectively. Let Q beapolygonalcurvewhoseverticesarefrom S andwhoseFr echetdistance from P isatmost " .Forsomevertex s 2 S , Q issaidto visit apoint s 2 S atsegment i ifthereexistsubcurves P 0 and Q 0 ,eachbeginningthestartoftheirrespectivecurves, suchthat Q 0 endsat s , P 0 endsatsomepoint p 2 P i ,and F P 0 , Q 0 " .Apoint s 2 S i issaidtobe reachable at i ifthereexistsacurvethatvisitsitat i ,andthepair s , p is calleda feasiblepair . 36

PAGE 37

4.2RestrictedProblem ThemaincombinatorialchallengeoftheAll-Pointsversionoftheproblemstems fromthefactthatapointinmultiplecylinderscanbevisitedatanyoneofthem.To removethischallenge,weintroduceanadditionalrestrictiontotheproblem:Weenforce thateachpointin S bevisitedatitsclosestsegment.Visitingpointsatothersegments isalsoallowed,buteachpointmustbevisitedasitsclosestsegmentevenifitisalso visitedinanotherone.Wecallacurvethatrespectsthiscondition NS-compliant NearestSegmentcompliant. Intheunrestrictedproblem,thedecisionwhetherornottovisitagivenpointata givencylinderisdependentontheentireproblem;thedecisionmustbemadebased onwhetherornotitispossibletovisitthatpointatsomeothersegment.Theadditional restrictionofNS-compliancedisconnectsthisdecisionfromtherestoftheproblemby makingitdependentonlyonwhetherornotthepointisclosesttoagivensegment.This makestheproblempolynomial-timesolvable,andinthefollowingsections,wegivean algorithmforthisversionoftheproblem. 4.3SubsetAlgorithmOverview OuralgorithmfortheNS-compliantversionreliesonthealgorithmfortheSubset versionoftheproblemgivenin[61].Inthissection,webrieysummarizetheiralgorithm. Analgorithmisrstgivenforthedecisionversionoftheproblem,whichdecidesif thereisavalidpathwithFr echetdistanceatmost " from P .Therststepistocompute areachabilityfunction r i s , t .Let s 2 S i beapointthatisreachableat P i bysome feasiblecurve Q endingin s .Thenforapoint t 2 S , r i s , t isdenedasthelargest index j i suchthatthecurve Q + st visits t at P j ,or0if Q + st isnotfeasible.As provenin[61], t isreachableat P j forall i j r i s , t .Therefore,thisvalueprovides reachabilityinformationforallpairsofpointsin S fromanysegmenttoanyother.This reachabilityfunctionisprecomputedastherststepoftheSubsetalgorithm. 37

PAGE 38

Ofcourse,thisvalue r i s , t isonlyvalidif s isindeedreachableat P i .Atrst,this isonlyknownforpointsin C 1 .Thealgorithmworksbypropagatingthisreachability informationthroughthecylindersinsequence.Oncethereachabilityofallpointsis known,theproblemissolved.Ifthereexistsapointthatisreachableat C n +1 , yes is returned;otherwise, no isreturned. Withanalgorithmforthedecisionversioninhand,thetechniqueofparametric searchisemployedtondtheoptimalcurve.Byanalyzingtheso-called freespace diagram of P andeachofthe S S possiblesegmentsof Q , O nk 2 criticalvaluesof " canbeidentied.Thesevaluescanthenbesorted,andthedecisionversionofthe algorithmcanbeusedtobinarysearchforthesmallestvalue.Thisyieldsanalgorithm withrunningtime O nk 2 log nk . 4.4NS-CompliantAlgorithm Wefollowtheparametricsearchparadigmbyrstdevelopinganalgorithmforthe decisionversionoftheproblem.Foragiven s 2 S ,let P s bethesegmentof P closestto s .Letthe essentialpoints of P i ,denotedby S i ,betheset f s 2 S j P s = P i g . Anobviouspreprocessingstepistoconrmthatallpointsof S areamember ofsome S i .Anotheristoconrmthat S 0 and S n +1 arenon-empty.Ifeitherofthese conditionsarefalse,wecanstopandreturnfalseimmediately.Foragiven s 2 S ,let P s bethesegmentof P closestto s .Letthe essentialpoints of P i ,denotedby S i ,bethe set f s 2 S j P s = P i g .Notethatifallpointsof S areamemberofsome S i ,then S i S i . Everypointmustbevisitedatitsclosestcylinder.However,itmaybenecessaryto visitpointsinothercylindersaswell.Forexample,somepoint s 2 S i mayneedtobe visited,evenif S i = ; ,inordertostayclosetothegivencurveandreachfuturepoints. Ifwethinkofpointsinmultiplecylindersasseparatepoints,thentherearetwotypes: pointswemustvisit,andpointswemayskip.Inthisway,theproblemcanbethought ofasavariantoftheSubsetversion.Theonlydifferenceisthatitisrestrictedtopass 38

PAGE 39

throughcertainpointsatcertaincylinders.Thisobservationleadsustouseamodied versionofthealgorithmin[61]tosolvetheproblem. PerourrestrictionofNS-compliance,everypointmustbevisitedatitsclosest cylinder.However,itmaybenecessarytovisitpointsinothercylindersaswell.For example,evenif S i = ; ,somepoint s 2 S i mayneedtobevisitedinordertostay closetothegivencurveandreachfuturepoints.Ifwethinkofsinglepointsinmultiple cylindersasiftheywereseparatepoints,thentherearetwotypes:pointswemustvisit, andpointswemayskip.Inthisway,theproblemisverysimilartotheSubsetversion,in whichallpointsarethelattertype. Inordertovisiteverypointinasegment'sessentialset,caremustbetaken regardingtherstandlastpointsvisitedforagivensegment.Let s 2 S i betherst pointvisitedin P i ,whichmaynotbeanessentialpointof P i .Ifthereexistsanessential point s 0 forwhich R " i s 0 L " i s ,thenitwillnotbepossibletovisit s 0 ;thecurvehas alreadygonetoofarandcannotbacktrackfarenough.Bythesametoken,if t 2 S i is thelastpointvisitedin P i andthereexistsanessentialpoint t 0 forwhich L " i t 0 R " i t , then t 0 mustnothavebeenvisited,becauseitistoofaraheadtohavebeenbacktracked from. Toformalizethisnotion,wesayapoint t isan entrypoint for P i if L " i t R " i s for all s 2 S i .Analogously,wesay t isan exitpoint if R " i t L " i s forall s 2 S i .Note that,if S i = ; ,theneverypointin S i isanentryandexitpointforthatsegment.Inorder toensurethateverypointin S i canbevisited,wemustentereachcylinderviaanentry pointandleaveitthroughanexitpoint.Aslongasthisisenforced,wecansimplyvisit alltheessentialpointsinmonotonicorderalongthesegment. Lemma3. AcurveisNS-compliantonlyiftherstlastpointvisitedineachcylinderis anentryexitpointforthatsegment. 39

PAGE 40

Lemma4. Ifthereexistsacurveon Q withFr echetdistanceatmost " from P suchthat therstlastpointvisitedineachcylinderisanentryexitpointforthatsegment,then thereexistsanNS-compliantcurveaswell. TomodifytheSubsetalgorithmforourpurposes,weneedonlymodifythe reachabilityfunction r i s , t .Inordertoensurethatnoessentialpointsareskipped, wemustmodify r i s , t toobtainanewfunction r 0 i s , t withthefollowingproperties: r 0 i s , t mustbeeither0or i if s isnotanexitpointfor P i . If P r 0 i s , t > i ,then t mustbeanentrypointfor P r 0 i s , t . Allcylinders j for i < j < r 0 i s , t musthaveemptyessentialsets. Thersttwopropertiesensurethateachcylinderisenteredviaanentrypointand leftviaanexitpoint.Thethirdensuresthatthecurveisnotallowedtobypasscylinders withnon-emptyessentialsets.Notethatthepreviouslystatedpropertyof t being reachableat P j if t 2 P j for i j r 0 i s , t stillholdsunderthisruleset;if r 0 i s , t > i , theneverycylinderinbetweenhasanemptyessentialset,andeverypointinacylinder withanemptyessentialsetisanentrypoint. Inordertocomputethemodiedreachabilityfunction,werstdenethreehelper functionsforeachofthethreerules.Wewillthendenethemodiedreachability functionintermsofthethreehelperfunctions.Let r exit i s , t bedenedasfollows.If s is anexitpointfor i ,then r exit i s , t = r i s , t .Otherwise, r exit i s , t equals i if t 2 S i and 0 if not.Wedene r entry i s , t bethelargestvalueof x suchthat i < x r i s , t and t isan entrypointfor x .Ifnosuchvalueexists, r entry i s , t equals i if t 2 S i and 0 ifnot.Finally, wedene e i tobetheindexoftherstsegmentafter i withanon-emptyessentialset. Usingthethreehelperfunctions,wedene r 0 i s , t astheminimumof r i s , t , r exit i s , t , and r entry e i s , t .Itisstraightforwardtoverifythatthisdenitionrespectsthethreerules above.Itisalsocomputablein O nk 2 timebyprecomputingthehelperfunctions. Underthismodiedreachabilityfunction,theSubsetalgorithmdecidesthe NS-compliantproblem.Notethat,eventhoughtheactualcurvereturnedbytheSubset 40

PAGE 41

algorithmisnotguaranteedtovisitallpoints,itwillreturnacurvethatenterseach cylinderviaanentrypointandexitsviaanexitpoint,whichissufcienttoguarantee theexistenceofanNS-compliantcurve.Thepseudo-codeforthealgorithmisshownin Algorithm1below. Algorithm1 NS-compliantCPSM P , S , " 1: Compute S i and S i forall i 2: If anypointisoutsideall S i , returnno 3: Compute r i s , t forall 1 i n and s , t 2 S 4: Computetheentryandexitsetsforeachsegment. 5: Modify r i s , t toobtain r 0 i s , t 6: ApplytheSubsetalgorithmusing r 0 i s , t 7: Return theresult TimeComplexity. Lines1and2ofAlgorithm1takes O nk time.Lines3and 6take O nk 2 time[6,61].ComputingtheentryandexitsetsonLine4requires comparing O k candidateswith O k otherpoints,repeatedforeachofthe n cylinders, sothissteptakes O nk 2 time.Finally,computing r 0 i s , t inLine5takes O nk 2 time,as previouslydiscussed.Thus,thecomplexityofthealgorithmis O nk 2 . 4.5ApproximationProof WenowshowthattheoptimalNS-compliantcurvehasatmost3timesthe Fr echetdistanceoftheoptimalunrestrictedcurve.Toshowthis,wewilltakeacurve thatisnotNS-compliantandtransformitintoacurvethatis.Wewillshowthatthis transformationincreasestheFr echetdistancebyafactorof3atmost,whichimpliesthe aforementionedresult. Foragiven P and S ,let Q beacurveon S thatvisitsallpoints,butisnotnecessarily NS-compliant.Let " betheFr echetdistancebetween P and Q .Somepointsof S may notbevisitedattheirclosestsegment;let s besuchapoint.Itmustbetruethat s is within " of P s ,oracurvewithFr echetdistance " wouldnotbepossible.Recallthat, since Q iswithinFr echetdistance " of P ,thereisalwaysatleastonefeasiblepairfor anypointon P .Let p , s 0 beafeasiblepairsuchthat s 2B p , " .Then,add s 0 asa 41

PAGE 42

newvertexof Q .Notethatthedistancebetween s and s 0 isatmost 2 " .Repeatingthis processforeverypointnotvisitedatitsclosestsegmentyieldsanewcurve Q 0 .Since eachnewvertexhasbeenaddedalonganexistingsegment, F P , Q = F P , Q 0 . Now,mergeeach s 0 withitscorresponding s bytranslatingtheformertothe positionofthelatter,yieldinganewcurve Q 00 .HowdoesthisaffecttheFr echetdistance from P ?Let and bereparameterizationsof P and Q 0 ,andconsiderthepoint Q 0 t forsome t 2 [0,1] ,whichliesonsomesegmentof Q 0 .Theendpointsof thecorrespondingsegmentin Q 00 mayhavebeenperturbedupto 2 " ,andthusthe point Q 00 t maybeupto 2 " awayfrom Q 0 t .Therefore, k P t , Q 00 t k canbeatmost 2 " largerthan k P t , Q 0 t k .Finally,sincetheFr echetdistance istheinmumofthemaximumdistanceoverallreparameterizations,wehavethat F P , Q 00 F P , Q 0 +2 " =3 " .ThisimpliesthattheFr echetdistancebetween P and theoptimalNS-compliantcurveisatmost3timesthatoftheunrestrictedcurve. Theorem4.1. Givenapolygonalcurve P andapointset S ,apolygonalcurve Q whose verticesareexactly S with F P , Q atmost3timesthatoftheclosestcanbecomputed in O nk 2 log nk time. AsFigure4-1shows,theapproximationboundisrealizable.Ifthetwomiddlepoints areslightlyclosertothetopsegmentsthantothebottomsegment,theoptimalsolution fortheNS-compliantversionhasFr echetdistance3timesthatoftheunrestricted version.Note,however,ifthealgorithmyieldsaFr echetdistanceforwhichnopointin S belongstomorethanonecylinder,itmustbethattheFr echetdistanceisoptimalforthe unrestrictedproblem. 42

PAGE 43

" aTheoptimalsolutionfortheNS-compliantproblem. 3 " bTheoptimalsolutionfortherestrictedproblem. Figure4-1.Demonstrationofthetightnessoftheapproximationbound 43

PAGE 44

CHAPTER5 CPSMUNDERTRANSFORMATIONS 5.1Motivation Inmostapplicationsofshapematchingproblems,dataistypicallygatheredasa pointsetthroughsometypeofscanner,andthegoalisoftentondcertainobjects, describedaspolygonalcurves,inthescene.Inordertoperformamatching,oneneeds asimilaritymetricbetweengeometricconstructs.Inthispaper,westudytheproblemof curveandpointsetmatching,usingtheFr echetdistanceasthesimilaritymetric. Givenapointsetandapolygonalcurve,thegoalistoconnectthepointsintoa newpolygonalcurvethatissimilartothegivencurve.Animportantfactoriswhether ornottheinputcurveisallowedtobetranslatedortransformed.Theprobleminwhich thecurveisxedinplacehasbeenwell-studiedintheliterature[1,61,72],andwe refertoitinthispaperasthe Curve/PointSetMatchingCPSM problem.Formally, givenapolygonalcurve P oflength n ,apointset S ofsize k ,andarealnumber "> 0 , determinewhetherthereexistsapolygonalcurve Q onasubsetofthepointsof S such that F P , Q " . EightversionsoftheoriginalCPSMproblemcanbeclassiedbasedonwhether theuseofallpointsisenforced,whetherpointsareallowedtobevisitedmorethan once,andwhethertheFr echetdistancemetricusedisdiscreteorcontinuous.Table5-1 summarizestheversionsandtheirknowncomplexityclasses. Fr echetdistanceisapowerfulandusefulmetric,butitisverysensitivetopositional androtationaldifferences.Ifthegoalistolocateacurveinapointsetthatissimilar DiscreteContinuous SubsetUnique NP-C[72]NP-C[2] Non-Unique P[72]P[61] All-PointsUnique NP-C[72]NP-C[1] Non-Unique P[72]NP-C[1] Table5-1.EightversionsoftheCPSMproblemandtheircomplexityclasses. 44

PAGE 45

Figure5-1.AninstanceoftheTCPSManditssolution. toagivencurve,manyapplicationswouldwanttheshapeofthecurvetobetheonly relevantfactor,notitspositionororientation.Onewaytoachievethisistoallowthe curvetobetransformedbyanafnetransformationfromauser-speciedset.Indeed, intheliterature,theproblemofmatchingtwocurvesunderaspeciedsetofafne transformationshasbeenwell-studied[55,70].Inthispaper,weintroducethe TransformedCurve/PointSetMatchingTCPSM problem,inwhichthegoalistondthe transformationof P limitedtoauser-speciedsetthatputsitclosesttosomecurve whoseverticesarein S .Figure5-1showsanexampleinstance.Wenotethat,inthis paper,wefocusontheNon-uniqueversionsonly,andweusetheconventionthatallthe TCPSMproblemsdiscussedhenceforthrefertotheNon-uniqueversion. Ourresults. Wepresentanalgorithmthatmakesuseoftheresultsin[61]and[70] tosolvetheContinuousNon-UniqueTCPSM.Thealgorithmrunsin O nk 2 d +1 k time forthedecisionversionoftheproblem,where d isthenumberofdegreesoffreedomin theafnetransformmatrix.Similarly,weshowhowtheDiscreteversionsaresolvablein asimilarfashion,resultingin O nk d n + k log k timealgorithmsforboththeSubset andAll-Pointsversions.Finally,weshowthattheoptimizationversionofalltheproblems discussedcanbesolvedwithanadditional O log nk factorviaparametricsearch.It 45

PAGE 46

isinterestingtonotethatthediscreteCPSMisactuallyidenticaltoanotherwellknown matchingproblem:thedirectedHausdorffdistancebetween S andtheverticesof P . Becauseofthis,ourresultsonthediscreteCPSMdoubleasresultsforthedirected Hausdorffdistance. 5.2Preliminaries Below,wepresentthenotationthatwillbeusedthroughoutthepaper,someof whichissimilartothenotationusedbyearlierwork[1,6,61].Morewillbeintroduced laterasneeded.Giventwocurves P , Q :[0,1] ! R d ,the Fr echetdistance between P and Q isdenedas F P , Q =inf , max t 2 [0,1] k P t , Q t k where , :[0,1] ! [0,1] rangeoverallcontinuousnon-decreasingsurjectivefunctions [45].DecidingwhethertwocurveshaveFr echetdistancelessthanagiven " canbe donein O nm time,andndingtheactualFr echetdistancecanbedeterminedin O nm log nm timebyapplyingparametricsearch[11].TheContinuousSubsetCPSM, whichusesthecontinuousFr echetdistance,issolvablein O nk 2 time[61]. DiscreteFr echetdistanceisavariationofthestandardFr echetdistancethatonly takesintoaccountdistanceatthecurvevertices[44].Fortwocurves P and Q oflengths n and m respectively,a pairedwalk or couplingsequence isapairofintegersequences a 1 , b 1 ,..., a k , b k , k max n , m ,withthepropertiesthat a 1 , b 1 =,1, a k , a k = n , m ,andforall i , a i +1 , b i +1 2f a i +1, b i , a i , b i +1, a i +1, b i +1 g .Let W bethe setofallpairedwalksfor P and Q .Thenthe discreteFr echetdistance canbedened as: F =min a , b 2 W max i k P a i , Q b i k Notethat F P , Q F P , Q .ThediscreteFr echetdistancecanbecomputeddirectly, withouttheneedforparametricsearch,in O nm timeviaadynamicprogramming algorithm[44].Recently,Agarwaletal.[3]presentedanalgorithmthatndsthediscrete Fr echetdistancein O nm loglog nm = log nm time,breakingthequadraticbarrier 46

PAGE 47

forthisproblem.In[72],Wyliepresentedan O nk algorithmforthediscreteCPSM. However,aswehavepreviouslynoted[2],thediscreteCPSMisactuallyequivalentto thedirectedHausdorffproblem,whichcanbesolvedin n + k log k time[10]. Apolygonalcurve P isdenedbyasetofvertices P 0 ,..., P n .Weuse P i toreferto thesegmentof P between P i )]TJ/F23 7.9701 Tf 6.587 0 Td [(1 and P i ,andweuse V P todenotethesetofverticesof P .Let P and Q becurvesand " = F P , Q .Apairofpoints p , q 2 P Q ,residingin segments P i and Q j respectively,issaidtobe feasible ifthesubcurves P 0 ,..., P i )]TJ/F23 7.9701 Tf 6.586 0 Td [(1 , p and Q 0 ,..., Q j )]TJ/F23 7.9701 Tf 6.587 0 Td [(1 , q haveFr echetdistanceatmost " .If p , q 2 P i Q isfeasible,we saythat q is visitedat segment i of P .Foreverypoint q 2 Q ,theremustbeatleastone feasiblepair p , q ,andthuseverypointin Q isvisitedinatleastonesegmentof P . 5.3PreviousWork 5.3.1Maheshwari'sAlgorithm In[61],Maheshwarietal.gaveadynamicprogrammingalgorithmtosolvethe ContinuousSubsetCPSMinpolynomialtime.Thealgorithmreliesonapreviousresult byAltetal.[6]tocomputethereachabilityinformationforeverypairofpointsin S with respectto P .Startingfromtherstvertexof P ,thealgorithmworksbycomputing whichpointsarereachableatwhichsegments,propagatingthisreachabilityinformation throughthecurve.Oncethenalvertexof P isreached,ifanypointsin S arestill reachable,thealgorithmreturns TRUE .Itrunsin O nk 2 time.Weneednotmodify Maheshwari'salgorithmforourpurposes;wesimplycallitasasubroutine. 5.3.2Wenk'sAlgorithm Wenk[70]lookedataproblemsimilartotheTCPSM.Inthatproblem,insteadof matchingacurvetoapointset,theymatchacurvetoanothercurve,allowingoneof themtobetransformedinordertondtheoptimalFr echetdistance.Aswewillmake useofthisalgorithm,wegiveafulloverviewinthissection. 47

PAGE 48

Let T bearationallyparameterized 1 subsetofthesetofafnetransformations operatingin R D .Eachtransformationin T canberepresentedbya D D linear transformationmatrix A andatranslationvector t 2 R D .Thus,thenumberofdegreesof freedom d isatmost D 2 + D ,andtheparameterspaceof T canberepresentedby R d . In[70],Wenkconsiderstheproblemofndingthe x 2 R d thatminimizes F A x P + t x , Q , where P and Q arepolygonalcurves.InkeepingwithmanyotherFr echetresults,the strategyemployedistorstsolvethedecisionversionoftheproblem,whichasksif thereexistsan x 2 R d forwhich F A x P + t x , Q " ,andthenuseparametricsearchto ndtheminimum.Forbrevity,welet x P = A x P + t x . Lemma5. [70] Foranytwopolygonalcurves P and Q , F x P , Q iscontinuousasa functionof x 2 R d . Corollary2. [70] Foragiven "> 0 ,ifthereexistssome x 2 R d forwhich F x P , Q < " ,thenthereexistssome x 2 R d forwhich F x P , Q = " Lemma6. [70] If F P , Q = " ,theneither: thereexistsavertex x fromonecurveandasegment Z fromtheothercurvefor which min z 2 Z k x , z k = " , orthereexisttwovertices x and y fromonecurveandasegment Z fromtheother curveforwhich k x , z k = k y , z k = " forsome z 2 Z . Theabovelemmashowsthat,inordertondatransformationof P whichputs itsFr echetdistancefrom Q atexactly " ,weneedonlyconsiderthosetransformations whichcauseoneofthesetwoconditionstoarise.Bothinvolveasegmentandatmost twovertices.Thisleadstotheintroductionofcongurations. Denition1. [70] A conguration isatriple x , y , Z ,where x and y areverticesfromone curvepossiblythesamevertexand Z isasegmentfromtheother. 1 See[70]forafulldenitionof“rationallyparameterized.”Thesetofrationally parameterizedafnetransformsincludesthesetofallcommonlyusedtransformation types,suchastranslations,rotations,similarities,andarbitraryafnetransforms. 48

PAGE 49

Denition2. [70] Foragivenconguration c = P i , P j , Q k ,thesetof critical transformations T " crit c isdenedas: T " crit c = 8 > < > : f x 2 R d j min z 2 Q k k x P i , z k = " g : i = j f x 2 R d j9 z 2 Q k k x P i , z k = k x P j , z k = " g : i 6 = j Symmetrically,if c = Q i , Q j , P k , T " crit c = 8 > < > : f x 2 R d j min z 2 x P k k Q i , z k = " g : i = j f x 2 R d j9 z 2 x P k k Q i , z k = k Q j , z k = " g : i 6 = j Atransformation x issaidtobe critical ifitiscriticalforsomeconguration c .The arrangementin R d ofallcriticaltransformationsisdenotedby A " crit . Lemma7. [70] Ifthereexistsatransformation x suchthat F x P , Q <" thenthere existssomeface F 2 A " crit suchthat F y P , Q " forall y 2 F . Aftershowingtheselemmas,thestrategyemployedbyWenk[70]istoobtain asamplepointfromeachfacein A " crit andchecktheFr echetdistanceforeach correspondingtransformation.Toobtainsuchasample,aresultofBasu,Pollack, andRoy[17]isemployed.Thisresultshowshowtoobtainasamplepointfromeach faceofanarrangementofsemi-algebraicsetsin d -dimensionalspacein O M d time andspace,where M isthenumberofsets.Theresultingsamplesetistermeda semialgebraicsample .Ofcourse,thisdoesrequireonelastlemma. Lemma8. [70] Foranyconguration c , T " crit c issemi-algebraic. Sincethereareatotalof n 2 m + nm 2 possiblecongurations,andsincedeciding iftheFr echetdistanceoftwocurvesislessthan " takes O nm time[11],thetotal complexityofWenk'salgorithmis O nm d +1 n + m d . 5.4ExactAlgorithmsfortheTCPSM 5.4.1ContinuousSubsetversions Wenk'salgorithmreliesontheconceptofaconguration:atripleoftwovertices fromonecurveandasegmentfromtheother.Theimportantobservation,however,is 49

PAGE 50

thateachcongurationisindependentoftheothers,andtheorderoftheverticesisnot relevanttotheconstructionofthearrangement.Therefore,tosolvetheTCPSMinwhich oneofthecurvesisunknown,computingasupersetofthecongurationsofavalid curveissufcient.Wecandothisbyconsideringallpointsandpotentialedgesin S . Thecongurationscorrespondingtoavalidcurve Q ,ifthereisone,willbeamongthem. Theadditionofextracongurationstothearrangementdoesnotaffectthecorrectness ofthealgorithm. Sincethereare k 2 potentialedgesinthepointset,thenumberofcongurations M is O nk 2 + n 2 k 2 = O n 2 k 2 .Thesemi-algebraicsamplecanbecomputedin O M d = O nk 2 d .Finally,eachpossibletransformationmustbecheckedwith Maheshwari'salgorithm,whichtakes O nk 2 time[61].Thus,thetotalrunningtime forthedecisionversionis O nk 2 d +1 k .Theoptimizationversioncanbesolvedusing parametricsearch,whichaddsanadditionallogfactor,leadingtoarunningtimeof O nk 2 d +1 k log nk . 5.4.2DiscreteSubsetandAll-pointsversions TheDiscreteversionsoftheTCPSMcanbesolvedinasimilarfashion,butthe lemmasaboveneedtobereexaminedtoensuretheyholdforthediscreteFr echet distance.Lemma5triviallyholdsfromthefactthatthediscreteFr echetdistanceis denedbyasetofminimumsandmaximumsofEuclideandistancefunctions. Lemma9. Foranytwopolygonalcurves P and Q , F x P , Q iscontinuousasa functionof x 2 R d . Lemma6isnotaseasy;itonlyholdstrueforthecontinuousFr echetdistance.Its discretecounterpartisasfollows. Lemma10. If F P , Q = " ,thenthereexisttwovertices P i and Q j forwhich k P i , Q j k = " . Proof. TheproofismuchsimplerthanthecorrespondingcontinuousLemma,owing tothefactthatthenumberofuniquepairedwalksisnite.Sincetheexpressioninside 50

PAGE 51

theminimumandmaximumofthediscreteFr echetdistances'denitionisthedistance betweentwovertices, F mustbeoneofthesedistances. Thus,congurationsforthediscreteproblemareredenedasapair P i , Q j ,and criticaltransformationsofaconguration c = P i , Q j areredenedas: T " crit c = f x 2 R d jk x P i , Q j k = " g ThediscreteFr echetequivalentofLemma8triviallyholdsforthisnewdenition,as T " crit c isdenedbyasimplepolynomialexpression.ThediscreteFr echetequivalent ofLemma7alsoholds,butalthoughtheproofisverysimilartoproofforthecontinuous versiongivenin[70],wefeelitisdifferentenoughtowarrantatleastasketchofthe proof,highlightingthedifferencesbetweenthetwo. Lemma11. Ifthereexistsatransformation x suchthat F x P , Q <" thenthere existssomeface F 2 A " crit suchthat F y P , Q " forall y 2 F . Proof. BythecontinuityofdiscreteFr echetdistanceanditscorollary,theexistenceof atransformation x forwhich F x P , Q <" impliestheexistenceofatransformation x = forwhich F x = P , Q = " .ByLemma10,thereissomeconguration c for which x = 2 T " crit c .Let F betheconnectedcomponentof T " crit c thatcontains x = .If F y P , Q " forall y 2 F ,theclaimisshown.Otherwise,let x > 2 F besuchthat F x > P , Q >" . Let R beacurveon F suchthat R = x = and R = x > ,andlet " r = F r P , Q for r 2 R .Assumewithoutlossofgeneralitythat " R s >" for any s > 0 .FromthedenitionofdiscreteFr echetdistanceandthecontinuityof criticaltransformationsasafunctionof " ,wehavethattheremustexistsomeopen neighborhood S around0forwhich R s 2 T " R s crit c forall s 2 S andsome conguration c .Therefore,since T a crit c T b crit c = ; for a 6 = b ,wehavethat R 2 T " crit c ,but R s = 2 T " crit c foranysmallvalueof s .However, R F T " crit c . 51

PAGE 52

Therefore, c 6 = c and x = 2 T " crit c T " crit c .Wethenapplythesameargumenttothe lowerdimensionalface F T " crit c T " crit c of A " crit ,andtheclaimfollowsbyinduction. Withtheequivalentlemmasinhand,thesolutionapproachremainsthesame. However,thetimecomplexityisofcoursemuchfasterthanthecontinuousversion, owingtothesmallernumberofcongurationsandthesimpleralgorithmforthe discreteCPSM.Thenumberofcongurationsis O nk ,andeachsamplepointin thetransformationspacecanbetestedin O n + k log k time,leadingtoanalrunning timeof O nk d n + k log k forthedecisionversionand O nk d n + k log k log nk fortheoptimizationversion.Theparametricsearchanalysisin[70]forcomputingthe " valuestocheckappliesstraightforwardly. Wenotethat,forthespecialcaseoftranslationsin R 2 and R 3 ,abetteralgorithm isknown.In[53],theauthorspresentanalgorithmforsolvingthedirectedHausdorff distanceundertranslations.BecausethediscreteCPSMisequivalenttothedirected Hausdorffdistance,theseresultsapply,andtheiralgorithmcanbeused.Theiralgorithm runsintime O nk n + k log nk for R 2 andtime O nk 2 n + k nk log 2 nk for R 3 ,where istheinverseAckermanfunction.Thisisbetterthanthegeneral casealgorithmdescribedabove,whichwouldbe O nk 2 n + k log k log nk and O nk 3 n + k log k log nk respectively. 5.5ApproximationAlgorithms 5.5.13-ApproximationforContinuousAll-PointsTCPSM InChapter4,wepresenteda3-factorapproximationalgorithmfortheContinuous All-pointsversionoftheCPSM,whichisNP-complete.Theapproximationalgorithm worksbyrstdecidingifthereiscurvethat,inadditiontohavingFr echetdistanceat most " from P ,visitseachpointin S atitsclosestsegment.Recallthatsuchacurveis called NS-compliant . 52

PAGE 53

Denition3. Let " = F P , Q ,where P and Q arecurves,andforagivenpoint q ,let c q betheindexofthesegmentof P nearest q . Q issaidtobe NS-compliant if,for everypoint q inthevertexset V Q ,thereexistsavertex Q i = q thatisvisitedat P c q . Lemma12. Let " = F P , Q ,where P and Q arecurves.ThereexistsanNS-compliant curve Q 0 withthesamevertexsetas Q suchthat F P , Q 0 3 " . AnalgorithmwaspresentedinChapter4thatcanbeusedfordecidingwhether thereexistsacurvewhichvisitsallpointsin S ,hasFr echetdistanceatmost " from P , andisNS-compliant.Itrunsin O nk 2 time,andtheoptimalNS-compliantcurvecanbe foundin O nk 2 log nk timebywayofparametricsearch.Sincetheoptimalcurvecan bemadeNS-compliantwhileonlyincreasingitsFr echetdistancebyafactorof3,this yieldsa3-approximationalgorithm. Theorem5.1. TheContinuousAll-pointsCPSMcanbe3-approximatedin O nk 2 time. WhenintegratingthisresultintoWenk'sframework,itistemptingtosimplyapplythe decisionalgorithmtocheckforanNS-compliantcurveateachsemi-algebraicsample pointinthetransformationspace,andthenuseparametricsearchtondtheoptimal NS-compliantcurve.However,thiswillnotwork.As P istranslatedortransformed, theclosestsegmenttoeachpointin S canchange,whichmeanscurvesthatwere NS-compliantforonetransformationmaybenon-compliantforothers.Therefore,evenif P isexactlytheoptimalFr echetdistanceawayfromtheoptimalNS-compliantcurve, thecurvemaynotbeNS-compliantforthatparticularvalueof ,causingthedecision algorithmtoreturn FALSE . Thesolutiontothisproblemistorememberthatourgoalisnottondtheoptimal NS-compliantcurve,buttondtheoptimalunrestrictedcurve.Tothatend,wemodify thealgorithmsothat,ateachstep " oftheparametricsearch,itcheckseachsample pointinthetransformationspaceforanNS-compliantcurvewithFr echetdistanceat most 3 " . 53

PAGE 54

Let Q opt betheoptimalunrestrictedcurvethatvisitseverypointin S ,andlet " opt betheFr echetdistancefrom Q opt totheoptimaltransformationof P .Asbefore,the congurationscorrespondingto Q opt willbeamongthoseaddedtothearrangement, andtheotherswillhavenoeffectonthecorrectness.Foragivenparametricsearch step " " opt ,therewillbeatleastonesamplepoint intheparameterspaceforwhich F P , Q opt = " .Forthisvalueof ,Lemma12guaranteesthattherewillbean NS-compliantcurvewithFr echetdistanceatmost 3 " from P ,regardlessofwhich pointhappenstobeclosesttowhichsegment.Thus,theparametricsearchwillcontinue downwardandisguaranteedtoterminateatsomestep " forwhich " opt = 3 " " opt , yieldingatransformation andacurve Q with " opt F P , Q 3 " opt . Theorem5.2. TheContinuousAll-PointsTCPSMcanbe3-approximatedin O nk 2 d +1 k log nk time. 5.5.2+ " -Approximation Therunningtimesoftheexactalgorithmsdiscussedintheprevioussectionsareall quitehigh,evenwhenthedegreesoffreedomarefew.Becauseofthis,itmakessense tolookatapproximationalgorithmsthatmighthavelowertimecomplexity.In[12],the authorspresenta + " approximationalgorithmforthetwo-curvematchingproblem undertranslationsin R 2 .Inthissection,wegeneralizetheirapproachtoworkforthe TCPSMproblemwhenrestrictedtotranslationsin R d .Werefertothisversionofthe problemasthe tCPSM . WemakeuseofthefollowingLemma,whichwasprovenin[70],andakey observationaboutbothtypesofFr echetdistance. Lemma13. [70] Let P and Q becurvesandlet t beatranslationvectorin R d .Then F P + t , Q F P , Q + k t k .ThesameappliestodiscreteFr echetdistance. Observation5.1. Let P and Q becurves.Then k P 0 , Q 0 k F P , Q F P , Q . Thissuggeststhestrategyoftranslating P suchthatitsstartpointoverlapswiththe startpointoftheoptimalcurve Q .Infact,thisstrategyguaranteesaFr echetdistance 54

PAGE 55

from Q atmosttwicetheoptimal.Toshowthis,let t opt betheoptimaltranslationof P andlet t apx = Q 0 )]TJ/F39 11.9552 Tf 13.216 0 Td [(P 0 bethetranslationthat,whenappliedto P ,linesupthe twoinitialpointsofthecurve.Bytheobservationabove,wehavethat k t apx )]TJ/F39 11.9552 Tf 11.955 0 Td [(t opt k = k P 0 + t opt , P 0 + t apx k = k P 0 + t opt , Q 0 k F P + t opt , Q .ByLemma13,thisshowsthat F P + t apx , Q = F P + t opt + t apx )]TJ/F39 11.9552 Tf 10.993 0 Td [(t opt , Q 2 F P + t opt , Q .Finally,wecanimprove this2-approximationtoa 1+ " approximationbycenteringan " -latticeofwidth2around Q 0 andtryingeverylatticepoint. Ofcourse,allthisassumesthattheoptimalcurve Q isknown,whichitisnot. However,itsstartpointmustbeoneofthe k inputpoints.Tryingeachpointin S adds anotherfactorof k ,leadingtoanalworstcaserunningtimeof O nk 3 log nk =" d for thecontinuousversionsand O nk 2 =" d forthediscrete.Wenotethat,inpractice,this additionalfactorof k willtypicallyhaveaverysmallassociatedconstant,sincethose translationsthatdonotalsoputtheendpointof P closetoapointin S canquicklybe ruledout. Theorem5.3. ThetCPSMcanbe + " -approximatedin O nk 3 log nk =" d timefor theContinuousSubsetversionand O nk 2 =" d fortheDiscreteSubsetandDiscrete All-pointsversions. Inaddition,thesameideacanbeappliedtothe3-approximationalgorithmforthe ContinuousAll-pointsCPSMdiscussedinSection5.5.1toyielda + " approximation forthecorrespondingtCPSMversion. Corollary3. TheContinuousAll-pointstCPSMcanbe + " -approximatedin O nk 3 log nk =" d . 55

PAGE 56

CHAPTER6 IMPRECISION 6.1Motivation Sofar,wehaveexaminedtheCPSMproblemfromtheperspectivethateachpoint ispreciselydened.However,computersarenitemachineswithniteprecision, andthusthisperspectiveisnotalwaysrealistic.Thelimitationsofmodernscanner technologysuggestthatamorerealisticversionofthisproblemwouldbetoconsiderthe inputpointsasimpreciseregions.Here,weintroducethisnewversionoftheproblem andrefertoitasthe Curve/ImprecisePointSetMatchingCIPSM problem. 6.2Preliminaries Asin[57],weuse ~ S todenoteasetof imprecisepoints ,whichareregionsin R d .A realization S of ~ S isasetofpointssuchthatthereexistsasurjectivefunction R : ~ S ! S with R ~ s 2 ~ s forall ~ s 2 ~ S . 6.3CIPSMProblem IntheCIPSMproblem,wearegivenacurve P andanimprecisepointset ~ S ,and thegoalistondarealization S onwhichthereexistsacurvewithFr echetdistanceat most " from P .Forsimplicity,wewilltreattheimprecisepointsaslinesegments,butwe observethatallresultstriviallyextendtootherregions.TheCIPSMproblemhaseight versionscorrespondingtotheeightversionsoftheCPSMproblem.However,notethat theCPSMisaspecialcaseoftheCIPSMinwhichthediameteroftheimprecisepoints happenstobezero.ThisshowsthattheveNP-completeversionsoftheCPSMimply theNP-completenessoftheircorrespondingCIPSMversions.Assuch,wefocusonthe remainingversions. Here,weshowthattheContinuousNon-uniqueSubsetCIPSMproblemis NP-complete,usingareductionsimilartothatofthereductionfortheUniqueSubset CPSMpresentedinChapter3.Recallthattheconstructionismadeupofavariable sectionandaclausesection.Akeypropertyoftheconstructionisthat,afterthevariable 56

PAGE 57

Figure6-1.Aseparationcornerwithasingleimprecisepointinsteadoftwocorner points sectionhasbeentraversed,exactlytwoofthefourcornerpointsofeachvariableremain usablebytheclausesection.Thisisduetothefactthatpointscannotbereused,and twoofthefourpointsmustbeusedtotraversethevariablesection. ToadaptthereductiontotheNon-uniqueCIPSMproblem,wesimplyconnectthe twopointsofeachcornerintoasingleimprecisesegmentFigure6-1.Sinceeach imprecisesegmentmustresolvetoasinglepoint,andsincepointscanbeusedmore thanonceinthisversionoftheproblem,theendresultaftertraversingthevariable sectionisexactlythesame:twopointsforeachvariableareavailablefortheclause sectiontochoose,eitherinthepositiveliteralpositionsorthenegativeliteralpositions. Thus,insteadof“usingup”cornerpoints,weare“makingthemavailable”fortheclause loopstousetoescapetheirdeadends.6-2showsacompleteconstruction. Wehavemodeledimprecisepointsaslinesegmentsforsimplicity.However,the modelcaneasilybeextendedtodisksbyplacingthemsothattheyaretangenttothe appropriatecylindersattheappropriatelocations.Othershapescanalsobepositioned tocorrectlyintersectthecylindersbyaligningthecylinderboundariesattheirextremal points.Sincetheentireconstructionisscalable,thereisnodangerofbeingforced toplaceimprecisepointscloseenoughtointerferewitheachother.Thisleadstothe followingtheorem. Theorem6.1. TheContinuousNon-uniqueSubsetCIPSMisNP-complete. 57

PAGE 58

x y z Figure6-2.AcompletedconstructionfortheContinuousSubsetNon-uniqueCIPSM, giventheformula = x _ y _ z ^ x _ y _ z ^ x _ y _ z ^ x _ y _ z 6.4DiscreteCIPSMProblem Inthissection,westudytheCIPSMunderdiscreteFr echetdistance,avariation ofthestandardFr echetdistancethatonlytakesintoaccountdistanceatthecurve vertices[44].Fortwocurves P and Q oflengths n and m respectively,a pairedwalk or couplingsequence isapairofintegersequences a 1 , b 1 ,..., a k , b k , k max n , m , withthepropertiesthat a 1 , b 1 =,1, a k , a k = n , m ,andforall i , a i +1 , b i +1 2 58

PAGE 59

f a i +1, b i , a i , b i +1, a i +1, b i +1 g .Let W bethesetofallpairedwalksfor P and Q . Thenthe discreteFr echetdistance canbedenedas F =min a , b 2 W max i k P a i , Q b i k . SincetheedgesofthegivencurvehavenoimpactonthediscreteFr echetdistance, andsinceweareallowedtovisitthepointsof ~ S inanyorder,thediscreteFr echet distancebetween P andagivenrealizationof ~ S isthesameforanycurvewiththe samevertexsetas P .Thus,theDiscreteSubsetCIPSMcanberestatedasfollows: doesevery " -ballaroundtheverticesof P containatleastonepointfrom S ?This isequivalenttothedirectedHausdorffdistanceproblem,whichistodetermineif max p 2 V P min s 2 S k p )]TJ/F39 11.9552 Tf 11.955 0 Td [(s k " .Thisproblemhasalreadybeenstudiedunderimprecision in[57],andalltheresultsapply.Namely,theDiscreteSubsetCIPSMisNP-complete, buttheoptimizationversioncanbe4-approximatedin O n + k 3 log 2 n + k .The problemcanalsobesolvedexactlyin O n + k 3 timeiftheimprecisepointsare circular,disjoint,andsufcientlylargerelativetotheoptimaldiscreteFr echetdistance. Furthermore,theAll-pointsversioncanbereducedtotheSubsetversion.Fora givencurveandpointset,ifthereisnosolutiontotheSubsetversion,thenthereis clearlynosolutiontotheAll-pointsversioneither.But,givenasolutiontotheSubset version,onecaneasilydetermineifthereisasolutiontotheAll-pointsversion.Every vertexof P musthaveatleastoneassociatedpointof ~ S fromtheoutputcurve Q within distance " .Aslongastheunusedimprecisepointseachoverlapwiththe " -ballaround somevertexof P ,theoutputcurve Q canjumpfromthatvertex'sassociatedpointin ~ S andvisittheunusedpointsclosetothatvertexbeforecontinuing.Thus,theAll-points versionisalsoNP-complete. 59

PAGE 60

CHAPTER7 IMPLEMENTATION InordertobetterunderstandtheCPSMproblem,wehaveimplementeda softwarepackagewhichincludesdemonstrationsofMaheshwari'salgorithmandthe approximationalgorithmdetailedinChapter4.Inthischapter,wedetailthecreation andusageofthesoftware.Thepackagecanbefoundat https://github.com/ paul-accisano/geometry-canvas . 7.1DesignandStatistics Thesoftwarepackageconsistsofaframeworkfordemonstratingalgorithms.Itis splitintotwosections:thedemosectionandthealgorithmsection.Theformercollects userinputanddisplaysresults,whilerelyingonthelatterasaback-endtoperform thecomputationalwork.InadditiontotheCPSMproblemandbasicFr echetdistance problem,thesoftwaredemosseveralbasicalgorithms,including: ConvexHull Point/LineDuality LineIntersection MonotonePartitioning PolygonVisibility RangeSearch WatchmanRoute ShortestPath TranslationalCoasting PolygonTriangulation ThesoftwareiswritteninJava,withprojectlesfortheNetBeansIDEprovided.It totalsapproximately8000linesofJavacodein41les.Thesoftwaremakesextensive 60

PAGE 61

useofthe java.awt.geom package,andisintendedtoprovideotherimplementerswitha usablereference. 7.2Usage Uponstartingtheprogram,selectademofromtheDemomenutobegin.Sincethis dissertationisfocusedontheCPSMproblem,wewilldetailtheCPSMdemoonly.Itis locatedunderthePolylineBasedsubcategoryintheDemomenu. AfterstartingtheCPSMdemo,clickinsidethewindowtocreatethepolygonal curve.HoldtheShiftkeyandclicktoaddpointstothepointset.Right-clickpointsfrom eitherthepolylineorthepointsettoremovethem.TheresultingcurveoftheCPSM algorithmwillbedisplayedinblue,andupdateddynamicallyaspointsareaddedor removed,andtheFrechetdistanceinpixelsisdisplayedintheupperleftcorner. 61

PAGE 62

CHAPTER8 CONCLUSION Insummary,wehaveexaminedanumberofproblemsrelatedtoshapematching usingtheFr echetdistancemetric.WehaveshownthattheAll-PointsNon-Unique, All-PointsUnique,andSubsetUniquevariantsoftheCPSMareNP-complete,andthat allvariantsoftheCIPSMareNP-complete.Wehavegivena3-approximationalgorithm fortheContinuousAll-PointsNon-uniqueCPSMthatrunsin O nk 2 time.Finally,we haveshownhowtheTCPSMcanbesolvedinpolynomialtime,andgivenseveral approximationalgorithmsforfastercomputation. Weclosewithseveralopenproblemswhichwehaveexaminedbutremainas-of-yet unsolved. 8.1CPSMdistancewithspeedlimits In[59],Maheshwarietal.exploredtheconceptofFr echetdistancewithspeed limits.ItwouldbeinterestingtoseeiftheCPSMcouldbesolvedunderthisrestriction. Theprimarychallengewouldbetounderstandhowspeedlimitsaffectthefreespace diagraminordertocomputethereachabilityfunctioncorrectly. 8.2HomotopicCPSM HomotopicFr echetdistancewasexploredinbyChambersetal.in[30].Inthe correspondingCPSMversion,wewouldbegiventwosetsofpoints,onesetofwhichthe constructedcurvecantraverse,andonesetofwhichthe“leash”mustavoid.Apossible avenueforthisproblemcouldbecorrectingthereachabilityfunctionaftercomputingit normally,similartotheapproximationalgorithminChapter4. 8.3ApproximationAlgorithms Wehavedetaileda3-approximationalgorithmforoneversionoftheCPSM,butthe existenceofapproximationalgorithmsfortheotherversionsremainsanopenproblem. Theuniqueversionsremainparticularlydifcult,sincetheredoesnotseemtobeany obviouscriteriatousetoprioritizeonechoiceoveranother. 62

PAGE 63

ApproximationalgorithmsfortheCIPSMareanotheropenproblem.Ofcourse, thereisatrivialapproximationalgorithmfortheAll-PointsNon-Uniqueversion:simply resolvingtheimprecisepointsarbitrarilywillalwaysproduceasolutionthatiswithin R of theoptimalsolution,where R isthemaximumdiameterofanyimprecisepointintheset. However,theexistenceofapproximationalgorithmswithastrongerboundremainsan openproblem. 8.4CIPSMwithanImpreciseGivenCurve InChapter6,weexaminedtheCPSMundertheaddedelementofanimprecise pointset.However,thereisanothersideoftheproblemthatremainsunsolved:whatif thepointsinthepointsetareprecise,buttheverticesofthegivencurveareimprecise? Thisisasignicantlymorecomplexproblem,andremainsunsolved.Infact,itremains unsolvedevenifbothcurvesaregiven,andonecurve'sverticesareimprecise. 63

PAGE 64

REFERENCES [1]PaulAccisanoandAlper Ung or.Hardnessresultsoncurve/pointsetmatchingwith Fr echetdistance.In Proc.29thEuro.WorkshoponComp.Geom. ,2013. [2]PaulAccisanoandAlper Ung or.Approximatematchingofcurvestopointsets.In 26thCanadianConferenceonComputationalGeometry ,2014. [3]PankajKAgarwal,RinatBenAvraham,HaimKaplan,andMichaSharir.Computing thediscreteFr echetdistanceinsubquadratictime. SIAMJournalonComputing , 43:429,2014. [4]PankajKAgarwal,SarielHar-Peled,NabilHMustafa,andYusuWang. Near-lineartimeapproximationalgorithmsforcurvesimplication. Algorithmica , 42-4:203,2005. [5]Hee-KapAhn,ChristianKnauer,MarcScherfenberg,LenaSchlipf,andAntoine Vigneron.ComputingthediscreteFr echetdistancewithimpreciseinput. Int.J.of Comp.Geom.&Appl. ,22:27,2012. [6]H.Alt,A.Efrat,G.Rote,andC.Wenk.Matchingplanarmaps.In Proc.ofthe14th annualACM-SIAMSymp.onDiscr.Algo. ,pages589,2003. [7]HelmutAlt.Thecomputationalgeometryofcomparingshapes.In Efcient algorithms ,pages235.Springer,2009. [8]HelmutAltandMaikeBuchin.Semi-computabilityoftheFr echetdistancebetween surfaces.In Proc.21stEuropeanWorkshoponComputationalGeometry ,pages 45,2005. [9]HelmutAltandMaikeBuchin.Canwecomputethesimilaritybetweensurfaces? Discrete&ComputationalGeometry ,43:78,2010. [10]HelmutAltandMichaelGodau.Measuringtheresemblanceofpolygonalcurves.In ProceedingsoftheeighthannualsymposiumonComputationalgeometry ,pages 102.ACM,1992. [11]HelmutAltandMichaelGodau.ComputingtheFr echetdistancebetweentwo polygonalcurves. Int.J.ofComp.Geom.&Appl. ,5n02:75,1995. [12]HelmutAlt,ChristianKnauer,andCarolaWenk.Matchingpolygonalcurveswith respecttotheFr echetdistance.In STACS2001 ,pages63.Springer,2001. [13]HelmutAlt,LudmilaScharf,andSvenScholz.Probabilisticmatchingofsetsof polygonalcurves.In Proceedingsofthe22ndEuropeanworkshoponcomputationalgeometryEWCG ,pages107,2006. 64

PAGE 65

[14]ErnstAlthausandKurtMehlhorn.Tsp-basedcurvereconstructioninpolynomial time.In ProceedingsoftheeleventhannualACM-SIAMsymposiumonDiscrete algorithms ,pages686.SocietyforIndustrialandAppliedMathematics,2000. [15]NinaAmenta,MarshallBern,andDavidEppstein.Thecrustandthe -skeleton: Combinatorialcurvereconstruction. Graphicalmodelsandimageprocessing , 60:125,1998. [16]BorisAronov,SarielHar-Peled,ChristianKnauer,YusuWang,andCarolaWenk. Fr echetdistanceforcurves,revisited.In Algorithms–ESA2006 ,pages52. Springer,2006. [17]SaugataBasu,RichardPollack,andMarie-FrancoiseRoy.Anewalgorithmtonda pointineverycelldenedbyafamilyofpolynomials.In Quantiereliminationand cylindricalalgebraicdecomposition ,pages341.Springer,1998. [18]SergeyBereg,KevinBuchin,MaikeBuchin,MarinaGavrilova,andBinhaiZhu. VoronoidiagramofpolygonalchainsunderthediscreteFr echetdistance.In ComputingandCombinatorics ,pages352.Springer,2008. [19]PiotrBerman,MarekKarpinski,andAScott.Approximationhardnessofshort symmetricinstancesofMAX-3SAT. El.Coll.onComp.Complex. ,,2003. [20]S.Brakatsoulas,D.Pfoser,R.Salas,andC.Wenk.Onmap-matchingvehicle trackingdata.In Proc.Int.Conf.onVeryLargeDatabases ,pages853,2005. [21]KarlBringmann.Whywalkingthedogtakestime:Fr echetdistancehasnostrongly subquadraticalgorithmsunlesssethfails. arXivpreprintarXiv:1404.1448 ,2014. [22]KevinBuchin,MaikeBuchin,JoachimGudmundsson,MaartenL ofer,andJun Luo.Detectingcommutingpatternsbyclusteringsubtrajectories.In Algorithmsand Computation ,pages644.Springer,2008. [23]KevinBuchin,MaikeBuchin,ChristianKnauer,G unterRote,andCarolaWenk. Howdifcultisittowalkthedog.In Proc.23rdEuro.WorkshoponComput.Geom , pages170.Citeseer,2007. [24]KevinBuchin,MaikeBuchin,WouterMeulemans,andWolfgangMulzer.Four sovietswalkthedog-withanapplicationtoalt'sconjecture. reprintarXiv:1209.4403 , 2012. [25]KevinBuchin,MaikeBuchin,andAndr eSchulz.Fr echetdistanceofsurfaces: Somesimplehardcases.In Algorithms–ESA2010 ,pages63.Springer,2010. [26]KevinBuchin,MaikeBuchin,andYusuWang.Exactalgorithmsforpartialcurve matchingviatheFr echetdistance.In ProceedingsofthetwentiethAnnualACMSIAMSymposiumonDiscreteAlgorithms ,pages645.SocietyforIndustrial andAppliedMathematics,2009. 65

PAGE 66

[27]KevinBuchin,MaikeBuchin,andCarolaWenk.ComputingtheFr echetdistance betweensimplepolygons. ComputationalGeometry ,41:2,2008. [28]ErinWChambers,TaoJu,DavidLetscher,andLuLiu.IsotopicFr echetdistance.In 23rdCanadianConferenceonComputationalGeometry ,2011. [29]ErinWolfChambers, EricColindeVerdi ere,JeffErickson,SylvainLazard,Francis Lazarus,andShripadThite.Walkingyourdoginthewoodsinpolynomialtime.In Proceedingsofthetwenty-fourthannualsymposiumonComputationalgeometry , pages101.ACM,2008. [30]ErinWolfChambers, EricColindeVerdi ere,JeffErickson,SylvainLazard,Francis Lazarus,andShripadThite.HomotopicFr echetdistancebetweencurvesor, walkingyourdoginthewoodsinpolynomialtime. ComputationalGeometry , 43:295,2010. [31]DanielChen,AnneDriemel,LeonidasJGuibas,AndyNguyen,andCarolaWenk. ApproximatemapmatchingwithrespecttotheFr echetdistance.In Proc.7th WorkshoponAlgorithmEngeneeringandExperiments ,pages75,2011. [32]YamKiCheungandOvidiuDaescu.Fr echetdistanceproblemsinweighted regions. DiscreteMathematics,AlgorithmsandApplications ,2:161,2010. [33]AtlasCookIVandCarolaWenk.GeodesicFr echetdistanceinsideasimple polygon. ACMTransactionsonAlgorithmsTALG ,7:9,2010. [34]AtlasFCookIV,AnneDriemel,SarielHar-Peled,JessicaSherette,andCarola Wenk.ComputingtheFr echetdistancebetweenfoldedpolygons.In Algorithms andDataStructures ,pages267.Springer,2011. [35]MarkdeBergandAtlasFCookIV.Gowiththeow:thedirection-basedFr echet distanceofpolygonalcurves.In TheoryandPracticeofAlgorithmsinComputer Systems ,pages81.Springer,2011. [36]MarkdeBerg,AtlasFCookIV,andJoachimGudmundsson.FastFr echetqueries. ComputationalGeometry ,2012. [37]TamalKDey.Curveandsurfacereconstruction:Algorithmswithmathematical analysis.2011. [38]TamalKDeyandPiyushKumar.Asimpleprovablealgorithmforcurve reconstruction.In ProceedingsofthetenthannualACM-SIAMsymposiumonDiscretealgorithms ,pages893.SocietyforIndustrialandAppliedMathematics, 1999. [39]TamalKDey,KurtMehlhorn,andEdgarARamos.Curvereconstruction: Connectingdotswithgoodreason.In ProceedingsofthefteenthannualsymposiumonComputationalgeometry ,pages197.ACM,1999. 66

PAGE 67

[40]A.DriemelandS.Har-Peled.Jaywalkingyourdog:computingtheFr echetdistance withshortcuts.In Proc.ofSymp.onDisc.Alg. ,pages318,2012. [41]AnneDriemel,SarielHar-Peled,andCarolaWenk.ApproximatingtheFr echet distanceforrealisticcurvesinnearlineartime. Discrete&ComputationalGeometry ,48:94,2012. [42]AdrianDumitrescuandG unterRote.OntheFr echetdistanceofasetofcurves.In 16thCanadianConferenceonComputationalGeometryCCCG ,pages162, 2004. [43]AlonEfrat,QuanfuFan,andSureshVenkatasubramanian.Curvematching,time warping,andlightelds:Newalgorithmsforcomputingsimilaritybetweencurves. JournalofMathematicalImagingandVision ,27:203,2007. [44]T.EiterandH.Mannila.ComputingdiscreteFr echetdistance.TechnicalReport CD-TR94/65,ChristianDopplerLaboratory,1994. [45]GeorgeMcNaughtEwing. Calculusofvariationswithapplications .DoverPub., NewYork,1985. [46]ShacharFleishman,DanielCohen-Or,andCl audioTSilva.Robustmoving least-squaresttingwithsharpfeatures.In ACMTransactionsonGraphicsTOG , volume24,pages544.ACM,2005. [47]M.Fr echet.Surquelquespointsducalculfonctionnel. RendicontidelCircolo MathematicodiPalermo ,22:1,1906. [48]AnkaGajentaanandMarkHOvermars.Onaclassof O n 2 problemsin computationalgeometry. Computationalgeometry ,5:165,1995. [49]MichaelGodau.Anaturalmetricforcurves–computingthedistanceforpolygonal chainsandapproximationalgorithms.In STACS91 ,pages127.Springer, 1991. [50]MichaelGodau. Onthecomplexityofmeasuringthesimilaritybetweengeometricobjectsinhigherdimensions .PhDthesis,FreieUniversit atBerlin, Universit atsbibliothek,1998. [51]SarielHar-Peledetal.Newsimilaritymeasuresbetweenpolylineswithapplications tomorphingandpolygonsweeping. Discrete&ComputationalGeometry , 28:535,2002. [52]SarielHar-PeledandBenjaminRaichel.TheFr echetdistancerevisitedand extended.In Proceedingsofthe27thannualACMsymposiumonComputational geometry ,pages448.ACM,2011. 67

PAGE 68

[53]DanielPHuttenlocher,KlaraKedem,andMichaSharir.Theupperenvelope ofvoronoisurfacesanditsapplications. Discrete&ComputationalGeometry , 9:267,1993. [54]PiotrIndyk.ApproximatenearestneighboralgorithmsforFr echetdistancevia productmetrics.In Proceedingsofthe18thannualSymposiumonComputational Geometry ,pages102.ACM,2002. [55]MinghuiJiang,YingXu,andBinhaiZhu.Proteinstructure–structurealignment withdiscretefr echetdistance. Journalofbioinformaticsandcomputationalbiology , 6:51,2008. [56]AaronSKeys,ChristopherRIacovella,andSharonCGlotzer.Characterizing StructureThroughShapeMatchingandApplicationstoSelf-Assembly. Annual ReviewofCondensedMatterPhysics ,2:263,March2011. [57]ChristianKnauer,MaartenL ofer,MarcScherfenberg,andThomasWolle.The directedHausdorffdistancebetweenimprecisepointsets. TheoreticalComputer Science ,412:4173,2011. [58]In-KwonLee.Curvereconstructionfromunorganizedpoints. Computeraided geometricdesign ,17:161,2000. [59]AnilMaheshwari,J org-R udigerSack,KavehShahbaz,andHamidZarrabi-Zadeh. Fr echetdistancewithspeedlimits. ComputationalGeometry ,44:110,2011. [60]AnilMaheshwari,J org-R udigerSack,KavehShahbaz,andHamidZarrabi-Zadeh. Improvedalgorithmsforpartialcurvematching.In Algorithms–ESA2011 ,pages 518.Springer,2011. [61]AnilMaheshwari,J org-R udigerSack,KavehShahbaz,andHamidZarrabi-Zadeh. Stayingclosetoacurve.In CanadianConferenceonComputationalGeometry , pages55,2011. [62]ArianeMascret,ThomasDevogele,IwanLeBerre,andAlainH enaff.Coastline matchingprocessbasedonthediscreteFr echetdistance.In ProgressinSpatial DataHandling ,pages383.Springer,2006. [63]AxelMosigandMichaelClausen.Approximatelymatchingpolygonalcurveswith respecttotheFr echetdistance. ComputationalGeometry ,30:113,2005. [64]MarioEMunichandPietroPerona.Continuousdynamictimewarpingfor translation-invariantcurvealignmentwithapplicationstosignatureverication. In ComputerVision,1999.TheProceedingsoftheSeventhIEEEInternational Conferenceon ,volume1,pages108.IEEE,1999. [65]AndersonRocha,DanielCHauagge,JacquesWainer,andSiomeGoldenstein. Automaticfruitandvegetableclassicationfromimages. ComputersandElectronicsinAgriculture ,70:96,2010. 68

PAGE 69

[66]G unterRote.ComputingtheFr echetdistancebetweenpiecewisesmoothcurves. ComputationalGeometry ,37:162,2007. [67]SwaminathanSankararaman,PankajKAgarwal,ThomasMlhave,andArnoldP Boedihardjo.Computingsimilaritybetweenapairoftrajectories. arXivpreprint arXiv:1303.1585 ,2013. [68]RSriraghavendra,KKarthik,andChiranjibBhattacharyya.Fr echetdistancebased approachforsearchingonlinehandwrittendocuments.In DocumentAnalysisand Recognition,2007.ICDAR2007.NinthInternationalConferenceon ,volume1, pages461.IEEE,2007. [69]ReneVanOostrumandRemcoCVeltkamp.Parametricsearchmadepractical. In ProceedingsoftheeighteenthannualsymposiumonComputationalgeometry , pages1.ACM,2002. [70]CarolaWenk. Shapematchinginhigherdimensions .PhDthesis,FreieUniversit at Berlin,Universit atsbibliothek,2002. [71]CarolaWenk,HelmutAlt,AlonEfrat,LingeshwaranPalaniappan,andGunterRote. Findingacurveinamap.In Proceedingsofthenineteenthannualsymposiumon Computationalgeometry ,pages384.ACM,2003. [72]TimWylie.Discretelyfollowingacurve.In CombinatorialOptimizationand Applications ,pages13.Springer,2013. [73]GuangyuZhu,YefengZheng,DavidDoermann,andStefanJaeger.Signature detectionandmatchingfordocumentimageretrieval. PatternAnalysisand MachineIntelligence,IEEETransactionson ,31:2015,2009. 69

PAGE 70

BIOGRAPHICALSKETCH Paulreceivedhisbachelor'sdegreein2009,dualmajoringinmathematicsand computerscience.Followingthis,hejoinedthedoctoralprogramatUniversityof Florida'sComputerandInformationScienceandEngineeringDepartment,specializing incomputationalgeometry.Paulworkedonseveralgeometryareasbeforedecidingto focusondistancemetricproblems,andreceivedhisdoctoraldegreeinthespringof 2015. 70