Notes, summaries, assignments, exams, and exercises for Computer science for Other courses

Statistics and Python Programming Fundamentals

Computer science8.01 KB

Understanding Quartiles, Deciles, and Percentiles

Quartiles divide ordered data into four equal parts. There are three quartiles: Q1, Q2, and Q3.

  • Q1 (First Quartile): Tells about the point below which the first 25% of observations lie.
  • Q2 (Second Quartile/Median): The middle value or median.
  • Q3 (Third Quartile): Tells us about the point below which 75% of observations lie.

Deciles and Percentiles

Deciles divide an ordered dataset into 10 equal parts. They are represented by D1 through D9.

  • D1: 10% position
  • D5: 50% position
  • D9: 90% position

Percentiles divide data into 100 equal parts, represented by P1 to P99.

Measures of Dispersion in Statistics

Dispersion refers to how much the data values are spread or scattered around a central value, such as the mean....

Continue reading "Statistics and Python Programming Fundamentals" »

Graph Neural Networks and Distributed Data Pipelines

Computer science25.85 KB

Graph Neural Networks (GNN)

GNN Challenges and Representations

Working with graphs introduces unique computational challenges:

  • Graph size is dynamic.
  • Each node can have a variable number of edges.
  • Standard methods used for images and texts are not suitable for graphs.
  • Adjacency matrix representation can be very inefficient.
  • There can be multiple adjacency matrices to represent the same graph.
  • Standard convolution applied to images does not work (though adaptations have been tried).

Potential tasks: Link prediction, node classification, community detection, and ranking.

Representation: Adjacency matrix, edge list, and adjacency list.

Spectral GNN Architectures

Como funciona: Utiliza a Transformada Discreta de Fourier (DFT) sobre a matriz de adjacência...

Continue reading "Graph Neural Networks and Distributed Data Pipelines" »

Operating Systems Memory Management and Bash Scripting

Computer science4.74 KB

Memory Allocation Strategies

🔹 First Fit

👉 Take the first block that fits.

Example:

Blocks: 120, 450, 300, 700, 200
Processes: 250, 100, 500, 180

Step by step:

  • 250 → goes into 450 → left: 200
  • 100 → goes into 120 → left: 20
  • 500 → goes into 700 → left: 200
  • 180 → goes into 300 → left: 120

Final memory:
20, 200, 120, 200, 200


🔹 Best Fit

👉 Use the smallest block that fits.

Same example:

  • 250 → 300 → left 50
  • 100 → 120 → left 20
  • 500 → 700 → left 200
  • 180 → 200 → left 20

Final:
20, 450, 50, 200, 20

👉 Note: Causes more fragmentation (many small pieces).


🔹 Worst Fit

👉 Use the largest block.

Same example:

  • 250 → 700 → left 450
  • 100 → 450 → left 350
  • 500 → ❌ no block large enough
  • 180 → 350 → left 170

🔹 Next Fit

👉...

Continue reading "Operating Systems Memory Management and Bash Scripting" »

Essential Networking Concepts: Routers, SSH, and IPv4

Computer science566.19 KB

Understanding Network Fundamentals

What Is a Router?

A router is a networking device that connects two or more networks and forwards data packets between them based on their IP addresses. It determines the best path for data to travel across networks.

Understanding SSH (Secure Shell)

SSH (Secure Shell) is a network protocol used to securely access and manage remote computers over an unsecured network. It encrypts the communication between client and server to ensure security.

What Are IEEE Standards?

IEEE Standards are technical standards developed by the Institute of Electrical and Electronics Engineers for designing and developing hardware, software, and networking technologies to ensure compatibility and interoperability (e.g., IEEE 802 standards...

Continue reading "Essential Networking Concepts: Routers, SSH, and IPv4" »

Essential Linux and Operating Systems Concepts Explained

Computer science3.25 KB

Linux and Operating Systems Fundamentals

  • 1. CD-ROM Directory: The CD-ROM contains a directory called /fortycdrom/data.
  • 2. Permissions: -rwxr-xr applies to everyone and members.
  • 3. Process Control: ID 42000 — kill -9.
  • 4. Modern Operating Systems: Applies to all.
  • 5. Child Process: Identified by the process ID.
  • 6. 11-Bit Processor: Maximum value is 2047.
  • 7. Block Special File: Represents a hard disk drive.
  • 8. POSIX Compliant: There are different standards.
  • 9. Code Execution: The following code crashes.
  • 10. Bash Command: alias bubble.
  • 11. Linux Shell: pwd prints the current working directory.
  • 12. Shell Commands: chown is used for ownership.
  • 13. Virtual Machine: Utilizes CPU and memory resources.
  • 14. File Names: ls -al lists files including their names.
  • 15.
...
Continue reading "Essential Linux and Operating Systems Concepts Explained" »

Fundamentals of Computers: Generations, Memory & Networks

Computer science38.44 KB

Unit I — Computer Fundamentals

1. Generations of Computers

Computers have evolved significantly over time, categorized into generations based on technological advancement. The first generation (1940–1956) relied on vacuum tubes, which made computers bulky, expensive, and heat-prone. These machines used machine language and had limited speed, processing only basic calculations. The second generation (1956–1963) replaced vacuum tubes with transistors, reducing size, cost, and power consumption. Assembly language became popular during this era, making programming easier. The third generation (1964–1971) introduced integrated circuits (ICs), improving reliability and processing speed while reducing physical size. High-level programming languages...

Continue reading "Fundamentals of Computers: Generations, Memory & Networks" »

OLAP vs OLTP: Detailed Database System Comparison

Computer science5.15 KB

ChatGPT Interaction

Log in
You said:

Explain in detail the concept of OLAP and OLTP. Also state the difference between them.

ChatGPT said:

Below is a clear, detailed explanation of OLAP and OLTP, followed by a structured comparison of the two.


OLAP (Online Analytical Processing)

Definition:
OLAP refers to systems designed for complex analysis, data modeling, and decision support. It allows users—typically analysts, managers, and executives—to analyze large volumes of historical data from multiple perspectives.

Purpose:
To support strategic decision-making by enabling deep data analysis, trend identification, forecasting, and reporting.

Key Characteristics:

  • Works with large volumes of historical data (often stored in data warehouses).
  • Supports complex
...
Continue reading "OLAP vs OLTP: Detailed Database System Comparison" »

Transport Layer Functions and TCP Flow Control Explained

Computer science2.5 KB

The Transport Layer: OSI Model Layer 4

The Transport Layer is the 4th layer of the OSI model, providing process-to-process communication between applications running on different hosts. It ensures reliable, error-free, and ordered delivery of data.

Main Services of the Transport Layer

  • Process-to-Process Delivery: Uses port numbers to deliver data from a specific process on the sender to a specific process on the receiver.
  • Segmentation and Reassembly: Divides large messages into smaller segments for transmission and reassembles them at the destination.
  • Connection Control: Supports connection-oriented communication (TCP) and connectionless communication (UDP).
  • Flow Control: Prevents the sender from overwhelming the receiver with too much data by using
...
Continue reading "Transport Layer Functions and TCP Flow Control Explained" »

Grammar Analysis and Context-Free Language Exercises

Computer science4.14 KB

Hexadecimal Integer Grammar Analysis

Consider the following grammar for hexadecimal integers:

  • <hex literal> ::= 0x<number>
  • <number> ::= <number><number> | <digit>
  • <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F

The string 0xF3 is an element of the language generated by this grammar.

Derivation Sequences and Parse Trees

1. How many distinct derivation sequences exist for this string?

There exist 6 distinct derivation sequences:

  • <hex literal> ⇒ 0x<number> ⇒ 0x<number><number> ⇒ 0x<digit><number> ⇒ 0x<digit><digit> ⇒ 0xF<digit> ⇒ 0xF3
  • <hex literal> ⇒ 0x<number> ⇒ 0x<number><number> ⇒ 0x<number&
...
Continue reading "Grammar Analysis and Context-Free Language Exercises" »

Concept of education

Computer science16.35 KB

Define Machine Learning. Briefly explain the types of learnings.

Machine Learning (ML) is a branch of Artificial Intelligence (AI) that enables computers to learn automatically from data and improve their performance on a task without being explicitly programmed. It focuses on developing algorithms that can identify patterns and make predictions or decisions.

Types of Learning in Machine Learning:

  1. Supervised Learning:

    • The model is trained using labeled data (input-output pairs).

    • It learns the relationship between input and output to make predictions.

    • Examples: Classification (e.G., spam detection), Regression (e.G., price prediction).

  2. Unsupervised Learning:

    • The model is trained using unlabeled data (no predefined output).

    • It finds hidden patterns or

...
Continue reading "Concept of education" »