-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
694 lines (652 loc) · 36.8 KB
/
index.html
File metadata and controls
694 lines (652 loc) · 36.8 KB
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
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Program That Cannot Be Written - An Interactive Presentation</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Lora:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #0f172a;
color: #f1f5f9;
position: relative;
}
.slide {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0rem 2rem 2rem 2rem;
position: relative;
}
h1, h2, h3 {
font-family: 'Inter', sans-serif;
font-weight: 900;
text-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
}
/* Card hover effects */
.card {
transition: all 0.3s ease;
box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
border: 1px solid transparent;
}
.card:hover {
box-shadow: 0 0 20px rgba(99, 102, 241, 0.7);
border-color: #818cf8;
}
/* Button styles */
.glow-button {
transition: all 0.3s ease;
box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
border: 1px solid transparent;
}
.glow-button:hover {
box-shadow: 0 0 20px rgba(99, 102, 241, 0.7);
border-color: #818cf8;
}
p, li, blockquote {
font-family: 'Lora', serif;
}
#video-background {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -2;
background-size: cover;
}
.video-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(15, 23, 42, 0.85); /* Darker semi-transparent overlay */
z-index: -1;
}
main {
position: relative;
z-index: 1;
padding-top: 80px; /* Add space for fixed navbar */
}
/* Hover effects for navigation buttons - removed movement */
#prevBtn:hover, #nextBtn:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
/* Hover effects for interactive buttons - removed movement */
.interactive-btn {
transition: all 0.3s ease;
}
.interactive-btn:hover {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
/* Hover effects for images */
.slide img {
transition: all 0.3s ease;
}
.slide img:hover {
transform: scale(1.02);
box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}
/* Hover effects for section titles */
.slide h2 {
transition: color 0.3s ease;
}
.slide h2:hover {
color: #a5b4fc;
}
/* Hover effects for list items in Slide 9 - removed movement */
#slide-9 li {
transition: all 0.3s ease;
}
#slide-9 li:hover {
background-color: #312e81;
}
/* Glow hover effect for paradox output box */
#paradox-output, #quiz-output {
border: 1px solid transparent;
transition: all 0.3s ease;
border-radius: 0.75rem;
background-color: rgba(55, 48, 71, 0.85);
padding: 1rem;
}
#paradox-output:hover, #quiz-output :hover {
box-shadow: 0 0 15px rgba(147, 112, 219, 0.7);
border-color: #8b5cf6;
transform: translateY(-2px);
background-color: rgba(55, 48, 71, 0.9);
}
/* Navbar styles */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background-color: rgba(15, 23, 42, 0.95);
-webkit-backdrop-filter: blur(5px);
backdrop-filter: blur(5px);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #4b5563;
transition: all 0.3s ease;
}
/* Glow and hover effect for analogy output box */
#analogy-output, #quiz-output {
border: 1px solid transparent;
transition: all 0.3s ease;
border-radius: 0.75rem;
background-color: rgba(55, 48, 71, 0.85);
padding: 1rem;
}
#analogy-output:hover, #quiz-output :hover {
box-shadow: 0 0 15px rgba(147, 112, 219, 0.7);
border-color: #8b5cf6;
transform: translateY(-2px);
background-color: rgba(55, 48, 71, 0.9);
}
.navbar.scrolled {
background-color: rgba(15, 23, 42, 0.98);
-webkit-backdrop-filter: blur(15px);
backdrop-filter: blur(15px);
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.logo {
height: 50px;
width: auto;
}
/* New navigation styles */
.nav-container {
position: fixed;
top: 70px;
left: 0;
right: 0;
z-index: 90;
background-color: rgba(15, 23, 42, 0.9);
-webkit-backdrop-filter: blur(5px);
backdrop-filter: blur(5px);
padding: 0.5rem 2rem;
border-bottom: 1px solid #4b5563;
display: flex;
align-items: center;
overflow-x: auto;
}
.nav-links {
display: flex;
gap: 1rem;
padding: 0.5rem 0;
}
.nav-links a {
color: #cbd5e1;
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 0.25rem;
transition: all 0.3s ease;
white-space: nowrap;
border: 1px solid transparent;
}
.nav-links a:hover {
color: #fff;
box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
border-color: #818cf8;
}
.hamburger {
display: none;
flex-direction: column;
justify-content: space-around;
width: 30px;
height: 30px;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
z-index: 101;
}
.hamburger span {
width: 100%;
height: 3px;
background: #818cf8;
border-radius: 10px;
transition: all 0.3s ease;
}
/* Responsive navigation */
@media (max-width: 768px) {
.nav-links {
position: fixed;
top: 70px;
left: 0;
right: 0;
background-color: rgba(15, 23, 42, 0.95);
flex-direction: column;
align-items: center;
padding: 1rem;
max-height: calc(100vh - 80px);
overflow-y: auto;
transform: translateY(-100%);
transition: transform 0.3s ease;
border-bottom: 1px solid #4b5563;
}
.nav-links.active {
transform: translateY(0);
}
.hamburger {
display: flex;
}
main {
padding-top: 120px; /* Adjust for both navbars */
}
}
</style>
<!-- Chosen Palette: Calm Harmony (Light Neutrals with Blue Accent) -->
<!-- Application Structure Plan: The new structure is a single-page, vertically scrollable application. Each "slide" is now a full-viewport section, identified by an ID. This design choice directly addresses the user's need for scrollability while maintaining the full-screen feel of a presentation. The fixed navigation buttons at the bottom now smoothly scroll the user to the next or previous section, creating a hybrid experience that is both a slideshow and a single-page document. This makes the content accessible and ensures no text is ever clipped. -->
<!-- Visualization & Content Choices: The primary presentation remains well-structured text and placeholder images for conceptual topics. New interactive elements have been added:
- LLM-Generated Paradox: Added to Slide 2 to make the "Logic Warm-up" more interactive. The goal is to engage the audience with a fresh paradox.
- LLM-Generated Analogy: Added to Slide 5 for the Halting Problem definition. The goal is to make a complex, abstract concept more accessible with a new, creative analogy.
- LLM-Generated Quiz Question: Added to Slide 8 on Real-World Implications. This turns a static content slide into an interactive Q&A to test audience understanding.
These features are powered by a custom JavaScript function that calls the Gemini API. The results are displayed in dynamic UI elements on the slides. The approach continues to avoid charts for this highly conceptual topic, focusing on text-based engagement.
Library/Method: Vanilla HTML/CSS/JS with the Gemini API. -->
<!-- CONFIRMATION: NO SVG graphics used. NO Mermaid JS used. -->
</head>
<body class="w-full">
<!-- Navbar -->
<nav class="navbar">
<div class="flex items-center justify-center w-full max-w-7xl mx-auto px-4 relative space-x-4">
<div class="flex items-center flex-shrink-0 max-w-[120px] overflow-visible">
<img src="acmhitk.png" alt="College Logo" class="logo max-w-full h-auto object-contain">
</div>
<div class="flex-grow text-center">
<h1 class="text-indigo-400 font-black text-2xl sm:text-3xl md:text-4xl lg:text-5xl">Program Paradox</h1>
</div>
</div>
<style>
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background-color: rgba(15, 23, 42, 0.85);
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(20px);
padding: 1rem 2rem;
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1px solid #4b5563;
transition: all 0.3s ease;
}
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background-color: rgba(15, 23, 42, 0.95);
-webkit-backdrop-filter: blur(5px);
backdrop-filter: blur(5px);
padding: 1rem 2rem;
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1px solid #4b5563;
transition: all 0.3s ease;
}
.logo {
height: 50px;
width: auto;
}
@media (max-width: 768px) {
.navbar {
padding: 1.05rem 2rem; /* 5% taller navbar on mobile */
}
}
</style>
</nav>
<!-- Background Video and Overlay -->
<video autoplay loop muted id="video-background">
<source src="video.mp4" type="video/mp4">
</video>
<div class="video-overlay"></div>
<main class="w-full">
<!-- Slide 1: Title Slide -->
<section id="slide-1" class="slide">
<img src="pic1.png" alt="A complex knot or maze representing an unsolvable problem." class="mt-4 mb-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
<div class="max-w-4xl text-center">
<h1 class="text-5xl md:text-7xl font-black text-indigo-400">The Program That Cannot Be Written!</h1>
<h2 class="text-3xl md:text-4xl text-gray-300 mt-4">Understanding the Halting Problem</h2>
<div class="mt-8 text-2xl text-gray-400">
<p>Welcome, everyone! This is an ACM Tech Talk, a glimpse into the very foundations of Computer Science, where paradoxes break programs, proofs outruun prediction and computers meet their philosophical match</p>
<p class="mt-2 font-bold text-gray-200">Aryan Ghosh and Mohak Sarkar</p>
<p class="text-xl">ACM HITK Student Chapter</p>
</div>
</div>
<!-- <img src="pic1.jpg" alt="A complex knot or maze representing an unsolvable problem." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';"> -->
</section>
<!-- Slide 2: A World of Paradoxes -->
<section id="slide-2" class="slide">
<div class="max-w-3xl w-full space-y-6 text-center">
<h2 class="text-4xl md:text-5xl font-black text-indigo-400 mb-8">A World of Paradoxes</h2>
<p class="text-xl text-gray-400 mb-6">Before we dive into the deep end of computer science, let's warm up with some mind-bending logical paradoxes. These aren't just riddles—they reveal fundamental limits to logic itself.</p>
<div class="p-6 border border-gray-600 rounded-lg shadow-sm bg-gray-800 card">
<h3 class="text-2xl font-bold text-blue-400">The Liar Paradox</h3>
<p class="mt-2 text-xl text-gray-300">"This statement is False". A simple sentence that breaks logic. If it's true, it's false. If it's false, it's true. It's a logical loop.</p>
</div>
<div class="p-6 border border-gray-600 rounded-lg shadow-sm bg-gray-800 card">
<h3 class="text-2xl font-bold text-blue-400">The Barber Paradox</h3>
<p class="mt-2 text-xl text-gray-300">A barber shaves only those men who do not shave themselves. Who then shaves the barber?</p>
</div>
<button id="generate-paradox-btn" class="mt-8 px-6 py-3 bg-indigo-600 text-white font-bold rounded-full hover:bg-indigo-700 transition-colors glow-button">✨ Generate a New Paradox</button>
<div id="paradox-output" class="mt-4 p-4 text-center text-lg text-gray-200 hidden bg-gray-800 border-l-4 border-indigo-400 rounded-lg" style="transition: all 0.3s ease; border-radius: 0.75rem; background-color: rgba(55, 48, 71, 0.85); padding: 1rem;">
</div>
</div>
</section>
<!-- Slide 3: The Dawn of Computation -->
<section id="slide-3" class="slide">
<div class="max-w-4xl w-full grid md:grid-cols-2 gap-8 text-center">
<h2 class="col-span-full text-4xl md:text-5xl font-black text-indigo-400 mb-8">From a Dream to a Machine</h2>
<p class="col-span-full text-xl text-gray-400 mb-6">Our story begins with a grand vision for mathematics and the man who challenged it, setting the stage for modern computing.</p>
<div class="p-6 border border-gray-700 rounded-lg shadow-sm bg-gray-800 card">
<h3 class="text-3xl font-bold">David Hilbert's Dream</h3>
<p class="mt-2 text-xl text-gray-300">The "Entscheidungsproblem" (Decision Problem): Could we create a mechanical procedure to solve every mathematical problem?</p>
</div>
<div class="p-6 border border-gray-700 rounded-lg shadow-sm bg-gray-800 card">
<h3 class="text-3xl font-bold">The Plot Twist: Alan Turing</h3>
<p class="mt-2 text-xl text-gray-300">A young genius who proved that Hilbert's dream was, ironically, impossible to compute, laying the foundation for all modern computers.</p>
</div>
</div>
<img src="pic2.png" alt="A historical photo collage of David Hilbert and Alan Turing, representing the clash of their ideas." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 4: What is a Turing Machine? -->
<section id="slide-4" class="slide">
<div class="max-w-5xl w-full grid md:grid-cols-3 gap-6 text-center">
<h2 class="col-span-full text-4xl md:text-5xl font-black text-indigo-400 mb-2">What is a Turing Machine?</h2>
<p class="col-span-full text-2xl text-gray-400 mb-8">The simplest computer that could do everything, born from a thought experiment.</p>
<div class="p-6 bg-gray-800 rounded-lg card">
<h3 class="text-2xl font-bold text-blue-400">The Tape</h3>
<p class="mt-2 text-lg text-gray-300">An infinite strip of paper acting as the machine's memory, like your RAM.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg card">
<h3 class="text-2xl font-bold text-blue-400">The Head</h3>
<p class="mt-2 text-lg text-gray-300">A read/write device that moves along the tape, functioning as the CPU.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg card">
<h3 class="text-2xl font-bold text-blue-400">The Rules</h3>
<p class="mt-2 text-lg text-gray-300">A finite set of instructions that the machine follows to perform its task, like your code.</p>
</div>
</div>
<p class="mt-8 text-2xl text-gray-200 font-bold text-center max-w-3xl">The Big Idea: This simple machine could, in theory, simulate any algorithm, proving the universality of computation.</p>
<img src="pic3.png" alt="A schematic diagram of a Turing Machine with a long tape and a read/write head." class="mt-0 rounded-lg shadow-xl max-w-2xl w-full" style="transform: scale(0.75); transform-origin: center;" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 5: The Halting Problem Defined -->
<section id="slide-5" class="slide">
<div class="max-w-3xl w-full text-center">
<h2 class="text-4xl md:text-5xl font-black text-indigo-400 mb-8">The Halting Problem Defined</h2>
<p class="text-xl text-gray-400 mb-4">Imagine you're a programmer and you have to know if a program will ever stop. The Halting Problem asks a simple, yet impossible question:</p>
<p class="text-2xl text-gray-300">Can we create a universal program <span class="font-bold text-blue-400">H</span> that takes any program <span class="font-bold">P</span> and its input <span class="font-bold">I</span>, and definitively tells us:</p>
<div class="mt-6 space-y-4 text-left">
<p class="text-3xl p-4 bg-green-900 text-green-300 rounded-lg shadow-sm">"Yes, it will halt (stop)."</p>
<p class="text-3xl p-4 bg-red-900 text-red-300 rounded-lg shadow-sm">"No, it will loop forever."</p>
</div>
<p class="mt-8 text-xl text-gray-400">Turing proved this magical "HALT-MAN" program is impossible to write for all cases.</p>
</div>
<button id="generate-analogy-btn" class="mt-8 px-6 py-3 bg-indigo-600 text-white font-bold rounded-full hover:bg-indigo-700 transition-colors glow-button">✨ Generate a New Analogy</button>
<div id="analogy-output" class="mt-4 p-4 text-center text-lg text-gray-200 hidden bg-gray-800 border-l-4 border-indigo-400 rounded-lg max-w-xl"></div>
<img src="pic4.png" alt="An icon of a magnifying glass over a piece of code, representing a universal debugger." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 6: The Proof by Contradiction: The Setup -->
<section id="slide-6" class="slide">
<div class="max-w-3xl w-full text-center">
<h2 class="text-4xl md:text-5xl font-black text-indigo-400 mb-4">A Sneaky Program to Break the Rules</h2>
<p class="text-xl text-gray-400 mb-6">Turing's genius was in a proof by contradiction. He assumed a universal program H exists, then constructed a clever program to make H lie.</p>
<p class="text-2xl text-gray-300 mb-6">We'll assume our magical program <span class="font-bold text-blue-400">H</span> exists. Then, we write a new, clever program called <span class="font-bold text-red-400">Trouble</span>:</p>
<div class="bg-gray-800 text-white p-6 rounded-lg shadow-lg text-left overflow-x-auto max-w-full">
<pre class="whitespace-pre-wrap break-words"><code class="language-python text-lg">def Trouble(P):
# Using our hypothetical program H
if H(P, P) == True: # If H says P halts...
loop_forever() # ...we make Trouble loop forever
else: # If H says P loops...
halt() # ...we make Trouble halt</code></pre>
</div>
<p class="mt-6 text-2xl text-gray-300">Now, what happens when we feed <span class="font-bold text-red-400">Trouble</span> into itself?</p>
</div>
<img src="pic5.png" alt="A diagram illustrating a logical loop where a program analyzes itself, leading to a paradox." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 7: The Logical Trap -->
<section id="slide-7" class="slide">
<div class="max-w-4xl w-full space-y-6 text-center">
<h2 class="text-4xl md:text-5xl font-black text-indigo-400 mb-8">The Moment of Contradiction</h2>
<p class="text-xl text-gray-400 mb-6">When we try to run `Trouble(Trouble)`, the program's behavior forces the universal halting checker `H` to contradict itself every time.</p>
<div class="p-6 bg-red-900 border-l-4 border-red-500 text-left">
<h3 class="text-2xl font-bold text-red-300">Scenario 1: H says Trouble will halt...</h3>
<p class="mt-2 text-xl text-red-200">...then <span class="font-bold">Trouble</span> is forced to loop forever. A <span class="font-black">CONTRADICTION!</span></p>
</div>
<div class="p-6 bg-green-900 border-l-4 border-green-500 text-left">
<h3 class="text-2xl font-bold text-green-300">Scenario 2: H says Trouble will loop...</h3>
<p class="mt-2 text-xl text-green-200">...then <span class="font-bold">Trouble</span> is forced to halt. Another <span class="font-black">CONTRADICTION!</span></p>
</div>
<p class="mt-8 text-2xl text-gray-200 font-bold max-w-3xl">Since both logical possibilities fail, our initial assumption must be false. The program H cannot exist.</p>
</div>
<img src="pic6.png" alt="A stylized graphic showing two contradictory statements in a loop." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 8: Real-World Implications -->
<section id="slide-8" class="slide">
<div class="max-w-5xl w-full grid md:grid-cols-2 gap-6 text-left">
<h2 class="col-span-full text-4xl md:text-5xl font-black text-indigo-400 mb-8 text-center">It's Not Just a Theory, It's Everywhere</h2>
<p class="col-span-full text-xl text-gray-400 mb-6">This theoretical limitation has very real consequences for the software we use every day.</p>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-xl font-bold text-blue-400">Virus Detection:</h3>
<p class="text-lg text-gray-300">Antivirus can't perfectly predict malicious loops; they rely on heuristics and behavioral analysis.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-xl font-bold text-blue-400">Compilers & IDEs:</h3>
<p class="text-lg text-gray-300">Warnings about infinite loops are educated guesses, not certainties, because of the Halting Problem.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-xl font-bold text-blue-400">LeetCode & HackerRank:</h3>
<p class="text-lg text-gray-300">These platforms use strict time limits to stop your code, because they can't solve the Halting Problem for your code for you.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-xl font-bold text-blue-400">The "Schrödinger's Bug":</h3>
<p class="text-lg text-gray-300">A bug that only appears when you're not looking, disappearing when you add a print() statement due to complex, unpredictable system states.</p>
</div>
</div>
<button id="generate-quiz-btn" class="mt-8 px-6 py-3 bg-indigo-600 text-white font-bold rounded-full hover:bg-indigo-700 transition-colors glow-button">✨ Quiz Me!</button>
<div id="quiz-output" class="mt-4 p-4 text-center text-lg text-gray-200 hidden bg-gray-800 border-l-4 border-indigo-400 rounded-lg max-w-xl"></div>
<img src="pic7.png" alt="A collage of icons representing antivirus software, a code editor, and a stopwatch." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 9: The Boundaries of Knowledge -->
<section id="slide-9" class="slide">
<div class="max-w-5xl w-full grid md:grid-cols-3 gap-6 text-center">
<h2 class="col-span-full text-4xl md:text-5xl font-black text-indigo-400 mb-8">The Boundaries of Knowledge</h2>
<p class="col-span-full text-xl text-gray-400 mb-6">The Halting Problem isn't a one-off. It opened the door to a whole field of "undecidable" problems that have no algorithmic solution.</p>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-2xl font-bold mb-2">Rice's Theorem</h3>
<p class="text-lg text-gray-300">You can't programmatically check any non-trivial property of a program's output.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-2xl font-bold mb-2">Busy Beaver Problem</h3>
<p class="text-lg text-gray-300">It's impossible to find the program that runs the longest before halting.</p>
</div>
<div class="p-6 bg-gray-800 rounded-lg shadow-sm card text-blue-300 font-bold">
<h3 class="text-2xl font-bold mb-2">Gödel's Incompleteness Theorems</h3>
<p class="text-lg text-gray-300">There will always be mathematical truths that can't be proven within a formal system.</p>
</div>
</div>
<img src="pic8.png" alt="A graphic representing complex, unprovable mathematical concepts." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
<!-- Slide 10: Conclusion & Call to Action -->
<section id="slide-10" class="slide" style="padding-bottom: 100px;">
<div class="max-w-4xl space-y-6 text-center">
<h2 class="text-4xl md:text-5xl font-black text-indigo-400 mb-8">The Takeaway</h2>
<p class="text-xl text-gray-400 mb-6">We began with a problem that can't be solved. We've seen that some problems are not just hard—they are probably impossible.</p>
<div class="space-y-6 text-2xl text-gray-300">
<p>The Halting Problem is a fundamental limit of computation that we work around, but can never solve.</p>
<blockquote class="mt-8 pt-6 border-t border-gray-700 text-3xl italic text-gray-400">"If Alan Turing were here, he wouldn't just give you a theorem—he'd hand you a mirror."</blockquote>
</div>
<div class="mt-12 text-2xl font-bold text-indigo-400">
<p>On behalf of ACM HITK, thank you for joining us.</p>
<p>Stay curious. Challenge the edges of logic. Break things.</p>
</div>
</div>
<img src="pic9.png" alt="A powerful, reflective image of a person standing at a precipice, looking out at a vast, unknown landscape." class="mt-8 rounded-lg shadow-xl max-w-2xl w-full" onerror="this.onerror=null;this.src='https://placehold.co/600x300';">
</section>
</main>
<div class="fixed bottom-0 left-0 w-full p-4 bg-gray-900/50 backdrop-blur-sm border-t border-gray-700 z-50" style="-webkit-backdrop-filter: blur(5px);">
<div class="max-w-7xl mx-auto flex justify-center items-center space-x-4">
<button id="prevBtn" class="px-6 py-2 bg-gray-700 text-white rounded-md glow-button hover:bg-gray-600 transition-colors">Previous</button>
<button id="nextBtn" class="px-6 py-2 bg-indigo-600 text-white rounded-md glow-button hover:bg-indigo-700 transition-colors">Next</button>
</div>
</div>
<script>
const sections = document.querySelectorAll('section');
const prevBtn = document.getElementById('prevBtn');
const nextBtn = document.getElementById('nextBtn');
let currentSectionIndex = 0;
function updateButtons() {
prevBtn.disabled = currentSectionIndex === 0;
nextBtn.disabled = currentSectionIndex === sections.length - 1;
}
function scrollToSection(index) {
if (index >= 0 && index < sections.length) {
sections[index].scrollIntoView({ behavior: 'smooth' });
currentSectionIndex = index;
updateButtons();
}
}
function nextSection() {
scrollToSection(currentSectionIndex + 1);
}
function prevSection() {
scrollToSection(currentSectionIndex - 1);
}
prevBtn.addEventListener('click', prevSection);
nextBtn.addEventListener('click', nextSection);
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowRight') {
nextSection();
} else if (e.key === 'ArrowLeft') {
prevSection();
}
});
// Navbar scroll effect
const navbar = document.querySelector('.navbar');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');
}
// Existing scroll functionality for sections
let activeIndex = 0;
sections.forEach((section, index) => {
const rect = section.getBoundingClientRect();
if (rect.top <= window.innerHeight / 2 && rect.bottom >= window.innerHeight / 2) {
activeIndex = index;
}
});
currentSectionIndex = activeIndex;
updateButtons();
});
// Initialize button states after a short delay to ensure sections are loaded
setTimeout(() => {
// Initial button update
updateButtons();
}, 100);
async function callGeminiApi(prompt) {
const apiKey = "AIzaSyAgVzMV0RghoD77NX_mKEU80DMx3Q2K3cU";
const apiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-05-20:generateContent?key=${apiKey}`;
const chatHistory = [{ role: "user", parts: [{ text: prompt }] }];
const payload = { contents: chatHistory };
let resultText = '';
let retries = 0;
const maxRetries = 5;
let delay = 1000;
while (retries < maxRetries) {
try {
const response = await fetch(apiUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
if (response.status === 429) {
retries++;
await new Promise(res => setTimeout(res, delay));
delay *= 2;
continue;
}
const result = await response.json();
if (result.candidates && result.candidates.length > 0 &&
result.candidates[0].content && result.candidates[0].content.parts &&
result.candidates[0].content.parts.length > 0) {
resultText = result.candidates[0].content.parts[0].text;
break;
} else {
resultText = 'Could not get a response from the API.';
break;
}
} catch (error) {
resultText = 'An error occurred while fetching data.';
break;
}
}
return resultText;
}
async function generateParadox() {
const outputDiv = document.getElementById('paradox-output');
outputDiv.textContent = 'Thinking of a new paradox...';
outputDiv.classList.remove('hidden');
const prompt = "Generate a short, simple, and mind-bending logical paradox in a single paragraph. Make it similar in style to the Liar Paradox or the Barber Paradox.";
const response = await callGeminiApi(prompt);
outputDiv.textContent = response;
}
async function generateAnalogy() {
const outputDiv = document.getElementById('analogy-output');
outputDiv.textContent = 'Generating a new analogy...';
outputDiv.classList.remove('hidden');
const prompt = "Create a new, simple, and relatable analogy for the Halting Problem in one paragraph. The analogy should explain why it's impossible to create a universal program that predicts if another program will halt.";
const response = await callGeminiApi(prompt);
outputDiv.textContent = response;
}
async function generateQuiz() {
const outputDiv = document.getElementById('quiz-output');
outputDiv.textContent = 'Creating a quiz question...';
outputDiv.classList.remove('hidden');
const prompt = "Generate one multiple-choice question with four options (a, b, c, d) and the correct answer about a real-world implication of the Halting Problem. Use a newline to separate the question, options, and answer. Format the response like this: \nQuestion: \nOption a: \nOption b: \nOption c: \nOption d: \nCorrect Answer: ";
const response = await callGeminiApi(prompt);
outputDiv.textContent = response;
}
document.getElementById('generate-paradox-btn').addEventListener('click', generateParadox);
document.getElementById('generate-analogy-btn').addEventListener('click', generateAnalogy);
document.getElementById('generate-quiz-btn').addEventListener('click', generateQuiz);
// Hamburger menu functionality
const hamburger = document.querySelector('.hamburger');
const mobileMenu = document.getElementById('mobile-menu');
hamburger.addEventListener('click', () => {
const expanded = hamburger.getAttribute('aria-expanded') === 'true' || false;
hamburger.setAttribute('aria-expanded', !expanded);
mobileMenu.classList.toggle('active');
mobileMenu.setAttribute('aria-hidden', expanded);
hamburger.classList.toggle('active');
});
// Close mobile menu when clicking on a link
document.querySelectorAll('#mobile-menu a').forEach(link => {
link.addEventListener('click', () => {
mobileMenu.classList.remove('active');
mobileMenu.setAttribute('aria-hidden', 'true');
hamburger.setAttribute('aria-expanded', 'false');
hamburger.classList.remove('active');
});
});
</script>
</body>
</html>