Chapter 199: I Have a Particularly Awesome Roommate

"So you want us to help you improve your plagiarism detection tool?"

"Well, that's a big deal, and I promise you...... Well, you don't lack scholarships, I'll invite you to dinner when you go back to Shanghai, Jin Mao top floor. ”

"Wow, such extravagance."

"Yes, this is a big project, how about it, do my brother a favor?"

"Okay, I'll try, but first of all, I'm not as good at programming languages as you think."

"You're more powerful than you think." Li Yan shook his head, although Wu Bin had not helped him solve any actual code problems, but Li Yan was too relieved of his academic ability, but everything that this big guy had studied with his heart could reach a realm that ordinary people could not understand.

Both of them belong to the vigorous and resolute character, so after eating, Wu Bin and Lin Ziqi followed Li Yan directly to the student union office.

[Shoulder the mission of the times and gather the power of youth!] 】

As soon as you enter the door, there are all kinds of party newspapers and propaganda words on the wall, which can be said to be quite red, which makes people feel a sense of mission at a glance.

Under the leadership of Li Yan, Wu Bin met Tang Chengwen, vice chairman of the Discipline Inspection Department.

When he learned that Wu Bin was here to help solve the problem, Tang Chengwen immediately expressed a warm welcome.

Last year, Wu Bin learned from Li Yan that the student union of HKUST does not have the legendary "bureaucratic spirit", and everyone regards the student union as a place to exercise their abilities, so the atmosphere is very good.

Although Wu Bin has also heard that some students will become official after joining the student union, and even do some things to form a party and do private things after holding power, it is really difficult for him to imagine what kind of situation it will be.

After a few polite words to each other, Tang Chengwen described the phenomenon and scope of cheating to Wu Bin.

Wu Bin nodded after listening.

In short, he didn't need to study how plagiarism happened, but to work out a better bot to effectively get the copied code out of a bunch of submissions last night.

'Kind of interesting'

This reminds Wu Bin of a small game he came across on the forum, where you are given two copies of C code, and you rate the similarity between them, which is an effective training for language comprehension.

"I'll try."

Wu Bin, a master of the code industry, has seen a lot in major forums, but now that he is at the University of Science and Technology, he really doesn't know what kind of old demon of Montenegro he will meet.

"That's smart......"

After brushing a few sets of code, the corners of Wu Bin's mouth curled, the person who wrote the code obviously knew that someone would detect the similarity of the code, so he deliberately changed the code to be complicated, if you want to manually identify them one by one, it is indeed time-consuming and laborious.

In addition, there are students who copy the code directly.,It should be some students who hug their thighs.,It can be said that it's completely unearned.,Although it's human nature.,But it's certainly not a good behavior.。

However, this experimental design is indeed a bit boring, and I guess most students are not interested in doing it seriously. ’

But what is wrong is wrong, and developing this habit certainly does not benefit academically.

"How's that, is it difficult?" Tang Chengwen, who was standing behind him, asked.

"It's okay, just give me some time."

"That's great." After Tang Chengwen finished speaking, he asked Li Yan in a low voice: "Do you still know friends from the letter academy?" ”

"Oh no, he's my classmate, from the Academy."

"Is the Monogain so omnipotent now!?" Tang Chengwen exclaimed.

"No, he's the only one, he has a wide range of hobbies."

"Excellent ......"

While the two were chatting, Wu Bin was doing problem analysis, in essence, the problem of checking the copied code was actually given two codes, P1 and P2.

D(p1,p2) is required to "distance" between them, the smaller the distance, the greater the suspicion of plagiarism.

The premise of solving the problem is naturally to find the problem, and after reading so much code at present, Wu Bin almost made a summary in his heart.

The most common method used is to modify irrelevant information such as comments, variable names, capitalization, etc. Then there are code reflows, style changes, etc., such as filtering the code with the indent tool, knowing that everyone has their own programming style, and this change can make a big difference to the naked eye.

The other two are more technical, one is to add or remove redundant elements in the code, such as adding some useless code, or deleting some printed debugging information.

The second is to rewrite data structures, loops, and local codes equivalently, split and merge functions.

To find out the problem, the first thing Wu Bin needs to do is to optimize the compiler to compile the code, which is very important, you can optimize a lot of manually modified equivalent code into the same binary code, and then get the instruction sequence of the function.

In this way, except for the most technical method of rewriting data structures, loops, and local code, the other three methods of cheating are useless.

Because in the eyes of the compiler, no matter how you indent or adjust, the function is compiled the same.

Watching Wu Bin crackling and typing code on the computer, Tang Chengwen and Lin Ziqi opened their mouths wide.

Although Lin Ziqi knew that Wu Bin was very good at designing programs when she was in the laboratory, she still felt shocked when she saw it with her own eyes.

'That's too high......

After modeling the similarity of the program to the maximum weight matching problem of a bipartite graph, Wu Bin turned back to Tang Chengwen and said, "I'll copy the rest back to the dormitory, it will take a lot of time, is this okay?" ”

"Absolutely." Tang Chengwen nodded again and again, "Then I'll thank you in advance for helping us solve such a big problem." ”

Although Tang Chengwen couldn't understand what Wu Bin had done, his calm and relaxed appearance made him feel that people who had no skills really couldn't pretend.

"You're welcome."

Wu Bin has been frantically reading physics papers for the past week, and now he has stopped to do something else, which makes him feel good, and even feels that some new inspiration is already in the making, and with a little more effort, he can come up with it.

After leaving the student union, Lin Ziqi left the team first and went to the laboratory, while Wu Bin and Li Yan returned to the dormitory together.

Turning on the computer, Li Yan turned his head to Wu Bin and said, "I finally know now why so many people like to use the beginning of a friend I have, I have a classmate, and I have a colleague to pretend to be B." ”

Before Wu Bin could speak, Chen Anzhi on the side interjected: "What, Wu Shen took you to pretend to be b and flew with you?" ”

"Yes, it probably won't be long before the student council will spread the legend that I have a great roommate."

"What's it in? Let's hear it. Chen Anzhi's face was full of curiosity.

"It's not solved yet, don't listen to him." Wu Bin said and walked to Chen Zhi'an's desk and looked at the electromagnetic problem he was doing.

"Big guy...... Don't look at me like that, I'm so stressed. Chen Zhian said pitifully. 2k reading web