Notes, summaries, assignments, exams, and problems for Computers

Sort by
Subject
Level

Prolog Predicates & Game AI Algorithms

Classified in Computers

Written on in English with a size of 3.47 KB

funcition min-max(pos,out-eval,out-best_move,in-whomoves,in-max_level){max=-?;min=?;best_move=0;if(level==0){evaluation=eval_(pos);best_move=0; return;}else{foi(i=0;i<num_succ(i);++i){succi=succesor(i);if(whomoves=='max'){min-max(succi,evaluation,best_move,'min', max_level-1);if(evaluation>max){max=evaluation; best_move=i;}}else{min-max(succi,evaluation,best_move,'max', max_level-1);}if(evaluation<min){min=evaluation;best_move=i;}}}}

funcition ??(pos,level,quien_juega,*eval,mejor_move,?,?){if(terminal(pos)||(level==0){*eval=eval(pos);return;}n_succ= num_succ(pos);for(i=0;i<n_succ;++i{if(quien_juega=='max'){succi=succesor(pos,i);??(succi,level-1,'min',evali, mejor_movi,?,?);if(evali>?){?=evali;*eval=?; *mejor_move=i;}if(?>?)... Continue reading "Prolog Predicates & Game AI Algorithms" »

Key Concepts in File Organization and Data Access Methods

Classified in Computers

Written on in English with a size of 3.37 KB

Internal vs. External Files in Data Processing

External File: A data structure used to store information in secondary memory (e.g., on a hard drive or SSD).

Internal File: A variable representing a data structure in main memory used to process information within an application.

Understanding File Organization Types

File organization refers to the way data records are stored on a storage medium. The type of organization is determined when the file is created. The primary types are:

  • Sequential Organization

    In a sequential file, records are written or recorded consecutively, often in adjacent physical positions, following the same order in which they were introduced. To access the n-th record, you must first read the preceding n-1 records. This results

... Continue reading "Key Concepts in File Organization and Data Access Methods" »

Memory Management Concepts and Techniques

Classified in Computers

Written on in English with a size of 2.78 KB

Memory Management Definition

Memory management is the process of:

  • Bringing programs into the main memory to be executed by the processor.
  • Dynamically dividing the part of main memory to accommodate multiple processes.
  • Allocating memory efficiently for packaging processes, preventing the processor from being idle.
  • Enabling the execution of a larger program than is available in real memory.

Memory Management Requirements

1. Relocation

  • Ability to move a program from one region to another of the main memory without invalidating the memory references.
  • The processor hardware and operating system translate the memory references' addresses to the final physical memory addresses.

2. Protection

Each process must be protected from unwanted interference from other... Continue reading "Memory Management Concepts and Techniques" »

Network Management, Domains, and Resource Sharing Configuration

Classified in Computers

Written on in English with a size of 3.47 KB

Network Management Fundamentals

Network management consists of deciding how to configure the network, joining teams, determining what permissions users will have, and handling all tasks related to the operation of the network.

Client/Server Network Architecture

A client/server network consists of the following components:

  • Server: Network equipment more powerful than the others, acting as the central controller. The server sets up the network and its policies.
  • Client Computers: Devices connected to the server that depend on it for resources and services.
  • Shares (Resources): Devices like printers, faxes, and other peripherals used by all network users.
  • Connection Devices: Equipment that connects all the computers composing the network (e.g., switches,
... Continue reading "Network Management, Domains, and Resource Sharing Configuration" »

Database Management System Concepts and Functions

Classified in Computers

Written on in English with a size of 2.49 KB

Database Terminology and Structure

Tip: A set of characters with some meaning can be numeric, alphanumeric, or alphabetical.

Information: Ordered set of data that are managed according to user needs.

Field: It is the smallest unit to which we refer to in a program.

Record: Collection of equal fields or different types.

File: Collection of records stored homogeneously following a structure.

Database: Collection of interrelated files that typically contain information about a particular company.

DBMS: A computer-based system (software) that manages a database or a collection of databases or files.

Uses and Functions of a DBMS

  • Allow users to access and manipulate the database.
  • Provide administrators with the tools to perform maintenance and data management.
... Continue reading "Database Management System Concepts and Functions" »

Stack ADT Implementation: Static vs Dynamic Representations

Classified in Computers

Written on in English with a size of 2.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" »

Understanding Fuzzy Logic and Backpropagation in Neural Networks

Classified in Computers

Written on in English with a size of 2.43 KB

Fuzzy Logic

Fuzzy logic extends Boolean logic, allowing intermediate values between TRUE (1) and FALSE (0), such as MAYBE (0.5). A fuzzy logic value can be any value within the range of 0 to 1. This logic incorporates statistical concepts, especially in inference. Fuzzy logic implementations enable control devices to handle indeterminate states, allowing for the evaluation of non-quantifiable concepts. Practical examples include evaluating temperature (hot, warm, medium), happiness (bright, happy, apathetic, sad), and the veracity of an argument (absolutely right, right, counter-argumentative, inconsistent, false, totally wrong).

Fuzzy logic is a research area focused on uncertainty treatment and a family of mathematical models dedicated to... Continue reading "Understanding Fuzzy Logic and Backpropagation in Neural Networks" »

C++ Algorithms: Frequency Counting, ISBN Validation, and Horner's Method

Classified in Computers

Written on in English with a size of 5.51 KB

Counting Frequencies Algorithm in C++

This C++ implementation demonstrates a method for counting the frequencies of input integers while maintaining a sorted list of unique values. It utilizes custom functions for insertion and shifting elements.

Data Structure Definition

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

struct lon{
    int dig, vez; // digit, count (vezes)
};

Helper Functions: Shifting and Positioning

The mover function shifts elements to make space for a new insertion, and donde_poner finds the correct sorted position for a new digit.

void mover(vector<lon>& a, const int& pos, const int& ini){
    for(int i = pos; i > ini; --i){
        a[i].dig = a[i-1].dig;
        a[i].vez = a[i-1]
... Continue reading "C++ Algorithms: Frequency Counting, ISBN Validation, and Horner's Method" »

TCP/IP Transport Layer Fundamentals Explained

Classified in Computers

Written on in English with a size of 4.01 KB

TCP/IP Transport Layer Fundamentals

1. Transport Layer Header & Session Description

On the basis of the transport layer header shown in the diagram (not provided), what statements describe the established session?

This TCP header contains a Telnet request.

2. TCP/IP Data Encapsulation & Known Port Numbers

With TCP/IP data encapsulation, which range of port numbers identifies all known applications?

0-1023

3. Purpose of Port Numbers in TCP Headers

Why are port numbers included in the TCP header of a segment?

To allow a receiver to transmit data to the appropriate application.

4. OSI Model Layer for Reliable Flow Control

What OSI model layer is responsible for regulating the flow of information from the source to destination, reliably and accurately?... Continue reading "TCP/IP Transport Layer Fundamentals Explained" »

CPU Register Types and Functions

Classified in Computers

Written on in English with a size of 3.48 KB

CPU Internal Registers

Internal registers are a set of temporary storage units available to the Central Processing Unit (CPU) for its operation. They serve as high-speed storage locations within the CPU itself.

The size of these registers depends on the function to be performed and the type of CPU. They generally match the size of the Data Bus or the Address Bus.

Classification of CPU Registers

CPU registers are broadly classified into two main types:

  • Inaccessible Registers: Not directly controllable by the user.
  • Accessible Registers: Controllable by the user.

Inaccessible Registers

Inaccessible registers are those whose operation or content the user cannot directly control. They are for the exclusive and restricted use of the CPU. From the user's... Continue reading "CPU Register Types and Functions" »