Chu Ge grew more agitated as he spoke. He pulled a cigarette from his pocket and was about to light it, but after a glance at Chen Zhuo, he irritably stuffed it back in.
"It was supposed to be a simple inventory system—just build a front-end and connect it to a database. But the boss insisted on adding this insane allocation logic."
Chu Ge gestured with his hands.
"Supplies are tight. Orders from municipal hospitals get absolute priority, followed by the big chain pharmacies, and finally the small clinics in the counties below. And we can’t just cut off the small clinics completely—we have to reserve a ten percent base inventory and distribute it to them proportionally."
Chen Zhuo listened quietly without interrupting.
"When Lu Jia wrote the allocation algorithm, she used nested loops."
Chu Ge rubbed his temples, a headache brewing.
"If an order comes from a hospital, it goes down path A: check inventory, deduct. If it’s from a pharmacy, it goes down path B: check inventory, deduct proportionally. Logically, there’s nothing wrong with that."
Chu Ge paused, his expression turning grim.
"But the deadline is tonight. Lu Jia and I threw in thirty thousand lines of simulated data for a pressure test. Thirty thousand orders, all with different priority tags, flooded in at once. Those If-Else conditional statements were nested five or six layers deep. The server has to repeatedly traverse, compare, and sort all those tens of thousands of orders in the background."
"And then?" Chen Zhuo asked.
"And then the CPU usage shot straight to one hundred percent, the memory maxed out, the case fan spun so fast it nearly started smoking, and the system crashed."
Chu Ge leaned back in his chair.
"The algorithm’s time complexity is just too high. Lu Jia and I spent the whole afternoon tweaking parameters, but no matter what we changed, it ended in a deadlock. The boss said it has to be running by tonight. If it can’t handle these thirty thousand concurrent requests, we’ll lose the final payment of over ten thousand yuan."
After he finished, Chu Ge stared at Chen Zhuo, his eyes full of desperate hope.
"Brother Zhuo, you’re brilliant, and you have a strong foundation in math. Can you help me sort this out? What’s fundamentally wrong with the underlying logic?"
Chen Zhuo sat in his chair, his gaze falling on the copy of *Landau* on the desk. He thought silently for a few seconds.
He understood.
’The problem Chu Ge and Lu Jia are facing,’ he thought, ’is that they’re trying to navigate a maze using the most direct, clumsiest brute-force method.’
’With a small amount of data, the computer can handle checking identities one by one, queuing them up, and allocating resources.’
’But once the data volume explodes exponentially, the nested loops become a computational black hole.’
’In terms of pure logic, it’s isomorphic to the dead end he had encountered while reading that paper from the Princeton team.’
’Delian’s team tried to use continuous spacetime calculus to cross the Singularity and encountered divergence. Chu Ge and his team tried to use linear conditional statements to process a huge number of intertwined orders and encountered a memory overflow.’
Chen Zhuo nodded.
"Your approach was flawed from the very beginning."
Chen Zhuo’s tone was even.
Chu Ge was stunned, his mouth hanging half-open.
"Flawed? Allocation based on conditional logic—isn’t that the most reliable planning method taught in programming books?"
Chen Zhuo didn’t rush to explain.
He reached for the sheet of scratch paper he’d been using earlier, the one covered in physics derivation formulas.
He glanced at the dense calculations on its surface—the Landau theory he had just been completing. Chen Zhuo casually flipped the paper over, revealing the other side, which was printed with obsolete C code.
The line spacing of the code was wide, leaving plenty of white space in between.
In a blank area, he used his pen to lightly draw a black ink dot.
"You’re treating these orders like people lining up to buy tickets."
Chen Zhuo explained as he drew.
"The line gets too long, so you set up three different lanes at the ticket gate. For every person that comes through, you have to ask, ’Where are you from?’ before deciding which lane to send them down. When the crowd gets too big, the gate gets completely jammed."
Chu Ge leaned in closer, his eyes fixed on the black dot under Chen Zhuo’s pen.
"If they don’t line up, how are you supposed to sort them?" Chu Ge asked.
Chen Zhuo drew a few more black dots, spaced far apart from the first one, and then connected them with straight lines.
"Treat them as individual state nodes."
With a flick of his wrist, Chen Zhuo sketched the structure of a bipartite graph on the paper, not the tree-like branching Chu Ge had described.
"Abandon the mindset of linear traversal. Abstract the hospitals, pharmacies, and clinics directly into algebraic points with different weights. Abstract the existing inventory into a set."
In another blank space on the paper, Chen Zhuo quickly jotted down a few basic variables from Discrete Mathematics, then applied a minimalist matrix mapping formula.
"In this Discrete Matrix, you don’t need to ask ’if.’ An order comes in, and it brings its weight value with it—say, 3 for a hospital, 2 for a pharmacy, 1 for a clinic. You directly perform a multiplicative mapping between the order matrix and the inventory matrix. The ones with higher weights will naturally get matched to an inventory node first."
Chen Zhuo added a final stroke to the formula.
"If an inventory node is depleted to zero, it becomes inactive in the matrix, and subsequent mappings will automatically skip it. All the logic is completed in a single matrix operation, instead of running through tens of thousands of nested loops."
After writing the last line, Chen Zhuo pushed the scratch paper in front of Chu Ge.
Chu Ge stared down at the clear matrix structure on the paper, his brain rapidly translating the mathematical symbols into the database language he was familiar with.
Although Chu Ge’s foundation in mathematics wasn’t as strong as Chen Zhuo’s, he had, after all, managed to get into a place like the junior class at Keda. His logical comprehension could still be considered top-tier.
He looked at it for about half a minute.
"Holy shit..."
Chu Ge snapped his head up. The look of dejection in his eyes was completely gone, replaced by the bright spark of sudden enlightenment.
Reading settings
Size
18
Font
Alignment
Theme
Spacing
1.7
Width
Original text
Progress marks
My IQ Increases Year by Year — Chapters
1
Chapter 1
2
Chapter 2
3
Chapter 3
4
Chapter 4
5
Chapter 5
6
Chapter 6
7
Chapter 7
8
Chapter 8
9
Chapter 9
10
Chapter 10
11
Chapter 11
12
Chapter 12
13
Chapter 13
14
Chapter 14
15
Chapter 15
16
Chapter 16
17
Chapter 17
18
Chapter 18
19
Chapter 19
20
Chapter 20
21
Chapter 21
22
Chapter 22
23
Chapter 23
24
Chapter 24
25
Chapter 25
26
Chapter 26
27
Chapter 27
28
Chapter 28
29
Chapter 29
30
Chapter 30
31
Chapter 31
32
Chapter 32
33
Chapter 33
34
Chapter 34
35
Chapter 35
36
Chapter 36
37
Chapter 37
38
Chapter 38
39
Chapter 39
40
Chapter 40
41
Chapter 41
42
Chapter 42
43
Chapter 43
44
Chapter 44
45
Chapter 45
46
Chapter 46
47
Chapter 47
48
Chapter 48
49
Chapter 49
50
Chapter 50
51
Chapter 51
52
Chapter 52
53
Chapter 53
54
Chapter 54
55
Chapter 55
56
Chapter 56
57
Chapter 57
58
Chapter 58
59
Chapter 59
60
Chapter 60
61
Chapter 61
62
Chapter 62
63
Chapter 63
64
Chapter 64
65
Chapter 65
66
Chapter 66
67
Chapter 67
68
Chapter 68
69
Chapter 69
70
Chapter 70
71
Chapter 71
72
Chapter 72
73
Chapter 73
74
Chapter 74
75
Chapter 75
76
Chapter 76
77
Chapter 77
78
Chapter 78
79
Chapter 79
80
Chapter 80
81
Chapter 81
82
Chapter 82
83
Chapter 83
84
Chapter 84
85
Chapter 85
86
Chapter 86
87
Chapter 87
88
Chapter 88
89
Chapter 89
90
Chapter 90
91
Chapter 91
92
Chapter 92
93
Chapter 93
94
Chapter 94
95
Chapter 95
96
Chapter 96
97
Chapter 97
98
Chapter 98
99
Chapter 99
100
Chapter 100
101
Chapter 101
102
Chapter 102
103
Chapter 103
104
Chapter 104
105
Chapter 105
106
Chapter 106
107
Chapter 107
108
Chapter 108
109
Chapter 109
110
Chapter 110
111
Chapter 111
112
Chapter 112
113
Chapter 113
114
Chapter 114
115
Chapter 115
116
Chapter 116
117
Chapter 117
118
Chapter 118
119
Chapter 119
120
Chapter 120
121
Chapter 121
122
Chapter 122
123
Chapter 123
124
Chapter 124
125
Chapter 125
126
Chapter 126
127
Chapter 127
128
Chapter 128
129
Chapter 129
130
Chapter 130
131
Chapter 131
132
Chapter 132
133
Chapter 133
134
Chapter 134
135
Chapter 135
136
Chapter 136
137
Chapter 137
138
Chapter 138
139
Chapter 139
140
Chapter 140
141
Chapter 141
142
Chapter 142
143
Chapter 143
144
Chapter 144
145
Chapter 145
146
Chapter 146
147
Chapter 147
148
Chapter 148
149
Chapter 149
150
Chapter 150
151
Chapter 151
152
Chapter 152
153
Chapter 153
154
Chapter 154
155
Chapter 155
156
Chapter 156
157
Chapter 157
158
Chapter 158
159
Chapter 159
160
Chapter 160
161
Chapter 161
162
Chapter 162
163
Chapter 163
164
Chapter 164
165
Chapter 165
166
Chapter 166
167
Chapter 167
168
Chapter 168
169
Chapter 169
170
Chapter 170
171
Chapter 171
172
Chapter 172
173
Chapter 173
174
Chapter 174
175
Chapter 175
176
Chapter 176
177
Chapter 177
178
Chapter 178
179
Chapter 179
180
Chapter 180
181
Chapter 181
182
Chapter 182
183
Chapter 183
184
Chapter 184
185
Chapter 185
186
Chapter 186
187
Chapter 187
188
Chapter 188
189
Chapter 189
190
Chapter 190
191
Chapter 191
192
Chapter 192
193
Chapter 193
194
Chapter 194
195
Chapter 195
196
Chapter 196
197
Chapter 197
198
Chapter 198
199
Chapter 199
200
Chapter 200
201
Chapter 201
202
Chapter 202
203
Chapter 203
204
Chapter 204
205
Chapter 205
206
Chapter 206
207
Chapter 207
208
Chapter 208
209
Chapter 209
210
Chapter 210
211
Chapter 211
212
Chapter 212
213
Chapter 213
214
Chapter 214
215
Chapter 215
216
Chapter 216
217
Chapter 217
218
Chapter 218
219
Chapter 219
220
Chapter 220
221
Chapter 221
222
Chapter 222
223
Chapter 223
224
Chapter 224
225
Chapter 225
226
Chapter 226
227
Chapter 227
228
Chapter 228
229
Chapter 229
230
Chapter 230
231
Chapter 231
232
Chapter 232
233
Chapter 233
234
Chapter 234
235
Chapter 235
236
Chapter 236
237
Chapter 237
238
Chapter 238
239
Chapter 239
240
Chapter 240
241
Chapter 241
242
Chapter 242
243
Chapter 243
244
Chapter 244
245
Chapter 245
246
Chapter 246
247
Chapter 247
248
Chapter 248
249
Chapter 249
250
Chapter 250
251
Chapter 251
252
Chapter 252
253
Chapter 253
254
Chapter 254
255
Chapter 255
256
Chapter 256
257
Chapter 257
258
Chapter 258
259
Chapter 259
260
Chapter 260
261
Chapter 261
262
Chapter 262
263
Chapter 263
264
Chapter 264
265
Chapter 265
266
Chapter 266
267
Chapter 267
268
Chapter 268
269
Chapter 269
270
Chapter 270
271
Chapter 271
272
Chapter 272
273
Chapter 273
274
Chapter 274
275
Chapter 275
276
Chapter 276
277
Chapter 277
278
Chapter 278
279
Chapter 279
280
Chapter 280
281
Chapter 281
282
Chapter 282
283
Chapter 283
284
Chapter 284
285
Chapter 285
286
Chapter 286
287
Chapter 287
288
Chapter 288
289
Chapter 289
290
Chapter 290
291
Chapter 291
292
Chapter 292
293
Chapter 293
294
Chapter 294
295
Chapter 295
296
Chapter 296
297
Chapter 297
299
Chapter 299
301
Chapter 301
303
Chapter 303
304
Chapter 304
305
Chapter 305
Comments
Log in to leave a comment.