What about Babuie's Behavior?

Description

In this story, the actions of the character Babuie can be explained in terms of a finite state machine . It's not easy, but it can be done.

Students who have no experience with finite state machines, can still enjoy Babuie's outrageous behavior and laugh at the ridiculous pizzas he makes. This story can serve as an introduction to the study of finite state machines, or as a culimation of their study. Since the puzzle is rather hard to solve, it can serve as the first open problem in the study of finite state machines, and students can return to it as they learn more about them.

Materials

Instructions

Ideas for discussion

Materials

Preparation and Set-Up

Instructions

  1. If you don't tell the students ahead of time that Babuie's behavior can be explained in terms of a finite state machine the students will suspect that it is so if they have any experience with finite state machines at all.

  2. Enjoy the story as you would any story in your class, by reading it aloud, talking about it, acting out your favorite parts, drawing pictures to illustrate it, etc.

  3. Don't become frustrated if this is hard to figure out. It is! Let it stand as an open problem for as long as necessary. Sometimes you just have to let problems incubate for a long time.

  4. Write your own story that has a finite state machine hidden inside of it like this one. Read it to your friends and send it to MegaMath!

Ideas for discussion



Babette and Babuie, Pizza Producers

It is early morning in kitchen of Babette and Babuie's Pizza Parlor. Since he woke up, Babuie has been busy preparing the kitchen for pizza production. He has scrubbed the floor, arranged the containers of pizza ingredients in a neat even row on the counter which he has polished to a gleaming shine. All the dishes are washed, and the pizza crusts have been placed in their pans and stacked high, waiting for Babuie to take them off the stack one by one, pile them high with pizza ingredients, and bake them in the Pizza Parlor oven.

Babette sits at a table in the corner, finishing up reading the morning paper. "Babuie," she says, "I've been thinking...."

Babuie glances in her direction as he reaches for the first pizza crust. He dips into the vat of tomato sauce with a ladle and spreads the thick red paste over the top of the crust.

"If it rains today, Babuie, I'm not going out, and that's that!"

Babuie sprinkles cheese over the top of the pizza and pops it into the oven.

"Babuie, I have been thinking..." Babette begins again. Babuie reaches for the next pizza crust and smeares it evenly with tomato sauce. "Whatever are you doing?" she cries. "Why are you making another pizza? No one has even come to eat the first one yet."

"People will come. Someone will eat them," responds Babuie, reaching for the pepperoni and arranging the small flat circles neatly on the surface of the pizza.

"I suppose. Do you want some orange juice?"

"Sure," says Babuie, sprinkling cheese over the top of the pizza.

"Oops! Well, that's that," says Babette, as the last drops of orange juice fell from the rim of the pitcher. "It's all gone. One of us will have to go to the store." Babuie slid the finished pizza in the oven.

Babette folds up the newspaper she had been reading and places it on the table, "Babuie, I've been thinking..." Babuie glances at her, but doesn't say anything. He just reaches for the next crust and spread tomato sauce on it as Babette continues. "You are right. It probably is a good idea to get lots of pizzas made in advance, even in nobody is here yet. Look, the sky is already clearing up. If it doesn't rain, business will be good."

Without looking up or saying anything, Babuie reaches for the cheese and sprinkles an even layer over the tomato sauce.

"Of course," Babette continues, "if it doesn't clear up and rains a lot, people won't want to be out walking on the street, and they will come inside. You're right, make lots of pizzas today."

Babuie sprinkles another layer of cheese onto the pizza.

"Except, well, maybe not. People who come in out of the rain aren't here to eat, they might just drink coffee and pop all afternoon. Then we won't need so many pizzas."

Babuie glances at her, but doesn't say anything, just heapes another layer of cheese on the huge mound already on the pizza.

"Well, it's not raining now," says Babette, as Babuie adds cheese so that the pizza looks like a yellow mountain, "so I'd better run off to the store for more orange juice."

Babuie turns, walks to the other end of the counter and begins to sprinkle chocolate chips on the pizza.

"I'll pick up whatever else we need, too. What would that be?" Babuie is busy carefully arranging pepperoni on top of the chocolate chips. Babette ticks off the rest of her list on her fingers, "Pickles, marmalade, shoelaces, soap, and that's that."

Babuie steps back and looks at the pizza he has just made. "This is unacceptable!" he cries, and tosses it into the garbage. While Babette is gone, he tidies up the kitchen. When the door slams and grocery bags rustlein the hall, the empty pizza pans are all washed up and the counters are shining clean.

"Babuie, I've been thinking," calls Babette from the vestibule.

"Here we go again," murmurs Babuie, reaching for a pizza crust and spreading the sauce neatly and evenly all over it.

Babette pops her head into the kitchen door. "Do you care for that orange juice now?" she asked.

"Not right now," answers Babuie, adding a layer of chocolate chips to the pizza.

"I don't know how you can pass up a good glass of orange juice," marvels Babette. "I could drink it all day. That's not such a bad habit, though. It's good for you."

Babuie nods and sprinkles cheese on the pizza.

"That's what's been on my mind. Maybe we should open an orange juice shop." Babuie looks puzzled. He arranges pepperoni on the pizza and waits for her to continue. "You don't even like pizza. You just make them because that's how we earn our living. But orange juice..."

Babuie nods. It was true that he never ate the pizzas he made. He sprinkles cheese on top of the one in front of him.

Babette taps the glass of orange juice that she is holding. "I tell you. Rain or shine, this is my favorite drink." Babuie sprinkles on another layer of cheese. "If it's my favorite drink, other people probably find it irresistible, too. They'd all come here to get it. They'd order refill after refill. You wouldn't have to make all those pizzas, and we'd still earn our living. It's a great idea, and that's that."

Babuie looks at the pizza, gently lifts it up and carries it to the oven. He opens the door and pops it in.

It stays quiet in the kitchen for a long time. Babuie sits down to rest at the table with Babette. In the silence he daydreams about a life where he didn't have to make pizzas ever again. But serving orange juice all day--would that be any better? He was dreaming of all the kinds of things he would rather do, when Babette's voice interrupts his reverie.

"Babuie, I've been thinking..." Babuie jumps up, grabs a pizza crust and ladles tomato sauce onto it with a splat.

"I have an idea about how we can advertise our Orange Juice Shop." Quickly, he tosses some chocolate chips over the tomato sauce.

"We can make up little jingles and rhymes. Like this: Whatever people think. It's my favorite drink."

"I don't know, Babette," begins Babuie, arranging neat circles of pepperoni on the pizza.

"No, listen, it's great," she insists. "How's this: Whatever people say, I drink this stuff all day." Babuie is not impressed. He puts more pepperoni on the pizza.

"Or this," she says excitedly. "Rain or shine, I'm gonna drink it all the time." Babuie does not look pleased. He puts chocolate chips on the pizza.

"Whatever you want to say is fine..." begins Babette in a sing-song voice. Babuie glares at her and deals out rings of pepperoni like he is dealing cards on the top of the pizza.

"...orange juice is the drink that's mine!" she finishes triumphantly. Babuie growled and threw a handful of cheese on the pizza.

"Whatever others rant and rave about...." Babuie pickes up the ladle and puts a glop of tomato sauce on top so that now the pizza looks like a bloody volcano. "...orange juice is what will make me jump and shout!" Babette claps her hands. Babuie scoops chocolate chips onto the pizza and glares at her.

"Enough, Babette. No more. That's that. Look at this pizza! It is absolutely unacceptable!" He throws the pizza into the garbage. "Talk, talk, talk. All this crazy talking that you do distracts me from my work. Just be quiet, will you?" he shouts. "Be quiet and let me make pizzas."

Babette folds her hands and sits still. Babuie stares at her like he doesn't really believe she isn't going to move. Babette doesn't make a sound. Babuie grabs his dishcloth and wipes off the counters, then whirls to took at her. She hasn't moved a muscle. She looks at Babuie and starts to pick at a fingernail. Babuie shines up one more spot on the counter, then begins sweeping the floor, slowly, slowly. As he gets near the window, he looks out. He watches the street where no one passes by for a very long time.

Finally Babette takes a deep breath and says, "Babuie, I've been thinking." This startles Babuie. He rushes back to the counter, pulls a pizza crust off the stack and spreads it with tomato sauce.

"Well, don't think," he snarls. "It makes you talk. You talk and I can't concentrate on making pizzas."

"Babuie, if I don't talk, you don't make pizzas."

"This is nonsense. You rattle one and on, making up rhymes about orange juice, and you think this helps me make pizzas?" He puts a scoop of chocolate chips into the center on top of the tomato sauce. "Then you get into some kind of a dither because it's going to rain," he says, scooping up a handful of cheese. "Ker-blamm! That's the thunder," he shouts, "and here's a cloud of cheese about to make a storm!" He sprinkles it like rain on top of the pizza. He scoops up more cheese, "Perhaps you are worried about tomorrow's rain. Or yesterday's rain. Maybe it will rain next year. Maybe we have forgotten how many times it has rained already this year. Nonsense!' When he had finished speaking five huge handfuls of cheese had rained down on top of the pizza.

"Whatever it is you are thinking about, I wish you would keep it to yourself," he cries, then spreads tomato sauce over the mountain of cheese.

He picks up the pizza, looks straight over to where she is sitting motionless, and whispers fiercely, "And that's that!"

He looks at the pizza in his hand and says, "This is unacceptable." He throws the pizza into the garbage and slumps into his chair.

After a long silence, Babette speaks quietly, "Babuie, I've lived here a long time with you, and when I haven't been talking, I've been thinking..."

Slowly, Babuie pushes himself up from the chair, gets a pizza crust and spreads tomato sauce all over the surface.

"I've been paying attention to how my talking affects your work. My talking doesn't distract you, it inspires you--provided I talk about the right things. Rain for instance." Babuie continues working on his pizza, putting cheese on it next. "If I talk about rain, you work on making pizzas." He adds more cheese to the pizza. "And you work on making pizzas when I talk about orange juice. It's a good thing I like it so much." He puts a layer of pepperoni on the pizza next. "Whatever else I talk about doesn't matter." He put more pepperoni on. "Grape juice, thunderstorms, arithmetic, politics, snow, sleet, hail, cardboard, wheelbarrows, I've tried them all."

Babuie stops working and turns to face Babette. "Street lights!" she cries, and he puts his hands on his hips. "Elephants!" hisses Babette. Babuie just glares at her. "Macaroni! Rumbas! Polkas! Computers! Hairdos!" Babuie is so angry he looks like he is going to explode.

"Orange juice," she whisperes, and he sprinkles a layer of cheese on the pizza. "It gets the job done. And that's that." Babuie looked a little confused, but he put the pizza in the oven.

"Babuie, I have been thinking," continues Babette, "about why you ruin so many pizzas." Babuie is spreading tomato sauce on the next crust, but he is listening. "I don't know if your ruining pizzas has anything to do with what I say or not. But I'm sure it must. I talk about orange juice, rain, and whatever else I might be able to slip in to keep it from being completely boring. And sometimes you decide the pizza is unacceptable." Quickly, Babuie puts two scoops of chocolate chips on the pizza, and adds pepperoni. "And once you decide a pizza is unacceptable, there is no changing your mind. You throw it in the garbage and that's that!"

"Because it's unacceptable!" cries Babuie. "Just like this one. All this nonsense! Look what you have made me do! Into the garbage with you!" And he tosses the pizza into the trash can, which was getting rather full that day.

"Well, Babuie, that's what I've been thinking about," says Babette.

"Well stop thinking! Get out of here and leave me alone."

Babuie spreads tomato sauce on the next pizza crust. When he hears Babette close the door, he marches over and locks it behind her. He comes back into the kitchen, sits down at the table, and starts to read the newspaper.

"Well, I'm not used to it being this quiet," he mutters. "I'll listen to something normal for a change." He flips on the radio, picks up his dish cloth and begins wiping the counter. He has tuned into the middle of a news report.

"...and in the south, citrus producers are alarmed about the heavy rains that have been falling with no end in sight..."

Babuie whistles cheerfully and sprinkles a generous portion of chocolate chips on the unfinished pizza on the counter.

"...if the blossoms are damaged, the crop will be smaller than expected. We will experience this as a steep rise in the price of orange juice in about six months..."

Babuie dances happily over to the cheese container, and sprinkles a nice even layer all over the chocolate chips.

"...and that's that for the news. Now, on to more music..."

Humming to himself, Babuie pickes up the pizza and puts it in the oven.

"Ha, ha, Babuie. You do your best work when you are all alone, don't you. Yes, Babuie, old friend, I've been thinking." He snaps his fingers and pulls the top pizza crust off the stack. As he spreads it with tomato sauce, he says out loud, "Other folks have plenty of ideas about what you do, but you're the one who knows the most about it. Heh, heh, heh."

He picks up the cloth and shines up a couple of spots on the counter. Then he straightens the containers of tomato sauce, cheese and chocolate chips so they are in a perfect straight line. He washes all the dishes. Then he washes all the windows, and the floor. He shines the water faucets, and the cupboard doors. He dusts off the chair at the table by the window and sits down in it.

He is probably sitting there still.