top of page
Search

Greedy Algorithms and Mental Health

Algorithms are useful, but choose the right ones.




Greedy algorithms are problem-solving approaches that choose the most locally optimal choice, with the hopes that it leads to a globally optimal solution. Said another way–you choose what looks best now, with the hopes that it leads to a good outcome long term (or without thinking about the long term at all). In computer science, greedy algorithms are quick, simple, and surprisingly effective.


Quick Fixes are Tempting for Mental Health


They are also quite tempting for someone in pain.


The temptation of course is to find the quickest way to alleviate distress, which is reasonable. If your hand is on the stove–take it off. When it comes to mental health, improving a situation can be quite daunting–so it makes sense that you want to simplify your healing. 


Sometimes people, especially high achievers, use exercise or education or self-help to improve their situation (and are often praised for this). Sometimes folks use substances or sex or scrolling to find relief from their distress (and are often judged for this*). However, like scratching an itch, these solutions can feel good until the pain returns. Sometimes the pain comes back even more intensely.


Greedy Algorithms Have Limits


The above solutions may be greedy attempts to fix psychic pain. 


You probably know where I’m going with this–I am a therapist, after all.


If you’re having an existential crisis, having career uncertainty, or your romantic partners keep leaving, lifting some weights probably won’t help much.** Sometimes, you need to take a longer path to feeling better. Therapy isn’t about quick life hacks*** but about creating durable change. My hope for my patients is that their mental health is better for the rest of their lives. That kind of change doesn’t happen quickly, though it often feels fast and compared to your whole life it’s actually a small investment.


Greedy algorithms like Dijkstra’s algorithm or Huffman coding often work for computer code but they rarely work for mental health. Psychological healing usually requires the opposite: taking a bit longer path, and tolerating discomfort now for freedom later.


Take the Longer Path


If you’re hurting from a breakup, if you’re unsure what personal or professional path to take, if you feel numb or apathetic, if you’re unsure how to tolerate climate change, or if you find yourself anxious and scared all the time–you could take the shortest path to relief. 


Or you can decide to make a bigger change. 


You won’t ever be younger than you are today, so to get the most benefit from therapy for however many years you have ahead, I encourage you to reach out now. It could be me, it could be someone else, but take the first step to schedule a call and see what it’s about. 



-----------------------------------------------------------------------------------

*To be clear–exercise/education/self-help can be useful, and usually don’t carry the negative side-effects that a lot of substances/scrolling/sexual coping do. In fact, “behavioral activation” (e.g., going for a walk) is a supported intervention for depression and does help (at least for a while–which is better than nothing). 

**Biceps only take you so far, Don Juan. 

***Usually it isn’t quick, though we have a few tricks. This whole argument also applies to insurance companies supporting “evidence based therapies (EBT’s)”–I have a lot of respect for my CBT colleagues and many of them do amazing work, and I firmly believe that mental distress is big enough for a diverse set of solutions. The data for treating phobias, for example, more often points to a cognitive-behavioral approach than a psychodynamic one. However, insurance companies are greedy and have greedy algorithms, so a quick study on a treatment approach that provides symptom reduction at a 6-week follow up is preferred to one that takes longer but provides health and resiliency 15 years later (both the treatment and the study are too extensive for an insurance company to prefer). So the treatment approaches called “evidence based” are often greedily ascertained (and psychodynamic treatment, which has good long term support but higher up front costs, get discouraged). Perhaps Dijkstra would be proud of this system, but I’m not.


 
 
 

Comments


bottom of page