A Question of Rankings: a Logic Puzzle Fic

by Coyotek4


Twilight's Reasoning

Silence pervades for several seconds. As Twilight scans the seven sets of eyes upon her, a sense of confusion comes over her. “What?”

“Uh, Principal Twilight,” Sandbar starts, “could you repeat what you just said?”

“Certainly: you’ve heard enough from everyone in the room to know how your friends did on those quizzes.”

THAT’S IMPOSSIBLE!” Gallus immediately realizes who he’s outbursting to. “Sorry, I didn’t mean anything by …”

“You’re fine, Gallus,” Twilight assures. “But I stand by what I said: based on everything I just heard, I could deduce all your rankings.”

“But you probably know all our scores,” Smolder insists.

“Indeed I do,” Twilight replies, “but that doesn’t falsify my statement.”

“Yona confused.”

“Gallus confused too, Yona.”

“Silverstream confused … wait, shouldn’t that be ‘Silverstream is confused’? Actually, why is Silverstream referring to herself in the third-creature … I mean, why am I talking like that?”

“You guys,” Ocellus says to her friends before turning to Twilight. “So you’re saying that, just from a bunch of snippets, you can actually determine all that information? How? Honestly, I’d like to know.”

“Ah’d like to know mahself, Twi,” Applejack adds.

Flattered by the interest, Twilight levitates a piece of chalk to the chalkboard and writes out the statements made by the fivesome, as well as space underneath for the final rankings in each quiz:

Ocellus: “No one had the same ranking for any pair of quizzes. I ranked first for Kindness.”

Smolder: “Everyone ranked first or second on at least one quiz. I ranked higher for Loyalty than for Honesty.”

Yona: “Yona fourth for Honesty. Yona ranked higher for Loyalty than for Kindness.”

Silverstream: “Neither Smolder nor Ocellus ranked fourth for Honesty. Gallus didn’t rank second for Loyalty.”

Gallus: “I didn’t rank fifth for any test. Silverstream ranked fifth for Loyalty.”

H: ___ , ___ , ___ , ___ , ___

L: ___ , ___ , ___ , ___ , ___

K: ___ , ___ , ___ , ___ , ___

“Now the first crucial clue,” Twilight starts, “came from Applejack.” The comment dumbfounds everyone else.

“Twilight, Ah didn’t make any comments about them rankings.”

“Actually, you did: you said those who placed first, second, or third on the Honesty quiz told the truth, and those who placed fourth and fifth lied.” Twilight then turns to the class. “And whether you know this or not, Applejack never lies.”

“Not anymore, anyways,” Applejack mutters to herself.

Twilight turns to Applejack. “What was that?”

“Nothin’, nothin’ … carry on, Sugarcube. Ah’m curious where you go from here.”

“Oohkay then.” Twilight turns back to the board. “Let’s look at Yona’s first comment. She claimed to finish fourth on the Honesty quiz, but if she did, then she would be lying. Therefore, Yona didn’t finish fourth on the Honesty quiz.”

Yona lowers her head. “Is true … Yona not very honest there.”

“However,” Twilight continues, “since Yona lied, she couldn’t have finished first, second, or third either. She must have ranked fifth for Honesty.” Twilight notes this on the chalkboard as she continues. “Now consider Silverstream’s first comment.”

“Ooo, my turn to be special!” the hippogriff cheerily announces.

“Yes … well, suppose Silverstream was lying.”

But I didn’t lie!!!

I know,” Twilight says, “but reasoning sometimes involves starting with an assumption and showing it to lead to a contradiction.”

“A contra-what?”

“Contradiction, Gallus. Follow me here: let’s just suppose that Silverstream was lying. Well, that would mean that either Smolder or Ocellus did finish fourth. But if Silverstream was lying, then she herself would have to have finished fourth, since we already know that Yona was fifth and no one else lied. That is a contradiction: she couldn’t finish in the same place as someone else. And that means that the assumption that Silverstream was lying, was itself a lie. So now we know Silverstream was telling the truth.”

“That’s what I was trying to say!” Silverstream pleads, causing Twilight to chuckle.

“I know, Silverstream … but the funny thing is, both a truth-teller and a liar would claim to tell the truth. But now we’ve proven that you were truthful with your comments … and that means—”

“Smolder and I were also truthful!” Ocellus concludes.

“Wait,” Gallus says, “how you know that?”

Ocellus explains: “Because neither Smolder nor myself finished fourth for Honesty; Silverstream stated so, and now we *know* that’s true. And neither of us were fifth either, since Yona was fifth. That means we were in the top three for Honesty, along with Silverstream. And that proves that we were all truthful …”Her eyes narrow as she displays a grin.“… and there’s only one choice left for finishing fourth for Honesty.”

“Yeah, yeah, you got me,” Gallus admits, “I was fourth for Honesty, and I may have bent the truth with my comments.”

“Just like pretzel!” Yona states, getting a laugh from everyone.

“OK then,” Twilight continues after the laughter dies down, “Let’s recap what we now know: Silverstream, Ocellus, and Smolder were truthful, while Yona and Gallus lied. We also know that Gallus was fourth and Yona was fifth for Honesty.” She adds this knowledge to the board:

H: ___ , ___ , ___ , G , Y

L: ___ , ___ , ___ , ___ , ___

K: O , ___ , ___ , ___ , ___

“Why ‘O’ next to ‘K’?”

“Oh, sorry Yona, I got a bit ahead of myself. Ocellus stated she was first for Kindness, and since we now know her statements are true, I put that information up on the board.” Twilight’s explanation draws a nod from Yona.

“Now let’s consider Smolder’s first comments.”

Finally …”Smolder quickly backtracks: “oh, sorry Principal—”

“That’s all right, Smolder. I know it took a while to get to your statements, but this one is very useful. Based on this comment, everyone finished first or second on at least one quiz. Let’s combine this statement with Yona’s second statement, which we now know to be false. This means Yona finished higher for Kindness than for Loyalty.”

“Wait a minute.” Ocellus asks, “Couldn’t Yona have finished the same place for both quizzes.”

“Funny you should mention that, Ocellus, as it’s your own second comment that prevents that from being a possibility.”

“Oh yeah …”Ocellus sheepishly smiles as Twilight continues.

“Now Yona had to finish either first or second on some quiz. Not Honesty, where she finished fifth. And if she finished first or second for Loyalty, she would have had to have been higher for Loyalty than for Kindness. So she must have finished first or second for Kindness … but Ocellus was first, so that forces Yona to be second for Kindness, and either third or fourth for Loyalty.”

“Now Gallus had to finish first or second on some quiz, but it can’t be Kindness anymore, and it wasn’t Honesty. He must have been first or second in Loyalty, but Silverstream’s second comment—”

“Back to me!!!”

“Yes, Silverstream, back to your comments … you stated that Gallus wasn’t second for Loyalty, so he must have been first. And since his first statement was false, Gallus had to be fifth in something; that means he was fifth for Kindness. Meanwhile, Smolder stated that she was higher for Loyalty than for Honesty. The only way that’s now possible is for her to be second for Loyalty and third for Honesty.”

Twilight adds these facts to the board:

H: ___ , ___ , Sm , G , Y

L: G , Sm , ___ , ___ , ___

K: O , Y , ___ , ___ , G

“It’s like putting together a jigsaw puzzle,” Ocellus admits. “It’s amazing how everything fits together. And all that from a bunch of random comments.”

“We’re not done yet,” Twilight giddily states.“Smolder and Silverstream were third and fourth for Kindness in some order, but Smolder was already third for Honesty; that forces her to be fourth for Kindness, and that means—”

I was third for Kindness!!! Oh wait, I already knew that. But that you figured all that out … I mean, *wow*.”

“By the same reasoning, Ocellus couldn’t be first for Honesty since she was first for Kindness. That means Silverstream was first for Honesty, and Ocellus was second.” Twilight adds this information to the board:

H: Silv , O , Sm , G , Y

L: G , Sm , ___ , ___ , ___

K: O , Y , Silv , Sm , G

“Just a little bit left,” Twilight says. “Now Silverstream—”

“—couldn’t be fifth for Loyalty,” Sandbar says in a laid-back voice now filled with conviction, “because Gallus said she was and that was a lie. But she couldn’t be third either, since she was third for Kindness. That means she was fourth for Loyalty … and since Yona was already fifth for Honesty, she couldn’t be fifth for Loyalty. That means Yona was third, and Ocellus was fifth.”

Well done, Sandbar!” Twilight’s declaration is followed by a myriad of ‘attaboys’ and ‘good jobs’ from his friends.

“So that’s it, then,” Twilight concludes as she writes on the board one last time. “The rankings must have been as follows:”

H: Silv , O , Sm , G , Y

L: G , Sm , Y , Silv , O

K: O , Y , Silv , Sm , G

“Well Ah’ll be,” Applejack admits with a sigh. “Ah never thought so much information could be taken from so little.”

“All part of what makes me the pony I am today,” Twilight meekly states. “But I must say, Sandbar, you and your friends put together a fascinating Honesty project.”

WHAT???” The chorus from everyone else in the room … including Applejack … forces her to continue.

“Well of course.This was a wonderful demonstration of how much simpler life can be if everyone would be honest and forthcoming with information, instead of striving for deception and untruths. Wouldn’t you agree, Applejack?”

“Huh? … Oh, Ah mean, great job everyone! Guess you all get top marks on this one.”

The class erupts in sighs of relief, while Applejack mentally thanks Twilight for giving her less to grade, allowing for more time to catch up on farmyard chores.

“Well I must say, this observation was a lot of fun. Thank you again for having me in your class.” Twilight’s comment is met with a mix of hoof-stomping and applause, and in the name of appreciation.

“Um … Principal Twilight?”

“Yes, Ocellus?”

“You said this was ‘all part of what made you who you are’. You have any stories from your past like this?”

“I do have one interesting tale,” Twilight admits, “but that’s for another day … and who knows, you may have stories of your own to regale. At the least, you got this one.”