Theory of Computing

Messaggioda vl4d » 22/09/2007, 10:19

Io lancio il sasso, stile TdN for Dummies.
Ecco il primo problema:

Mostrare che il linguaggio
$S={<M>|" M e' una TM che accetta "w^r", per ogni "r\in NN", quando accetta w"}$
e' indecidibile.
Go to the roots, of these calculations! Group the operations.
Classify them according to their complexities rather than their appearances!
This, I believe, is the mission of future mathematicians. This is the road on which I am embarking in this work.
Evariste Galois
Avatar utente
vl4d
Average Member
Average Member
 
Messaggio: 483 di 515
Iscritto il: 05/05/2006, 14:49

Messaggioda vl4d » 26/09/2007, 15:51

Mmm... provo un ultimo tentativo, magari P vs. NP e' piu' interessante ...

Se $P=NP$ allora ogni $A \in P$, ad eccezione di $\emptyset$ e di $\Sigma^*$,
e' $NP$-completo.
Go to the roots, of these calculations! Group the operations.
Classify them according to their complexities rather than their appearances!
This, I believe, is the mission of future mathematicians. This is the road on which I am embarking in this work.
Evariste Galois
Avatar utente
vl4d
Average Member
Average Member
 
Messaggio: 491 di 515
Iscritto il: 05/05/2006, 14:49

Messaggioda TomSawyer » 26/09/2007, 16:40

Posto anch'io un problema carino, così c'è più scelta. (anche se è meno "theoretic"). Dato $S \subset {1,...,2n}$ con $|S|=n+1$, trovare un algoritmo che restituisca in output, se presente, una coppia di elementi di $S$ tali che uno divida l'altro.

ps: si può fare anche in $O(n)$.
I watched a snail crawl along the edge of a straight razor. That's my dream. That's my nightmare. Crawling, slithering, along the edge of a straight... razor... and surviving., Walter E. Kurtz
Avatar utente
TomSawyer
Advanced Member
Advanced Member
 
Messaggio: 1996 di 2270
Iscritto il: 16/11/2005, 16:18

Messaggioda vl4d » 26/09/2007, 18:18

Su "input" $S = {s_1, \cdots, s_{n+1}}$,
notiamo che ogni $s_i \in S$ puo' essere scritto $s_i=2^m \cdot q$ con $q$ dispari. (*)
Notiamo inoltre che ${1,\cdots, 2n}$ contiene $n$ numeri dispari.
Prepariamo allora $n$ insiemi $S_1, S_3 \cdots, S_{2n-1}$
I)Per ogni $i=1,\cdots, n$ :
1) Poniamo $S_{d} = S_{d}\cup {s_i}$ quando esiste $m$ t.c. $s_i = 2^m\cdot d$
2) Se $|S_d| = 2$, ritorniamo $S_d$, altrimenti andiamo in I)

La complessita' dell'algo e' $O(n)$ se supponiamo
di conoscere gia' la rappresentazione in (*),
altrimenti non sono cosi' sicuro... Di sicuro resta $O(nlog n)$...

Proprio un bel problema comunque, l'idea era questa?
Go to the roots, of these calculations! Group the operations.
Classify them according to their complexities rather than their appearances!
This, I believe, is the mission of future mathematicians. This is the road on which I am embarking in this work.
Evariste Galois
Avatar utente
vl4d
Average Member
Average Member
 
Messaggio: 492 di 515
Iscritto il: 05/05/2006, 14:49

Messaggioda TomSawyer » 26/09/2007, 21:59

Proprio quella l'idea. Potrebbe sembrare che non si possa fare in tempo lineare, ma quel trucchetto facilita tutto.
I watched a snail crawl along the edge of a straight razor. That's my dream. That's my nightmare. Crawling, slithering, along the edge of a straight... razor... and surviving., Walter E. Kurtz
Avatar utente
TomSawyer
Advanced Member
Advanced Member
 
Messaggio: 1998 di 2270
Iscritto il: 16/11/2005, 16:18

Messaggioda TomSawyer » 29/09/2007, 23:49

vl4d ha scritto:Se $P=NP$ allora ogni $A \in P$, ad eccezione di $\emptyset$ e di $\Sigma^*$,
e' $NP$-completo.

Perché ad eccezione di $\emptyset$ e di $\Sigma^*$? Dovrebbero essere anche loro NPC, se P=NP..
I watched a snail crawl along the edge of a straight razor. That's my dream. That's my nightmare. Crawling, slithering, along the edge of a straight... razor... and surviving., Walter E. Kurtz
Avatar utente
TomSawyer
Advanced Member
Advanced Member
 
Messaggio: 2012 di 2270
Iscritto il: 16/11/2005, 16:18

Messaggioda vl4d » 30/09/2007, 08:37

Sono gli unici linguaggi tali che loro stessi, oppure i loro complementi,
sono vuoti. (questa e' anche la chiave per il resto dell'esercizio).
Go to the roots, of these calculations! Group the operations.
Classify them according to their complexities rather than their appearances!
This, I believe, is the mission of future mathematicians. This is the road on which I am embarking in this work.
Evariste Galois
Avatar utente
vl4d
Average Member
Average Member
 
Messaggio: 493 di 515
Iscritto il: 05/05/2006, 14:49

Messaggioda TomSawyer » 11/02/2008, 09:37

Eccone un altro in $O(n)$. Chiamo inversione di due elementi in un array $A$ una coppia $(i,j)$ di indici tali $i<j$ e $A[i]>A[j]$. Supponendo che l'array contenga solo $0,1,2$, calcolare in $O(n)$ il numero totale di inversioni, con $n$ la dimensione dell'array.
I watched a snail crawl along the edge of a straight razor. That's my dream. That's my nightmare. Crawling, slithering, along the edge of a straight... razor... and surviving., Walter E. Kurtz
Avatar utente
TomSawyer
Advanced Member
Advanced Member
 
Messaggio: 2236 di 2270
Iscritto il: 16/11/2005, 16:18


Torna a Algebra, logica, teoria dei numeri e matematica discreta

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite