Warner Bros. Entertainment Wiki
Warner Bros. Entertainment Wiki

"The Friendship Algorithm" is the thirteenth episode of the second season of the American sitcom The Big Bang Theory. This episode first aired on Monday, January 19, 2009.

In this episode, Sheldon wants access to a university computer which Kripke controls, so Sheldon decides to become friends with his adversary and even invents an algorithm for making friends.


At the Caltech cafeteria, Sheldon is going on and on about how deadly tapioca pudding is. Howard interrupts him until Sheldon is about to explodes and they let him finish in a burst of unwanted factoids. Barry Kripke comes over to "congwatuwate Weonard" on anti-proton decay experiment, which had 20,000 data runs without any statistically significant results. Sheldon needs time on the open science grid computer, which Barry Kripke controls, and let his friends have plenty of time on it. Sheldon decides that he should become his friend.

Back at home, Leonard is working on Penny’s computer so that Howard's emails go right into the spam folder. Sheldon is calling Kripke to again try and be friends after many unanswered phone calls. Leonard is his friend because there was a flyer on the bulletin board at the university: "roommate wanted: whistlers need not apply." Leonard demonstrates with a short whistler, which is immediately met with a quick first warning from Sheldon.

Sheldon is undaunted by his quest for figuring out how to make friends so he passes out a questionaire to his friends, 211 questions and an essay. No one takes it seriously. Leonard answered the multiple-choice in a repeating pattern. Howard filled out his essay with a picture of a raccoon with an enlarged scrotum.

Next Sheldon decides to head to a bookstore to find literature on the subject. In the children's section he finds "Stu the Cockatoo is New at the Zoo." He tries to make friends with a little girl who also likes monkeys. He invites her to go with him sometime to see the monkeys, however, Leonard pulls him out before he gets arrested as a pedophile.

Sheldon going over the algorithm whilst on a phone call to Kripke.

Leonard, Raj, and Howard show up with dinner and Sheldon presents his "Friendship Algorithm" based on the Stu the Cockatoo book. Leonard dismisses it, however Howard thinks they should consider in since they might make a fortune selling it at Comic-Con. “Share a meal ----> get a hot beverage----> share time with an interest of Kripke's ----> share a different interest of Kripke's ----> share a different interest of Kripke's ----> share a different interest of Kripke's ----> share a different interest of Kripke's (uh-oh)” Sheldon calls Kripke, but gets stuck in his loop. By Howard adding a loop counter and a direct line to the "Least Objectionable Activity," Sheldon accepts rock climbing. Not bad for a man with only a masters in mechanical engineering.

Sheldon, after he passed out and left hanging like a giant bird.

Sheldon learns about rock climbing over the Internet and has no fear of climbing. He does have fear of falling. He freezes and can’t go up or down so he faints still hanging from his safety line like a giant salami.

Back at the apartment returning from their rock-climbing adventure, they offer Kripke some Chinese food. He needs some dental floss first. Since he can’t deal with any more friends, Sheldon cuts Raj loose even though Penny is not a scientist. Kripke notices that Penny is hot, but changes her name to Roxane. Howard whispers that he is starting to look good no, isn’t he? Sheldon pushes past to discuss getting time in the Open Science Grid Computer, however since as the official schedule is out of his control, Kripke can’t help him even if they are friends. Sheldon who is annoyed at this, allows Raj to be back in his friendship circle since he likes monkeys.

Leonard, Howard, and Raj comment about Sheldon's rock-climbing efforts before the camera reveals that he passed out again.


  • Title Reference: The algorithm created by Sheldon that he uses to make friends with Kripke.
  • When Leonard drags Sheldon out of the bookstore, he still has a copy of "Stu the Cockatoo is New at the Zoo" in his hand. It is unknown whether he went back and paid for it or not.
  • Sheldon innocently tries to make a friend; however, Leonard takes him out of the store before someone thinks he is stalking little children. Sheldon was also stopped on checking the Internet for "How do I get 12 years old girls excited" in "The Contractual Obligation Implementation". In "The Hook-up Reverberation" the guys have the idea to chip-in some money to help Stuart to re-open the Comic Book Store, later Raj has the idea to get a van and drive around the neighborhood picking up children.
  • The "big-balled raccoon" Howard drew on his Sheldon trivia sheet is a Bake-Danuki.
  • The aspect that Sheldon likes monkeys (and also trains) is strongly regarded in this episode as does his future girlfriend Amy though he doesn't complain that everything with her is "monkeys, monkeys, monkeys."
  • When Kripke hits on Penny, Howard says to her "Suddenly I'm looking pretty good, huh?", referencing the previous episode, where Penny comments on Howard's interest in her.
  • This is the first time that Leonard mentioned that Sheldon does not like whistling (and demonstrates it to show Sheldon's dislike).



v - e - d
2000px-TBBT logo svg.png
The Big Bang TheoryYoung SheldonVideo
Main Characters: Leonard HofstadterSheldon CooperPenny HofstadterHoward WolowitzRajesh KoothrappaliAmy Farrah FowlerBernadette Rostenkowski-WolowitzStuart BloomEmily SweeneyLeslie Winkle

Recurring Characters: Barry KripkeWil WheatonAltheaKurtEric GablehauserMary CooperDebbie WolowitzV.M. KoothrappaliMrs. KoothrappaliMikeStephanie BarnettBeverley HofstadterPresident SiebertZack JohnsonPriya KoothrappaliWyattMike RostenkowskiMrs. RostenkowskiAlex JensenJanine DavisLucyProfessor ProtonDavid GibbsClaireStephen HawkingAlfred HofstadterColonel Richard WilliamsDenise
Minor Characters: ChristyLalita GuptaToby LoobenfeldDennis KimDimitriMissy CooperBlainTomOctaviaMariaLourdesRamona NowitzkiKathy O'BrianDavid UnderhillAliciaMikaylaCaptain SweatpantsLonely LarryDr. CrawleyBethanySarahSkeeterProfessor LaughlinAbbyMarthaOfficer HackettSandyGlenVenkatesh KoothrappaliSebastianLouie/LouiseJoyce KimMrs. GundersonJoyMrs. FowlerAngela PageProfessor GlennMrs. LathamTodd ZarneckiSusanRandallColonel Richard Williams

Season 1: PilotThe Big Bran HypothesisThe Fuzzy Boots CorollaryThe Luminous Fish EffectThe Hamburger PostulateThe Middle-Earth ParadigmThe Dumpling ParadoxThe Grasshopper ExperimentThe Cooper-Hofstadter PolarizationThe Loobenfeld DecayThe Pancake Batter AnomalyThe Jerusalem DualityThe Bat Jar ConjectureThe Nerdvana AnnihilationThe Porkchop IndeterminacyThe Peanut ReactionThe Tangerine Factor

Season 2: The Bad Fish ParadigmThe Codpiece TopologyThe Barbarian SublimationThe Griffin EquivalencyThe Euclid AlternativeThe Cooper-Nowitzki TheoremThe Panty Piñata PolarizationThe Lizard-Spock ExpansionThe White Asparagus TriangulationThe Vartabedian ConundrumThe Bath Item Gift HypothesisThe Killer Robot InstabilityThe Friendship AlgorithmThe Financial PermeabilityThe Maternal CapacitanceThe Cushion SaturationThe Terminator DecouplingThe Work Song NanoclusterThe Dead Hooker JuxtapositionThe Hofstadter IsotopeThe Vegas RenormalizationThe Classified Materials TurbulenceThe Monopolar Expedition
Season 3: The Electric Can Opener FluctuationThe Jiminy ConjectureThe Gothowitz DeviationThe Pirate SolutionThe Creepy Candy Coating CorollaryThe Cornhusker VortexThe Guitarist AmplificationThe Adhesive Duck DeficiencyThe Vengeance FormulationThe Gorilla ExperimentThe Maternal CongruenceThe Psychic VortexThe Bozeman ReactionThe Einstein ApproximationThe Large Hadron CollisionThe Excelsior AcquisitionThe Precious FragmentationThe Pants AlternativeThe Wheaton RecurrenceThe Spaghetti CatalystThe Plimpton StimulationThe Staircase ImplementationThe Lunar Excitation
Season 4: The Robotic ManipulationThe Cruciferous Vegetable AmplificationThe Zazzy SubstitutionThe Hot Troll DeviationThe Desperation EmanationThe Irish Pub FormulationThe Apology InsufficiencyThe 21-Second ExcitationThe Boyfriend ComplexityThe Alien Parasite HypothesisThe Justice League RecombinationThe Bus Pants UtilizationThe Love Car DisplacementThe Thespian CatalystThe Benefactor FactorThe Cohabitation FormulationThe Toast DerivationThe Prestidigitation ApproximationThe Zarnecki IncursionThe Herb Garden GerminationThe Agreement DissectionThe Wildebeest ImplementationThe Engagement ReactionThe Roommate Transmogrification
Season 5: The Skank Reflex AnalysisThe Infestation HypothesisThe Pulled Groin ExtrapolationThe Wiggly Finger CatalystThe Russian Rocket ReactionThe Rhinitis RevelationThe Good Guy FluctuationThe Isolation PermutationThe Ornithophobia DiffusionThe Flaming Spittoon AcquisitionThe Speckerman RecurrenceThe Shiny Trinket ManeuverThe Recombination HypothesisThe Beta Test InitiationThe Friendship ContractionThe Vacation SolutionThe Rothman DisintegrationThe Werewolf TransformationThe Weekend VortexThe Transporter MalfunctionThe Hawking ExcitationThe Stag ConvergenceThe Launch AccelerationThe Countdown Reflection
Season 6: The Date Night VariableThe Decoupling FluctuationThe Higgs Boson ObservationThe Re-Entry MinimizationThe Holographic ExcitationThe Extract ObliterationThe Habitation ConfigurationThe 43 PeculiarityThe Parking Lot EscalationThe Fish Guts DisplacementThe Santa SimulationThe Egg Salad EquivalencyThe Bakersfield ExpeditionThe Cooper/Kripke InversionThe Spoiler Alert SegmentationThe Tangible Affection ProofThe Monster IsolationThe Contractual Obligation ImplementationThe Closet ReconfigurationThe Tenure TurbulenceThe Closure AlternativeThe Proton ResurgenceThe Love Spell PotentialThe Bon Voyage Reaction
Season 7: The Hofstadter InsufficiencyThe Deception VerificationThe Scavenger VortexThe Raiders MinimizationThe Workplace ProximityThe Romance ResonanceThe Proton DisplacementThe Itchy Brain SimulationThe Thanksgiving DecouplingThe Discovery DissipationThe Cooper ExtractionThe Hesitation RamificationThe Occupation RecalibrationThe Convention ConundrumThe Locomotive ManipulationThe Table PolarizationThe Friendship TurbulenceThe Mommy ObservationThe Indecision AmalgamationThe Relationship DiremptionThe Anything Can Happen RecurrenceThe Proton TransmogrificationThe Gorilla DissolutionThe Status Quo Combustion
Season 8: The Locomotion InterruptionThe Junior Professor SolutionThe First Pitch InsufficiencyThe Hook-up ReverberationThe Focus AttenuationThe Expedition ApproximationThe Misinterpretation AgitationThe Prom EquivalencyThe Septum DeviationThe Champagne ReflectionThe Clean Room InfiltrationThe Space Probe DisintegrationThe Anxiety OptimizationThe Troll ManifestationThe Comic Book Store RegenerationThe Intimacy AccelerationThe Colonization ApplicationThe Leftover ThermalizationThe Skywalker IncursionThe Fortification ImplementationThe Communication DeteriorationThe Graduation TransmissionThe Maternal CombustionThe Commitment Determination
Season 9: The Matrimony MomentumThe Separation OscillationThe Bachelor Party CorrosionThe 2003 ApproximationThe Perspiration ImplementationThe Helium InsufficiencyThe Spock ResonanceThe Mystery Date ObservationThe Platonic PermutationThe Earworm ReverberationThe Opening Night ExcitationThe Sales Call SublimationThe Empathy OptimizationThe Meemaw MaterializationThe Valentino SubmergenceThe Positive Negative ReactionThe Celebration ExperimentationThe Application DeteriorationThe Solder Excursion DiversionThe Big Bear PrecipitationThe Viewing Party CombustionThe Fermentation BifurcationThe Line Substitution SolutionThe Convergence-Convergence
Season 10: The Conjugal ConjectureThe Military MiniaturizationThe Dependence TranscendenceThe Cohabitation ExperimentationThe Hot Tub ContaminationThe Fetal Kick CatalystThe Veracity ElasticityThe Brain Bowl IncubationThe Geology ElevationThe Property Division CollisionThe Birthday SynchronicityThe Holiday SummationThe Romance RecalibrationThe Emotion Detection AutomationThe Locomotion ReverberationThe Allowance EvaporationThe Comic-Con ConundrumThe Escape Hatch IdentificationThe Collaboration FluctuationThe Recollection DissipationThe Separation AgitationThe Cognition RegenerationThe Gyroscopic CollapseThe Long Distance Dissonance
Season 11: The Proposal ProposalThe Retraction ReactionThe Relaxation IntegrationThe Explosion ImplosionThe Collaboration ContaminationThe Proton RegenerationThe Geology MethodologyThe Tesla RecoilThe Bitcoin EntanglementThe Confidence ErosionThe Celebration ReverberationThe Matrimonial MetricThe Solo OscillationThe Separation TriangulationThe Novelization CorrelationThe Neonatal NomenclatureThe Athenaeum AllocationThe Gates ExcitationThe Tenant DisassociationThe Reclusive PotentialThe Comet PolarizationThe Monetary InsufficiencyThe Sibling RealignmentThe Bow Tie Asymmetry
Season 12: The Conjugal ConfigurationThe Wedding Gift WormholeThe Procreation CalculationThe Tam TurbulenceThe Planetarium CollisionThe Imitation PerturbationThe Grant Allocation DerivationThe Consummation DeviationThe Citation NegationThe VCR IlluminationThe Paintball ScatteringThe Propagation PropositionThe Confirmation PolarizationThe Meteorite ManifestationThe Donation OscillationThe D & D VortexThe Conference ValuationThe Laureate AccumulationThe Inspiration DeprivationThe Decision ReverberationThe Plagiarism SchismThe Maternal ConclusionThe Change ConstantThe Stockholm Syndrome

The Apartment BuildingApartment 4AApartment 4BThe ElevatorCalifornia Institute of TechnologyWolowitz HouseThe Comic Center of PasadenaPasadenaThe Cheesecake FactoryRaj's ApartmentAmy's ApartmentHoward and Bernadette's ApartmentThe StairsSheldon's Old OfficeRaj's Old OfficeSheldon's New OfficeHoward's LabThe University CafeteriaKripke's Plasma LabInternational Space StationThe Kinetics Lab
See Also
Unaired Pilot