Switch Mode

GG Chapter 7

Floyd-Dijkstra path

Volume 1: Elementary school 2004-2005 (7)

 

After Lin Zhixia finished speaking, she pulled Jiang Yubai forward and started running.

 

The castles and fortresses set as bases by Group A and Group B were all located on high ground, while most of the crisscrossing tunnels were located at lower levels.

 

Under Nie Tianqing’s interference, the bubble balls rolled into different tunnels. Nie Tianqing wandered through the tunnels without any care, kicking the balls in all directions.

 

Lin Zhixia observed the situation and concluded: “If we view this game as a graph theory problem, each tunnel node is a vertex of the graph. We have a total of thirty-seven vertices. This graph is already imprinted in my mind. Some tunnels are transparent, while others are not, which involves partially observable Markov decisions…”

 

“Lin Zhixia!” Jiang Yubai interrupted righteously, “You don’t need to explain to me! I believe you!”

 

Lin Zhixia dragged him into a tunnel: “Is it because you don’t understand, so you don’t want to listen? In that case, you can only follow me and obey my commands.”

 

For the sake of their team’s victory, Jiang Yubai chose to overlook Lin Zhixia’s provocations.

 

They ran to various tunnel nodes and quickly gathered seven bubble balls.

 

Along the way, Lin Zhixia bumped into their teammate Dong Sunqi. Dong Sunqi shouted, “Follow me, there’s a shorter path here! If we take the shortest path, we’ll get back faster!”

 

“No!” Lin Zhixia countered, “Always choosing the shortest path doesn’t necessarily lead to the global optimal solution!”

 

Dong Sunqi was shocked: “What the heck are you talking about?”

 

Lin Zhixia explained: “Think of a triangle! Side A and side B are shorter than side C, but their combined length will always exceed side C’s length. Such a simple truth! Why can’t you understand it when applied to graph theory?”

 

Dong Sunqi was stunned: “It kind of makes sense! You talk too much, but fine, I’ll listen to you!”

 

Thus, Dong Sunqi and Jiang Yubai both became Lin Zhixia’s followers.

 

In just a few minutes, they managed to collect twelve bubble balls. However, as fate would have it, three members of the opposing team headed straight for them.

 

Ding Yan sprinted wildly while shouting, “Gan Shuli, Nie Tianqing! Let’s go! Rob Jiang Yubai! They’ve collected so many balls! They’re really good at it! We don’t even need to gather balls ourselves; we’ll just follow them and rob them!”

 

Jiang Yubai didn’t panic at all. He stood there calmly, looking at Lin Zhixia: “You must have a plan.”

 

Lin Zhixia’s eyes shifted, and she suddenly exclaimed: “I don’t have a plan, let’s run! Help, help! Run!”

 

“What?” Jiang Yubai was completely caught off guard and hurried after Lin Zhixia as they ran for their lives.

 

Lin Zhixia was laughing and jumping, her ponytail coming undone. She, Jiang Yubai, and Dong Sunqi all slid down a slide and rushed into the trampoline area.

 

Lin Zhixia, clutching four balls, sped ahead, her figure quickly disappearing into the maze of tunnels.

 

Jiang Yubai and Dong Sunqi were left bewildered, much like the French army after losing the Maginot Line during World War II. Even though they still had mobile forces, they didn’t know how to keep fighting.

 

“You guys take the blue tunnel! Then the red tunnel!” Lin Zhixia’s voice echoed from above. “Quick, get the bubble balls into the centre of our group’s area!”

 

Jiang Yubai immediately asked, “Where are you going?”

 

“I’m going to find the members of Group B,” Lin Zhixia replied.

 

“No!” Jiang Yubai tried to stop her, “Lin Zhixia, don’t go!”

 

Lin Zhixia bid him farewell: “I’m leaving! I don’t know if I’ll be able to come back!”

 

Jiang Yubai, stepping onto the entrance of the blue tunnel, shouted, “Where are you? I’ll come save you!”

 

But Lin Zhixia had already made up her mind: “No, I can’t be a coward! You stay behind and protect the bubble balls, protect every single one! That’s our last hope of winning!”

 

Dong Sunqi, also stricken, cried out: “Lin Zhixia, go quickly! We’ll always remember you!”

 

“What did you just say?” Jiang Yubai began to scold Dong Sunqi, “We’re a team! How can we abandon a teammate? Don’t you have anything you want to protect?”

 

Dong Sunqi firmly replied: “Yes! I want to protect the bubble balls! Lin Zhixia told us to protect the bubble balls, so you go to the centre of Group A’s area!”

 

With that, the two of them rushed towards the central area of Group A’s base.

 

***

 

In the suspended tunnel, Nie Tianqing suddenly said, “I hear footsteps. Lin Zhixia is coming.”

 

None of the three in Nie Tianqing’s group ran away. They stood firm, discussing their plan.

 

Ding Yan revealed, “Lin Zhixia’s nickname in our class is ‘freak.’ She’s really smart, so be careful.”

 

“She’s only nine,” Nie Tianqing said. “How smart can she be?”

 

Ding Yan’s expression changed slightly, “It only takes her three seconds to memorise anything!”

 

Nie Tianqing didn’t believe him.

 

Ding Yan angrily exclaimed, “Really! If I’m lying, I’m a puppy!”

 

Gan Shuli chimed in, “It’s true. She’s really smart.”

 

“Don’t let others’ ambition dampen your own spirit,” Nie Tianqing said, like an older brother teaching them. “The opponent isn’t that scary. There are three of us. If we play rock-paper-scissors against her, surely we can beat her. Each of us has a 50% chance of winning!”

 

“That makes sense!” The voice that responded belonged to Lin Zhixia.

 

Lin Zhixia followed Nie Tianqing’s line of thinking and said, “The cube of 50% is 0.125, so my chance of winning is only 0.125.”

 

Nie Tianqing asked, “Why 0.125?”

 

Lin Zhixia tilted her head and explained, “I need to win against each one of you. The chance of winning the first time is 0.5, the second time it’s 0.25, and the third time it’s 0.125… Isn’t that what you said? You’re assuming each two-on-two match has a 50% chance of winning…”

 

Nie Tianqing frowned, “But Lin Zhixia, when you play rock-paper-scissors with us, as soon as you lose one game, you can’t continue. Why are you still calculating the probability using powers of 0.5?”

 

“Think about it this way,” Lin Zhixia patiently explained, “When I play with the three of you, there are four possible outcomes. The first is that I lose in the first round, with a probability of 0.5. The second is that I lose in the second round, with a probability of 0.25. The third is that I lose in the third round, with a probability of 0.125. The fourth is that I win the third round, also with a probability of 0.125. The sum of these probabilities equals 1. Can you calculate it? The key to moving to the second and third rounds is that I win the previous round. But remember, winning the previous round doesn’t guarantee final victory.”

 

Nie Tianqing suddenly understood, making a fist with his right hand and hammering it into the palm of his left: “I’ve figured it out!”

 

He turned to his two companions, “Are you happy? We have a 0.875 probability of winning!”

 

Ding Yan trembled slightly, “Nie Tianqing, after all she’s said, you still think you can win? She must be tricking you. I don’t believe it.”

 

Nie Tianqing ignored Ding Yan. He walked up to Lin Zhixia with a fighting spirit and said, “Let’s begin, Lin Zhixia—rock, knife, scissors, paper.”

 

Lin Zhixia happily agreed.

 

Then, both of them made their moves at the same time—Nie Tianqing played rock, while Lin Zhixia played paper.

 

Nie Tianqing was shocked, frozen in place.

 

Lin Zhixia clapped her hands and jumped in front of Ding Yan.

 

Ding Yan was terrified. He clenched his teeth and showed scissors, while Lin Zhixia played rock. With a resigned expression of “I knew it all along,” Ding Yan started counting down his three minutes of freezing time.

 

Only Gan Shuli remained in Ding Yan’s group. The entire group’s hope now rested on her.

 

Gan Shuli stammered, “I… rock-paper-scissors…”

 

“Gan Shuli,” Lin Zhixia patted her shoulder, “Don’t be nervous.”

 

The tunnel node was a closed space, with glass windows on both sides and an exhaust vent at the top. When Gan Shuli glanced outside, she could see trampolines, a zipline, and a chandelier. She steeled herself and faced Lin Zhixia, “Lin Zhixia! Rock-paper-scissors!”

 

As soon as she spoke, Gan Shuli opened her hand in a “paper” gesture.

 

But Lin Zhixia seemed to have reacted faster, already showing scissors before Gan Shuli could respond.

 

Gan Shuli looked surprised, “You… won again.”

 

Lin Zhixia smiled and said, “Oh, it’s just luck.”

 

In her mind, however, Lin Zhixia thought—it’s this very luck that makes her different from everyone else. Through carefully observing the smallest details, she could predict each classmate’s moves.

 

Gan Shuli clapped for her, “What good luck.”

 

“I told you!” Ding Yan warned Nie Tianqing, “I knew from the start! We can’t beat her!”

 

Nie Tianqing brought up the past: “If you knew all along, why did you still bring us to rob Lin Zhixia’s group?”

 

Ding Yan was left speechless. He just couldn’t stand Jiang Yubai happily picking up balls with Lin Zhixia. In just a few minutes, Jiang Yubai had gathered a bunch of balls! Why! Why didn’t Jiang Yubai have to use his brain! He didn’t want to use his brain either!

 

Poor them—the three members of their group were all frozen in place.

 

Meanwhile, Lin Zhixia had already run far away.

 

On the way back to the base, Lin Zhixia was still picking up balls. She was overjoyed, her long hair loose and hanging over her shoulders, looking like a little lunatic. But she didn’t care at all. She had picked up four balls and dashed into a tunnel, just in time to bump into Jiang Yubai.

 

Lin Zhixia fell right on the spot.

 

Jiang Yubai knelt down and helped her up with both hands.

 

She lamented, “All four bubble balls rolled away, go get them quickly…”

 

Jiang Yubai only asked, “I’m sorry, did I hurt you? I have a doctor at home.”

 

Lin Zhixia shook her head: “No.” Then she asked, “Why are you apologising? I bumped into you too. It wasn’t intentional. The force is mutual.”

 

At the end of Lin Zhixia’s hair, there was a red hair tie hanging loosely. Jiang Yubai gently removed it and said, “Tie up your hair. In the tunnel, your hair can’t cover your eyes. You need to see the path clearly.”

 

Lin Zhixia had already picked up three bubble balls. She sat on the ground, her back to Jiang Yubai: “Help me tie my hair! Hurry up!”

 

Jiang Yubai was stunned: “I… I don’t know how to tie hair.”

 

Immediately, Lin Zhixia threw the bubble balls into his arms and snatched the red hair tie back from him. While tying her long hair, she muttered, “It’s really simple to tie hair.”

 

Jiang Yubai said, “I’ve never learned how.”

 

Lin Zhixia told him, “There are many things that are so simple you don’t need to learn them. Just look once and you can figure it out.”

 

From a distance, Dong Sunqi let out a thunderous roar, “Jiang Yubai! Lin Zhixia! Where are you!”

 

“Let’s go!” Lin Zhixia pulled Jiang Yubai up. “We need to keep collecting balls!”

 

Jiang Yubai asked her, “Are you still using the shortest path algorithm?”

 

Lin Zhixia glanced back at Jiang Yubai and ran forward with him: “Of course! I have a Floyd algorithm matrix in my mind! All the tunnel nodes are vertices in the graph. When the matrix doesn’t work, I build a Dijkstra tree, and this tree also exists in my mind. Basically, it’s a fusion of greedy, exhaustive, and pruning algorithms. It’s as simple as tying your hair. You don’t need to think about it, just look once and you’ll know! I’ll take you on the fastest route! Let’s go home together!”

 

Jiang Yubai couldn’t help but admire her. Hearing her say, “I’ll take you the fastest way, let’s go home together,” filled him with joy. This time, their Group A was definitely going to win!

 

The road in the tunnel was rough, and both Jiang Yubai and Lin Zhixia were carrying four balls each. As Jiang Yubai kept an eye on the enemy’s movements, he noticed something strange: “They’re not chasing us anymore.”

 

Lin Zhixia laughed heartily: “They’re going to raid the centre of our Group A base and rob Dong Sunqi soon. We need to get back to the centre of Group A’s base before they ambush us!”

 

“What!” Jiang Yubai exclaimed, “They’re so sneaky!”

 

Lin Zhixia comforted him: “Don’t worry! I’ll protect you!”

 

She jumped onto a pipe.

 

Jiang Yubai placed the four balls he was carrying into the pipe. Then, gripping the ring with one hand, he stood on the zipline track and turned to Lin Zhixia: “You go back to the base first! I saw two balls on the trampoline!”

 

Lin Zhixia warned him: “Be careful, and come back quickly!”

 

Jiang Yubai flew down like the wind and landed on the trampoline with steady footwork. His landing was so smooth that with a quick roll, he softened the impact, causing the trampoline not to bounce at all.

 

He picked up the valuable bubble balls and looked up at Lin Zhixia, who was standing by a window in the castle.

 

Lin Zhixia waved at him with one hand from the castle.

 

Jiang Yubai recalled the fairy tales he had read—where the princess always stood in the castle, waiting for the prince to slay the demons and rescue her.

 

But the princess before him was different.

 

She was more like a prince fighting through obstacles than he was.

 

The stories in the fairy tales had it wrong. From what Jiang Yubai had seen with his own eyes, even the princess could be invincible and ride the waves herself.

 

_______________________________________

Thank you for reading! If you found any typos please let me know in the comment section!

If you like the translation or novel please rate it on NU and support me on Ko-fi for bonus chapters:

Buy Me a Coffee at ko-fi.com

Have a lovely day~~

(づ˶•༝•˶)づ𓍢ִ໋🌷͙֒

Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO

Options

not work with dark mode
Reset