Issue 127 |
Summer 2015

Algorithmic Problem Solving for Father-Daughter Relationships

To be a good computer scientist, a man needs first to understand the basics. Back away from the computer itself and into the concepts. After all, a computer is just a general-purpose machine; its purpose is to perform algorithms.

It is due to the fact that algorithms are unambiguous that they are effective and executable. However, algorithms aren’t only for machines. In designing an algorithm, a person can execute a complex task through observation and analysis. To be a good father, it would be a logical assumption that these same acquired skills should apply.

As I used to say during my lectures at Dalian University of Technology some thirty years ago—Everything in life, every exploit of the mind is really just the result of an algorithm being executed.

For example: To peel garlic

• Obtain a bulb of garlic and a small baggy

As long as there is still-wrapped garlic, continue to execute the following steps:

• Break the garlic petal from the garlic bulb

• Peel off the outer skin

• Put the smooth garlic into the baggy

• Throw the skin into the wastebasket

To my students and colleagues I famously said the same can be applied to something as complicated as getting married. As long as an adult male is still without a wife, continue to execute the following steps:

• Ask librarians, family members, and coworkers if they know any single girls

• Invite girls to watch movies

Assess compatibility facts as follows:

• Beauty

• Family

• Education

If compatibility measures up to previously set standard, move to step e, if not, start from beginning

• Ask the girl to be wife

A coworker introduced me to my ex-wife. Her nose was too small for her face, her hairline too high. However, she came from a family with good Communist party standing and we attended similarly ranked universities.

One day on the way to see a play, she lost the tickets and I yelled at her for her carelessness. I thought that was the end of us. Then on the way back, I stopped along the street and tied an old man’s shoes for him. She agreed to marry me after that.

There was a miscalculation in this equation, which I see now of course. I liked the girl I married very much, but not the woman she became after we immigrated to America. This woman never respected me. All the data was there to be sorted, I just didn’t decode it until it was too late. She had this way of making me feel spectacularly incompetent. She was a literature major in college, she had what people said was a nice sense of humor. Once I took her to a company party and all anybody could talk about the next day was how beautiful and amazing my wife was. That was when it began to bother me. That people didn’t think I deserved her. That they thought I was somehow less than her.

I don’t think she understood the protocol of being a good wife. “Let’s go into the city and eat at a nice place,” she used to say. Why? So I could feel more out of place not being able to read the menu? No thank you.

But without her, there would be no daughter, Wendy. There’s that to consider.

Now that I’m older, I see my theory prove itself day after day. Until illness and then death, life is indeed the result of a series of algorithms being executed. I didn’t need a coach to learn how to play tennis, because before I even stepped onto the court, I understood the fundamental math of the game through theory. I know that the GPS in my car is using an algorithm, taking into its calculations a satellite moving through space, transmitting down to me to tell me where my car is.

So right now I need to make an algorithm to solve the problem of Wendy. My only daughter, who I somehow managed to drive away from me—door slamming and little eyes pooling up during dinner.

I wish to concentrate on the relevant details of our relationship, from tonight and beyond, in order to break down our problem into something that can be decoded, processed, and used to save our relationship. How did I hurt her? Will she ever come back to me?

The evening was one of those calm, snowless December evenings in Westchester County. My daughter, whom I hadn’t seen in nearly a year, was home on vacation from studying in England and planned to spend two weeks living in her old bedroom. I had already prepped the pigs feet to throw in the pressure cooker, and defrosted tofu skins I’d smuggled in from my last trip to Jilin. When she walked through the door, pink-nosed and taller than I remembered, I felt such a rush of affection for the girl that I went right up to her and pinched her arm really hard.

I broke down these two weeks into pseudocode just to see how it was going to work out in my mind:

If (daughter comes to stay)

then (if (temperature = cold))

then (enjoy home cooking)

else (watch movies)

else (buy her consumer electronics)

Baba, is it your goal to make me obese?” she asked when I showed her the five-pound bag of uncured bacon shoved in my fridge. I replied, “Oh, come on, little fatty, you know you crave my pork stew,” and she laughed. She hadn’t changed very much, had the same chubby little hands that I love squeezing. She still had my smile, the one that was all gums.

Even before I had finished putting out all the vegetables and meats on the counter for prepping, Wendy was already showing me pictures of all her weekend trips. She’d been to France, Italy, and Spain. I pulled my head back so that the countries got into focus.

“Where are pictures of you?” I asked as she clicked.

“I was too busy documenting the landscape.” She went through the snapshots slowly, importantly, lifting her computer to show me pictures of bus stops, lampposts, jars of pickles.

“How do you have so much time to travel when you’re supposed to be studying?” I asked.

“You think I went all the way to England just to sit in my room? Besides, all the Brits do it too.”

For me, she speaks Mandarin, which had gotten rusty. She mispronounced words and made up her own metaphors. But I loved hearing her talk, just like when she was a child, telling me stories while I tried to teach her how to make a good steamed fish. While her mother would be out taking real estate courses or painting a still life, Wendy would always keep me company in the kitchen. I didn’t want to look at the pictures, but I was happy having her voice fill up the house. I gutted a red snapper and stuffed it with ginger.

“Can’t say I have the same attitude toward education,” I said. I handed her a potato peeler and she finally put away her laptop.

“Of course, I studied too, Dad, and I made a ton of friends from all over the world,” she said.

“That’s good, expanding your horizons,” I said.

“There were Chinese students at my school too. Bunch of wackos. They just stayed in their dorm rooms and made dumplings all the time. It looked fun I guess, but all the time.” I nodded, and she went on, “In England. Can you imagine?”

“And they were your friends too?” I asked.

“No, they never talked to me. Probably because I spoke English and didn’t study engineering.” She started chopping the carrots into strips, and I showed her how to make them into stars, “but I didn’t go over to England to pretend like I lived in China, you know?”

“Probably good you weren’t friends with them,” I said solemnly. “The only Chinese kids that get to study in England have to come from crooked families with embezzled money.”

“Maybe…but I can’t imagine it would be all of them,” she said, squinting at me. “There was this one crazy thing that happened while I was there. There’s a lake in the middle of campus where the university raised exotic geese from all over the world. Then one day, the caretakers noticed that one of the Egyptian geese was missing its mate.”

She stopped talking until I gave her my full attention. “Turns out this Chinese student had killed it! Goose dumplings.” She put down her chopping and with great affect said, “The University expelled him.”

“That’s a pity.”

“Isn’t it? I heard the guy was from Anhui.” She said. “And I just kept thinking, why did he do it? Even if he didn’t know they were pets. What makes him see a beautiful bird and immediately want to kill it?”

“I wouldn’t worry about it, Wendy,” I said. “Here, help me over here.” How would she know that my brothers and I used to kill sparrows with slingshots as food to eat. How we shot so many sparrows the birds couldn’t land, so exhausted they began falling out of the sky, dead.

“It’s just so typical of Chinese people too, not to even protest their friend’s expulsion.” She went over to the sink and began peeling the potatoes with great indignation.

If anything, I thought, it was she who protested too much. Always concerned with things that she has zero control over. Like missing her SATs for a hunger strike against the Iraq War, something she had nothing to do with.

Maybe I should have told her, the happy dinners where those little birds filled up my little brothers’ swollen, wanting bellies. Maybe a little American like her might have understood after all. The water boiled and the fish was steamed.

Then there was the wine.

“I brought you this wine, Baba, carried it on my back through three border crossings,” she said. “It’s from Ravello, below Naples, on the way to this beautiful town called Amalfi.” I nodded at the unlabeled bottle, which was made of heavy green glass.

“It was a family vineyard. The vintner said it was the best wine he’s ever made. The vines grew on the cliffs facing the ocean. I had to hitchhike just to get this bottle for you.” The girl kept going, excitedly, her hands remembering Italy.

Right then the phone rang, it was Charles and Old Ping, my two divorced and now bachelor buddies. They were wondering what I was doing for Christmas dinner. These buddies and I cut each other’s hair once a month. They had nowhere to go that night, so naturally, I invited them over.

“Come! We are going to have great food, and Wendy’s here,” I said.

I smiled at Wendy and she shrugged and went about opening the wine. She couldn’t have been upset about that, could she? Having my best friends over to share our Christmas dinner? No way, she wouldn’t be that selfish. In fact, even though she’s not very logical, she was always a remarkably reasonable, well-behaved child.

My ex-wife and I, we never hid things from her; she shared equal partnership in the family.

Maybe there were some things we shouldn’t have told her. She probably shouldn’t have been at the lawyer’s during the divorce agreement where I probably shouldn’t have yelled at her crying mother, “What are you going to actually miss? Me or the money?” That was probably a mistake, but I can’t do anything about that now.

Was it the wine? I bet it had something to do with that wine. As we were preparing the last of the food, we had a rather unpleasant conversation about the fundamentals that make up a good bottle. “The most popular cocktail in China right now is the Zhong Nan Hai no. 5,” I said. “They say it was created by former Premier Jiang Zemin himself: wine with Sprite.”

Ba, let me tell you some of the basics. So the most common red wines are Merlot, Cabernet Sauvignon, and Syrah,” she said. She continued on like an expert, “Wine is not supposed to be ganbei-ed, the way you do it. It’s supposed to be tasted and sipped, since it’s about the appearance, the smell, the aftertaste.”

“That sounds like a needless hassle to me,” I said. “It’s a drink.”

“You know, you were probably destined to be a lonely migrant farmer, but instead you were blessed with me and you don’t even know how to appreciate it!”

She circled around the kitchen counter and stood facing me. “Come on, I thought you’d like knowing about this,” she said, as she slowly opened the bottle. “While I’m here, maybe I can take you to a wine tasting in the city. It’ll be really fun!”

“You can save your energy, Wendy. Your old man is not fancy, and I’m not going to sniff booze like a snob. I’m a working-class guy, in case you forgot,” I said with a sniff, “while you were in Europe.”

I took a sip from the glass she poured me and said, “I feel that in my experience, the best wine is wine that is over 14 percent alcohol content, with a wide neck; preferably the bottle should have a large indent at the bottom.”

I thought I saw her roll her eyes at me, so I said, “When did you get so stuck up? Did you learn that from your mother?” and she turned away from me.

The previous situation can be broken down into pseudocode:

If (daughter is frustrating) then (compare her to her mother)

While (daughter shuts up) do (change the subject)

When the doorbell rang, Wendy skipped over to answer and I assumed everything was back to normal. She was very polite to both of them, like a good daughter. I didn’t even have to ask her to help unpack the two cases of beer into the fridge. What a sight my friends must have been to her! Old Ping was as unwashed as ever, but he had changed out of his work overalls for the occasion. Charles still had paint splatters above his eyebrow, and his hair had grown long everywhere that was not bald.

When I tried to offer them Wendy’s wine, both of them initially refused.

“I don’t know about foreign liquors. Most things white people like give me the runs,” said Charles.

“I’ll stick to my baijiu, but thanks, little Wendy,” said Old Ping, whose eyes were already rimmed with red. He must have started drinking in the car.

Wendy set up the table while I finished cooking. It was one of my most sumptuous spreads. There were five dishes, fish done two ways, and a soup. All the colors satisfied, every plate still hot. Old Ping opened twelve bottles of beer and clinked them against the plates. Now we could eat.

“A toast,” Old Ping said, “for little Wendy giving us the honor of her presence. We owe it all to you for this nice meal we are having.”

“Don’t pay attention to your Uncle Ping, he has no education like you,” said Charles.

Old Ping pointed a chopstick at Wendy, “Be nice to your old Dad, don’t neglect him.”

Chi Chi Eat Eat!” I said, digging into the brisket.

The table was quiet with eating, until Ping started talking again: “Say, Wendy Wendy Wendy, when are you going to get married?

“Ah, don’t bother the girl, Ping, she’s going to get a PhD, isn’t she?” Charles asked me.

“You know!” Old Ping cut in, “They have a saying in China, there are three genders: men, women, and women with PhDs.”

“Well this isn’t China, last time I checked,” she replied.

“Don’t take too long is my advice,” said Old Ping. “Make sure you find a boyfriend before your PhD scares all the boys away!”

I jumped in, “She doesn’t have to worry about that. If she doesn’t want to get married or can’t get married, or whatever, she can always live here with her old dad. I’ll pay the bills.”

Then, what the heck, they decided to give the wine a shot. Charles asked her, “Wendy, you really think this tastes good? I’m not going to lie. I’m ignorant.”

“It’s from a family vineyard in Italy,” I said, but not wanting to make my friends feel out of place, I added with a laugh, “Not that I could taste the difference.”

“It’s a little too sweet,” Old Ping said as he wobbled toward my refrigerator and cracked a few ice cubes from the ice tray with his hands. He sauntered back to the table with a fist full of ice cubes and I reached out my glass.

I drank a big gulp and made a satisfied sigh.

It happened sometime after that. Charles had made us all take some shots of baijiu, and we were laughing when I noticed Wendy had stopped eating. She pushed her bowl away from her and was blinking at the ceiling light.

“Have some fish,” I said to her. Her eyes glistened.

“Dad, why am I here?” she said, getting up from the table, “I flew back just to spend time with you, but it’s like you don’t need me at all. You have no interest in me. It’s like I’m…”

“Oh, so if you’re going to have to spend time with me, it should be all about you.”

“I’m not saying that.”

“I should be honored that you came back.”

“Jessica’s dad said her first verb was ‘scurry!’ What was my first verb?” she asked me.

“How am I supposed to remember a word from twenty years ago?” I laughed. I should have just made something up on the spot, like “eat!”

“Don’t be a brat, Wendy, we have guests here.”

“Come on, come on,” Charles said. He pressed his lips together and rubbed his hands together. He had his own grown daughter that he was afraid of.

Knocking against the table, she struggled to put on her jacket.

“Hey, you can’t be mad at your Dad,” I said. “I raised you, you can’t just throw a tantrum over nothing,” I said, and somehow I accidentally ripped a few hairs from her head in trying to stop her from getting up and putting on her jacket.

She yanked away from me and went into the kitchen. I got up and the ground moved below me.

“Think of all the stuff I bought you. Think of all the sacrifices I’ve made for you. Now you come here with a bottle of wine and ask me questions? Make demands on me?” I said, yelling now, “Do you know how much of my money it cost to raise a little bratty girl like you all these years?”

She stopped by the kitchen door and looked at me. “You calculated the exact amount of money it cost to raise me?”

Old Ping cleared his throat, “Hey, Ma, stop it now.”

“Yeah, it’s 150,000 US dollars, not including all your tuition,” I said to her, the blood rushing to my head as if I was hung upside down. “How about I act like Jessica’s American Dad, and ask you to pay me back?”

“Yeah, why don’t you pay me my money back?” I said as I banged my hand on the table. “Why don’t you think about that?”

She left. Charles and Old Ping left soon after that too, leaving the table a mess of bottles and bones. An hour passed before I realized she was not going to take responsibility for her disrespectful behavior and return to apologize. Fine, have it her way. If she was going to be an ungrateful little brat, then that’s her code of operation. I don’t get it. My mind works best in bytes, in data, in things permanently and irrevocably true. I’m not even going to pretend that I understand women at all.

It’s possible that I might have said some things in bad taste. I might have drunk a little too much as well. Thus, I had a problem on my hands.

I am aware there are limits to the capabilities of the human mind. That’s why solving complicated algorithms is difficult; it requires a person to keep track of so many interrelated concepts. The solution couldn’t possibly be figured out that very night. The last of the wine tasted bitter in my mouth, but I drank it anyway. Birds went up into their nests and I went to bed.

Wendy didn’t call that night. She is still young, self-important, and takes her hurt feelings seriously. Even though she knows, at least should know, that I’d simply lost my temper. But even though I am asleep in bed, things will start happening. That’s the phenomenon of problem solving; the mysterious wells of inspiration will often follow a period of incubation. Often the most difficult problems are solved only after one has formally given up on them.

So while I sleep, my mind will be incubating. The subconscious part of my brain will continue working on a problem previously met without success. Even after I wake up, work my mindless eight-hour shift in the assembly line of a computer repair shop, then watch basketball with Charles and Ping, I’ll be trying subconsciously to get to the mysterious inspiration to solve my yet unfathomable problem. Once I do, the solution will be forced into my conscious mind.

Everything makes logical sense in computer science. Computers know not to get sentimental; they can rise above and work in symbols and codes. The world of imagination, uncertainty, and doubt can be managed through entities, HEX notations, and sooner or later, everything becomes representational and quite manageable. You don’t need to worry about the specifics, once you figure out the abstract.

My favorite is the Nondeterministic Polynomial, which is simply a case in which someone or something, a magic bird perhaps, shows up out of nowhere and simply gives you the “answer” to a difficult problem. The answer is “yes.” This is the only thing you need to do to find a way to check if the answer is correct, that the circumstances of the problem actually exist, and to be able to do so in a reasonable amount of time.

At one point in the past, I thought I had all the answers already. It happened before moving to America, before the marriage, before the daughter, before I’d even attended college. It was the summer I hitched a train to Guangzhou, then bought the cheapest ticket to Hainan. I was eighteen years old with a shaved head and twenty yuan in my pocket, but I just wanted to see the ocean, to float above the water and see the sand below. I still remember it now, that water reflecting a million perfectly placed petals, lifted up to meet the moon. Those birds that lined the trees like big white fruit, who transformed back into birds when I approached them and then flew away to become clouds. Those clouds reaching down to meet the sea, like a lock of wet hair on a girl’s neck.

It was then I realized that the reflection on the sand looked like the electricity in a light bulb, like the mysterious maps of marble. I thought I knew the answer to a question I hadn’t even asked, that there was some order in this universe.

Life happened so quickly. My hair thinned and I developed a paunch. The years melted and quietly pooled at my feet. Before I was at all prepared, I was married to an ambitious woman, with a precocious daughter, giving up my professorship and moving to New Jersey to become another immigrant American living an ordinary immigrant life.

Now that I think about it, those years were like watching a sunrise. It was not at all like the pleasant vision I had in mind. It was too much to handle, the great sun peering out from the distance: warm and comforting for a moment, and then brilliant, too brilliant to bear. The soft halo of light quickly became a flare and it stung. And yet, by the time I learned to turn away, most of my life was over.

Some nights I wake up in a panic and wonder: Why did everything that I worked for turn into things I despised? How did I become an old man? How did I end up with no one?

Algorithm discovery is the most challenging part of algorithmic problem solving. The phases themselves are unambiguous, but it is determining them that is the art. To actually solve a problem, I must first take the initiative.

Phase 1. Define and understand the problem

Phase 2. Develop a plan for problem solving

Phase 3: Execute the developed plan

Phase 4: Evaluate the solution for accuracy, and for its potential as a tool for solving other problems

Phase 1: Define the Problem:

The daughter herself

I always knew this daughter was going to be trouble. The first inkling of it was sparked when I used to take her on my bike around my old campus. Because we didn’t have any children’s seats, I sat her on the pole directly behind the handlebars of my bike. The first thing I told her was to never, ever, get her feet close to the wheels. They would get caught and the wheel would cut her feet badly. I told her the only thing to do was concentrate on keeping her feet as far from the wheel as possible.

So the first thing she did was get her feet caught in the wheel. Cold sweat beaded on my face when I bandaged her bloodied little feet, but she barely cried. It was as if she was testing me, as if she had gone against my warning just to be sure I was telling the truth.

Phase 2: ? No, let’s go back.

Phase 1: Understand the Problem: Immigration

Maybe it began soon after Wendy was born, after my wife and I boarded a plane from Beijing to JFK. Probably right after I took my first bite of ham and peanut butter sandwich and liked it. The problem might have arisen following decades of listening to the same Chinese songs, driving to Queens to be surrounded by other transplanted Chinese people, craving the same food we left behind. Perhaps it was sparked during the last twenty years of watching television, how I could never understand enough of the dialogue to chuckle along with the laugh track.

Phase 2: Could it have begun because TV wasn’t funny? No, let’s try again.

Phase 1: Understand the Problem: Unfair and unexpected reversal of roles

When I pictured myself being a father, I’d always assumed I’d take the lead in the relationship. I’d teach her how to read, how to ride a bike, how not to talk to strangers, and all that, but a lot of these opportunities at fatherhood have been robbed from me. It was she who taught me how to read English, when she was eleven. When she was twelve, she helped me pass my citizenship exam by making up acronyms. When she was sixteen, I taught her how to drive, but it was my daughter who helped me renew my license. I never got to console her over some little punk kid breaking her heart, but she held my hand when I cried, after her mother left me.

Is that all there is? It can’t be. Cannot proceed to Phase 2.

I must admit, there are some ultimate limitations of algorithms. A difference does exist between problems whose answers can be obtained algorithmically and problems whose answers lie beyond the capabilities of algorithmic systems.

A problem solved algorithmically would be my temperamental attitude. I have since stymied the urge to physically threaten teenage boys being assholes in public, and I no longer pay for car damage due to routine road rage. It was logical reasoning.

However, there is ultimately a line to be drawn between processes that culminate in an answer and those that merely proceed forever without a result, which in this case might be:

1. The problem of wine

2. The problem of daughters

But this can’t be the end, not for Wendy and me. We used to have a good relationship, a great relationship, with some all-involving grace that didn’t need problem solving. When I watched her ride away on her first bicycle, her ponytail flapping back and forth like a bird’s wing; or as I listened to her sing in the school choir, my heart skipped when she spotted me in the crowd and waved. That’s my girl! I made her! Like when I visited her third grade open house and she showed me that in her bio, she had written “hiking with father” under hobbies, and “father” under heroes. That’s got to be worth something.

So I can’t give up. There has to be a solution.

And so, a portion of my unconscious mind will go on translating ideas from abstraction to pseudocode and laying it out systematically in algorithmic notations. It will be an ever-slowing process. Once I wake up, life will bring about more arguments and disappointments; small trespasses in this long life to live.

My relationship with my daughter might never fully recover from this night. We might miss a lot of holiday cooking together, and my hair will thin even more and she will grow just a little taller. Maybe out of the blue, some years from now, she will introduce me to a boyfriend, a strange-looking but polite boy. It might take even more years, but maybe she will come home and apologize and wash my dirty pillowcases and overeat in order to please me. I wouldn’t be able to know how unhappy I had been until she returned.

She cannot abandon me. She loves me and thus will be able to anticipate my indignation and put my hurt feelings before her own. Those are some of the concessions made. There will be others. These sequences of instructions are programmed within her; that is her heritage.

Ah, but the solution, and there is one, will come to me years later. Perhaps when I am on a fishing boat in Baja, or in the middle of my honeymoon with my second wife, or in the hospital room at the birth of my new baby daughter, Lana. When it comes to me, and it will, I will remember this:

One afternoon, not long after we immigrated, when my daughter was still outgrowing her baby teeth, I came home from work early and found her walking alone around the dim apartment. Holding a hand mirror, face up at her waist, she walked from room to room while peering down into the reflection.

“What are you doing?” I asked.

“I am walking on the ceiling,” she replied.

I was about to tell her to stop fooling around, to do her homework, but instead I paused and allowed myself to go with her imagination. I tried to picture what she might have seen up there. What magical inexplicable things could have been walking on the ceiling with my lovely fat-faced daughter, who spoke no English, sensitive and shy, and so often alone.