Actions

Work Header

Rating:
Archive Warning:
Category:
Fandom:
Relationship:
Characters:
Additional Tags:
Language:
English
Series:
Part 24 of Mathematical Proof
Stats:
Published:
2012-10-19
Words:
4,305
Chapters:
1/1
Comments:
12
Kudos:
200
Bookmarks:
15
Hits:
5,102

The Merits of Local Searching

Summary:

The first time it happened, they were just off the A4 investigating a car crash that wasn’t a car crash.
The second time it happened, John had just spilled his scalding hot tea onto his lap.
The third time it happened, John had just finished scraping an unidentifiable substance from the microwave.
The fourth time it happened, John was blindfolded.

Notes:

Oh, look at that, it's past 5am...oops. Er, no promises on the quality of the porn, but it's there?

Some of this math is a bit obscure, so I'm always worried some poor soul trying to find out about partial gradient searching is going to wind up amidst a bunch of Johnlock porn on accident just by virtue of there not being a ton of stuff about partial gradient searching to find in general. (Or, more alarmingly, what if my prof just happens to Google it due to general personal interest in a topic to which he has contributed significantly and winds up here?)

Work Text:

The process known as information fusion consists of receiving information, forming a database from that information, then somehow combining that information to get a single number and use that number to make a decision. The information is combined using an “aggregation tool.” Classically, an aggregation tool would be something like a weighted average, such as when calculating a GPA. In this case, the measure is additive (see Fuzzy Measures). However, when there is interaction, a different aggregation tool must be used. The Choquet integral (see The Transposable Choquet Integral) is an example of one of such aggregation tools.

 

There are two inverse problems to this one: one is, if we know the efficiency measure and the end solution, can we find the function that was used to generate it? The other is, if we know the function and the end result, can we find the efficiency measure? This second one is of particular interest, but it is also complicated. We need to have the correct number of equations, and will use the least square method to minimize the error and determine the measure. Since this involves a quadratic term, we must take the partial derivative in order to get a set of linear equations which we can then easily solve.

 

However, we can’t always take the partial derivative of the objective function. For instance, the function may have a corner. In a contour plot of a superadditive or subadditive measure, for example, a corner will occur, and so the function is not differentiable everywhere. In that case, we must use a soft computing technique. One example of this is the pseudo-gradient search. A regular gradient search requires partial derivatives everywhere, but the partial gradient search does not have this restriction. Doing a global search has the advantage of avoiding the risk of falling into a local minimum (you are trying to find the lowest point, but accidentally only find the lowest point in your direct vicinity), but it is very slow because you are analyzing the entire search space. Doing a local search is much faster, but since you are only looking at a small area around you, you may fall into a local minimum and never find the global minimum (and you may never know it). In partial gradient searching, you use a global search to find roughly where the good, extreme points are, and then switch to a faster, local search to hone in on them.

 

 

***

 

 

            The first time it happened, they were just off the A4 investigating a car crash that wasn’t a car crash. It wasn’t a car crash because it was a well-timed bomb, which was precisely what Sherlock and John found out when one lagging charge blew twenty feet away from them.

            John dove onto Sherlock, directing his back toward the blast, planting them both against the ground, his hands wrapping around Sherlock’s head, palms pressed into Sherlock’s ears.

            “John,” Sherlock said into the grass when all had gone silent and still.

            “Are you okay?” John asked, but he held Sherlock there, and he probably would until somebody else had gone and checked the car for any other straggler explosives.

            Sherlock snorted into the ground. “You’re the doctor; you tell me.”

            John had nothing to say to that besides You almost died, you bloody idiot, of course you’re not okay, or maybe that wasn’t right and all he really wanted to say was My god, I should have thought to check, Sherlock, I’m so sorry. Or maybe You’re welcome, because shrapnel that had flown to their left would have hit Sherlock had John not dragged him to the ground. He had nothing to say, so he stared at Sherlock—at the back of his head, at his windblown hair, even messier than usual, at the shell of his ear and if he leaned over slightly he could see Sherlock’s face. He did so, and found Sherlock struggling to look calm, found his eyelids fluttering and his mouth trying to work past something (or else spit out any dirt that had flown in; difficult to tell). He found a smudge of dirt on Sherlock’s cheek and Sherlock’s nostrils flared and only from this close could he hear a quiet, relieved groan emanate from Sherlock’s lips. John stared.

             “What is it?” Sherlock said. “Am I injured? I can’t feel anything but I suppose adrenaline could…”

            “No,” John said, or mouthed, or whatever he was doing. “You’re fine.” He squeezed his arms around Sherlock’s shoulders one more time before climbing off and looking in the direction of the vehicle. Sherlock was staring at him now: puzzling it out, certainly. He probably already knew.

 

 

 

            The second time it happened, John had just spilled his scalding hot tea onto his lap.

            He yelped, leapt up, only by chance managed to not throw the mug across the room as it clattered onto the table and spilled the rest of its contents. His sudden movement shook the table, which shook Sherlock’s microscope, which irritated Sherlock as he looked into it.

When the rest of John’s spilled tea reached Sherlock’s hand and Sherlock drew it back quickly, John felt time slow down, for even as he thought to himself that he ought to find a towel to mop up the mess, he simultaneously became fixated on Sherlock’s hand, slicing through the air, whipping to and then fro to shake off the water or to shake off the heat. At the same time as he reached for the towel he could only think about Sherlock’s wrist, about the fact that he had one, about the fact that his hand rotated about it. Wrists were responsible for a great many hand movements.

As John’s fingers wrapped around the towel, John thought about his own wrists, and Sherlock lowered his own hand to brush it against his dressing gown. John thought about things he’d recently used his wrists for: reaching for the towel, for one. Making and consequently spilling his tea, as well. He’d used them to pull back his blankets and get dressed. He’d probably used them to pull his pillow to the proper angle before going to sleep.

John pulled the towel from over the cupboard door and shifted his weight to his right foot in preparation to turn back to the spilled tea. As he turned, Sherlock’s focus moved from his hand to John, John who was still staring at Sherlock and his hand and his wrist. As Sherlock looked toward John, John was still thinking about wrists. He was thinking about how before he’d arranged his pillow he’d used a wrist when he wanked to what he pretended could be anybody’s trim figure and smooth posh arse but which were definitely only Sherlock’s.

As John shifted his weight and began kneeling down to the spill, he directed his eyes away from Sherlock. As he directed his eyes away from Sherlock, he saw Sherlock’s brows rising, Sherlock’s hand coming to a complete stop, Sherlock coming to a complete stop, staring at John. As John shifted his weight he thought about Sherlock staring at him and Sherlock deducing everything he’d just been thinking, which was not likely—but as Sherlock would no doubt remind him, unlikely by no means meant not true. It was all running through Sherlock’s mind like a film reel, frame by crystal clear frame, each of John’s thoughts. Sherlock was watching John watch his wrists. Sherlock was watching John think of his own wrists. Sherlock was watching John thinking of John wanking and Sherlock was watching John thinking of John thinking of Sherlock while he did.

            The towel made contact with the hot spilled tea and John could see it darken the fabric before its heat seeped into his fingers, could feel his weight settling down just as the tea flowed upward into the towel. He could hear Sherlock’s weight shift, and with his attention focused on the towel steeping in tea-water, he could hear Sherlock squat down until his head was under the table, and he was still watching John and thinking of John’s wrists and what John did with them.

            “You can kill a man with a shot through two windows but you can’t keep your own tea on the table,” Sherlock said, and time sped back up, and he kept staring and he kept knowing but the difference was that now John could blink past it.

            “Don’t get me started,” John said, “or I’ll bring up the solar system again.”

           

 

           

            The third time it happened, which may as well have been the fourth or the tenth or the hundredth, and maybe it was, John had just finished scraping an unidentifiable substance from the microwave (which John was reasonably certain Sherlock had only bought for experiment purposes anyway, and heaven forbid John want to use it for anything more conventional). Sherlock approached with half a glass of something too blue to be drinkable and a lecture on the tip of his tongue about why John ought not be just throwing away the unidentifiable substance stuck to the walls of the microwave, and John turned to preemptively tell him to shut up, because two could play at that game, at preemptively-telling-people-to-shut-up.

            But instead he turned around and saw Sherlock, the glass in his hand and deep lines imprinted on his cheekbones from goggles that now rested in his hair, blocking off several curls as if they were in a museum window, carefully preserved. John saw that Sherlock had decided on the red dressing gown today, which probably meant he wasn’t planning on going out; he saw the sash pulled around back and tied in a bow to keep the ends from dipping into chemicals. He saw Sherlock’s thin shirt and half of what was under it; he saw Sherlock’s pyjama pants and half of what was under them, too. He couldn’t blink once his eyes settled on the waistband. He could reach for that waistband. He could tuck his fingers beneath it and hold them there. John imagined how it would feel to Sherlock, to have John’s warm, textured fingers resting against the inside of his hipbone, still but ready and just a wriggle away from causing Sherlock to shudder beneath him.

            Sherlock opened his mouth to begin his lecture but he shut it, and as Sherlock shut his mouth John knew that he was seeing it behind John’s eyes, the waistband, the fingers, the wriggling, but there was nothing to think about but that waistband and everything John could do with it. He could pull it away. He could pull it away and look down inside: did Sherlock wear pants under his pyjamas? From what John could tell now: no. He would look down and in the current winter chill of the flat he’d feel a puff of warm air on his nose, let loose by the waistband being pulled back, and with the warm air he’d catch a scent and he’d duck lower to smell deeper, and lower, and he’d dig his nose into Sherlock’s belly and hold the waistband back to kiss his hipbones and he’d breathe deeply and curl his fingers against Sherlock’s skin and Sherlock would shudder.

            John scratched at a small spot of the unidentifiable substance and then wiped up the dust with a cloth, still glancing over his shoulder at Sherlock.

            Sherlock shifted his weight. The waistband moved with his hips. The waistband could move. John could pull it down.

            His eyes must have glazed over at the thought, or widened, or misted, or whatever else they were prone to doing when he wasn’t paying enough attention to them, because Sherlock not only failed to deliver his lecture, he also set the very blue liquid down and took a step closer to John.

            “Are you staring at my pyjamas?”

            John hadn’t the spare attention for lying. “In a fashion.”

            “May I ask in exactly what fashion?”

            John took a shuddering breath—no time like the present, was there? this might be the only time this month he’d get Sherlock’s full attention—and stepped forward and wrapped his fingers under Sherlock’s waistband.

Sherlock shivered and froze in place for several moments. “Oh,” he finally said, as if John were one of Sherlock’s brilliant revelations, his eyes lit like triple homicide, his mouth round like Christmas brought mercury-laced candy two weeks early. “You want me. No, you want part of me,” his eyes narrowed into deduction dilation.

            “Don’t be daft,” John said, almost unable to speak past Sherlock just standing there, deducing, while John had his fingers in his pyjama pants. He wiggled them to spite him. “I want all of you.”

            “Nonsense,” Sherlock said quietly, now unable to look away from John’s hand. “You hone in on particular aspects of me.”

            “Yeah, your face and your hands and your wrists and your bloody hips and next it’ll be your shoulder blades or your fingernails or your neck or your toes.”

            Sherlock’s head nodded backward in slow motion, taken aback and understanding at once, nostrils flared. “That’s a very…innocent list,” he finally noted, neutrally.

            “Wouldn’t want to make you uncomfortable.” John accepted and subsequently ignored the absurdity of saying this with his hand less than half a foot from exactly what Sherlock was thinking about.

            “I’m not uncomfortable,” Sherlock blurted, and then, of course, he had to prove it—or that was, John could only assume, why he placed a hand on the back of John’s and forced it farther into his pyjama pants. John’s fingers danced along Sherlock’s inner thigh, not daring to reach higher, not daring to edge toward a more central point, not yet.

            “You sure?” John breathed.

            “If what you said is true, then there are still parts of me that you are no doubt going to stare at rather intently upon first taking particular note of them, given the opportunity.” He took in a breath. “I would like to observe this process.”

            In the kitchen of 221B, Sherlock shrugged off his dressing gown, and it pooled red on the floor. His throat hummed with hesitation.

            “It’s okay,” John said, noting his uncertainty. “You really don’t have to…” You do have to, you do have to, was what he was thinking, but, of course, he didn’t have to, and if he didn’t that was fine, and John could just slink back to his room and play the rest of the scenario out with himself.

            “I want to,” Sherlock said, pausing before peeling off his shirt. “I’ve just never…”

            John wriggled his fingers again, which he hoped came off as comforting rather than pressuring. He leaned closer to Sherlock. “Trust me,” he said, “there is nothing here worth being embarrassed about, if that’s your concern.”

            “I know,” Sherlock snapped. Which was true enough: and after all, that probably wasn’t what was catching him. For god’s sakes, he’d gone to Buckingham Palace in a sheet. Stripping in front of John should be nothing in comparison. Unless…

            “Is it that it’s me?” He clarified, “As in, only me?”

            Sherlock closed his eyes, apparently considering it. “Do the thing where you stare at me,” he finally said. “But do it someplace else now. Do it at my…my…shoulder, or something.”

            “I can’t just—” John started, but Sherlock rolled his shoulder and John’s eyes were snapped to it, to skin slipping over the bone and muscle beneath. Sherlock’s shoulders were broad enough to be appropriate to his height, but no more than that—John watched the one that had rolled as it settled back into place, could practically see the seizing and releasing of each muscle as it relaxed. John thought about Sherlock’s smooth, curving shoulders and then he thought about his own marred shoulder. Sherlock tilted his chin up slightly and leaned back against the kitchen table, and his shoulder dipped with his weight. John’s shoulder wasn’t half as graceful, but John didn’t need graceful shoulders. He felt Sherlock’s eyes on him and he imagined (didn’t know, apparently, because he was wrong all the times before) that Sherlock could see his thoughts exactly, could see the scarring on John’s shoulder, could see John thinking he was lucky to still have the range of motion that he could reach up and grab Sherlock’s shoulder, could grip it and use it to drag Sherlock’s mouth down to his. He could grab that shoulder and throw his body over Sherlock’s to save him from an exploding car. He could grab that shoulder and direct Sherlock to sit and eat. He could grab that shoulder from behind Sherlock, could use it to steady himself while he drove into Sherlock’s—

            John ripped his eyes away and Sherlock was gaping. “That must be what it feels like,” Sherlock said.

            And John was reasonably certain that Sherlock had not just vicariously experienced John’s imagined scenario, so he asked, “What?”

            In response, Sherlock’s eyes fixed on John and John braced himself for the inevitable string of deductions about the fact that yes, he was actually a lazy arse and didn’t brush his teeth last night, and no, he wasn’t pleased at having to clean out the microwave, and yes, yes, yes yes yes, he had just been thinking of fucking Sherlock and no, he wasn’t sorry. He waited for scathing comments about his jumper or possibly his choice in television last night.

            None came.

            “You see?” Sherlock said.

            John sighed. “We can’t all read minds, here.”

            “You flinched when I began staring at you.”

            “You usually insult me right after you do that.”

            “Because I’m focusing a great deal of attention on you.”

            “Yes, ex—oh. You think I’m—”

            “I can see why it disconcerts others,” Sherlock said, “when I stare at them to deduce something about them.”

            “Okay, well, I’m not going to, I dunno, start suggesting lotions for smoother skin,” John said. “Just take it as a compliment.”

            “Easier said than done, I’m afraid,” he glanced down at John’s fingers, still buried in his pyjama pants.

            “But you still want…”

            “I want you to touch me,” Sherlock said, through a lump in his throat based on the way his pitch wavered. “I don’t know past that.”

            And if Sherlock admitted to not knowing, it must be serious.

            John’s expression brightened. “I have an idea.”

 

 

 

            The fourth or fifth or eleventh or hundred-and-first time it happened, John was blindfolded.

            Sherlock’s hand gripped John’s to help guide him onto Sherlock’s bed, and once John was reasonably certain he wouldn’t be falling off, his fingers worked their way from Sherlock’s hand to his wrist. His thumb probed the thin skin and small bones, and Sherlock’s pulse, too, and worked its way up to Sherlock’s elbow, to its sharp angle. With his other hand, John found Sherlock’s other elbow, and he gave each a reassuring grip and leaned his head forward to rest his forehead in the crook of Sherlock’s shoulder, legs folded up in front of him so that Sherlock’s thighs touched John’s knees. John’s hands slid over Sherlock’s shoulders—for real this time—and he grabbed at them and thought of eating and explosions and sex and grabbed at them harder.

            He traced Sherlock’s collarbone to his neck and petted it gently, and heard Sherlock’s breath quicken, and trailed his fingers down to Sherlock’s sternum, all wide and flat with little ridges for muscles, and then raised when its surface was replaced by pectorals, and raised again as John’s left hand found one of Sherlock’s nipples and thumbed at it, and he leaned forward and pressed his nose into it and then kissed it, and then kissed it and nipped and sucked, just a little, and Sherlock grabbed his shoulder.

            John spread his hands over Sherlock’s belly, all flat and lithe to John’s compact and robust, so radically different that he had to touch and press and slide his palms over it to remember it. He could feel Sherlock breathing even here, and felt his muscles twitch when John’s fingers reached Sherlock’s hips again, this time unclothed. John took in a breath and realized it was shaky, and spread his fingers as he swept his hands in wider and wider circles until the hair they found was thicker and thicker. He could continue down, of course, to Sherlock’s legs, to his knees and his sharp ankles and his long feet and his long toes, back up the backs of his legs, back up to his arse, to his back, to the back of his neck again, but…

            “Please, John,” Sherlock breathed.

            His fingers buried into Sherlock’s hair, curly as it was anywhere else on him, and John savored the warmth on his fingers and remembered, remembered thoughts of warmth on his nose and of scent wafting up to him, and so he uncrossed his legs and let them slide back behind him so that he was propped up on his elbows between Sherlock’s legs.

            John couldn’t even come close to guessing Sherlock’s expression, he thought. “I’m just going to smell you,” he assured him, just in case, before leaning forward and letting the scent of Sherlock fill his nostrils. He leaned forward farther and breathed and breathed, and felt the tickle of hairs against his nose and the bump of Sherlock’s cock against his chin, just briefly, just briefly but enough that he could tell how hard it was, just enough that he wondered if it had bothered Sherlock. “Can I…” he started.

            “Okay,” Sherlock said, breathing deeply, and John would have ripped his blindfold off to see his face if he thought he could without upsetting Sherlock. “Okay.”

            John dipped his head forward to bury his nose deeper and Sherlock’s length lined up with John’s jawbone, rested there against it, hot and real and not all in John’s head for once, the head tickling his ear. John took in a deep breath and before he could think, pursed his lips and kissed the area right beneath them, kissed the base of Sherlock’s shaft.

            “Oh,” Sherlock said, and it was not a sound of deduction or thought, and so John kissed him again, and again, and Sherlock whimpered so John kissed him again, higher up, and again, letting his tongue lap out, and again, sucking slightly, higher and higher, until he reached the very tip. “John,” Sherlock said. John swirled his tongue around the head, sweeping wider and wider and lowering his mouth until his lips popped around the top and slipped down, down and down and down, and there, his nose once more meeting Sherlock’s hair, John paused and thought.

            He thought about the hundred times he’d wanked to this image; he thought about the first time he thought about it. He thought about jumping on top of Sherlock as the charge in the car blew, the shrapnel whirring past his head, his hands clapped over Sherlock’s ears while his own rattled and rang at the blast, fiery heat (actually a result of the bomb or remembered from the war, it didn’t matter) at their backs, Sherlock and his penchant for almost-dying more times than any one person had a right to, Sherlock almost killed again (if they’d been closer to the car, if it had happened two minutes ago when Sherlock was right there), Sherlock almost gone from his life, Sherlock safe underneath him from the shrapnel and the cracking of rapidly expanding air and the consuming heat, Sherlock heavy and human and mortal and human and fragile and human. Sherlock, trying to shake off the shock; Sherlock, fragile and human and precious and human and irreplaceable and human and unique and human and good and human and beautiful and human.

            Sherlock, beautiful and human. John had thought that and then he had gone home and thought about it more while Sherlock played the violin. He thought about it more before bed. He thought about it before bed the next day, and the next. Sherlock, beautiful and human and warm and human with all the same feelings as other humans, with all the same feelings as John. Sherlock, with his dressing gowns and his hands and his wrists and his mouth, and somewhere around mouth, days or weeks later,John had reached into his pants and grabbed himself. Somewhere around mouth he thought of Sherlock’s mouth on his cock and somewhere around mouth he thought of his mouth on Sherlock’s.

            Sherlock, this Sherlock, this Sherlock who John looked at with so much intensity, apparently, that he was now wearing a blindfold. He woke up this morning and decided to scrape the unidentifiable substance out of the microwave and wound up sucking Sherlock off wearing a blindfold. He hummed in amusement. Sherlock bucked, and Sherlock bucked John back to the moment, and John slipped his lips up and twisted his tongue around Sherlock’s erection and bobbed back down and with the head of Sherlock’s cock at the back of his throat he swallowed and Sherlock wailed and gripped John’s shoulders and John sucked his way back up and tongued his way back down.

            The fifth or sixth or twelfth or hundred-and-second time it happened, Sherlock tore John’s blindfold off and John stared straight into Sherlock’s eyes and Sherlock keened and jerked his hips and John licked his way up and off Sherlock’s cock and wrapped his hand around it and gripped it tight while Sherlock thrust, and John lunged forward for Sherlock’s lips and moaned into them, and Sherlock moaned back, low and low and low with a shudder and a whimper, and John felt heat seep into his hand and dribble down his fingers. His lips twisted into a smile against Sherlock’s, and he felt Sherlock smile back.

 

 

 

            (The sixth or seventh or thirteenth or hundred-and-third time it happened, John wore the blindfold again. That time, though, it was just for fun.)

Series this work belongs to: