Two different individuals came up from Bavel to Eretz Yisrael with Ezra. We'll talk about these two terms now. The Mishnah says, “Anybody who knows who his mother is but doesn't know who his father is.” This person is called a shtuki, because shetok means “quiet down.” His mother would yell at him anytime he would call anybody “Daddy” or “Father.” His mother would say, “Quiet down,” because his father was unknown. Since we don't know who his father is, a shtuki is a safek mamzer (unqualified). We don't know. Maybe his father was somebody problematic. Maybe his father himself was a mamzer. Or maybe this person's mother was in an adulterous relationship. She maybe had relationships with an erva (forbidden sexual relation) of her own. And therefore, the child that she had—this boy that we found, or this girl that we found—was a mamzer or a mamzeret (female mamzer). And therefore, that's how we treat that kid.
Asufi. What's an asufi? Asufi comes from the word “taken in, gathered in,” which means anybody gathered in from the shuk, from the marketplace, and they don't know their father or their mother. We consider this person Jewish only if he's found in a location where most of the people who live there are actually Jewish. If he's found in a non-Jewish location, we assume that this child is non-Jewish. We also assume that this kid is a safek mamzer. We don't know anything about his parents. So therefore, we can't marry him off into the kosher (halachically acceptable) lineage.
Abba Shaul would call a shtuki—the one person who doesn't know who his father is but knows who his mother is—a beduki. Beduki is an examined one, somebody who was checked, because he says that the Bet Din (rabbinical court) would do an investigation. They would talk with the mother of this child. They would say, “Who's the father? Is he a kosher person?” They would find out the identity of the father. If she claimed that the father was a kosher person, somebody who was not from bad lineage, then we would believe her. According to Abba Shaul, we believe the mother about the father of her child. If she claims that he wasn't a disqualified person, then that child is okay. That child wouldn't be a mamzer. So we would only consider somebody to be a shtuki if the mother wasn't accessible—if we didn't have the ability to talk to her—or if the mother didn't know the identity of the man she was with, who fathered this child.
According to Tanna Kamma (first Tanna), on the other hand, he calls every child who only knows its mother but doesn't know its father a shtuki. And therefore, according to him, we assume that this child is from an unqualified, we don't believe the mother whatsoever. He doesn't hold to this idea of a beduki. We don't do an investigation because we wouldn't believe the mother regardless.

