All happy relationships are the same, but each unhappy relationship is unique in its own way. David Silverman / Getty Genghis Khan married his wife when he was 16 and together they had four kids.

Today, geneticists estimate that 16 million men in Asia (that's 1 out of every 200) are direct descendants of Khan.

Now, I'm not saying Khan cheated on his wife or anything. After all, I wasn't there.

But Khan is on the historical record claiming that his absolute favorite thing in the world, aside from murdering his enemies and stealing their horses, was to rape their wives and daughters.

And considering he conquered all of Asia and half of Europe, it's safe to say that's a lot of wives and daughters.

I mean, historians estimate that he was responsible for over 40 million deaths. That was 11% of the world population back then. Genocide is hard and stressful work. So yeah, if he wanted to sneak a little (forced) nookie in on the side, who was going to stop him? 1

But get this, Genghis Khan wasn't the only man to ever cheat on his wife. I know, I know. It surprised me too. But it turns out that infidelity is actually not uncommon in both men and women. In fact, surveys estimate that almost one-fourth of all marriages experience infidelity at some point. And that's just counting the people who answered honestly or found out about it. 2

I get a lot of email these days. People tell me all about their lives and sometimes ask me questions. Dad doesn't talk to me anymore. My friends think I'm a nerd. What do I name my dog? Hi, will you marry me?

A lot of these emails involve people's relationships. And a lot of these relationships are about as healthy as the Ebola virus. Cold, distant, loveless, and flesh-eating. I get to hear the stories about the heartbreak and loneliness, the lying and cheating, and the pain. Always the pain.

Inevitably these emails always end with some form of the same question: "Why?" Why does he/she do this to me? Why does he/she not care anymore? Why won't he/she change?

The algorithm for staying faithful

Tolstoy said that all happy relationships are the same, but each unhappy relationship is unique in its own way. 3 I suppose that's true. But I do think the question of fidelity, of why some people choose to remain faithful and others do not, is fairly straightforward and easily answered.

Flickr / Candida.Performa I find that it's very hard for most people to be logical about infidelity. They start raging all over the place and throwing people's s--- out on the lawn. Or they get so sad and hurt that they can't look at the situation reasonably and see all of the warning signs stretching out miles behind them.

So let's break this down logically. I know algorithms aren't exactly romantic or sexy. But then again, neither is cheating. So f--- it, you get an algorithm.

Self-gratification > intimacy = cheating

As humans, we all have a natural desire for self-gratification. Good food. Good sex. Little work. Lots of sleep. Porn and video games and corn flakes. As humans, we also all have a natural desire for intimacy and to feel loved by somebody else, to feel as though we are sharing our lives with somebody. Unfortunately, these two needs are often contradictory. To achieve that intimacy and love, you have to sacrifice your own self-gratification at times. And to achieve self-gratification, you often have to sacrifice some love and intimacy. This can be as simple as watching a movie you don't really like or attending some boring work party you don't care about. But it can also be deep and complex, like being open about your fears and insecurities to your partner or making a conscious commitment to be monogamous with that person for an indefinite amount of time. If a person values self-gratification more than the intimacy they gain from a relationship, then they will stop sacrificing for the relationship and are likely to end up cheating. If a person values the intimacy they gain from a relationship more than self-gratification, then they will willingly sacrifice some of their self-gratification to remain faithful. Think of it like a scale. On one side you have self-gratification and on the other you have intimacy. If at any point the self-gratification side outweighs the intimacy side, well, then you get a cheater. There are two ways this can happen. The first way is that a person is just shallow and selfish and needs to be gratified constantly. The second reason is that the relationship is failing to provide sufficient intimacy and desire.

Let's unpack these two reasons separately.

Reason #1: An oversized need for self-gratification

In my eyes, the definition of maturity is the ability to defer self-gratification in favor of more important long-term goals.

You don't masturbate at work because that would get you fired. You don't eat chocolate cake for breakfast every morning because that would give you a heart attack by the age of 32. You don't mainline heroin straight into your eyeballs before picking your kids up from school because, well, do I really have to explain that one?

Sure, these things feel nice, but you have larger and more important concerns and you're able to defer your own gratification to meet those concerns.

This is called "maturity." It's called "being an adult." It's called "not being a f--- up."

Cheating falls under the same umbrella here. Sure, it may feel good to rub your genitals all over that beautiful stranger, but a mature person is capable of stepping back and deferring their gratification in favor of a more important life-long commitment.

Self-gratifying cheaters come in two flavors: miserable over-compensators and people in power.

The miserable over-compensators are constantly focused on their own gratification because they feel so miserable about themselves that they need to make themselves feel good to cover it up all the time. Chances are that if your cheating deadbeat of an ex-boyfriend/girlfriend is a miserable over-compensator, cheating isn't the only destructive self-gratifying behavior they pursue. They may be a heavy drinker, a hard partier, a drug user, or a social climber.

Or they may just try to take over the world.

The people in power are just that, people in high positions of power. 5 They're Genghis Khan. Or more recently, Bill Clinton and Arnold Schwarzenegger. They are people who don't have anyone to say "no" to them or those who don't face any real tangible repercussions for their actions.

But these don't just need to be people with social power. These can be people who are given complete power over the relationship, people who are shown no repercussions for their actions by their partners. Yes, you can unwittingly enable your partner to cheat on you. Which brings us to the second reason.

Reason #2: The lack of real intimacy

It's not rocket science to say that the likelihood of infidelity in a relationship is directly proportional to how miserable the relationship is.

Guian Bolisay / flickr The problem is that many people don't recognize the misery in their own relationships. They come from a family full of miserable relationships and/or have a long history of miserable relationships, so to them, it's not even miserable, it's just normal.

Then they get surprised when wifey is f------ the milk man. Everything was so good, what happened?

No, it wasn't so good buckeroo. Let me explain why.

Look, there are two relationship patterns that usually end up with somebody cheating. Both involve poor boundaries. And both create an illusion that "everything is great," when really it's a festering pile of cow s--- with big red hearts painted on it.

The first situation is when one partner feels as though they "do everything" for the other partner. They take care of them, give them everything they want, and in some cases support them. The person feels like a goddamn saint and then what happens? They get cheated on.

The reason this is actually a toxic situation is that when you do everything for your partner, when you take care of all of their problems and show them that no matter what happens you will always make it better for them, you show them that there are essentially no repercussions for their actions.

They lose their job because they were masturbating at the office again and you decide to support them. Then they spend the next six months loafing around on your couch while you tirelessly send out their resume for them. What makes you think they're going to change? What makes you think they will ever stop and question their own behavior?

If you had a dog that continuously pissed on your rug and every time you just cleaned up the rug because OMIGOD I LOVE HER, why would the dog ever stop pissing on it?

That's what happens when these people cheat on you. You're actually surprised when you've been tolerating and enabling the exact behavior that led them to cheat all along. No, it's not your "fault," but you sure as s--- weren't helping the matter.

Believe it or not, a healthy and loving relationship requires that people say "no" to one another on occasion. It requires that each individual stands up for themselves and their needs. Because only then can two people, as self-respecting individuals, discuss what will work and what won't work for them in a relationship.

The other situation where cheating always ends up happening is when one partner is insanely possessive and jealous.

Let me ask you this, if you were dating somebody who regularly looked through your phone without permission, demanded to know where you were at all times, got rips--- pissed off every time you went out with your friends without him/her and screamed at you until blood vessels popped in their face if you go a single day without calling or texting, why wouldn't you cheat? 6

I mean, this person is essentially treating you like you already cheated, even though you did nothing wrong. So why not cheat? It won't get any worse.

And that's exactly what happens. "Well, my husband yells at me every day anyway, and now that I'm with my friends and we've have had a few apple-tinis, I realize I haven't been happy with him in about a year, so yeah, why don't I kiss this cute guy hitting on me right now? He's actually nice to me. And I'm going to get yelled at when I go home anyway. So why not?"

And boom, the milkman strikes again.

Possessive/jealous behavior communicates extreme insecurity and a lack of self-respect. How can your partner respect you if you are incapable of tolerating any sort of discomfort in the relationship whatsoever?

True sexy confidence comes not from fighting for self-gratification, but rather from being comfortable with deferring gratification. Which brings us to …

How to prevent your a-- from getting cheated on

Step 1: Do not date somebody who cannot defer self-gratification well.

This goes without saying, but don't fall in love with the first person who looks at you without grimacing.

Look, dating a self-gratifier can be awesome, as long as you continue to gratify them. But you need to learn to look past the feel-goods and look at how this person actually lives their life. Are they capable of making sacrifices for those around them? Are they impulsive? Does their life appear to be filled with unnecessary drama? Do they take responsibility for their actions?

The problem with people who base their lives around their own gratification is that they often appear confident to people who are anxious or insecure. I remember when I met my first girlfriend, one of the things I loved about her was that if she wanted something she just went and did it. I was so insecure and inhibited at the time that I thought this was an amazing display of confidence.

What I later found out was that it was actually an amazing display of self-gratification. As soon as she wanted another pair of genitals, well, there they were.

As I described in this article, true sexy confidence only exists when someone is comfortable with what they don't have. True confidence comes from being able to defer and give up one's own gratification and desires and take the appropriate actions when necessary.

The other issue with people who date self-gratifiers is that they think to themselves, "Well, he's so loving and happy when he's with me, why would he ever want to be with somebody else?"

Yeah, it's because he was dating you for the self-gratification, not the intimacy. So of course he loved being with you, as long as it was on his terms. As soon as you quit providing gratification for him, he went and found somebody else who did.

Step 2: Enforce healthy boundaries.

That means standing up for yourself. That means declaring what is and is not acceptable in the relationship both for yourself and your partner. That means sticking by those declarations and following through on them.

That means you recognize that you are not responsible for your partner's happiness nor are they responsible for yours. That you do not have a right to demand certain actions from them nor do they have a right to demand certain actions from you.

That means that they are responsible for their own struggles just as you are responsible for yours.

That means that you realize often the most loving and compassionate thing you can do for a loved one is allow them to deal with their struggles themselves.

The point of a relationship is not for you to have all of your life's problems fixed by your partner, nor is it for you to fix all of your partner's life problems.

The point of a relationship is to have two individuals unconditionally support each other as they deal with their own problems together.

Step 3: Always be willing to leave.

This comes up in a lot of my replies to those emails I get, and it often catches people off guard.

But a relationship is only as strong as each person's willingness to leave. Note that I didn't say desire to leave, but the willingness to leave. Every healthy relationship requires the occasional loving but stern "no." Otherwise nothing will ever change because there's no reason for it to change.

A wise friend of mine told me years ago that after two divorces the most important lesson he learned was that "the quickest way to kill a relationship is to take each other for granted."

A relationship is not an obligation. It is a choice. Made every day. It is a choice that says, "The intimacy we share is better for me than my own self-gratification." It is a choice that recognizes the short-term costs are worth the long-term benefits. It is a choice to appreciate what brought you two together in the first place. And then to let that keep you there.