Data Structures and Algorithms Exam Review
1) Recurrences
1.1 10-mark: Solve T(n)=2T(n/2)+n, T(1)=c
T(n)=2T(n/2)+n
=4T(n/4)+2n
=8T(n/8)+3n
… after i steps: T(n)=2i T(n/2i) + i*n
Stop: n/2i=1 => i=log2 n
T(n)=n*T(1) + n log2 n = n*c + n log2 n
=> T(n)=Θ(n log n)
1.2 Master Theorem (Write As-Is)
T(n)=aT(n/b)+f(n), compare f(n) with nlogb a
- Case 1: f(n)=O(nlogb a – ε) => T(n)=Θ(nlogb a)
- Case 2: f(n)=Θ(nlogb a logk n) => T(n)=Θ(nlogb a logk+1 n)
- Case 3: f(n)=Ω(nlogb a + ε) and a f(n/b) ≤ c f(n) (c<1) => T(n)=Θ(f(n))
2)
Read MoreEssential Concepts in Statistics, Machine Learning, and Network Security
Statistical Foundations and Predictive Modeling
Understanding the Central Limit Theorem (CLT)
The Central Limit Theorem (CLT) is one of the most important principles in statistics. It states that when we take many random samples from any population—regardless of the population’s original distribution—the distribution of the sample means will approach a normal (bell-shaped) distribution as the sample size becomes large enough (usually n ≥ 30).
This phenomenon occurs even if the population itself
Read MoreAdvanced AI Concepts, Search Algorithms, and Biometric Security
Characteristics and Applications of Strong AI (AGI)
Characteristics of Strong AI
- Human-like Intelligence: Strong AI possesses reasoning, perception, and understanding comparable to humans.
- Self-awareness: It can think, understand emotions, and make independent decisions.
- Generalization: It can apply knowledge from one domain to another.
- Learning and Adaptation: It continuously improves through experience without explicit programming.
- Autonomous Decision-Making: Capable of performing complex tasks without
Computer Networks & Communication Technologies Principles
Unit I — Computer Communications and Networking
1. Introduction to Computer Communications
Computer communications and networking technologies refer to the systems, tools, and methods that allow computers and digital devices to exchange data efficiently. These technologies include hardware components like routers, switches, and transmission media, along with software protocols that control communication. Networking enables resource sharing, remote access, distributed computing, and real-time data
Read MoreC Implementations of Core OS Algorithms and Concepts
Operating System Concepts: C Code Implementations
1. Process Management and Inter-Process Communication (IPC)
1a. Process Creation using fork()
This program demonstrates the creation of a child process using the fork() system call and distinguishes between the parent and child processes.
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
pid_t pid, mypid, myppid;
pid = getpid();
printf("Before fork: Process id is %d\n", pid);
pid = fork(); Read More
Network Hierarchy: Core, Distribution, and Access Layers
Network Hierarchy Design
Core Layer
The Core Layer consists of the biggest, fastest, and most expensive routers with the highest model numbers. The Core Layer is considered the backbone of networks. Core Layer routers are used to merge geographically separated networks. These routers move information on the network as fast as possible. Core layer switches also operate to switch packets as fast as possible.
The core layer provides fast transport between distribution switches within the enterprise campus.
Read More