Elementary , Dear Data ( episode ) The " Enterprise " is threatened when a character in Data and La Forge ' s holodeck simulation becomes sentient . Summary . Teaser . The is awaiting the arrival of the . Data is then summoned to engineering , where Geordi La Forge ' s assistant , Ensign Clancy , tells Data that he ' s with the " Victory " , which puzzles Data . Data then walks over and inquires about the " Victory " , since it is not here yet . La Forge shows Data a model , a replica of the original , which he intends to give to Captain Zimbata , with whom La Forge had previously served as an ensign . In return for indulging him , La Forge gives Data a smoking pipe and invites him to take part in a Sherlock Holmes holographic story . Act One . Data , who has memorized all of Arthur Conan Doyle ' s stories of Sherlock Holmes , recognizes Holmes office and many of the trinkets in it . Data starts playing the violin and becomes in character as Holmes , while La Forge starts to read , taking on the character of John H . Watson . The story seamlessly starts with Inspector Lestrade knocking on the door . However , Data recognizes the story ( " Scandal in Bohemia " ) after only the first few moments , and immediately solves the case . La Forge abruptly freezes the program and storms out of holodeck two . Talking over the incident in Ten Forward , La Forge explains to Data that playing through the story is part of the fun , and since Data knows all the stories , there isn ' t any fun . La Forge and Data are overheard by Dr . Katherine Pulaski , who states that Data , while he does have good deductive reasoning , like Holmes , doesn ' t understand the Human soul , unlike Holmes , and so is incapable of solving a Holmes mystery of which he doesn ' t already know the answer . With La Forge ' s suggestion that the computer could create a story in the style , Data takes this as a challenge , and invites Pulaski to join La Forge and him in another Holmes story . Act Two . This time , Data instructs the computer to create a new mystery in the Holmes style . This is less than successful , however , because the computer merely combines elements of the existing Holmes stories in a way that Data is again easily able to solve by recognition . La Forge makes an attempt , now , and carefully instructs the computer to create a story and a character " capable of defeating Data . " At that moment , a power surge is detected on the bridge by Lieutenant Worf although it quickly passes and isn ' t investigated . The new program runs and the three are off on their new adventure . The story takes an unexpected twist when Dr . Pulaski is actually kidnapped by Sherlock Holmes ' arch - enemy , Professor James Moriarty , who now " felt like a new man " while witnessing La Forge ' s use of the holodeck arch earlier . Act Three . Data and La Forge track the footsteps of the kidnappers , though an unrelated murder distracts them temporarily . Moriarty has been observing them in order to learn about them . Data spots Moriarty going into a warehouse which turns out to be his secret laboratory . Moriarty welcomes them and says he somehow knows the two are " not " Holmes and Watson and is able to call for the holodeck ' s arch , which surprises them both . Furthermore , he explains he sees images and has thoughts he doesn ' t understand . Upon being given a piece of paper with something hand - drawn on it from Moriarty , Data immediately leaves the holodeck with La Forge following in confusion . " " Why does it frighten you , Holmes ? ! " " Moriarty shouts . After trying and failing to deactivate the holodeck because of an override of the holodeck protocols , Data reveals to La Forge that the drawing on the paper is a side profile of the " Enterprise " . Act Four . Meeting with Captain Picard and the senior officer s in the observation lounge , La Forge figures out that it was his instructions to create an adversary capable of defeating " Data " , not Sherlock Holmes , that initiated the holodeck override control and is preventing them from ending the holodeck program . Furthermore , he has access to the computer and all related libraries . Worf suggests infiltrating the holodeck , and Riker destroying the holodeck creations directly . Troi senses a " unifying force , " which prompts Data to speculate Moriarty has a consciousness , necessary to defeat him . The ship suddenly lurches due to a temporary control switch to the holodeck , revealing that Moriarty can control the ship if he wants . Picard decides that he must personally meet with him . Meanwhile , Moriarty learns a great deal about the " Enterprise " from the computer , and somehow constructs a crude device that toggles attitude control in the holodeck . Pulaski deftly plays along with the program while not acknowledging that anything odd is going on . Moriarty , for his part , treats the Doctor as a guest ; offering her tea while gently trying to get more information . He reveals that he can call the arch and that he suspects he is on the " Enterprise " . Outside , Worf , Data and Picard dress appropriately for the scene and enter the holodeck . Act Five . Picard and Data go to the warehouse . Moriarty now seems very knowledgeable about his situation , and is convinced he has grown beyond his original programming . He asks that he continue to exist . Picard explains that it isn ' t possible , and that he is only a holographic image that can ' t exist outside the holodeck . Moriarty challenges this by asking if Data has life , using the definition " I think , therefore I am " to argue he is alive . Picard is convinced , but it still isn ' t possible with current technology to give him existence outside the holodeck . Moriarty accepts this and releases Pulaski and control of the ship . Picard explains that the ship ' s computer can store Moriarty ' s character indefinitely , and that the Federation would work on a way to bring Moriarty out of the holodeck . Moriarty ' s program is stored and ended . Picard then goes down to engineering , where La Forge is overlooking the model of the HMS " Victory " which sustained minor damage during the shaking of the " Enterprise " by Moriarty . La Forge laments that he put the " Enterprise " in danger by simply misspeaking a single word , but Picard assures him that the " Enterprise " , like the model " Victory " , will soon be repaired . The USS " Victory " arrives for its rendezvous with the " Enterprise " . Memorable quotes . " " Where can I reach you ? " " " " He can be reached at 221B Baker Street . " " " " Your artificial friend doesn ' t have a prayer of solving a Holmes mystery that he hasn ' t read . " " " " I ' ll give you credit for your vast knowledge but your circuits would just short out if you were confronted with a truly original mystery . " " " " That dark fellow there used the word " arch " and then , I wonder . . . arch ! " " " " Why does it frighten you , Holmes ? ! " " " " How can a character from 1890s London draw a picture of the " Enterprise " ? " " " " Nice suit . " " " " I ' m a civilized abductor , Captain Picard . Civilized . . . but still dangerous . " " " " I do not want to die . " " " " And I do not want to kill you . " " Links and references . References . 221B Baker Street ; ale s ; Alpha Centauri ; antimatter power ; arch ; assistant engineer ; attitude control ; Baker Street ; bead ; black magic ; blackmail ; Bohemia ; Bristol ; Bruce - Partington plans ; common law marriage ; ; " " cogito , ergo sum " " ; crumpet ; Dartmoor ; Delphi ; Denkir IV ; detective ; dilithium regulator ; ; drawing ; emerald ; emissary ; fail - safe system ; finger mark ; fingerprint ; French language ; gag ; garrote ; handedness ; ; holodeck ; inspector ; kilometer ; King of Bohemia ; London ; magnetic fuel line ; mark ( identification ) ; matter - antimatter chamber ; meat pie ; milk ; ; ; mortality fail - safe ; nemesis ( literature ) ; number one ; Old Britain ; Oracle at Delphi ; override protocol ; particle beam ; pawn shop ; police ; police officer ; prostitute ; prostitution ; Queen Victoria ; Red - Headed League ; Reichenbach Falls ; robbery ; rubber ; Rule ' s ; sailor ; scone ; sentience ; shawl ; sheep ; shilling s ; " shipshape and Bristol fashion " ; snake ; snuff box ; ; spider ; stout s ; strangulation ; sugar ; tavern ; tea ; Tottenham Court Road ; transporter ; tuppence ; turtle ; " " ; " Victory " , HMS ; ; violin ; waveguide ; ; warehouse ; ; " Whitaker ' s Almanack " ; Wiltshire ; Zimbata Other references . Sherlock Holmes Program 3A : " The Blue Boy " ; Boyce , R . ; bullet hole ; " Childcraft " ; " Close - Up " ; ; Flaxville Meat Market ; Holt ' s Brown Nut Ale ; " King Louis XVI " ; Malmesbury ; McKenzie Coy Warehouse ; Noted Ale and Stout Stores ; Pyrex ; Santovin ; Stephen Pettifer & Sons ; Tovey Mews ; Wiltshire