Cook-Levin and Savitch

Cook Levin theorem is important because says that in 1971 if $SAT \in P$ then $NP = P$. We will start with this idea to define the concept of NP-completeness. Let’s start with the basics. Poly-reduction Def: poly-reduction🟩 $$ x \in L' \iff f(x) \in L $$ This is very similar to the Halting Theorem and Reducibility#Mapping reducibility. The difference is that it needs to be polynomially-bounded, so to say, it is efficient function. ...

4 min Â· Xuanqiang 'Angelo' Huang

Cookie e autenticazione

Cookies Gli utilizzi più soliti sono per Autenticazione e per Autorizzazione, perché sono delle informazioni che il server genera e mette al client, come se fossero dei segreti cifrati. Cookie Questi sono una estensione di netscape, che si appoggiano al protocollo HTTP per implementare certe funzionalità (soprattutto il fatto di essere stateless, quindi è utile per avere informazioni sugli stati su qualcosa.) Slide cookie Vengon utilizzati header specifici per settare il cookie. ...

3 min Â· Xuanqiang 'Angelo' Huang

Corrente Elettrica

Introduzione alla corrente elettrica Considerazioni generali Elettroni liberi nei materiali Ricorda che è un reticolo cristallino, con un elettrone nell’ultimo orbitale poco legato, quindi facilmente ionizzabile, in cui gli elettroni si possono muovere facilmente, e abbiamo che $n \approx 8.5 \times 10^{28} \frac{e^{-}}{m^{3}}$ nel rame Per l’argento abbiamo 5.9 con stesso ordine di grandezza. Velocità media elettroni senza campo elettrico 🟩 $$ \vec{v}_{m} = \sum_{i = 1} ^{N} \frac{\vec{v}_{i}}{N} = 0 $$$$ \frac{1}{2} m_{e} v^{2} = \frac{3}{2} k T $$ Con $k = 1.38 \times 10 ^{-23} J / K$ questo da studiare in altro posto… ...

6 min Â· Xuanqiang 'Angelo' Huang

Costraint Satisfaction Problems

Definizione Caratteristiche Variabili Dominio per ogni variabile Costraints per ogni variabile Queste tre sono elementi che definiscono un problema di soddisfazione delle restrizioni, una soluzione è un assegnamento di variabili che soddisfi ogni restrizioone e sia all’interno del dominio Consistenza Vogliamo andare a limitare il dominio valutando le consistenze possibili Consistenza del punto Si può dire che un punto sia consistente se le sue variabili possibili non viola nessuna restrizione unaria: eg. se ho N e ho la restrizione n ≥ 0, allora avere tutto N è inconsistente nel punto. ...

2 min Â· Xuanqiang 'Angelo' Huang

Counterfactual Invariance

Machine learning cannot distinguish between causal and environment features. Shortcut learning Often we observe shortcut learning: the model learns some dataset dependent shortcuts (e.g. the machine that was used to take the X-ray) to make inference, but this is very brittle, and is not usually able to generalize. Shortcut learning happens when there are correlations in the test set between causal and non-causal features. Our object of interest should be the main focus, not the environment around, in most of the cases. For example, a camel in a grass land should still be recognized as a camel, not a cow. One solution could be engineering invariant representations which are independent of the environment. So having a kind of encoder that creates these representations. ...

9 min Â· Xuanqiang 'Angelo' Huang