Notes, summaries, assignments, exams, and exercises for Computer science for Baccalaureate

Effective Information Processing and Search Techniques

Computer science2.94 KB

Information Processing

Companies collect data continuously from suppliers, clients, partners, etc., but this information is not very valuable unless it is properly classified and updated.

Information processing is a set of operations performed with the information obtained from different sources and includes the following stages:

Information Search > Classification > Selection > Interpretation & Presentation

Information Search

When collecting information, companies may choose to obtain it directly (called internal information) or from third parties (external information). In both cases, the source of information is primary when it is obtained first-hand from direct contact, or it can be secondary when it is collected from other sources....

Continue reading "Effective Information Processing and Search Techniques" »

Data Mining and Machine Learning Techniques: A Comprehensive Overview

Computer science4.37 KB

KDD-- CRISP-DM = business understanding, data understanding, data prep, modeling, evaluation, deployment-- KDD- selection, preprocessing, transformation, mining, interp/eval-- classification = most frequently used, machine learning (supervised), output is nominal or ordinal categorical in nature -- assessment methods = predictive accuracy, speed, robustnest, scalability, interpretability-- confusion matrix formulae = accuracy = (TP + TN)/(TP+TN+FP+FN); true positive rate = (TP)/(TP+FN); true negative = TN/(TN+FP); precision = (TP)/(TP+FP); recall = (TP)/(TP+FN) -- overfitting = excessively complex model, can give bad predictions, underfitting- too flexible, also gives bad predictions-- k-fold cross validation- split data into k mutually exclusive...

Continue reading "Data Mining and Machine Learning Techniques: A Comprehensive Overview" »

How Cell Phones Work: From Analog to Digital

Computer science2.15 KB

The Evolution of Mobile Phones

Mobile phones, also known as cell phones, emerged in the 1980s as bulky, analog devices relying on unencoded radio wave transmissions. These early models quickly evolved, shrinking in size and transitioning to digital technology, ushering in the second generation (2G) era. This shift enabled faster transmission speeds and paved the way for features like images, messaging, and sound.

Advancements in Technology: 3G and 4G

The early 2000s witnessed remarkable technological leaps with the introduction of 3G in 2001, followed by 3G+ and 4G. These advancements significantly boosted speed and capacity, transforming mobile phones into versatile multimedia devices capable of much more than just making calls.

How Cell Phones

...
Continue reading "How Cell Phones Work: From Analog to Digital" »

Layer 3 Versus Layer 2 Packet Fragmentation Analysis

Computer science3.45 KB

Packet Fragmentation: Layer 3 vs. Layer 2

As mentioned in the “Link-Layer Fragmentation and Interleaving” section, PPP, Frame Relay, ATM, and other WAN technologies support fragmenting packets (frames) at Layer 2. As you may have learned in basic networking classes, IP can also fragment packets at Layer 3. What are some advantages and disadvantages of fragmenting at Layer 3 versus fragmenting at Layer 2?

Advantages and Disadvantages

  • Advantages (Layer 3 Fragmentation): Large packets can be transmitted at Layer 2 as fragmentation is done at Layer 3. This reduces the number of acknowledgment exchanges. Also, maintaining the order of fragments to ensure the order of transmission and reassembly is not required.
  • Disadvantages (Layer 3 Fragmentation)
...
Continue reading "Layer 3 Versus Layer 2 Packet Fragmentation Analysis" »

Stack ADT Implementation: Static vs Dynamic Representations

Computer science2.72 KB

Static Representation of a Stack ADT

In which case will we use a static representation of a Stack ADT?

We use this when the size of all the stacks we need in our application is the same. The static representation requires knowing the maximum size at compile time; that is, knowing in advance the number of items that the stacks used in this application will contain.

Pseudostatic Representation of a Stack ADT

When should we use a pseudostatic representation of a Stack ADT?

This is used when it is convenient to utilize stacks of different sizes within a program. In this representation, the maximum size of a stack is not the same for all stacks and is set at runtime when it is created. The user will be asked for the size of the stack at the time of creation,...

Continue reading "Stack ADT Implementation: Static vs Dynamic Representations" »

Linux Software RAID and Apache Web Server Management

Computer science2.56 KB

Software RAID Configuration

  • Use fdisk or similar tools to create partitions with type 0xfd (Linux RAID). Remember to run partprobe.
  • Create and define RAID devices using mdadm: mdadm -C /dev/md0 --chunk=64 --level=5 --raid-devices=3 /dev/sd[b,c,d]1
  • Format each RAID device with a filesystem: mkfs.ext3 -j /dev/md0
  • Test RAID devices:
    • mdadm --detail /dev/md0
    • mdmonitor provides the notification service.

Software RAID Testing and Reclaiming

  • Simulating disk failure: mdadm /dev/md0 -f /dev/sda1
  • Recovering from failure:
    • Replace the failed disk.
    • Rebuild the partitions on the new disk.
    • mdadm /dev/md0 -a /dev/sda1
  • Monitor /proc/mdstat and syslog for error messages.
  • Managing arrays:
    • Disassemble: mdadm -S /dev/md0
    • Assemble: mdadm -A -s

Apache Web Server Management

In RHEL5,...

Continue reading "Linux Software RAID and Apache Web Server Management" »

Database Essentials: Components, Data Types, and Relationships

Computer science3.71 KB

Database Fundamentals

A database is a set of tools designed to manage information related to a specific topic, such as books or CDs.

Core Database Components

  • Tables

    Tables store data in an organized manner, featuring fields that allow information to be handled effectively.

  • Queries

    Queries are tools that provide answers to questions that may arise about the stored data.

  • Forms

    Forms are data objects that present information differently from a table, offering a more pleasant, colorful, and effective user interface.

  • Reports

    Reports allow you to print stored data in formats designed by the user.

Understanding Data Types

Data types define the kind of values a field can hold. Here are common data types:

  • Text (VARCHAR)

    Can be formed by letters, numbers, and spaces,

...
Continue reading "Database Essentials: Components, Data Types, and Relationships" »

SOA, Cloud Architecture and Computing Paradigms Explained

Computer science9.75 KB

Explain How Service-Oriented Architecture (SOA) Acts as a Technological Driver for Cloud Computing (10 Marks)

Service-Oriented Architecture (SOA) is a software design approach in which applications are built using independent, reusable services that communicate through standard interfaces.

Main Components of SOA

  • Service Provider: Creates and offers a service.

  • Service Consumer: Requests and uses the service.

  • Service Registry: Stores information about available services.

  • Service Contract: Defines the interface, rules, and communication requirements of a service.

  • Communication Protocol: Enables services to exchange information using technologies such as HTTP and web APIs.

SOA Architecture

Service Consumer
Requests a service

Service Interface / Communication

Service...

Continue reading "SOA, Cloud Architecture and Computing Paradigms Explained" »

C++ Priority Queue Solutions: Greedy Algorithms and Heap Examples

Computer science4.6 KB

C++ Priority Queue Examples

The following code samples demonstrate how to use the priority_queue container from the C++ Standard Template Library (STL) to solve common greedy and heap-based problems.

1. Minimum Cost to Merge Ropes (Huffman-style)

This program repeatedly merges the two smallest values using a min-heap and accumulates the total cost.

#include <iostream>
#include <queue>
#include <vector>
using namespace std;

int main() {
int n;
cin >> n;

priority_queue<long long, vector<long long>, greater<long long>> q;
for (int i = 0; i < n; i++) {
long long x;
cin >> x;
q.push(x);
}

long long ans = 0;
while (q.size() > 1) {
long long a = q.top();...

Continue reading "C++ Priority Queue Solutions: Greedy Algorithms and Heap Examples" »

Neural Networks: Core Concepts and Architectures

Computer science161.05 KB

1. What is ANN? What is a Neuron?

Artificial Neural Networks (ANNs) are inspired by the biological neural networks of the human brain. They are a set of algorithms designed to recognize patterns. ANN consists of layers: input layer, hidden layers, and output layer. Each layer is made up of nodes called neurons.

A neuron in ANN is a mathematical function modeled after a biological neuron. It receives one or more inputs, applies a weight and bias to them, sums them up, and passes the result through an activation function to produce output.

ANNs are widely used in tasks like image recognition, natural language processing, and more. They learn from data by adjusting weights using optimization algorithms like gradient descent.

2. What is Optimization

...
Continue reading "Neural Networks: Core Concepts and Architectures" »