File size: 17,352 Bytes
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a4db658
 
 
 
 
 
 
ab71acf
 
 
a4db658
 
 
 
 
 
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82153f6
9a23844
82153f6
 
 
 
9a23844
 
82153f6
 
 
 
 
 
 
 
ab71acf
 
 
82153f6
 
 
 
 
 
 
 
 
 
 
 
 
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1640278
ab71acf
 
 
 
1640278
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
1640278
 
 
 
 
 
 
 
 
 
 
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1640278
ab71acf
 
 
 
1640278
ab71acf
 
 
 
 
 
 
 
 
 
1640278
 
 
 
 
 
 
 
 
 
 
 
 
 
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1640278
ab71acf
 
 
 
1640278
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
1640278
 
 
 
 
 
 
 
 
 
 
ab71acf
 
 
 
 
 
 
 
 
 
 
 
 
a4db658
 
 
 
 
 
 
 
 
 
ab71acf
 
1640278
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Computer Science Processes - Programming Framework Analysis</title>
    <style>
        body { 
            font-family: 'Times New Roman', Times, serif, 'Arial Unicode MS'; 
            margin: 0; 
            background: #ffffff; 
            color: #000000; 
            line-height: 1.6; 
            font-size: 12pt; 
        }
        .container { 
            max-width: 1000px; 
            margin: 0 auto; 
            padding: 1.5rem; 
        }
        h1, h2, h3 { 
            color: #000000; 
            margin-top: 1.5rem; 
            margin-bottom: 0.75rem; 
        }
        h1 { 
            font-size: 18pt; 
            text-align: center; 
        }
        h2 { 
            font-size: 16pt; 
            border-bottom: 2px solid #000; 
            padding-bottom: 0.5rem; 
        }
        h3 { 
            font-size: 14pt; 
        }
        p { 
            margin-bottom: 1rem; 
            text-align: justify; 
        }
        .figure { 
            margin: 1rem 0; 
            text-align: center; 
            border: 1px solid #ccc; 
            padding: 1rem; 
            background: #f9f9f9; 
        }
        .figure-caption { 
            margin-top: 1rem; 
            font-style: italic; 
            text-align: left; 
        }
        .mermaid { 
            background: white; 
            padding: 1rem; 
            border-radius: 4px; 
        }
        .color-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 1rem;
            justify-content: center;
        }
        .color-legend span {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.25rem 0.5rem;
            border-radius: 999px;
            border: 1px solid rgba(0,0,0,.08);
            background: #fff;
            font-size: 0.9rem;
        }
        .color-box {
            width: 12px;
            height: 12px;
            border-radius: 2px;
            border: 1px solid rgba(0,0,0,.15);
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <script>
        mermaid.initialize({ 
            startOnLoad: true, 
            theme: 'default', 
            flowchart: { 
                useMaxWidth: false, 
                htmlLabels: true,
                curve: 'linear',
                nodeSpacing: 50,
                rankSpacing: 50,
                padding: 20
            },
            themeVariables: {
                fontFamily: 'Arial Unicode MS, Arial, sans-serif'
            }
        });
    </script>
</head>
<body>
    <div class="container">
        <h1>Computer Science Processes - Programming Framework Analysis</h1>
        
        <p>This document presents computer science processes analyzed using the Programming Framework methodology. Each process is represented as a computational flowchart with standardized color coding: Red for triggers/inputs, Yellow for structures/objects, Green for processing/operations, Blue for intermediates/states, and Violet for products/outputs. Yellow nodes use black text for optimal readability, while all other colors use white text.</p>

        <h2>1. QuickSort Algorithm Process</h2>
        <div class="figure">
            <div class="mermaid">
graph TD
    A[Input Array] --> B[Choose Pivot]
    B --> C[Partition Array]
    C --> D[Recursive Sort Left]
    C --> E[Recursive Sort Right]
    D --> F[Merge Results]
    E --> F
    F --> G[Sorted Array]
    
    style A fill:#ff6b6b,color:#fff
    style B fill:#ffd43b,color:#000
    style C fill:#51cf66,color:#fff
    style D fill:#74c0fc,color:#fff
    style E fill:#74c0fc,color:#fff
    style F fill:#51cf66,color:#fff
    style G fill:#b197fc,color:#fff

            </div>
            <div class="color-legend">
                <span><span class="color-box" style="background:#ff6b6b;"></span>Inputs & Data</span>
                <span><span class="color-box" style="background:#ffd43b;"></span>Data Structures & Arrays</span>
                <span><span class="color-box" style="background:#51cf66;"></span>Operations & Algorithms</span>
                <span><span class="color-box" style="background:#74c0fc;"></span>States & Variables</span>
                <span><span class="color-box" style="background:#b197fc;"></span>Output & Results</span>
            </div>
            <div class="figure-caption">
                <strong>Figure 1.</strong> QuickSort Algorithm Process. This computer science process visualization demonstrates the computational logic of the QuickSort algorithm. The flowchart shows input data and parameters, data structures and arrays, algorithmic operations and comparisons, intermediate states and recursive calls, and final sorted output.
            </div>
        </div>

        <h2>2. Binary Search Tree Process</h2>
        <div class="figure">
            <div class="mermaid">
graph TD
    A[Search Key] --> B[Compare with Root]
    B --> C[Key less than Root Question]
    C -->|Yes| D[Search Left Subtree]
    C -->|No| E[Search Right Subtree]
    D --> F[Recursive Search]
    E --> G[Recursive Search]
    F --> H[Key Found Question]
    G --> I[Key Found Question]
    H -->|Yes| J[Return Node]
    H -->|No| K[Return Null]
    I -->|Yes| L[Return Node]
    I -->|No| M[Return Null]
    J --> N[Search Successful]
    L --> N
    K --> O[Search Unsuccessful]
    M --> O
    
    style A fill:#ff6b6b,color:#fff
    style B fill:#ffd43b,color:#000
    style C fill:#51cf66,color:#fff
    style D fill:#74c0fc,color:#fff
    style E fill:#74c0fc,color:#fff
    style F fill:#51cf66,color:#fff
    style G fill:#51cf66,color:#fff
    style H fill:#51cf66,color:#fff
    style I fill:#51cf66,color:#fff
    style J fill:#74c0fc,color:#fff
    style K fill:#74c0fc,color:#fff
    style L fill:#74c0fc,color:#fff
    style M fill:#74c0fc,color:#fff
    style N fill:#b197fc,color:#fff
    style O fill:#b197fc,color:#fff
            </div>
            <div class="color-legend">
                <span><span class="color-box" style="background:#ff6b6b;"></span>Inputs & Data</span>
                <span><span class="color-box" style="background:#ffd43b;"></span>Data Structures & Arrays</span>
                <span><span class="color-box" style="background:#51cf66;"></span>Operations & Algorithms</span>
                <span><span class="color-box" style="background:#74c0fc;"></span>States & Variables</span>
                <span><span class="color-box" style="background:#b197fc;"></span>Output & Results</span>
            </div>
            <div class="figure-caption">
                <strong>Figure 2.</strong> Binary Search Tree Process. This computer science process visualization demonstrates the computational logic of binary search tree operations. The flowchart shows search key validation, tree structure analysis, binary search strategy, recursive traversal, and search result determination.
            </div>
        </div>

        <h2>3. Dynamic Programming Process</h2>
        <div class="figure">
            <div class="mermaid">
graph TD
    %% Problem Definition
    A[Problem Statement] --> B[Problem Analysis]
    C[Input Parameters] --> D[Parameter Validation]
    E[Constraints] --> F[Constraint Analysis]
    
    %% Dynamic Programming Setup
    B --> G[Subproblem Identification]
    D --> H[State Space Definition]
    F --> I[Memory Requirements]
    
    %% Algorithm Design
    G --> J[Recursive Relation]
    H --> K[DP Table Structure]
    I --> L[Memory Allocation]
    
    %% Implementation
    J --> M[Base Case Definition]
    K --> N[Table Initialization]
    L --> O[Array Creation]
    
    %% Computation
    M --> P[Fill Base Cases]
    N --> Q[Iterative Computation]
    O --> R[State Transitions]
    
    %% Solution Construction
    P --> S[DP Table Population]
    Q --> T[Optimal Value Calculation]
    R --> U[Path Reconstruction]
    
    %% Final Result
    S --> V[Optimal Solution]
    T --> W[Performance Analysis]
    U --> X[Solution Verification]
    
    %% Styling - Computer Science Color Scheme
    %% Red: Inputs & Triggers
    style A fill:#ff6b6b,color:#fff
    style C fill:#ff6b6b,color:#fff
    style E fill:#ff6b6b,color:#fff
    
    %% Yellow: Structures & Objects
    style B fill:#ffd43b,color:#000
    style D fill:#ffd43b,color:#000
    style F fill:#ffd43b,color:#000
    style G fill:#ffd43b,color:#000
    style H fill:#ffd43b,color:#000
    style I fill:#ffd43b,color:#000
    style J fill:#ffd43b,color:#000
    style K fill:#ffd43b,color:#000
    style L fill:#ffd43b,color:#000
    style M fill:#ffd43b,color:#000
    style N fill:#ffd43b,color:#000
    style O fill:#ffd43b,color:#000
    
    %% Green: Processing & Operations
    style P fill:#51cf66,color:#fff
    style Q fill:#51cf66,color:#fff
    style R fill:#51cf66,color:#fff
    style S fill:#51cf66,color:#fff
    style T fill:#51cf66,color:#fff
    style U fill:#51cf66,color:#fff
    
    %% Blue: Intermediates & States
    style V fill:#74c0fc,color:#fff
    style W fill:#74c0fc,color:#fff
    style X fill:#74c0fc,color:#fff
            </div>
            <div class="color-legend">
                <span><span class="color-box" style="background:#ff6b6b;"></span>Inputs & Data</span>
                <span><span class="color-box" style="background:#ffd43b;"></span>Data Structures & Arrays</span>
                <span><span class="color-box" style="background:#51cf66;"></span>Operations & Algorithms</span>
                <span><span class="color-box" style="background:#74c0fc;"></span>States & Variables</span>
                <span><span class="color-box" style="background:#b197fc;"></span>Output & Results</span>
            </div>
            <div class="figure-caption">
                <strong>Figure 3.</strong> Dynamic Programming Process. This computer science process visualization demonstrates the computational logic of dynamic programming algorithms. The flowchart shows problem analysis, subproblem identification, recursive relation formulation, table-based computation, and optimal solution construction.
            </div>
        </div>

        <h2>4. Graph Traversal Process</h2>
        <div class="figure">
            <div class="mermaid">
graph TD
    %% Graph Representation
    A[Graph Structure] --> B[Graph Analysis]
    C[Starting Vertex] --> D[Vertex Validation]
    E[Traversal Type] --> F[Algorithm Selection]
    
    %% Data Structure Setup
    B --> G[Adjacency List/Matrix]
    D --> H[Vertex Initialization]
    F --> I[Queue/Stack Selection]
    
    %% Traversal Initialization
    G --> J[Graph Representation]
    H --> K[Visited Array]
    I --> L[Data Structure Creation]
    
    %% Traversal Process
    J --> M[Neighbor Discovery]
    K --> N[Visit Tracking]
    L --> O[Element Management]
    
    %% Algorithm Execution
    M --> P[Neighbor Processing]
    N --> Q[Visit Marking]
    O --> R[Element Removal]
    
    %% Completion
    P --> S[Traversal Complete]
    Q --> T[All Vertices Visited]
    R --> U[Data Structure Empty]
    
    %% Final Result
    S --> V[Traversal Order]
    T --> W[Connected Components]
    U --> X[Algorithm Termination]
    
    %% Styling - Computer Science Color Scheme
    %% Red: Inputs & Triggers
    style A fill:#ff6b6b,color:#fff
    style C fill:#ff6b6b,color:#fff
    style E fill:#ff6b6b,color:#fff
    
    %% Yellow: Structures & Objects
    style B fill:#ffd43b,color:#000
    style D fill:#ffd43b,color:#000
    style F fill:#ffd43b,color:#000
    style G fill:#ffd43b,color:#000
    style H fill:#ffd43b,color:#000
    style I fill:#ffd43b,color:#000
    style J fill:#ffd43b,color:#000
    style K fill:#ffd43b,color:#000
    style L fill:#ffd43b,color:#000
    
    %% Green: Processing & Operations
    style M fill:#51cf66,color:#fff
    style N fill:#51cf66,color:#fff
    style O fill:#51cf66,color:#fff
    style P fill:#51cf66,color:#fff
    style Q fill:#51cf66,color:#fff
    style R fill:#51cf66,color:#fff
    style S fill:#51cf66,color:#fff
    style T fill:#51cf66,color:#fff
    style U fill:#51cf66,color:#fff
    
    %% Blue: Intermediates & States
    style V fill:#74c0fc,color:#fff
    style W fill:#74c0fc,color:#fff
    style X fill:#74c0fc,color:#fff
            </div>
            <div class="color-legend">
                <span><span class="color-box" style="background:#ff6b6b;"></span>Inputs & Data</span>
                <span><span class="color-box" style="background:#ffd43b;"></span>Data Structures & Arrays</span>
                <span><span class="color-box" style="background:#51cf66;"></span>Operations & Algorithms</span>
                <span><span class="color-box" style="background:#74c0fc;"></span>States & Variables</span>
                <span><span class="color-box" style="background:#b197fc;"></span>Output & Results</span>
            </div>
            <div class="figure-caption">
                <strong>Figure 4.</strong> Graph Traversal Process. This computer science process visualization demonstrates the computational logic of graph traversal algorithms. The flowchart shows graph representation, vertex initialization, neighbor discovery, visit tracking, and traversal completion.
            </div>
        </div>

        <h2>5. Memory Management Process</h2>
        <div class="figure">
            <div class="mermaid">
graph TD
    %% Memory Request
    A[Memory Request] --> B[Request Analysis]
    C[Size Requirements] --> D[Size Validation]
    E[Memory Type] --> F[Type Selection]
    
    %% Memory Allocation
    B --> G[Free List Search]
    D --> H[Block Size Check]
    F --> I[Allocation Strategy]
    
    %% Block Management
    G --> J[Free Block Identification]
    H --> K[Block Splitting]
    I --> L[Allocation Method]
    
    %% Memory Assignment
    J --> M[Block Assignment]
    K --> N[Remaining Block]
    L --> O[Memory Marking]
    
    %% Deallocation
    M --> P[Memory Usage]
    N --> Q[Free Block Update]
    O --> R[Allocation Complete]
    
    %% Cleanup
    P --> S[Memory Release]
    Q --> T[Free List Update]
    R --> U[Fragmentation Check]
    
    %% Final State
    S --> V[Memory Freed]
    T --> W[Free List Maintained]
    U --> X[Memory Management Complete]
    
    %% Styling - Computer Science Color Scheme
    %% Red: Inputs & Triggers
    style A fill:#ff6b6b,color:#fff
    style C fill:#ff6b6b,color:#fff
    style E fill:#ff6b6b,color:#fff
    
    %% Yellow: Structures & Objects
    style B fill:#ffd43b,color:#000
    style D fill:#ffd43b,color:#000
    style F fill:#ffd43b,color:#000
    style G fill:#ffd43b,color:#000
    style H fill:#ffd43b,color:#000
    style I fill:#ffd43b,color:#000
    style J fill:#ffd43b,color:#000
    style K fill:#ffd43b,color:#000
    style L fill:#ffd43b,color:#000
    style M fill:#ffd43b,color:#000
    style N fill:#ffd43b,color:#000
    style O fill:#ffd43b,color:#000
    
    %% Green: Processing & Operations
    style P fill:#51cf66,color:#fff
    style Q fill:#51cf66,color:#fff
    style R fill:#51cf66,color:#fff
    style S fill:#51cf66,color:#fff
    style T fill:#51cf66,color:#fff
    style U fill:#51cf66,color:#fff
    
    %% Blue: Intermediates & States
    style V fill:#74c0fc,color:#fff
    style W fill:#74c0fc,color:#fff
    style X fill:#74c0fc,color:#fff
            </div>
            <div class="color-legend">
                <span><span class="color-box" style="background:#ff6b6b;"></span>Inputs & Data</span>
                <span><span class="color-box" style="background:#ffd43b;"></span>Data Structures & Arrays</span>
                <span><span class="color-box" style="background:#51cf66;"></span>Operations & Algorithms</span>
                <span><span class="color-box" style="background:#74c0fc;"></span>States & Variables</span>
                <span><span class="color-box" style="background:#b197fc;"></span>Output & Results</span>
            </div>
            <div class="figure-caption">
                <strong>Figure 5.</strong> Memory Management Process. This computer science process visualization demonstrates the computational logic of memory management systems. The flowchart shows memory request analysis, free block search, allocation strategy, block management, and memory cleanup operations.
            </div>
        </div>
        
        <div style="margin-top: 3rem; padding: 2rem; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #007bff;">
            <h3 style="margin-top: 0; color: #007bff;">Contact Information</h3>
            <p style="margin-bottom: 0.5rem;"><strong>Gary Welz</strong></p>
            <p style="margin-bottom: 0.5rem;">Retired Faculty Member</p>
            <p style="margin-bottom: 0.5rem;">John Jay College, CUNY (Department of Mathematics and Computer Science)</p>
            <p style="margin-bottom: 0.5rem;">Borough of Manhattan Community College, CUNY</p>
            <p style="margin-bottom: 0.5rem;">CUNY Graduate Center (New Media Lab)</p>
            <p style="margin-bottom: 0;"><strong>Email:</strong> gwelz@jjay.cuny.edu</p>
        </div>
    </div>
</body>
</html>