Maximum Entropy Principle

The maximum entropy principle is one of the most important guiding motives in artificial artificial intelligence. Its roots emerge from a long tradition of probabilistic inference that goes back to Laplace and Occam’s Razor, i.e. the principle of parsimony. Let’s start with a simple example taken from Andreas Kraus’s Lecture notes in the ETH course of Probabilistic Artificial Intelligence: Consider a criminal trial with three suspects, A, B, and C. The collected evidence shows that suspect C can not have committed the crime, however it does not yield any information about sus- pects A and B. Clearly, any distribution respecting the data must assign zero probability of having committed the crime to suspect C. However, any distribution interpolating between (1, 0, 0) and (0, 1, 0) respects the data. The principle of indifference suggests that the desired distribution is $(\frac{1}{2}, \frac{1}{2}, 0)$, and indeed, any alterna- tive distribution seems unreasonable. ...

Reading Time: 2 minutes ·  By Xuanqiang 'Angelo' Huang

Optimal Minimax Facility Location

In this note we will briefly present one problem common in operation research. The practical needs that formulated this problem are quite obvious: choosing the best location to build some important services for communities. The optimal minimax facility location refers to the placement of a facility (such as a warehouse, hospital, or service center) in such a way that the maximum distance or cost between the facility and any of the demand points (such as customers, patients, or users) is minimized. This approach is particularly useful when the goal is to ensure that no demand point is too far from the facility, thus providing a form of equity in service delivery. ...

Reading Time: 3 minutes ·  By Xuanqiang 'Angelo' Huang

Structured Query Language

Little bits of history It was invented in 1970 in Almaden (San Jose) by IBM (Don Chamberlin, Raymond Boyce worked on this) for the first relational database, called system R. Then for copyright issues it hasn’t been called SEQUEL, so they branded it as SQL. SQL is a declarative language With declaratives language there is a separation between what I call the intentionality and the actual process. In declarative languages we just say what we want the result to be, and don’t care what the actual implementation is like. This allows queries to be executed and optimized in different ways, even if the query on the surface is the same ...

Reading Time: 7 minutes ·  By Xuanqiang 'Angelo' Huang

Successioni

3.1 Successioni $$ \begin{cases} f: \mathbb{N} \to \mathbb{R} \\ n \to f(n) \\ \{a\}_{n \in \mathbb{N}} \vee a_n \end{cases} $$$$ \left\{ a \right\} _{n \in \mathbb{N}} $$3.1.1 Immagine e successione L’immagine di una successione (l’insieme dei suoi elementi) non è una successione! la successione è anche ordinata. 3.1.2 Limitazioni della successione Come per gli insiemi si può definire se l’insieme è limitato superiormente, inferiormente o entrambi, a seconda di come lo definiamo in questo modo possiamo poi farci altri ragionamenti ...

Reading Time: 5 minutes ·  By Xuanqiang 'Angelo' Huang

Uniform Resource Identifier

URI Sono stata LA vera invenzione di Berners Lee accennati in Storia del web. Il problema è avere un modo per identificare una risorsa in modo univoco sull’internet. Introduzione La risorsa Una risorsa è qualunque struttura che sia oggetto di scambio tra applicazioni all’interno del World Wide Web. Ora una risorsa può essere qualunque cosa, non solamente solo un file! Quindi è agnostico rispetto a contenuto oppure metodo di memorizzazione del dato, appare anche in questo ambiente importante vedere quanto siano importanti standard che permettano una comunicazione ...

Reading Time: 6 minutes ·  By Xuanqiang 'Angelo' Huang

Relational Algebra

Introduzione all’algebra relazionale Confronto con relazioni matematiche Le relazioni come le intendiamo in database sono leggermente diverse rispetto a quelle presenti per le relazioni matematiche: Non conta l’ordine Ci sono gli attributi Per il resto se introduciamo questo sistema per tenere conto delle astrazioni, possiamo analizzarle matematicamente, e questo ci fornisce qualche sicurezza in più diciamo. Four types of operations Set operations: union, intersection, difference Filter queries: Projecting or selecting Renaming queries: renames Join: correlare tuple di relazioni diverse Definition of tuples Le relazioni sono esattamente quelle definite in matematica, però noi aggiungiamo anche gli attributi, in modo da poter considerare l’ordine delle colonne non importante. ...

Reading Time: 8 minutes ·  By Xuanqiang 'Angelo' Huang

Bloom Filters

How Bloom Filters Work A Bloom filter is a space-efficient probabilistic data structure used to test whether an element is possibly in a set or definitely not in a set. It allows for false positives but never false negatives. One example of application is the membership query in Wide Column Storage, HBase. They make document lookup faster by completely skipping some HFiles. Structure and Initialization A Bloom filter consists of: A bit array of size $m$, initialized to all 0s. $k$ independent hash functions, each mapping an input element to one of the $m$ positions in the bit array. Common operations Insertion of an Element To insert an element $x$: ...

Reading Time: 2 minutes ·  By Xuanqiang 'Angelo' Huang

Gestione delle risorse

Gestione delle risorse Introduzione Definizione classe, fungibilità Classe di risorse sono un insieme di risorse fra loro equivalenti (nel senso che uno può rimpiazzare l’uso dell’altro), anche detti fungibili. Statico o dinamico Anche in economia ci sono tali definizioni! Queste risorse possono essere allocate staticamente o dinamicamente, in modo simile a quanto abbiamo detto in Gestione della memoria. Statico quando già in fase di compilazione del processo, o di avviamento del processo gli dò la memoria, e quella sarà per tutti il tempo della sua vita. ...

Reading Time: 8 minutes ·  By Xuanqiang 'Angelo' Huang

Entropy

Questo è stato creato da 1948 Shannon in (Shannon 1948). Questa nozione è basata sulla nozione di probabilità, perché le cose rare sono più informative rispetto a qualcosa che accade spesso. Introduction to Entropy The Shannon Information Content $$ h(x = a_{i}) = \log_{2}\frac{1}{P(x = a_{i})} $$ We will see that the entropy is a weighted average of the information, so the expected information content in a distribution. Kolmogorov complexity è un modo diverso per definire la complessità. Legato è Neural Networks#Kullback-Leibler Divergence. ...

Reading Time: 12 minutes ·  By Xuanqiang 'Angelo' Huang

Merkle Trees

Merkle Trees: A Fundamental Structure in Cryptography Merkle trees, introduced by Ralph Merkle in 1979, are a pivotal data structure in cryptographic systems. These binary hash trees enable efficient and secure verification of data integrity within distributed systems. Their design capitalizes on hash functions to reduce computational overhead, making them indispensable in blockchain and peer-to-peer networks. What are Merkle Trees? Structure and Construction A Merkle tree is a rooted binary tree where: ...

Reading Time: 2 minutes ·  By Xuanqiang 'Angelo' Huang