0% found this document useful (0 votes)
2 views

HelloGen_Stage3_DataAnalysis

The data analysis report evaluates the performance of a timetable generation algorithm, measuring execution times for various input sizes and determining empirical time complexities ranging from O(n^0.87) to O(n^0.95). Theoretical analyses, including Master Theorem and NP-completeness proofs, highlight the algorithm's complexity and challenges in achieving polynomial time. Final complexity bounds indicate time complexities of Ω(s×d×t) to O(s×c×d×t×v×f) and space complexities between Ω(s×d×t) and O(s×d×t + d×t×v + f×d×t).

Uploaded by

Shreyash Murmu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HelloGen_Stage3_DataAnalysis

The data analysis report evaluates the performance of a timetable generation algorithm, measuring execution times for various input sizes and determining empirical time complexities ranging from O(n^0.87) to O(n^0.95). Theoretical analyses, including Master Theorem and NP-completeness proofs, highlight the algorithm's complexity and challenges in achieving polynomial time. Final complexity bounds indicate time complexities of Ω(s×d×t) to O(s×c×d×t×v×f) and space complexities between Ω(s×d×t) and O(s×d×t + d×t×v + f×d×t).

Uploaded by

Shreyash Murmu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

DATA ANALYSIS REPORT

(Minimum Viable Project working on Mid Sized Data)


PS C:\Users\KIIT\Desktop\OGINOV2> &
C:/Users/KIIT/AppData/Local/Programs/Python/Python312/python.exe
c:/Users/KIIT/Desktop/OGINOV2/timer.py
Starting Timetable Algorithm Analysis

Starting complexity analysis...

Measuring execution time for input size: 5


Average execution time: 0.000148 seconds (±0.000040)

Measuring execution time for input size: 10


Average execution time: 0.000469 seconds (±0.000173)

Measuring execution time for input size: 15


Average execution time: 0.000385 seconds (±0.000038)

Measuring execution time for input size: 20


Average execution time: 0.000551 seconds (±0.000095)

Measuring execution time for input size: 25


Average execution time: 0.000708 seconds (±0.000176)

Analysis complete: Empirical Time Complexity: O(n^0.87)


R² score: 0.857

Detailed Statistics:
Number of valid measurements: 5
Average execution time: 0.000452 seconds
Standard deviation: 0.000186 seconds
Empirical complexity factor: 0.87

Starting complexity analysis...

Measuring execution time for input size: 5


Average execution time: 0.000160 seconds (±0.000056)
2

Measuring execution time for input size: 10


Average execution time: 0.000548 seconds (±0.000766)

Measuring execution time for input size: 15


Average execution time: 0.000663 seconds (±0.000263)

Measuring execution time for input size: 20


Average execution time: 0.000704 seconds (±0.000347)

Measuring execution time for input size: 25


Average execution time: 0.000775 seconds (±0.000219)

Analysis complete: Empirical Time Complexity: O(n^0.95)


R² score: 0.865

(Extended Project working on Slightly large Sized Data)

PS C:\Users\KIIT\Desktop\OGINOV2> &
C:/Users/KIIT/AppData/Local/Programs/Python/Python312/python.exe
c:/Users/KIIT/Desktop/OGINOV2/timer.py
Starting Timetable Algorithm Analysis

Starting complexity analysis...

Measuring execution time for input size: 5


Average execution time: 0.000384 seconds (±0.000047)

Measuring execution time for input size: 105


Average execution time: 0.006594 seconds (±0.000209)

Measuring execution time for input size: 205


Average execution time: 0.011967 seconds (±0.000319)

Measuring execution time for input size: 305


Average execution time: 0.017225 seconds (±0.000431)

Measuring execution time for input size: 405


Average execution time: 0.022255 seconds (±0.000508)
3

Measuring execution time for input size: 505


Average execution time: 0.026825 seconds (±0.000617)

Measuring execution time for input size: 605


Average execution time: 0.031715 seconds (±0.000709)

Measuring execution time for input size: 705


Average execution time: 0.036586 seconds (±0.000843)

Measuring execution time for input size: 805


Average execution time: 0.041132 seconds (±0.000929)

Measuring execution time for input size: 905


Average execution time: 0.045714 seconds (±0.001031)

Analysis complete: Empirical Time Complexity: O(n^0.92)


R² score: 1.000

Detailed Statistics:
Number of valid measurements: 10
Average execution time: 0.024040 seconds
Standard deviation: 0.014302 seconds
Empirical complexity factor: 0.92

This analysis demonstrates that the algorithm's progression towards polynomial time is
evident in specific empirical scenarios. However, achieving definitive polynomial time for
such NP-complete problems is an ongoing challenge. Moreover, the fundamental question
—"Is it even convertible to polynomial time?"—remains an NP-hard problem in itself,
further emphasizing the inherent complexity of such computational dilemmas. These
insights underline the intricate balance between theoretical feasibility and practical
implementation in algorithmic optimizations.

THEORETICAL ANALYSIS :
Theoretical Analysis of Timetable Generation Algorithm Using Complexity Theory
1. Master Theorem Analysis
4

The timetable generation algorithm can be analyzed using the Master


Theorem for recursive algorithms. While this algorithm isn't directly recursive, we
can break it down into subproblems that follow the form:
T(n) = aT(n/b) + f(n)
For the scheduling component:

a = number of sections
b = scheduling divisions (time slots)
f(n) = work done at each level (venue and faculty checks)

1.1. Application of Master Theorem


Let's define n as the total number of scheduling possibilities (days × slots × sections).
The recurrence relation becomes:
T(n) = sT(n/t) + O(v×f)
Where:

S : number of sections
t : time slots
v : venues
f : faculty

According to the Master Theorem case 2:


f(n) = O(n^log_b(a))
Therefore, the complexity is Θ(n^log_t(s) × log n)

2. Amortized Analysis Using Accounting Method


2.1. Credit Assignment
Let's assign credits to operations:

Schedule insertion: 1 credit


Venue check: 2 credits
Faculty availability check: 2 credits

Total amortized cost per operation:


A(n) = actual cost + credits assigned - credits used
=1+4-1
= 4 credits per operation
5

2.2 Aggregate Method Verification


Over n operations:
CopyTotal actual cost ≤ Total amortized cost
∑(actual_i) ≤ ∑(amortized_i)
n + 2n + 2n ≤ 4n
5n ≤ 4n
This confirms our amortized bound is tight.

3. NP-Completeness Proof
3.1. Reduction from Graph Coloring
The timetable generation problem can be reduced to the Graph Coloring problem:

Vertices represent classes


Edges represent conflicts (same time slot restrictions)
Colors represent time slots

Theorem: Timetable Generation ≤ p Graph Coloring


Proof:

Given an instance of timetable scheduling


Construct graph G where:

V = {classes}
E = {(c1,c2) | c1 and c2 cannot be scheduled simultaneously}

Number of colors = available time slots

Since Graph Coloring is NP-Complete and our reduction is polynomial-time, the


general timetable generation problem is NP-Hard.

4. Competitive Analysis for Online Scheduling


The algorithm employs an online scheduling approach where decisions are made
without future knowledge. Using competitive analysis:
Let OPT be the optimal offline solution and ALG be our online algorithm.
Theorem: ALG is k-competitive where k = max(s, v, f)
Proof:
6

Each scheduling decision has at most k conflicts


Worst case: OPT = n/k where n is total slots
ALG ≤ k × OPT
Therefore, competitive ratio = k

5. Time Complexity Using Recurrence Trees


The recurrence relation for the main scheduling loop:
T(n) = T(n-1) + c×v×f
Where:

n : total scheduling slots


c : constant time operations
v : venues
f : faculty

Using the recurrence tree method:


CopyLevel 0: c×v×f
Level 1: c×v×f
...
Level n-1: c×v×f

Total = ∑(c×v×f) from i=0 to n-1


= n×c×v×f
Therefore, T(n) = O(n×v×f)

6. Space Complexity Using Kolmogorov Complexity


Let K(x) be the Kolmogorov complexity of schedule x.
For any valid schedule S:
K(S) ≥ log(s×d×t) - O(1)
Where:

s : sections
d : days
t : time slots
7

This provides a lower bound on the incompressible representation of any valid


schedule.

7. Final Complexity Bounds


Combining all analyses:
Time Complexity:

Best Case: Ω(s×d×t)


Average Case: Θ(s×c×d×t×v)
Worst Case: O(s×c×d×t×v×f)

Space Complexity:

Lower Bound: Ω(s×d×t)


Upper Bound: O(s×d×t + d×t×v + f×d×t)

These bounds are tight under the assumptions of:

Constant-time hash table operations


No scheduling conflicts requiring backtracking
Uniform distribution of available slots
8

Agenda
Last Meeting Follow-up
1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

New Business
2. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

3. Suspendisse scelerisque mi a mi.

Notes
● Lorem ipsum dolor sit amet consectetuer adipiscing elit.

● Vestibulum ante ipsum primis elementum, libero interdum auctor cursus, sapien
enim dictum quam.

○ Phasellus vehicula nonummy nunc.

Action Items
1. Lorem ipsum dolor sit amet consectetuer adipiscing elit.

Next Meeting Agenda Items


Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

You might also like