Notes, summaries, assignments, exams, and problems for Computer science

Core Concepts in Data Processing and Information Retrieval

Computer science3.3 KB

Fundamental Concepts in Knowledge and Data

  • The most fundamental combiner is the unification of the Self with itself, which gives rise to the knower, the process of knowing, and the known.
  • Normalization is a mathematically interesting, bottom-up technique for producing a set of relations with desirable properties from a set of mathematical dependencies in the data.
  • A graphical technique employed by Vedic science is the unified field chart, which provides a holistic overview of a discipline and links all knowledge with the Self.

Data Compression Techniques

Variable-Length Integer Coding (VarInt)

A simple approach to compression is to use only as many bytes as necessary to represent an integer. This technique is known as variable-length integer coding...

Continue reading "Core Concepts in Data Processing and Information Retrieval" »

A Glossary of Computer and Internet Terms

Computer science3.71 KB

ASCII Code

American Standard Code for Information Interchange. A code in which each alphanumeric character is represented as a number from 0 to 127, translated into a 7-bit binary code for the computer. ASCII is used by most microcomputers and printers, and because of this, text-only files can be transferred easily between different kinds of computers.

Availability

A measure of how easy or difficult it is to obtain a piece of hardware or a computer application.

Backbone

High-speed lines or connections that form the major access pathways within the Internet.

Bandwidth

The capacity of a networked connection. Bandwidth determines how much data can be sent along the networked wires. Bandwidth is particularly important for Internet connections, since greater...

Continue reading "A Glossary of Computer and Internet Terms" »

Understanding Counting Principles, Knowledge Types, and Geometric Thinking

Computer science3.56 KB

The Counting Principles

Counting is the action of finding the number of elements in a finite set of objects. Here are the key principles:

  1. The Stable-Order Principle: To count effectively, the list of words used (like one, two, three) must be in a repeatable order.
  2. The One-to-One Principle: This involves assigning one, and only one, distinct counting word to each item being counted.
  3. The Cardinal Principle: When the one-to-one and stable-order principles are followed, the number name given to the final object in a collection represents the total number of items in that collection.
  4. The Order-Irrelevance Principle: This principle highlights that the order in which items are counted doesn't affect the total count.
  5. The Abstraction Principle: These counting
...
Continue reading "Understanding Counting Principles, Knowledge Types, and Geometric Thinking" »

Digital Logic Design: Examples in VHDL

Computer science5.88 KB

Behavioral Architecture of a State Machine

This VHDL code describes the behavioral architecture of a state machine.

TYPE tipo_estado IS (DET0, DET0a1, DET1a0, DET1);
signal Estado_actual : tipo_estado;
signal Estado_siguiente : tipo_estado;
begin
Registro_estado: process (clk, reset)
begin
if reset='1' then Estado_actual <= DET0;
elsif (clk'event and clk='1') then
Estado_actual <= Estado_siguiente;
end if;
end process Registro_estado;
Cambio_Estado: process (Dato, Estado_actual)
begin
Estado_siguiente <= Estado_actual;
case Estado_actual is
when DET0 => if (Dato='1') then Estado_siguiente <= DET0a1;
else Estado_siguiente <= DET0;
end if;
when DET0a1 => if (Dato='1') then Estado_siguiente <= DET1;
else Estado_siguiente <= DET1a0;
end if;
...
Continue reading "Digital Logic Design: Examples in VHDL" »

Computer Architecture Basics and Performance

Computer science3.43 KB

Introduction to Architecture

  • Instruction Set Architecture (ISA): An assembly language programmer's view of the microprocessor.
  • Assembler: Translates symbolic assembly language code into binary machine language code.

Computer Performance Metrics

  • Execution Time (Response Time): Time to complete a program or task.
  • Throughput (Bandwidth): Number of programs or tasks completed per time unit.
  • Execution Time (texec, i.e., elapsed time, wall time, real time, response time): Elapsed seconds from start to finish. Includes:
    • Executing instructions
    • Disk access
    • Memory access
    • I/O activities
    • OS overhead
  • User CPU Time (tcpu(user)): Seconds the CPU spends executing the program's instructions.
  • System CPU Time (tcpu(sys)): Seconds the CPU spends executing OS (kernel) instructions
...
Continue reading "Computer Architecture Basics and Performance" »

Microsoft Access Query Design and Data Management FAQ

Computer science3.4 KB

Microsoft Access Query Fundamentals

  • Query Creation: Queries are built using the Query Wizard, which prompts for necessary information.
  • Datasheet Behavior: When a query is run, the datasheet contents are temporary.
  • Field Ordering: The display order of fields in a query is determined by their order in the Design Grid.
  • Execution: To view query results, you must run the query.
  • Field Selection: Double-clicking the field list title bar in the design window will highlight all fields.
  • Adding Fields: You can automatically include all table fields by double-clicking the asterisk in the Field List box.

Managing Related Data and Records

  • Multi-Table Queries: Data can be extracted from multiple tables in one query, even if the tables are separate.
  • Referential Integrity:
...
Continue reading "Microsoft Access Query Design and Data Management FAQ" »

Microsoft Access Core Concepts and Functions

Computer science3.87 KB

Fundamental Database Concepts

What is a datasheet?

When you first open a datasheet, Microsoft Access selects the first field value in the first record.

What is a table?

All fields for a specific individual or place can be grouped together as a table.

How can a field be described?

A field can be described as an attribute.

What is a primary key?

A field, or a combination of fields, that has a unique value is a primary key.

What is a requirement for a primary key?

A primary key must contain a unique value for each record within the table.

What is a foreign key?

A field that is defined in one table and is also a primary key in a different table is a foreign key.

What is a requirement for a foreign key?

Every foreign key must match the field value of a primary

...
Continue reading "Microsoft Access Core Concepts and Functions" »

Database Management System: Key Concepts and Features

Computer science3.9 KB

Why do you have a primary key?

A primary key ensures UNIQUE DATA.

Form Design Views

In Form View, you cannot make any design changes to a form.

Checking Field Lengths

Martha is concerned that her form data may be longer in length than the size of the field control. To check this, she should use Print View.

Handling Primary Key Changes

If you choose the Cascade Update Related Fields Option, Access permits the change in value to the primary key and changes the appropriate foreign key values in the related table, thereby eliminating the possibility of inconsistent data in Yuka's database.

Resizing Columns

You can resize columns easily in Layout View.

Activating the Find Command

You can activate the Find command from the button on the Home tab.

Saving Database

...
Continue reading "Database Management System: Key Concepts and Features" »

Sequential Systems and Computer Memory Essentials

Computer science2.56 KB

Sequential Systems Design

A systematic way of designing any machine that passes through different states. Examples include counters, traffic lights, and vending machines. Generally called Finite State Machines/Automatas.

Mealy Machine

Outputs are a function of both inputs and the current state.

Moore Machine

Outputs are a function of the current state only.

Computer Memory

Part of the computer that stores information: instructions and data.

Organization:

Address: Identifies memory position

Content: Stored information

Memory Cell

Minimum storing element: one bit.

Word

Group of bits implied in each memory operation (8, 16, 32, 64, ... bits). It defines data bus size.

Basic Operations

Read (R) and Write (W)

Capacity

Maximum quantity of information that a memory

...

Continue reading "Sequential Systems and Computer Memory Essentials" »

C++ Priority Queue Implementation: Code & Explanation

Computer science3.58 KB

C++ Priority Queue Implementation

This document provides a C++ implementation of a priority queue using a heap data structure. The code includes the class definition, member functions, and supporting utilities.

Priority Queue Class Definition


#ifndef priority_queue_h_
#define priority_queue_h_

#include <iostream>
#include <vector>
#include <cassert>

template <class T>
class priority_queue {
private:
    std::vector<T> m_heap;

public:
    priority_queue() {}

    priority_queue(std::vector<T> const& values)
    {
        m_heap = values;
        for (int i = 0; i < m_heap.size(); i++){
            percolate_down(i);
            for (int j = i; j < m_heap.size(); j++){
                percolate_down(
...
Continue reading "C++ Priority Queue Implementation: Code & Explanation" »